summaryrefslogtreecommitdiff
path: root/sql/sql_db.cc
diff options
context:
space:
mode:
authorunknown <msvensson@neptunus.(none)>2006-01-31 12:52:25 +0100
committerunknown <msvensson@neptunus.(none)>2006-01-31 12:52:25 +0100
commit3a8d4de56e47b34b746738a8a658ee259bc0af40 (patch)
tree06422846249241398aa9d5bcad2b04fc1b1f4e05 /sql/sql_db.cc
parent26dcee98fa3d3f6dd5a8341d2571006f5af25a5a (diff)
parente840ce7f830ae99af7c4682c315cb5c7860fb969 (diff)
downloadmariadb-git-3a8d4de56e47b34b746738a8a658ee259bc0af40.tar.gz
Merge neptunus.(none):/home/msvensson/mysql/bug15302/my41-bug15302
into neptunus.(none):/home/msvensson/mysql/bug15302/my50-bug15302 client/mysqltest.c: Already in 5.0 sql/sql_db.cc: "mysql_create_db" is already silent in 5.0
Diffstat (limited to 'sql/sql_db.cc')
-rw-r--r--sql/sql_db.cc12
1 files changed, 9 insertions, 3 deletions
diff --git a/sql/sql_db.cc b/sql/sql_db.cc
index 2500b213f4c..136f7eb6a71 100644
--- a/sql/sql_db.cc
+++ b/sql/sql_db.cc
@@ -391,6 +391,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
FALSE ok
TRUE Error
@@ -431,17 +437,17 @@ bool 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);
- error= 0;
+ ER_DB_CREATE_EXISTS, ER(ER_DB_CREATE_EXISTS), db);
if (!silent)
send_ok(thd);
+ error= 0;
goto exit;
}
else