summaryrefslogtreecommitdiff
path: root/sql/sql_db.cc
diff options
context:
space:
mode:
authormsvensson@neptunus.(none) <>2006-01-31 12:47:22 +0100
committermsvensson@neptunus.(none) <>2006-01-31 12:47:22 +0100
commitb758b690a199e922ea3b3708fcf77ddef6a5ad83 (patch)
tree27ff8ec6afcb1b831bc6326f441011525e4b1bf1 /sql/sql_db.cc
parent1155bf20d93f8ae3e9ae68e6bcc055d261911a85 (diff)
downloadmariadb-git-b758b690a199e922ea3b3708fcf77ddef6a5ad83.tar.gz
Bug #15302 LOAD DATA FROM MASTER -> Packets out of order (Found: 2, expected 1)
- Change "mysql_create_db" to not call "send_ok" if in silent mode i.e. called from "load_master_data" - Change mysqltest to detect when there aren't as many warnings available as was reported.
Diffstat (limited to 'sql/sql_db.cc')
-rw-r--r--sql/sql_db.cc13
1 files changed, 10 insertions, 3 deletions
diff --git a/sql/sql_db.cc b/sql/sql_db.cc
index 7c834c91183..035a0b22a6b 100644
--- a/sql/sql_db.cc
+++ b/sql/sql_db.cc
@@ -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.
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
0 ok
-1 Error
@@ -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 (!(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);
error= -1;
goto exit;
}
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;
- send_ok(thd);
goto exit;
}
else