sqls icon indicating copy to clipboard operation
sqls copied to clipboard

Server shutting down when using CASE keyword

Open JacobDer opened this issue 3 years ago • 2 comments

Bug Description When I attempt to use CASE in a query, the server shuts down right after I type the word and no more suggestions are made. If I press esc to return to normal mode I am shown a message Client 1 quit with exit code 2 and signal 0.

To Reproduce Example reproduction:

  1. With sqls active, type SELECT CASE W
  2. Press esc to return to normal mode

Expected behavior After typing SELECT CASE W, there should be suggestions for keywords which begin with 'W' and the server should not shut down unexepectedly.

Versions:

  • OS Version: macOS 12
  • sqls Version: latest

JacobDer avatar Sep 09 '21 21:09 JacobDer

I found code like this will make it stackoverflow

select case
           when age>=25 WH


darrenhp avatar Mar 14 '22 06:03 darrenhp

Just the word "case" is making the servers' stack to overflow. It can even just be in a string such as in this query.

INSERT INTO answers (answer) VALUES ("Camel case");

And the issue is still not even touched from what I see 😭

Frytak avatar Mar 14 '24 14:03 Frytak