mysql2sqlite icon indicating copy to clipboard operation
mysql2sqlite copied to clipboard

pick `CREATE VIEW` from 50001 comments

Open cn00 opened this issue 4 years ago • 1 comments

the feature result like this:

/*!50001 VIEW `kv_text_view` AS select `t`.`id` AS `id`,`t`.`l` AS `l`,`t2`.`p` AS `path` from (`kv_text_v155` `t` left join `file_list` `t2` on(`t`.`f` = `t2`.`id`)) group by `t`.`v` order by `t`.`f` * 10000 + `t`.`l` */;

CREATE VIEW `kv_text_view` AS select `t`.`id` AS `id`,`t`.`l` AS `l`,`t2`.`p` AS `path` from (`kv_text_v155` `t` left join `file_list` `t2` on(`t`.`f` = `t2`.`id`)) group by `t`.`v` order by `t`.`f` * 10000 + `t`.`l` ;

cn00 avatar Aug 27 '21 12:08 cn00

Hi, thanks for the pull request. Admittedly I'm quite hesitant to merge it without understanding the motivation a bit more.

These comments are for backwards compatibility with older mysql versions. My question is why would we want to support this "quirk" when we already support regular create view statements which should be part of the dump as non-comments if used with the options as readme.md says?

Could you elaborate a bit?

Thanks!

dumblob avatar Aug 29 '21 14:08 dumblob