summaryrefslogtreecommitdiff
path: root/sql/sql_delete.cc
diff options
context:
space:
mode:
authorunknown <serg@serg.mylan>2004-08-24 17:24:23 +0200
committerunknown <serg@serg.mylan>2004-08-24 17:24:23 +0200
commita49c12f5152791042eeecac19db9054ad845e3dd (patch)
tree35c94403332fed86012546db775d8817473f7435 /sql/sql_delete.cc
parent62a63815e119807134de74edb78e478b75a6b874 (diff)
parent9d1a9d72cba1aa828e631f520540411d7508a4e0 (diff)
downloadmariadb-git-a49c12f5152791042eeecac19db9054ad845e3dd.tar.gz
manually merged
BitKeeper/etc/logging_ok: auto-union mysql-test/r/binary.result: Auto merged mysql-test/r/truncate.result: Auto merged mysql-test/t/binary.test: Auto merged mysql-test/t/truncate.test: Auto merged mysys/my_lib.c: Auto merged strings/my_vsnprintf.c: Auto merged support-files/Makefile.am: Auto merged
Diffstat (limited to 'sql/sql_delete.cc')
-rw-r--r--sql/sql_delete.cc8
1 files changed, 1 insertions, 7 deletions
diff --git a/sql/sql_delete.cc b/sql/sql_delete.cc
index b76bad2805b..ffeeb98488a 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -607,17 +607,13 @@ int mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok)
int error;
DBUG_ENTER("mysql_truncate");
+ bzero((char*) &create_info,sizeof(create_info));
/* If it is a temporary table, close and regenerate it */
if (!dont_send_ok && (table_ptr=find_temporary_table(thd,table_list->db,
table_list->real_name)))
{
TABLE *table= *table_ptr;
- HA_CREATE_INFO create_info;
table->file->info(HA_STATUS_AUTO | HA_STATUS_NO_LOCK);
- bzero((char*) &create_info,sizeof(create_info));
- create_info.auto_increment_value= table->file->auto_increment_value;
- create_info.default_table_charset= table->table_charset;
-
db_type table_type=table->db_type;
strmov(path,table->path);
*table_ptr= table->next; // Unlink table from list
@@ -659,8 +655,6 @@ int mysql_truncate(THD *thd, TABLE_LIST *table_list, bool dont_send_ok)
DBUG_RETURN(-1);
}
- bzero((char*) &create_info,sizeof(create_info));
-
*fn_ext(path)=0; // Remove the .frm extension
error= ha_create_table(path,&create_info,1) ? -1 : 0;
query_cache_invalidate3(thd, table_list, 0);