[MXS-3318] Parsing error with comment Created: 2020-12-04  Updated: 2020-12-18  Resolved: 2020-12-16

Status: Closed
Project: MariaDB MaxScale
Component/s: qc_sqlite
Affects Version/s: 2.3.15
Fix Version/s: 2.3.21, 2.4.15, 2.5.7

Type: Bug Priority: Major
Reporter: dapeng huang Assignee: Johan Wikman
Resolution: Fixed Votes: 0
Labels: None

Attachments: PNG File image-2020-12-04-15-43-01-997.png    
Sprint: MXS-SPRINT-121

 Description   

-- comment balabala.
UPDATE test SET a = '123';



 Comments   
Comment by markus makela [ 2020-12-07 ]

Did you add it to the query classifier test program in MaxScale to test this? If you created a new test case, can you do a pull request for it so that we can have the test in the MaxScale repository as well?

Comment by Johan Wikman [ 2020-12-11 ]

dapeng What client do you use? Are you sure it does not remove line-feeds?

Comment by dapeng huang [ 2020-12-17 ]

The fix works on a running instance; but not work for unit test

Comment by Johan Wikman [ 2020-12-18 ]

You mean the test case you added to input.sql?

I dont think that works as intended. Namely, classify removes line breaks and then splits at ;.
That is, the lines

-- comment balabala.
UPDATE test SET a = '123';

become

-- comment balabala. UPDATE test SET a = '123';

which is nothing but a comment. That classify program should be rewritten, it is such a mess.

Generated at Thu Feb 08 04:20:33 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.