summaryrefslogtreecommitdiff
path: root/sql/sql_base.cc
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2004-03-25 23:29:45 +0200
committerunknown <monty@mysql.com>2004-03-25 23:29:45 +0200
commit526b25e2633bbc44b867b548f5c7f633517e5b0f (patch)
tree7815fb40163d1db39e3991dcd19341ef57d08d74 /sql/sql_base.cc
parentf6e33d67e1132a18e7a6ab49c2b6ff00da5112c8 (diff)
parent922818a79809d789976e64a8b4faabd305863a7c (diff)
downloadmariadb-git-526b25e2633bbc44b867b548f5c7f633517e5b0f.tar.gz
Merge with 4.0
BitKeeper/etc/logging_ok: auto-union BitKeeper/deleted/.del-libmysql.def~f5dffcb3ed925d28: Auto merged BitKeeper/deleted/.del-post-incoming~9f2168f531f09f3b: Auto merged BitKeeper/deleted/.del-post-outgoing~1dd3d8f0f6e8f3cd: Auto merged VC++Files/innobase/innobase.dsp: Auto merged VC++Files/strings/MASM6x/strings.dsp: Auto merged client/mysqldump.c: Auto merged innobase/sync/sync0sync.c: Auto merged myisam/mi_check.c: Auto merged mysql-test/t/union.test: Auto merged mysql-test/t/update.test: Auto merged mysys/mf_iocache.c: Auto merged sql/nt_servc.cc: Auto merged mysql-test/r/system_mysql_db.result: Auto merged sql/sql_base.cc: Auto merged
Diffstat (limited to 'sql/sql_base.cc')
-rw-r--r--sql/sql_base.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 4115aac5123..c54892c9341 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -485,7 +485,7 @@ void close_temporary_tables(THD *thd)
return;
LINT_INIT(end);
- query_buf_size= 50; // Enough for DROP ... TABLE
+ query_buf_size= 50; // Enough for DROP ... TABLE IF EXISTS
for (table=thd->temporary_tables ; table ; table=table->next)
/*
@@ -496,7 +496,8 @@ void close_temporary_tables(THD *thd)
query_buf_size+= table->key_length+1;
if ((query = alloc_root(&thd->mem_root, query_buf_size)))
- end=strmov(query, "DROP /*!40005 TEMPORARY */ TABLE ");
+ // Better add "if exists", in case a RESET MASTER has been done
+ end=strmov(query, "DROP /*!40005 TEMPORARY */ TABLE IF EXISTS ");
for (table=thd->temporary_tables ; table ; table=next)
{