summaryrefslogtreecommitdiff
path: root/sql/sql_db.cc
diff options
context:
space:
mode:
authorgluh@eagle.intranet.mysql.r18.ru <>2005-09-12 17:09:19 +0500
committergluh@eagle.intranet.mysql.r18.ru <>2005-09-12 17:09:19 +0500
commitd9bd3c11e4c06e31974998dc75fc348e10c8cae1 (patch)
treea57b033bb2eff45734871677eb2e7d04cfea7c43 /sql/sql_db.cc
parent2a07350854b3d13562b4d8714fed82cf11a0a31c (diff)
downloadmariadb-git-d9bd3c11e4c06e31974998dc75fc348e10c8cae1.tar.gz
Fix for bug #6008: MySQL does not create warnings when creating database and using IF NOT EXISTS
produce warning for 'create database if not exists' if database exists do not update database options in this case produce warning for 'create table if not exists' if table exists
Diffstat (limited to 'sql/sql_db.cc')
-rw-r--r--sql/sql_db.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/sql/sql_db.cc b/sql/sql_db.cc
index 7635774e3ac..7c834c91183 100644
--- a/sql/sql_db.cc
+++ b/sql/sql_db.cc
@@ -427,7 +427,11 @@ int mysql_create_db(THD *thd, char *db, HA_CREATE_INFO *create_info,
error= -1;
goto exit;
}
- result= 0;
+ push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
+ ER_DB_CREATE_EXISTS, ER(ER_DB_CREATE_EXISTS), db);
+ error= 0;
+ send_ok(thd);
+ goto exit;
}
else
{