From the user interface for this module, entering a carriage return/new line in the "Original SQL string" field causes a parse error when there are multiple where conditions.

Was testing with SELECT queries, but i believe the trigger is multiple where conditions. This does not happen with a SELECT * FROM {table} query even when followed by CR/NL.

CommentFileSizeAuthor
#1 903520-sql-end-string.patch1.46 KBsolotandem

Comments

solotandem’s picture

Status: Active » Needs review
StatusFileSize
new1.46 KB

The Lexer::nextToken() routine never gets to state = 1000 due to character processing with the carriage return and new line in state = 0.

The patch handles the problem with the multiple where conditions that keep forcing a read of next token without testing for the end of the string. There may also be other places this test should occur.

duellj’s picture

Status: Needs review » Fixed

I wasn't able to reproduce this, but the patch fixes some bugs, so committing.

solotandem’s picture

Try a query with a couple of AND clauses and an OR. The OR seems to trigger things.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.