SQL/Parser.php
authorAlan Knowles <alan@akkbhome.com>
Sun, 13 Feb 2011 12:43:56 +0000 (20:43 +0800)
committerAlan Knowles <alan@akkbhome.com>
Sun, 13 Feb 2011 12:43:56 +0000 (20:43 +0800)
SQL/Parser.php

index e5c91a2..4b893f5 100755 (executable)
@@ -1208,7 +1208,13 @@ class SQL_Parser
                             //print_r($action);
                             break;
                         case 'index':
-                            // alter table xxx add index(a,b,c);
+                            // alter table xxx add index indexname(a,b,c);
+                            $this->getTok();
+                            $action['name'] = $this->lexer->tokText;
+                            $this->getTok();
+                            if ($this->token != '(') {
+                                $this->raiseError("Expecting '(', got : ". $this->token);
+                            }