New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SQL Still problematic #29942
Comments
I can't reproduce your issue on the provided query script neither with |
I don't see something wrong here. Outline shows that statements are correctly separated. |
@E1izabeth I often have multiple statements with no black spaces between them, see example below. Dbeaver should, and used to, only run the SQL statement that my cursor was within. How do I get back to that behavior?
Or:
|
Thank you for more examples. All of them works right for me on version 24.0.4. We have a bug in 24.0.3, but now it's fixed. I cannot reproduce the behavior you're describing. |
This seems pretty clearly related to the bug I reported here. I'm attaching an additional screenshot in hopes of clarifying that "Blank line as a statement delimiter" has no effect under certain conditions. Also, the outline view (which I just learned about, thanks to this post) even shows that the parser doesn't correctly parse these as separate statements. |
Description
Running just a single statement in in DBeaver is problematic.
Even though:
SQL Processing Statement delimiter is ;
Ignore native delimiter is unchecked
Blank line is statement delimiter is set to Never
Remove trailing query delimiter is unchecked
placing my cursor instaide of a complete statement and pressing "Execute SQL Query" will occationally try to run every statement in the SQL Editor with disasterous results.
I had thought that switching:
Blank line is statement delimiter: from the default of Smart, to Never had fixed the issue, but apparently all doing that accomplished was to reduce the occurance not eliminate it entirely.
The only way to ensure that only a single statement is run is to select the entire statement.
This is a marked regression from the behavior of previous versions,
hopefully this can be corrected soon.
DBeaver Version
Community Edition 24.0.4
Operating System
Windows 10
Database and driver
PostgreSQL 16
Steps to reproduce
Have an SQL Editor window with many sql statements
place the cursor (symbolized by {c} in the example below) inside a single statement
press the orange arrow (Execute SQL Query)
sometimes it will run the specified query
other times it will run all queries in that editor
ex:
select * from foo;
select yaba, daba, doo {c} from flintstones;
insert into baz set fld1 = 'something' where fld2 > 10;
delete from important_table where entered < '2023-01-01';
since the cursor {c} is in the select from flinstones statement that's the only statement that should be run.
Additional context
No response
The text was updated successfully, but these errors were encountered: