forums › forums › SQLyog › SQLyog: Bugs / Feature Requests › Syntax Error
- This topic is empty.
-
AuthorPosts
-
-
March 11, 2013 at 2:29 pm #12944
Mitch
ParticipantSQLYog Ultimate 11.01 32 bit
Wine 1.4
Ubuntu 12.04 64 bit
This query
SELECT * FROM web_js_error_log
WHERE addeddatetime >= '2013-03-10 00:00:00'
AND description='Uncaught TypeError: Property ''undefined'' of object #
LIMIT 200
;
Is executed as
SELECT * FROM web_js_error_log WHERE addeddatetime >= '2013-03-10 00:00:00' AND description='Uncaught TypeError: Property ''undefined'' of object #
(from history log) which throws a syntax error from mysql.
If I remove “LIMIT 200” it works OK.
Seems like a bug.
-
March 12, 2013 at 4:18 am #34227
peterlaursen
ParticipantWell .. we add a LIMIT clause (with a parameter according to user's paging setting) to statements executed from the editor if there is no one specified.
It seems that we don't detect the user defined LIMIT in this case. Probably because of the ” '' ” escaping sequences.
We will check.
-
March 12, 2013 at 4:24 am #34228
peterlaursen
ParticipantI have tried a few simpler test cases but did not find anything that broke yet. Now if you write the statements like:
SELECT * FROM web_js_error_log
WHERE addeddatetime >= '2013-03-10 00:00:00'
AND description=”Uncaught TypeError: Property 'undefined' of object # is not a function”
LIMIT 200
;
or
SELECT * FROM web_js_error_log
WHERE addeddatetime >= '2013-03-10 00:00:00'
AND description='Uncaught TypeError: Property 'undefined' of object # is not a function'
LIMIT 200
;
.. do they still fail?
-
March 12, 2013 at 5:56 am #34229
peterlaursen
ParticipantConfirmed. It is not related to escaping but to the hash-character (#)
— executed
SELECT * FROM `table`
WHERE t='#Object'
LIMIT 200
;
— history
SELECT * FROM `table` WHERE t='1#Object'LIMIT 200 LIMIT 0, 1000;
So it seems our detection for a user defined LIMIT does not look after the '#' (you probably know that '#' is a comment specifier. But here it is not as it is inside a 'quoted string'). Such issues we fix as soon as they are discovered, of course.
-
March 12, 2013 at 6:00 am #34230
peterlaursen
ParticipantSame issue with the variants:
SELECT * FROM `table`
WHERE t='– Object'
LIMIT 200
;
SELECT * FROM `table`
WHERE t='/* Object */'
LIMIT 200
;
.. a “LIMIT 0, 1000” is added where it should not.
-
-
AuthorPosts
- You must be logged in to reply to this topic.