vikramkakar / php-sql-parser

Automatically exported from code.google.com/p/php-sql-parser
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

FORCE INDEX failure #99

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1.
2.
3.

What is the expected output? What do you see instead?
case:
SELECT ... FROM tbl FORCE INDEX (col1_idx) WHERE ... ORDER BY col1
output:
SELECT ... FROM tbl WHERE ... ORDER BY col1,
it removes FORCE INDEX... and 
PHP produce notice:
A PHP Error was encountered
Severity: Notice
Message: Undefined variable: token_category
Filename: PHP-SQL-Parser/php-sql-parser.php
Line Number: 912

What version of the product are you using? On what operating system?
PHP 5.4 x64, WIN 7

Please provide any additional information below.

Original issue reported on code.google.com by bramanin...@gmail.com on 27 Oct 2013 at 9:26

GoogleCodeExporter commented 8 years ago
At the moment the parser doesn't recognize index hints, Don't use it.
http://dev.mysql.com/doc/refman/5.0/en/index-hints.html

Original comment by pho...@gmx.de on 1 Nov 2013 at 3:57

GoogleCodeExporter commented 8 years ago
I have added some code to handle index hints, but it will be part of further 
enhancements.

Original comment by pho...@gmx.de on 2 Apr 2014 at 2:26

GoogleCodeExporter commented 8 years ago
Issue 140 has been merged into this issue.

Original comment by pho...@gmx.de on 15 Sep 2014 at 10:43