1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

Manual merge from mysql-trunk-merge.

Conflicts:
  - sql/event_data_objects.cc
  - sql/events.cc
  - sql/mysql_priv.h
  - sql/repl_failsafe.cc
  - sql/sql_parse.cc
  - sql/sql_show.cc
  - sql/sql_view.cc
  - sql/table.cc
This commit is contained in:
Alexander Nozdrin
2010-01-28 00:10:37 +03:00
4 changed files with 15 additions and 12 deletions

View File

@@ -645,7 +645,7 @@ int mysql_create_db(THD *thd, char *db, HA_CREATE_INFO *create_info,
DBUG_ENTER("mysql_create_db");
/* do not create 'information_schema' db */
if (!my_strcasecmp(system_charset_info, db, INFORMATION_SCHEMA_NAME.str))
if (is_infoschema_db(db, strlen(db)))
{
my_error(ER_DB_CREATE_EXISTS, MYF(0), db);
DBUG_RETURN(-1);
@@ -1600,8 +1600,7 @@ bool mysql_change_db(THD *thd, const LEX_STRING *new_db_name, bool force_switch)
}
}
if (my_strcasecmp(system_charset_info, new_db_name->str,
INFORMATION_SCHEMA_NAME.str) == 0)
if (is_infoschema_db(new_db_name->str, new_db_name->length))
{
/* Switch the current database to INFORMATION_SCHEMA. */