Menu

#1148 Database renaming not working in MySQL >= 5.1.23

Upstream
nobody
None
Defect
2009-05-21
2009-05-20
Anonymous
No

Originally created by: ahosie@gmail.com

What exact steps will reproduce the problem?
1. Attempt to rename a database on a MySQL server >= v5.1.23

What was the expected output?
Joy.

What happened instead?
SQL Error: 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
'DATABASE `OldDb` TO `NewDb`' at line 1

Suggested fix (optional)?
Implement `UPGRADE DATA DIRECTORY NAME` command.
See http://dev.mysql.com/doc/refman/5.1/en/rename-database.html

Version used?
HeidiSQL revision: 2405
MySQL Server version: 5.1.33-enterprise-gpl-advanced-log

Discussion

  • Anonymous

    Anonymous - 2009-05-20

    Originally posted by: ahosie@gmail.com

    Sorry, the suggested fix is bogus, (I didn't read the command reference all the way to
    the end).
    I do not see a resolution for this one :(

     
  • Anonymous

    Anonymous - 2009-05-21

    Originally posted by: a...@anse.de

    UPGRADE DATA DIRECTORY NAME doesn't allow you to *rename* a database, it's meant for
    fixing encoding problems in the directory name. So, there is no chance to rename a
    database I'm afraid. Even for the older versions where the RENAME clause was valid,
    MySQL says "please don't use it".

    Status: Upstream