little-brother / sqlite-gui

Lightweight SQLite editor for Windows
GNU General Public License v2.0
1.09k stars 52 forks source link

Commented out query still executed #110

Closed jungle-boogie closed 2 years ago

jungle-boogie commented 2 years ago

Hi,

Take this query and run in:

select  json_group_array(json_object('id', id, 'title', title, 'price', price)) from books;

select id, title, price from books;

/*select * from books*/

Notice there are three tabs opened; 1 for the first query; 1 for the second query, and one for the commented out line.

Why would the commented out line have been executed?

Thanks!

little-brother commented 2 years ago

select 123; ;select 321; presents 3 queries. The second is an empty query.

But ok, I'll try to exclude empty queries from execution.

jungle-boogie commented 2 years ago

I get two results tabs:

image

But if I add --comment, I'll get three, with the third being the error.

little-brother commented 2 years ago

Yeah, select 123; /*abc*/;select 321; is a correct example. I already skip full empty queries. Now it's time for only-comments.

little-brother commented 2 years ago

Done.