diff options
author | serg@sergbook.mysql.com <> | 2005-08-26 13:24:59 +0400 |
---|---|---|
committer | serg@sergbook.mysql.com <> | 2005-08-26 13:24:59 +0400 |
commit | d591705e695a4040218366705be26dad6ef2d4bf (patch) | |
tree | 02fd091693e67b70f5b80fd94b4b006e1816f41c /sql | |
parent | 4da4a66b642fc189994bf63a4e6f892c41299024 (diff) | |
parent | 714b27c71c256332f803df5090ed1b8645042141 (diff) | |
download | mariadb-git-d591705e695a4040218366705be26dad6ef2d4bf.tar.gz |
merged
Diffstat (limited to 'sql')
-rw-r--r-- | sql/sql_db.cc | 18 | ||||
-rw-r--r-- | sql/sql_table.cc | 3 | ||||
-rw-r--r-- | sql/table.h | 3 |
3 files changed, 8 insertions, 16 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); diff --git a/sql/sql_table.cc b/sql/sql_table.cc index a7aa7f30aa0..8874a70327e 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -229,7 +229,6 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists, for (table= tables; table; table= table->next_local) { char *db=table->db; - table->was_dropped= 0; mysql_ha_flush(thd, table, MYSQL_HA_CLOSE_FINAL); if (!close_temporary_table(thd, db, table->table_name)) { @@ -301,8 +300,6 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists, wrong_tables.append(','); wrong_tables.append(String(table->table_name,system_charset_info)); } - else - table->was_dropped= 1; } thd->tmp_table_used= tmp_table_deleted; error= 0; diff --git a/sql/table.h b/sql/table.h index 6af58cfd1ca..c9095ad48f6 100644 --- a/sql/table.h +++ b/sql/table.h @@ -570,9 +570,6 @@ typedef struct st_table_list st_table_list *embedding; /* nested join containing the table */ List<struct st_table_list> *join_list;/* join list the table belongs to */ bool cacheable_table; /* stop PS caching */ - - /* used for proper partially successful DROP DATABASE binlogging */ - bool was_dropped; /* used in multi-upd/views privilege check */ bool table_in_first_from_clause; bool skip_temporary; /* this table shouldn't be temporary */ |