summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <sasha@mysql.sashanet.com>2001-11-27 18:21:39 -0700
committerunknown <sasha@mysql.sashanet.com>2001-11-27 18:21:39 -0700
commit8c335b8a21056c83f771cef8b9d3b551682a50ba (patch)
tree82486bd3d1d0ded60ebe235a1ac877c7d2d6ad83 /sql
parentaaed141aa6d8d80011c56c12abe7ddfeefc285cf (diff)
parent08fc358542509a63e04eb544885d03f10c576a22 (diff)
downloadmariadb-git-8c335b8a21056c83f771cef8b9d3b551682a50ba.tar.gz
Merge work:/home/bk/mysql into mysql.sashanet.com:/reiser-data/mysql
Diffstat (limited to 'sql')
-rw-r--r--sql/slave.cc7
-rw-r--r--sql/sql_base.cc4
2 files changed, 8 insertions, 3 deletions
diff --git a/sql/slave.cc b/sql/slave.cc
index 958ea0f1e18..5fdbab7c7c6 100644
--- a/sql/slave.cc
+++ b/sql/slave.cc
@@ -885,7 +885,12 @@ static int exec_event(THD* thd, NET* net, MASTER_INFO* mi, int event_len)
mi->inc_pos(event_len);
flush_master_info(mi);
- if(slave_skip_counter)
+ if(slave_skip_counter && /* protect against common user error of
+ setting the counter to 1 instead of 2
+ while recovering from an failed
+ auto-increment insert */
+ !(type_code == INTVAR_EVENT &&
+ slave_skip_counter == 1))
--slave_skip_counter;
delete ev;
return 0; // avoid infinite update loops
diff --git a/sql/sql_base.cc b/sql/sql_base.cc
index 70dc2ed058d..656758623bc 100644
--- a/sql/sql_base.cc
+++ b/sql/sql_base.cc
@@ -527,10 +527,10 @@ void close_temporary_tables(THD *thd)
if (query) // we might be out of memory, but this is not fatal
{
// skip temporary tables not created directly by the user
- if (table->table_name[0] != '#')
+ if (table->real_name[0] != '#')
{
end = strxmov(end,table->table_cache_key,".",
- table->table_name,",", NullS);
+ table->real_name,",", NullS);
// here we assume table_cache_key always starts
// with \0 terminated db name
found_user_tables = 1;