mirror of
				https://github.com/MariaDB/server.git
				synced 2025-10-30 04:26:45 +03:00 
			
		
		
		
	binlog even if they changed nothing, and a test for this. This is useful when users use these commands to clean up their master and slave by issuing one command on master (assume master and slave have slightly different data for some reason and you want to clean up both). Note that I have not changed multi-table DELETE and multi-table UPDATE because their error-reporting mechanism is more complicated. mysql-test/r/mysqlbinlog.result: result update mysql-test/r/rpl_charset.result: result update mysql-test/r/rpl_flush_log_loop.result: result update mysql-test/r/rpl_replicate_do.result: result update mysql-test/r/rpl_temporary.result: result update mysql-test/t/mysqlbinlog.test: moving SET TIMESTAMP up as DROP shows up in binlog sql/sql_db.cc: DROP DATABASE IF EXISTS is now always logged to binlog, even if db did not exist sql/sql_delete.cc: DELETE FROM t is now always logged to binlog even if no rows deleted (but in this case, only if really no error). sql/sql_table.cc: DROP TABLE IF EXISTS is now always logged to binlog even if table did not exist sql/sql_update.cc: UPDATE is now always logged to binlog even if no rows updated (but in this case, only if really no error).
		
			
				
	
	
		
			32 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
		
			1.4 KiB
		
	
	
	
		
			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;
 | |
| drop table if exists t11;
 | |
| drop table if exists t11;
 | |
| create table t2 (n int);
 | |
| insert into t2 values(4);
 | |
| create table t2 (s char(20));
 | |
| load data infile '../../std_data/words.dat' into table t2;
 | |
| insert into t2 values('five');
 | |
| create table t1 (m int);
 | |
| insert into t1 values(15),(16),(17);
 | |
| update t1 set m=20 where m=16;
 | |
| delete from t1 where m=17;
 | |
| create table t11 select * from t1;
 | |
| select * from t1;
 | |
| m
 | |
| 15
 | |
| 20
 | |
| select * from t2;
 | |
| n
 | |
| 4
 | |
| select * from t11;
 | |
| ERROR 42S02: Table 'test.t11' doesn't exist
 | |
| drop table if exists t1,t2,t11;
 | |
| show slave status;
 | |
| Slave_IO_State	Master_Host	Master_User	Master_Port	Connect_Retry	Master_Log_File	Read_Master_Log_Pos	Relay_Log_File	Relay_Log_Pos	Relay_Master_Log_File	Slave_IO_Running	Slave_SQL_Running	Replicate_Do_DB	Replicate_Ignore_DB	Replicate_Do_Table	Replicate_Ignore_Table	Replicate_Wild_Do_Table	Replicate_Wild_Ignore_Table	Last_Errno	Last_Error	Skip_Counter	Exec_Master_Log_Pos	Relay_Log_Space	Until_Condition	Until_Log_File	Until_Log_Pos	Master_SSL_Allowed	Master_SSL_CA_File	Master_SSL_CA_Path	Master_SSL_Cert	Master_SSL_Cipher	Master_SSL_Key	Seconds_Behind_Master
 | |
| #	127.0.0.1	root	MASTER_PORT	1	master-bin.000001	1340	slave-relay-bin.000002	1384	master-bin.000001	Yes	Yes			test.t1				0		0	1340	1384	None		0	No						#
 |