RussellEngland / 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

DROP TABLE and DROP DATABASE parse differently #74

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?

DROP TABLE parses to:

      ["DROP"] =>; array(4) {
        [0] =>; string(4) "DROP"
        [1] =>; string(5) "TABLE"
        [2] =>; string(1) " "
        [3] =>; string(22) "`foo`.`bar`"
      }

where as DROP DATABASE parses to:

    array(2) {
      ["DROP"] => array(1) {
        [0] => string(4) "DROP"
      }
      ["DATABASE"] => array(2) {
        [0] => string(1) " "
        [1] => string(16) "`foo`"
      }
    }

What is the expected output? What do you see instead?

DROP DATABASE should be similar in structure as the DROP TABLE command

What version of the product are you using? 

Latest SVN r339

Original issue reported on code.google.com by adrian.p...@googlemail.com on 28 Aug 2012 at 3:50

GoogleCodeExporter commented 8 years ago
Check r340, I have added some code to handle DROP statements explicitly.

Original comment by pho...@gmx.de on 28 Aug 2012 at 8:12

GoogleCodeExporter commented 8 years ago
cool, seems to work. thx!

Original comment by adrian.p...@googlemail.com on 28 Aug 2012 at 9:15

GoogleCodeExporter commented 8 years ago

Original comment by pho...@gmx.de on 28 Aug 2012 at 11:09