summaryrefslogtreecommitdiff
path: root/sql/sql_table.cc
diff options
context:
space:
mode:
authorunknown <monty@narttu.mysql.fi>2003-03-10 14:13:46 +0200
committerunknown <monty@narttu.mysql.fi>2003-03-10 14:13:46 +0200
commita6ea34ee5b2244dc85821cfbaedb4ccf5f397011 (patch)
treee5ead60265e7c75b687cf6327ae7a9b589cc6e12 /sql/sql_table.cc
parent3223245de3177fb42ce415b35f9edd050a5733b1 (diff)
parent5c100a6975cb50a6e20e6a0380bfb616e54eab70 (diff)
downloadmariadb-git-a6ea34ee5b2244dc85821cfbaedb4ccf5f397011.tar.gz
merge
BitKeeper/etc/ignore: auto-union BitKeeper/deleted/.del-delete.result: Auto merged client/mysqlbinlog.cc: Auto merged libmysql/libmysql.c: Auto merged mysql-test/r/delete.result: Auto merged mysql-test/r/type_datetime.result: Auto merged mysql-test/t/delete.test: Auto merged mysql-test/t/type_datetime.test: Auto merged sql/field.h: Auto merged sql/ha_myisam.cc: Auto merged sql/lock.cc: Auto merged sql/log_event.h: Auto merged sql/mysql_priv.h: Auto merged sql/mysqld.cc: Auto merged sql/share/polish/errmsg.txt: Auto merged sql/slave.cc: Auto merged sql/sql_repl.h: Auto merged sql/sql_select.cc: Auto merged
Diffstat (limited to 'sql/sql_table.cc')
-rw-r--r--sql/sql_table.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/sql_table.cc b/sql/sql_table.cc
index 156d2b842f1..adaedebfa28 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -65,7 +65,7 @@ static int copy_data_between_tables(TABLE *from,TABLE *to,
int mysql_rm_table(THD *thd,TABLE_LIST *tables, my_bool if_exists)
{
- int error;
+ int error= 0;
DBUG_ENTER("mysql_rm_table");
/* mark for close and remove all cached entries */
@@ -80,6 +80,7 @@ int mysql_rm_table(THD *thd,TABLE_LIST *tables, my_bool if_exists)
{
my_error(ER_TABLE_NOT_LOCKED_FOR_WRITE,MYF(0),
tables->real_name);
+ error= 1;
goto err;
}
while (global_read_lock && ! thd->killed)
@@ -173,7 +174,7 @@ int mysql_rm_table_part2(THD *thd, TABLE_LIST *tables, bool if_exists,
for (table=tables ; table ; table=table->next)
{
- char *db=table->db ? table->db : thd->db;
+ char *db=table->db;
mysql_ha_closeall(thd, table);
if (!close_temporary_table(thd, db, table->real_name))
{