summaryrefslogtreecommitdiff
path: root/sql/sql_db.cc
diff options
context:
space:
mode:
authorKonstantin Osipov <kostja@sun.com>2010-02-06 13:28:06 +0300
committerKonstantin Osipov <kostja@sun.com>2010-02-06 13:28:06 +0300
commit9c030fe5081163babdc8ef24395d108a394107fe (patch)
tree16fe2efa0a3d5e40e00972a1dc3bc4e13f71170c /sql/sql_db.cc
parent0b2f51664d38ed24f3f8b237877520e45bfe83f6 (diff)
parent19df110369d4cef5303176a8aedca34cd0e2d271 (diff)
downloadmariadb-git-9c030fe5081163babdc8ef24395d108a394107fe.tar.gz
Merge next-mr -> next-4284.
Diffstat (limited to 'sql/sql_db.cc')
-rw-r--r--sql/sql_db.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/sql/sql_db.cc b/sql/sql_db.cc
index 95db9cb3681..75855020127 100644
--- a/sql/sql_db.cc
+++ b/sql/sql_db.cc
@@ -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))
{
my_error(ER_DB_CREATE_EXISTS, MYF(0), db);
DBUG_RETURN(-1);
@@ -854,7 +854,7 @@ bool mysql_alter_db(THD *thd, const char *db, HA_CREATE_INFO *create_info)
qinfo.db_len = strlen(db);
/* These DDL methods and logging protected with LOCK_mysql_create_db */
- if (error= mysql_bin_log.write(&qinfo))
+ if ((error= mysql_bin_log.write(&qinfo)))
goto exit;
}
my_ok(thd, result);
@@ -1601,8 +1601,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. */