diff options
author | unknown <aelkin@mysql.com> | 2006-04-07 20:44:37 +0300 |
---|---|---|
committer | unknown <aelkin@mysql.com> | 2006-04-07 20:44:37 +0300 |
commit | 3ab267bf815637f5e2aaee46b48e82db9ba2c1e2 (patch) | |
tree | 2a8a6667fc42b6fc7579edc879e7cdfb77405432 /sql/sql_repl.cc | |
parent | 0a2cd4bb9f14c0e49b536063e304d9c9934f48a9 (diff) | |
download | mariadb-git-3ab267bf815637f5e2aaee46b48e82db9ba2c1e2.tar.gz |
Bug#17284 erroneous temp table cleanup on slave.
Idea of the fix is for master to send FD event with `created' as 0
to reconnecting slave (upon slave_net_timeout, no master crash) to avoid destroying temp tables.
In a case of a connect by slave to the master after its crash temp tables have been already
cleaned up so that slave can not keep `orphan' temp tables.
mysql-test/r/rpl_temporary.result:
results
mysql-test/t/rpl_temporary.test:
wait-free addon to check temp tables are ok after slave reconnect.
sql/sql_repl.cc:
Storing zero for assigning to `created' of FD event on the reconnecting slave.
mysql-test/include/get_binlog_dump_thread_id.inc:
mysqltest's preudo-macro to calculate $id master dump thread id
Diffstat (limited to 'sql/sql_repl.cc')
-rw-r--r-- | sql/sql_repl.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index 07678d97800..85d93767486 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -466,6 +466,12 @@ impossible position"; (rli->group_master_log_pos) */ int4store((char*) packet->ptr()+LOG_POS_OFFSET+1, 0); + /* + if reconnect master sends FD event with `created' as 0 + to avoid destroying temp tables. + */ + int4store((char*) packet->ptr()+LOG_EVENT_MINIMAL_HEADER_LEN+ + ST_CREATED_OFFSET+1, (ulong) 0); /* send it */ if (my_net_write(net, (char*)packet->ptr(), packet->length())) { |