Commit 44955296 authored by unknown's avatar unknown

Merge msvensson@msvensson.mysql.internal:/home/msvensson/mysql/bug15302/my41-bug15302

into  devsrv-b.mysql.com:/space/magnus/my41-bug15302
parents 830aa98c e840ce7f
...@@ -2966,8 +2966,8 @@ static int run_query_normal(MYSQL* mysql, struct st_query* q, int flags) ...@@ -2966,8 +2966,8 @@ static int run_query_normal(MYSQL* mysql, struct st_query* q, int flags)
warn_res= mysql_store_result(mysql); warn_res= mysql_store_result(mysql);
} }
if (!warn_res) if (!warn_res)
verbose_msg("Warning count is %u but didn't get any warnings\n", die("Warning count is %u but didn't get any warnings\n",
count); count);
else else
{ {
dynstr_append_mem(ds, "Warnings:\n", 10); dynstr_append_mem(ds, "Warnings:\n", 10);
...@@ -3446,8 +3446,8 @@ static void run_query_stmt_handle_warnings(MYSQL *mysql, DYNAMIC_STRING *ds) ...@@ -3446,8 +3446,8 @@ static void run_query_stmt_handle_warnings(MYSQL *mysql, DYNAMIC_STRING *ds)
{ {
MYSQL_RES *warn_res= mysql_store_result(mysql); MYSQL_RES *warn_res= mysql_store_result(mysql);
if (!warn_res) if (!warn_res)
verbose_msg("Warning count is %u but didn't get any warnings\n", die("Warning count is %u but didn't get any warnings\n",
count); count);
else else
{ {
dynstr_append_mem(ds, "Warnings:\n", 10); dynstr_append_mem(ds, "Warnings:\n", 10);
......
...@@ -388,6 +388,12 @@ bool load_db_opt(THD *thd, const char *path, HA_CREATE_INFO *create) ...@@ -388,6 +388,12 @@ bool load_db_opt(THD *thd, const char *path, HA_CREATE_INFO *create)
silent Used by replication when internally creating a database. silent Used by replication when internally creating a database.
In this case the entry should not be logged. In this case the entry should not be logged.
SIDE-EFFECTS
1. Report back to client that command succeeded (send_ok)
2. Report errors to client
3. Log event to binary log
(The 'silent' flags turns off 1 and 3.)
RETURN VALUES RETURN VALUES
0 ok 0 ok
-1 Error -1 Error
...@@ -421,16 +427,17 @@ int mysql_create_db(THD *thd, char *db, HA_CREATE_INFO *create_info, ...@@ -421,16 +427,17 @@ int mysql_create_db(THD *thd, char *db, HA_CREATE_INFO *create_info,
if (my_stat(path,&stat_info,MYF(0))) if (my_stat(path,&stat_info,MYF(0)))
{ {
if (!(create_options & HA_LEX_CREATE_IF_NOT_EXISTS)) if (!(create_options & HA_LEX_CREATE_IF_NOT_EXISTS))
{ {
my_error(ER_DB_CREATE_EXISTS,MYF(0),db); my_error(ER_DB_CREATE_EXISTS,MYF(0),db);
error= -1; error= -1;
goto exit; goto exit;
} }
push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE, push_warning_printf(thd, MYSQL_ERROR::WARN_LEVEL_NOTE,
ER_DB_CREATE_EXISTS, ER(ER_DB_CREATE_EXISTS), db); ER_DB_CREATE_EXISTS, ER(ER_DB_CREATE_EXISTS), db);
if (!silent)
send_ok(thd);
error= 0; error= 0;
send_ok(thd);
goto exit; goto exit;
} }
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment