summaryrefslogtreecommitdiff
path: root/sql/sql_db.cc
diff options
context:
space:
mode:
authorunknown <serg@sergbook.mysql.com>2005-08-25 00:08:02 +0400
committerunknown <serg@sergbook.mysql.com>2005-08-25 00:08:02 +0400
commit9e796abb5bcd8215c07936cefd94813b011f2c2f (patch)
tree7b55868b560cef2962cb095bd8339813ddef9f73 /sql/sql_db.cc
parente0f9b8a807fb09df27b016d0ad3852e3320f72dd (diff)
parent961abf79ab8a9b74490b3152edc15b139c0e626a (diff)
downloadmariadb-git-9e796abb5bcd8215c07936cefd94813b011f2c2f.tar.gz
merged
Diffstat (limited to 'sql/sql_db.cc')
-rw-r--r--sql/sql_db.cc18
1 files changed, 8 insertions, 10 deletions
diff --git a/sql/sql_db.cc b/sql/sql_db.cc
index a279fae93a9..7635774e3ac 100644
--- a/sql/sql_db.cc
+++ b/sql/sql_db.cc
@@ -701,30 +701,28 @@ int mysql_rm_db(THD *thd,char *db,bool if_exists, bool silent)
if (!(query= thd->alloc(MAX_DROP_TABLE_Q_LEN)))
goto exit; /* not much else we can do */
- query_pos= query_data_start= strmov(query,"drop table ");
+ query_pos= query_data_start= strmov(query,"drop table ");
query_end= query + MAX_DROP_TABLE_Q_LEN;
db_len= strlen(db);
-
+
for (tbl= dropped_tables; tbl; tbl= tbl->next)
{
uint tbl_name_len;
- if (!tbl->was_dropped)
- continue;
-
- /* 3 for the quotes and the comma*/
- tbl_name_len= strlen(tbl->real_name) + 3;
+
+ /* 3 for the quotes and the comma*/
+ tbl_name_len= strlen(tbl->real_name) + 3;
if (query_pos + tbl_name_len + 1 >= query_end)
{
write_to_binlog(thd, query, query_pos -1 - query, db, db_len);
query_pos= query_data_start;
- }
-
+ }
+
*query_pos++ = '`';
query_pos= strmov(query_pos,tbl->real_name);
*query_pos++ = '`';
*query_pos++ = ',';
}
-
+
if (query_pos != query_data_start)
{
write_to_binlog(thd, query, query_pos -1 - query, db, db_len);