summaryrefslogtreecommitdiff
path: root/sql/sql_table.cc
diff options
context:
space:
mode:
authorsasha@mysql.sashanet.com <>2000-11-25 23:29:01 -0700
committersasha@mysql.sashanet.com <>2000-11-25 23:29:01 -0700
commitdd24015eaca6fc813623f9f87c8478da3701a97b (patch)
treea230abbd46e3341756e3e5629a69736b6a057239 /sql/sql_table.cc
parentacc8e0c9a2d0419cd3a5fa23f4b5f913e6fdbde6 (diff)
downloadmariadb-git-dd24015eaca6fc813623f9f87c8478da3701a97b.tar.gz
Fixed temp tables to work with replication. It will not work if you stop the slave
while slave thread has temp tables - not hard to fix though, but it is time to go to bed added a new test case for temp table replication and Slave_open_temp_tables status variable. Misc fixes
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 d1be84b4143..9ae1b91b08c 100644
--- a/sql/sql_table.cc
+++ b/sql/sql_table.cc
@@ -1437,7 +1437,7 @@ int mysql_alter_table(THD *thd,char *new_db, char *new_name,
}
/* Remove link to old table and rename the new one */
close_temporary_table(thd,table->table_cache_key,table_name);
- if (rename_temporary_table(new_table, new_db, new_name))
+ if (rename_temporary_table(thd, new_table, new_db, new_name))
{ // Fatal error
close_temporary_table(thd,new_db,tmp_name);
my_free((gptr) new_table,MYF(0));
@@ -1611,6 +1611,8 @@ copy_data_between_tables(TABLE *from,TABLE *to,
(copy_end++)->set(*ptr,def->field,0);
}
+ found_count=delete_count=0;
+
if(order) {
from->io_cache=(IO_CACHE*) my_malloc(sizeof(IO_CACHE),
MYF(MY_FAE | MY_ZEROFILL));
@@ -1628,7 +1630,6 @@ copy_data_between_tables(TABLE *from,TABLE *to,
init_read_record(&info, thd, from, (SQL_SELECT *) 0, 1,1);
- found_count=delete_count=0;
next_field=to->next_number_field;
while (!(error=info.read_record(&info)))
{