Skip to content
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

Running query in a block without highlighting no longer works #30136

Open
clemlaugit opened this issue May 9, 2024 · 12 comments
Open

Running query in a block without highlighting no longer works #30136

clemlaugit opened this issue May 9, 2024 · 12 comments

Comments

@clemlaugit
Copy link

Description

previous behaviour: if your cursor was within a block of sql, it would run all the sql that was together (i.e. no gaps between the code lines)

current behaviour: if you have some code and then a gap and more code and try to run the code block without highlighting it errors now.

see screenshot below
image

i added "qqqq" to the code but have a line separating the code block. I tried to execute the code without highlighting and now it errors out.

version
image

DBeaver Version

24.0.4.202405051837

Operating System

Mac Sonoma 14.3

Database and driver

snowflake
image

Steps to reproduce

write a sql statement

add a carriage return
type anything

go to your sql statement and execute without highlighting

Additional context

write a sql statement

add a carriage return
type anything

go to your sql statement and execute without highlighting

@E1izabeth
Copy link
Member

DBeaver provided a new mode of statements execution. You can find it in preferences Editors->SQL Editor->SQL Processing->Blank line is statement delimiter. With this mode DBeaver takes everything between the statement start and the query delimiter or a new statement start. If such behavior doesn't fir your use cases, you can turn it off by switching this setting to Always.

@c-o-m-m-a-n-d-e-r-d-a-t-a
Copy link

Only chipping in as this was the latest issue on Git, and I saw it as well, but for me it was that this setting was set to 'smart' (by default?), and this rarely seemed to detect blank lines correctly. Setting to 'Always' fixed it, as per E1izabeth's note above.

@E1izabeth
Copy link
Member

@c-o-m-m-a-n-d-e-r-d-a-t-a we had a bug in 24.0.3 version. It's fixed now.

@c-o-m-m-a-n-d-e-r-d-a-t-a

Ok :) Although I will say that leaving the setting on 'Smart', which I don't remember doing manually, causes the blocks not to execute individually most times. Just saying :) PS this is on v 24.0.4

@E1izabeth
Copy link
Member

We can't reproduce it. Please provide a footage of the issue.

@c-o-m-m-a-n-d-e-r-d-a-t-a

output

@E1izabeth
Copy link
Member

Thank you for providing an example. I still can't reproduce it, but hope we will figure out, what';s wrong eventually.

java_eTlP1Rz2wP.mp4

image

@E1izabeth
Copy link
Member

@c-o-m-m-a-n-d-e-r-d-a-t-a I suppose your case is more about this issue #29942

@c-o-m-m-a-n-d-e-r-d-a-t-a

I don't think so - they had set the dropdown to 'never' hadn't they? I think my issue is that 'smart' is the default (or became it silently?) and that it doesn't always work (for me, at any rate). Sometimes it does, sometimes it doesn't. Basically a more complex query will cause 'smart' to fail.

@E1izabeth
Copy link
Member

E1izabeth commented May 10, 2024

We're going to set it back to Always by default in the next version.

@c-o-m-m-a-n-d-e-r-d-a-t-a

Probably safest, thanks. I suppose we users don't know the exact logic of 'smart' so it doesn't always do what we expect.

Thanks again :)

@clemlaugit
Copy link
Author

clemlaugit commented May 10, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants