diff options
author | unknown <serg@sergbook.mysql.com> | 2005-08-26 13:24:59 +0400 |
---|---|---|
committer | unknown <serg@sergbook.mysql.com> | 2005-08-26 13:24:59 +0400 |
commit | ad594de473a16b0bb0ba4a9292cf3218cd93ac2c (patch) | |
tree | 02fd091693e67b70f5b80fd94b4b006e1816f41c /sql/sql_db.cc | |
parent | 9f23fa9549b721aab000b5f04b100a9b6b0ef1c7 (diff) | |
parent | 9e796abb5bcd8215c07936cefd94813b011f2c2f (diff) | |
download | mariadb-git-ad594de473a16b0bb0ba4a9292cf3218cd93ac2c.tar.gz |
merged
mysys/my_alloc.c:
Auto merged
sql/sql_table.cc:
Auto merged
Diffstat (limited to 'sql/sql_db.cc')
-rw-r--r-- | sql/sql_db.cc | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/sql/sql_db.cc b/sql/sql_db.cc index 5ca3f07f0bd..a4351cfe99c 100644 --- a/sql/sql_db.cc +++ b/sql/sql_db.cc @@ -702,30 +702,28 @@ bool 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_local) { uint tbl_name_len; - if (!tbl->was_dropped) - continue; - - /* 3 for the quotes and the comma*/ - tbl_name_len= strlen(tbl->table_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->table_name); *query_pos++ = '`'; *query_pos++ = ','; } - + if (query_pos != query_data_start) { write_to_binlog(thd, query, query_pos -1 - query, db, db_len); |