I found a bug about "Run current query"

[expired user #6270]'s profile image [expired user #6270] posted 12 years ago in General Permalink
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 7.0.0.4053 and 7.0.0.4078 exist this bug.

kalvaro's profile image kalvaro posted 12 years ago Permalink
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;
[expired user #6270]'s profile image [expired user #6270] posted 12 years ago Permalink
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's profile image ansgar posted 12 years ago Permalink
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.