diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 06cb8ef161c..839ea6b7245 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -6928,7 +6928,7 @@ copy_data_between_tables(TABLE *from,TABLE *to, { int error= 1, errpos= 0; Copy_field *copy= NULL, *copy_end; - ulong found_count,delete_count; + ulong found_count= 0, delete_count= 0; THD *thd= current_thd; uint length= 0; SORT_FIELD *sortorder; @@ -6996,8 +6996,6 @@ copy_data_between_tables(TABLE *from,TABLE *to, } - found_count=delete_count=0; - if (order) { if (to->s->primary_key != MAX_KEY && to->file->primary_key_is_clustered())