I found a bug about "Run current query"

ffychina posted 5 years ago in General
the function of "Run current query" has a wrong that can't actually run the current line query, it will run whole sql in editor. just like that:
// two sql seperate by \r\n
select * from table_a
select * from table_b

when I put cursor at the line "select * from table_b" and right click "run current query", but the sql is not I expect, it's wrong: "select * from table_a select * from table_b", therefore, the error: "/* SQL Error (1064): You have an error in your SQL syntax" will be appear in log window.

however, I think this is a low level bug and it's easy to fix, I am hoping fix it sooner.

By the way, heidisql version is and exist this bug.

kalvaro posted 5 years ago
It's "Run current query", not line. A line is delimited by carriage returns, a query is delimited by semi-colon.

select * from table_a;
select * from table_b;
ffychina posted 5 years ago
thanks, it's different behavior with version 5. I will adapt this way. But if have a choice tetween semi-colon and carriage returns will be better, any way it's no important and is not a bug.
ansgar posted 5 years ago
HeidiSQL 5 did not have the "Run current query" action. Instead there was a "Run current line", which you likely used.

Now, there was quite some discussion on this "Run current line" action, so I finally turned it into a "Run current query", which now includes carriage returns, and is much more what most users need, while MySQL itself always supports multiple lines in a query.

Please login to leave a reply, or register at first.