Closed
Description
Description
Problem:
Exporting a view where the last line of the view definition is line-commented out results in an invalid script.
This is because the delimiter is appended to the last line of the view and ends up uncommented that way.
This mainly affects complete database exports where a syntax error breaks the script execution.
Example:
Expected behaviour:
Write valid syntax
Suggested Fix:
Terminate view definition with newline, or trim commented last lines.
Both approaches have the drawback of not replicating the original input perfectly.
Another option would be to throw an exception when editing a view through the GUI without a valid delimiter:
(GUI update log example result from above)
[12:18:41.143] ALTER ALGORITHM = UNDEFINED DEFINER=`root`@`127.0.0.1` SQL SECURITY DEFINER VIEW `export_bad` AS SELECT 'foo'
where true
-- and false ; ;;
HeidiSQL version
12.8.0.6955
Database server version
MariaDB 10.6.9, possibly any (My)SQL dialect
Reproduction recipe
See example images
Error/Backtrace
No response