You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Execute Current Line button in 'Execute SQL' tab runs multiple lines (Linux) #2440
doing an inner join executing current statement only through appropriatemenu button, will not stop execution at the comma and show results; instead will continue and execute next statement and hence show result of said immediately following statement.
What did you do?
Select Account.name, account.personemail from Account inner join ListNBRDoublon on ListNBRDoublon.personemail = account.personemail ; ;
select 3*5 ;
What did you expect to see?
result of inner join statement ie a table with Account.name, account.personemail
(that table appeared briefly until replaced by result of immiately following statement as was executed)
What did you see instead?
result of 3*5, ie, 15
Useful extra information
DB4S v3.12.0 [built for x86_64-little_endian-lp64] on Ubuntu 18.04.5 LTS (linux/5.4.0-48-generic) [x86_64]
using SQLCipher Version 3.4.1 (based on SQLite 3.30.1)
and Qt 5.9.5
Technically this is a duplicate of #2429.
If you only highlight the instructions you want to run, this helps matters, so highlight a line, run it, then highlight the next line.
Not a perfect solution, but its how I use SQL Server Management Studio...
Its a duplicate, as you're doing two queries, but the results window only shows the last query. While a bug, its easily worked around by only executing one instruction at a time, via selective highlighting. Its not ideal, but works fairly well once you get used to it. I tend to use one SQL tab with multiple queries so I can just select the one I want and run it.
Unfortunately I cannot reproduce it anymore as i changed my database too heavily.
If it helps, i was not using selective highlighting but was requesting a one instruction only execution by using the relevant button from db browser.
EDIT:
Giving it a second thoght: What you describe is wrong.
The bug is NOT that is shows the result of Second query only while I am doing 2 queries.
The bug is that I was requesting for execution of query 1 ONLY and it executed query one AND query 2; which was unexpected.
If you check my query above you will see that I tried to add additionna coma at the end of the query because it looked like it had missed somehow when parsing that it had already reached end of requested query, (and executed query 2 instead of halting).
I think it worth to mention, since I have the occasion, i am using that tool very often and really like it. Could hardly live without it.
Congratulation for the work.
Oh no, that's the issue - that's the bug (acknowledged in the other issue). If you were, it would have worked out OK. 😃
Hopefully someone will work out how to fix it, as its a common problem - especially if you use MS SQL Management Studio.
hard for me to understand how to view these as same error. DBBrowser is executing 2 queries where only the last one output is displayed, while I explicitely hit the button to execute ONE query, not two (and two were executed instead)
Furthermore, said bug is mentioning only ONE query, which output does not show the rows properly but the columns are shown properly.
While in my case, the output (both rows and column names) is correct for execution of query #2; the problem being, why on earth does it execute query #2 after #1, while being requested to execute query #1 only.
Sounds very different (though I can understand it could result from same technical bug, but outputs and execution are just at odds)
while I explicitely hit the button to execute ONE query
Apologies - so you pressed the 'Execute current line' button?
We've had many 'quirks' with this, as the parser can get confused with different lines depending on the OS (Linux vs Windows ... carriage returns vs carriage returns with line-feeds)
This works on Windows, but if you are pressing the 'execute current line', then yes, that's an error. Apologies - while you did mention 'the appropriate menu', I didn't appreciate that's the button you were referring to.
OK, if you put the text carat on line 1 and press that button, do you get the result of line 2?
Just making sure 100% the error is the error I'm reading.... :)
changed the title [-]2 issues with inner join -- issue 1[/-][+]Execute Current Line button in 'Execute SQL' tab runs multiple lines (Linux)[/+]on Oct 14, 2020
Yes, this is what I meant.
I put the text carat on line 1 and press that button,
then I can see the columns appearing for a very brief period of time (that query retruns a few thousands rows) and i have no time to see the rows appearing once they are returned
then, the columns and the rows of the next query appear. And it stops there.
So, query 1 was executed(expected) then immediately query 2 is executed as well (unexpected).
the result of query 2 is on screen, which is expected when it executes; the unexpected is query 2 to execute at all in that scenario.
Activity
chrisjlocke commentedon Oct 13, 2020
Technically this is a duplicate of #2429.
If you only highlight the instructions you want to run, this helps matters, so highlight a line, run it, then highlight the next line.
Not a perfect solution, but its how I use SQL Server Management Studio...
chrisjlocke commentedon Oct 13, 2020
Closing as this is a duplictate, but fee;l free to comment if needed. 😃
chris3392 commentedon Oct 13, 2020
Not sure if this is a duplicate or not. I have seen that behavior only with the inner join instruction. Evertything else is fine
As for issue #2, which I am hinting i will post - but have not-- I found in the meantime it was irrelevant as an Sqlite limitation.
Tx
chrisjlocke commentedon Oct 14, 2020
Its a duplicate, as you're doing two queries, but the results window only shows the last query. While a bug, its easily worked around by only executing one instruction at a time, via selective highlighting. Its not ideal, but works fairly well once you get used to it. I tend to use one SQL tab with multiple queries so I can just select the one I want and run it.
chris3392 commentedon Oct 14, 2020
Unfortunately I cannot reproduce it anymore as i changed my database too heavily.
If it helps, i was not using selective highlighting but was requesting a one instruction only execution by using the relevant button from db browser.
EDIT:
Giving it a second thoght: What you describe is wrong.
The bug is NOT that is shows the result of Second query only while I am doing 2 queries.
The bug is that I was requesting for execution of query 1 ONLY and it executed query one AND query 2; which was unexpected.
If you check my query above you will see that I tried to add additionna coma at the end of the query because it looked like it had missed somehow when parsing that it had already reached end of requested query, (and executed query 2 instead of halting).
I think it worth to mention, since I have the occasion, i am using that tool very often and really like it. Could hardly live without it.
Congratulation for the work.
chrisjlocke commentedon Oct 14, 2020
Oh no, that's the issue - that's the bug (acknowledged in the other issue). If you were, it would have worked out OK. 😃
Hopefully someone will work out how to fix it, as its a common problem - especially if you use MS SQL Management Studio.
chris3392 commentedon Oct 14, 2020
ok,
Not intending to start trolling here.
hard for me to understand how to view these as same error. DBBrowser is executing 2 queries where only the last one output is displayed, while I explicitely hit the button to execute ONE query, not two (and two were executed instead)
Furthermore, said bug is mentioning only ONE query, which output does not show the rows properly but the columns are shown properly.
While in my case, the output (both rows and column names) is correct for execution of query #2; the problem being, why on earth does it execute query #2 after #1, while being requested to execute query #1 only.
Sounds very different (though I can understand it could result from same technical bug, but outputs and execution are just at odds)
chrisjlocke commentedon Oct 14, 2020
Apologies - so you pressed the 'Execute current line' button?
We've had many 'quirks' with this, as the parser can get confused with different lines depending on the OS (Linux vs Windows ... carriage returns vs carriage returns with line-feeds)
This works on Windows, but if you are pressing the 'execute current line', then yes, that's an error. Apologies - while you did mention 'the appropriate menu', I didn't appreciate that's the button you were referring to.
chris3392 commentedon Oct 14, 2020
No worry.
Correct. I was pressing that execute current line button.
Ubuntu 18.04 here, if it helps.
chrisjlocke commentedon Oct 14, 2020
OK, if you put the text carat on line 1 and press that button, do you get the result of line 2?
Just making sure 100% the error is the error I'm reading.... :)
[-]2 issues with inner join -- issue 1[/-][+]Execute Current Line button in 'Execute SQL' tab runs multiple lines (Linux)[/+]chris3392 commentedon Oct 15, 2020
Yes, this is what I meant.
I put the text carat on line 1 and press that button,
then I can see the columns appearing for a very brief period of time (that query retruns a few thousands rows) and i have no time to see the rows appearing once they are returned
then, the columns and the rows of the next query appear. And it stops there.
So, query 1 was executed(expected) then immediately query 2 is executed as well (unexpected).
the result of query 2 is on screen, which is expected when it executes; the unexpected is query 2 to execute at all in that scenario.
chrisjlocke commentedon Oct 15, 2020
Excellent, thanks for clarifying. :)