Menu

#2852 (ok 3.1.4) Add Fields: Add index is missing quotes

fixed
1
2013-06-11
2009-04-01
No

ALTER TABLE `categories` ADD `left` INT UNSIGNED NOT NULL AFTER `title` ,
ADD `right` INT UNSIGNED NOT NULL AFTER `left` ,
ADD INDEX ( LEFT , RIGHT )

MySQL said: Documentation
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'left, right)' at line 1
--------------

ADD INDEX ( LEFT , RIGHT )

Should Be:

ADD INDEX ( `left` , `right` )

Discussion

  • Herman van Rink

    Herman van Rink - 2009-04-09
    • milestone: 284147 -->
    • assigned_to: nobody --> helmo
    • labels: 509122 --> Data insertion/extraction/manipulation
     
  • Herman van Rink

    Herman van Rink - 2009-04-09
    • priority: 5 --> 1
    • summary: Add Fields: Set Index [ALTER TABLE ADD INDEX] --> (ok 3.1.4) Add Fields: Add index is missing quotes
    • status: open --> open-fixed
     
  • Herman van Rink

    Herman van Rink - 2009-04-09

    Fixed in subversion, thanks for reporting.

     
  • Herman van Rink

    Herman van Rink - 2009-04-09

    Reinstated PMA_backquote() for PRIMARY KEY, INDEX, UNIQUE and FULLTEXT. And more in general fixed the code for FULLTEXT.

    Problem introduced by refactoring in revision 11240 - Wed May 7 12:35:00 2008 UTC (11 months ago) by cybot_tm

     
  • Marc Delisle

    Marc Delisle - 2009-04-25
    • status: open-fixed --> closed-fixed
     
  • Michal Čihař

    Michal Čihař - 2013-06-11
    • Status: closed-fixed --> fixed
     
MongoDB Logo MongoDB