summaryrefslogtreecommitdiff
path: root/sql/sql_db.cc
diff options
context:
space:
mode:
authorAlexander Nozdrin <alik@sun.com>2009-12-16 21:02:21 +0300
committerAlexander Nozdrin <alik@sun.com>2009-12-16 21:02:21 +0300
commit5f0c09dd7220b7ad5709823788e9289fc94ab8fe (patch)
treec656767fe54a976ffb669926348b9fac198be312 /sql/sql_db.cc
parent5194074be762f169fcc25b9ad0d4013905ba0655 (diff)
parentf1e83a4163458f7e25c709403cc7c7b48a7ef23e (diff)
downloadmariadb-git-5f0c09dd7220b7ad5709823788e9289fc94ab8fe.tar.gz
Manual merge from mysql-trunk-merge.
Conflicts: - include/my_no_pthread.h - mysql-test/r/sp-ucs2.result - sql/log.cc - sql/sql_acl.cc - sql/sql_yacc.yy
Diffstat (limited to 'sql/sql_db.cc')
-rw-r--r--sql/sql_db.cc11
1 files changed, 5 insertions, 6 deletions
diff --git a/sql/sql_db.cc b/sql/sql_db.cc
index 51098987e81..2ae876985b7 100644
--- a/sql/sql_db.cc
+++ b/sql/sql_db.cc
@@ -696,6 +696,7 @@ int mysql_create_db(THD *thd, char *db, HA_CREATE_INFO *create_info,
file. In this case it's best to just continue as if nothing has
happened. (This is a very unlikely senario)
*/
+ thd->clear_error();
}
not_silent:
@@ -815,9 +816,9 @@ bool mysql_alter_db(THD *thd, const char *db, HA_CREATE_INFO *create_info)
if (mysql_bin_log.is_open())
{
- int errcode= query_error_code(thd, TRUE);
+ thd->clear_error();
Query_log_event qinfo(thd, thd->query(), thd->query_length(), 0,
- /* suppress_use */ TRUE, errcode);
+ /* suppress_use */ TRUE, 0);
/*
Write should use the database being created as the "current
@@ -827,7 +828,6 @@ bool mysql_alter_db(THD *thd, const char *db, HA_CREATE_INFO *create_info)
qinfo.db = db;
qinfo.db_len = strlen(db);
- thd->clear_error();
/* These DDL methods and logging protected with LOCK_mysql_create_db */
if (error= mysql_bin_log.write(&qinfo))
goto exit;
@@ -968,9 +968,9 @@ bool mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent)
}
if (mysql_bin_log.is_open())
{
- int errcode= query_error_code(thd, TRUE);
+ thd->clear_error();
Query_log_event qinfo(thd, query, query_length, 0,
- /* suppress_use */ TRUE, errcode);
+ /* suppress_use */ TRUE, 0);
/*
Write should use the database being created as the "current
database" and not the threads current database, which is the
@@ -979,7 +979,6 @@ bool mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent)
qinfo.db = db;
qinfo.db_len = strlen(db);
- thd->clear_error();
/* These DDL methods and logging protected with LOCK_mysql_create_db */
if (mysql_bin_log.write(&qinfo))
{