Commit graph

4 commits

Author SHA1 Message Date
Gleb Shchepa
d72a4710aa Bug #53804: serious flaws in the alter database .. upgrade
data directory name command

The check_db_name function has been modified to validate tails of
#mysql50#-prefixed database names for compliance with MySQL 5.0
database name encoding rules (the check_table_name function call
has been reused).


mysql-test/r/renamedb.result:
  Updated test case.
mysql-test/r/upgrade.result:
  Test case for bug #53804.
mysql-test/t/renamedb.test:
  Updated test case.
mysql-test/t/upgrade.test:
  Test case for bug #53804.
sql/mysql_priv.h:
  Bug #53804: serious flaws in the alter database .. upgrade
              data directory name command
  
  The check_mysql50_prefix has been added.
sql/sql_table.cc:
  Bug #53804: serious flaws in the alter database .. upgrade
              data directory name command
  
  - The check_mysql50_prefix has been added.
  - The check_n_cut_mysql50_prefix function has been refactored
  to share code with new check_mysql50_prefix function.
sql/table.cc:
  Bug #53804: serious flaws in the alter database .. upgrade
              data directory name command
  
  The check_db_name function has been modified to validate tails of
  #mysql50#-prefixed database names for compliance with MySQL 5.0
  database name encoding rules.
2010-05-21 22:47:32 +04:00
unknown
8076d23f41 WL#4030 (Deprecate RENAME DATABASE: replace with ALTER DATABASE <name>
UPGRADE)

Bug 17565 (RENAME DATABASE destroys events)
Bug#28360 (RENAME DATABASE destroys routines)

Removed the
  RENAME DATABASE db1 TO db2
statement.

Implemented the
  ALTER DATABASE db UPGRADE DATA DIRECTORY NAME
statement, which has the same function.


client/mysqlcheck.c:
    ALTER DATABASE db UPGRADE DATA DIRECTORY NAME
mysql-test/r/create.result:
    ALTER DATABASE db UPGRADE DATA DIRECTORY NAME
mysql-test/r/query_cache.result:
    ALTER DATABASE db UPGRADE DATA DIRECTORY NAME
mysql-test/r/renamedb.result:
    ALTER DATABASE db UPGRADE DATA DIRECTORY NAME
mysql-test/r/sp-code.result:
    ALTER DATABASE db UPGRADE DATA DIRECTORY NAME
mysql-test/r/sp-error.result:
    ALTER DATABASE db UPGRADE DATA DIRECTORY NAME
mysql-test/r/upgrade.result:
    ALTER DATABASE db UPGRADE DATA DIRECTORY NAME
mysql-test/t/create.test:
    ALTER DATABASE db UPGRADE DATA DIRECTORY NAME
mysql-test/t/query_cache.test:
    ALTER DATABASE db UPGRADE DATA DIRECTORY NAME
mysql-test/t/renamedb.test:
    ALTER DATABASE db UPGRADE DATA DIRECTORY NAME
mysql-test/t/sp-error.test:
    ALTER DATABASE db UPGRADE DATA DIRECTORY NAME
mysql-test/t/upgrade.test:
    ALTER DATABASE db UPGRADE DATA DIRECTORY NAME
sql/mysql_priv.h:
    ALTER DATABASE db UPGRADE DATA DIRECTORY NAME
sql/sql_lex.h:
    ALTER DATABASE db UPGRADE DATA DIRECTORY NAME
sql/sql_parse.cc:
    ALTER DATABASE db UPGRADE DATA DIRECTORY NAME
sql/sql_prepare.cc:
    ALTER DATABASE db UPGRADE DATA DIRECTORY NAME
sql/sql_yacc.yy:
    ALTER DATABASE db UPGRADE DATA DIRECTORY NAME
sql/sql_db.cc:
    ALTER DATABASE db UPGRADE DATA DIRECTORY NAME
2007-09-10 16:10:37 -06:00
unknown
9c686c8a68 Bug#19392 Rename Database: Crash if case change
Problem:
Renaming a database to itself crashed server.
It hapenned because of wrong DBUG_ASSERT.
Fix: removing wrong DBUG_ASSERT. Now it reports
a correct error message "database alreadt exists".


mysql-test/r/renamedb.result:
  Adding test case
mysql-test/t/renamedb.test:
  Adding test case
sql/sql_db.cc:
  DBUG_ASSERT crashed server when renaming a database to itself.
2006-05-18 12:21:13 +05:00
unknown
bc5dc9e085 renamedb.test, renamedb.result:
new file
Many files:
  WL#757 RENAME DATABASE


sql/mysql_priv.h:
  WL#757 RENAME DATABASE
sql/mysqld.cc:
  WL#757 RENAME DATABASE
sql/sql_db.cc:
  WL#757 RENAME DATABASE
sql/sql_lex.h:
  WL#757 RENAME DATABASE
sql/sql_parse.cc:
  WL#757 RENAME DATABASE
sql/sql_rename.cc:
  WL#757 RENAME DATABASE
sql/sql_table.cc:
  WL#757 RENAME DATABASE
sql/sql_yacc.yy:
  WL#757 RENAME DATABASE
2006-02-13 11:49:28 +04:00