summaryrefslogtreecommitdiff
path: root/sql/sql_delete.cc
diff options
context:
space:
mode:
authorunknown <monty@mysql.com>2004-09-09 07:26:28 +0300
committerunknown <monty@mysql.com>2004-09-09 07:26:28 +0300
commite18b7ea95942cb8ab0b31d453929dde50dcf3756 (patch)
treee2b882265e31ada44f3adec357920530f0c0ac31 /sql/sql_delete.cc
parentc92b5349701ba68fa7ab97abf14933de8d6352fe (diff)
parent33efc9677d6f6a68d3dba69f4c036856ac4af5fe (diff)
downloadmariadb-git-e18b7ea95942cb8ab0b31d453929dde50dcf3756.tar.gz
Merge on pull
BitKeeper/etc/logging_ok: auto-union include/my_sys.h: Auto merged mysql-test/r/func_in.result: 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 089c0c00c3b..030541a0093 100644
--- a/sql/sql_delete.cc
+++ b/sql/sql_delete.cc
@@ -693,17 +693,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
@@ -745,8 +741,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);