mirror of
				https://github.com/MariaDB/server.git
				synced 2025-10-31 15:50:51 +03:00 
			
		
		
		
	sync using replicate-wild-ignore-table Problem: changes in character set variables before an action on an replication-ignored table makes slave to forget new variable values. Fix: initialize one_shot variables only when 4.1 -> 5.x replication is running. mysql-test/r/rpl_ignore_table.result: Adding test case mysql-test/t/rpl_ignore_table-slave.opt: Don't replicate tables with names starting with "tmptbl" mysql-test/t/rpl_ignore_table.test: Adding test case sql/sql_parse.cc: Reset one_shot variables only if we do 4.1->5.x replication. In other cases we cannot do that: resetting thd->variables out of sync with st_relay_log_info::cached_charset, which makes st_relay_log_info::cached_charset_compare() not to notice character set related variables changes afterwards.
		
			
				
	
	
		
			33 lines
		
	
	
		
			932 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			33 lines
		
	
	
		
			932 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| stop slave;
 | ||
| drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
 | ||
| reset master;
 | ||
| reset slave;
 | ||
| drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
 | ||
| start slave;
 | ||
| **** Test case for BUG#16487 ****
 | ||
| **** Master ****
 | ||
| CREATE TABLE test.t4 (a int);
 | ||
| CREATE TABLE test.t1 (a int);
 | ||
| UPDATE test.t4 NATURAL JOIN test.t1 SET t1.a=5;
 | ||
| **** Slave ****
 | ||
| SELECT * FROM t4;
 | ||
| a
 | ||
| DROP TABLE t1;
 | ||
| DROP TABLE t4;
 | ||
| DROP TABLE IF EXISTS t5;
 | ||
| CREATE TABLE t5 (
 | ||
| word varchar(50) collate utf8_unicode_ci NOT NULL default ''
 | ||
| ) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
 | ||
| SET @@session.character_set_client=33,@@session.collation_connection=192;
 | ||
| CREATE TEMPORARY TABLE tmptbl504451f4258$1 (id INT NOT NULL) ENGINE=MEMORY;
 | ||
| INSERT INTO t5 (word)  VALUES ('TEST’');
 | ||
| SELECT HEX(word) FROM t5;
 | ||
| HEX(word)
 | ||
| 54455354E28099
 | ||
| SELECT HEX(word) FROM t5;
 | ||
| HEX(word)
 | ||
| 54455354E28099
 | ||
| SELECT * FROM tmptbl504451f4258$1;
 | ||
| ERROR 42S02: Table 'test.tmptbl504451f4258$1' doesn't exist
 | ||
| DROP TABLE t5;
 |