mariadb/mysql-test/t
unknown 03dbf8ccbb Fix for BUG#1686
"If 2 master threads with same-name temp table, slave makes bad binlog"
and (two birds with one stone) for
BUG#1240 "slave of slave breaks when STOP SLAVE was issud on parent slave
and temp tables".

Here is the design change:
in a slave running with --log-slave-updates, events are now logged with the
thread id they had on the master. So no more id conflicts between master threads,
but introduces id conflicts between one master thread and one normal 
client thread connected to the slave. This is solved by storing the server id
in the temp table's name.

New test which requires mysql-test-run to be run with --manager,
otherwise it will be skipped.

Undoing a Monty's change (hum, a chill runs down my spine ;) which was
"Cleanup temporary tables when slave ends" in ChangeSet 1.1572.1.1.


mysql-test/mysql-test-run.sh:
  One new test which needs more than one slave so must be hardcoded in mysql-test-run.sh.
sql/log_event.cc:
  The event needs to carry a slave_proxy_id (which is set at event's creation
  and used at event's logging).
  This is used for events created by ::exec_event() in the slave SQL thread:
  now we want to log these events with the thread id they had on the master.
  This is so that several same-name temp tables simultaneously created on
  the master end up with not the same thread id in the slave's binlog.
sql/log_event.h:
  Query and Load need to carry a slave_proxy_id, like they carried a thread_id
  (to replicate temp tables well).
sql/slave.cc:
  Do not free temp tables in the slave SQL thread. Or they will be lost when
  one does STOP SLAVE / START SLAVE.
  We even save them in rli->save_temporary_tables and set thd->temporary_tables=0
  to prevent them to be freed.
sql/sql_base.cc:
  Put the server id in the table cache key name for temp tables
  (we already put the slave_proxy_id, but we also need the server id
  in case normal clients (not slave threads) are using temp tables
  on the slave).
sql/unireg.h:
  4 more bytes, to store the server id.
2003-10-29 14:23:35 +01:00
..
alias.test
alter_table.test
analyse.test
ansi-master.opt
ansi.test
auto_increment.test
backup-master.sh
backup.test
bdb-alter-table-1.test
bdb-alter-table-2-master.opt
bdb-alter-table-2.test
bdb-crash.test
bdb-deadlock.test
bdb.test
bdb_cache-master.opt
bdb_cache.test
bench_count_distinct.test
bigint.test
binary.test
bool.test
bulk_replace.test
case.test
cast.test
check.test
comments.test
compare.test
constraints.test
convert.test
count_distinct.test
count_distinct2-master.opt
count_distinct2.test
create.test
ctype_cp1251-master.opt
ctype_cp1251.test
ctype_latin1_de-master.opt
ctype_latin1_de.test
ctype_ujis-master.opt
ctype_ujis.test
delayed.test
delete.test
dirty_close.test
distinct.test
drop.test
drop_temp_table.test
empty_table.test
errors.test
explain.test
flush.test
flush_table.test
foreign_key.test
fulltext.test
fulltext_cache.test
fulltext_distinct.test
fulltext_left_join.test
fulltext_multi.test
fulltext_order_by.test
fulltext_update.test
fulltext_var.test
func_concat.test
func_crypt.test
func_date_add.test
func_encrypt-master.opt
func_encrypt.test
func_equal.test
func_group.test
func_if.test
func_in.test
func_isnull.test
func_like.test
func_math.test
func_misc.test
func_op.test
func_regexp.test
func_set.test
func_str.test
func_system.test
func_test.test
func_time.test
func_timestamp.test
gcc296.test
grant.test
grant_cache-master.opt
grant_cache.test
group_by.test
handler.test
having.test
heap.test
innodb-deadlock.test
innodb.test
innodb_cache-master.opt
innodb_cache.test
innodb_handler.test
insert.test
insert_select.test
isam.test
join.test
join_crash.test
join_outer.test
key.test
key_diff.test
key_primary.test
keywords.test
kill.test
limit.test
loaddata.test
lock.test
lock_multi.test
lock_tables_lost_commit-master.opt
lock_tables_lost_commit.test
lowercase_table-master.opt
lowercase_table.test
merge.test
mix_innodb_myisam_binlog.test
multi_update-master.opt
multi_update.test
myisam.test
mysqlbinlog-master.opt
mysqlbinlog.test
mysqldump.test
null.test
null_key.test
odbc.test
olap.test
openssl_1.test
order_by.test
order_fill_sortbuf-master.opt
order_fill_sortbuf.test
outfile.test
overflow.test
packet.test
query_cache.test
query_cache_merge.test
raid.test
range.test
README
rename.test
repair.test
repair_part2-master.sh
repair_part2.test
replace.test
rollback.test
rpl000001.test
rpl000002.test
rpl000003.test
rpl000004.test
rpl000005.test
rpl000006.test
rpl000008-slave.opt
rpl000008.test
rpl000009-slave.opt
rpl000009.test
rpl000010-slave.opt
rpl000010.test
rpl000011.test
rpl000012.test
rpl000013-slave.opt
rpl000013.test
rpl000015-slave.sh
rpl000015.slave-mi
rpl000015.test
rpl000016-slave.opt
rpl000017-slave.opt
rpl000017-slave.sh
rpl000017.test
rpl000018-master.opt
rpl000018-slave.opt
rpl000018.test
rpl_alter.test
rpl_chain_temp_table.test Fix for BUG#1686 2003-10-29 14:23:35 +01:00
rpl_do_grant.test
rpl_empty_master_crash.test
rpl_error_ignored_table-slave.opt
rpl_error_ignored_table.test
rpl_failsafe.test
rpl_flush_log_loop-master.opt
rpl_flush_log_loop-master.sh
rpl_flush_log_loop-slave.opt
rpl_flush_log_loop-slave.sh
rpl_flush_log_loop.test
rpl_get_lock.test
rpl_ignore_grant-slave.opt
rpl_ignore_grant.test
rpl_insert_id.test
rpl_loaddata.test
rpl_loaddata_rule_m-master.opt
rpl_loaddata_rule_m.test
rpl_loaddata_rule_s-slave.opt
rpl_loaddata_rule_s.test
rpl_loaddatalocal.test
rpl_log-master.opt
rpl_log-slave.opt
rpl_log.test
rpl_log_pos.test
rpl_master_pos_wait.test
rpl_max_relay_size.test
rpl_mystery22.test
rpl_redirect.test
rpl_relayspace-slave.opt
rpl_relayspace.test
rpl_replicate_do-slave.opt
rpl_replicate_do.test
rpl_reset_slave.test
rpl_rotate_logs-master.opt
rpl_rotate_logs-slave.sh
rpl_rotate_logs.slave-mi
rpl_rotate_logs.test
rpl_skip_error-slave.opt
rpl_skip_error.test
rpl_sporadic_master-master.opt
rpl_sporadic_master.test
rpl_trunc_binlog.test
sel000001.test
sel000002.test
sel000003.test
sel000031.test
sel000032.test
sel000033.test
sel000100.test
select.test
select_found.test
select_safe.test
show_check.test
status.test
symlink.test
tablelock.test
temp_table.test
timezone-master.opt
timezone.test
truncate.test
type_blob.test
type_date.test
type_datetime.test
type_decimal.test
type_enum.test
type_float.test
type_ranges.test
type_set.test
type_time.test
type_timestamp.test
type_uint.test
type_year.test
union.test
update.test
user_var.test
varbinary.test
variables-master.opt
variables.test
warnings.test