29 lines
		
	
	
		
			628 B
		
	
	
	
		
			Plaintext
		
	
	
	
		
		
			
		
	
	
			29 lines
		
	
	
		
			628 B
		
	
	
	
		
			Plaintext
		
	
	
	
| 
								 | 
							
								CREATE DATABASE federated;
							 | 
						||
| 
								 | 
							
								CREATE DATABASE federated;
							 | 
						||
| 
								 | 
							
								#
							 | 
						||
| 
								 | 
							
								# Bug#47525: MySQL crashed (Federated)
							 | 
						||
| 
								 | 
							
								#
							 | 
						||
| 
								 | 
							
								# Switch to slave
							 | 
						||
| 
								 | 
							
								CREATE TABLE t1(a INT);
							 | 
						||
| 
								 | 
							
								INSERT INTO t1 VALUES (1);
							 | 
						||
| 
								 | 
							
								# Switch to master
							 | 
						||
| 
								 | 
							
								CREATE TABLE t1(a INT) ENGINE=FEDERATED
							 | 
						||
| 
								 | 
							
								CONNECTION='mysql://root@127.0.0.1:SLAVE_PORT/test/t1';
							 | 
						||
| 
								 | 
							
								SELECT * FROM t1;
							 | 
						||
| 
								 | 
							
								a
							 | 
						||
| 
								 | 
							
								1
							 | 
						||
| 
								 | 
							
								# Start a asynchronous reload
							 | 
						||
| 
								 | 
							
								# Wait for tables to be closed
							 | 
						||
| 
								 | 
							
								# Ensure that the server didn't crash
							 | 
						||
| 
								 | 
							
								SELECT * FROM t1;
							 | 
						||
| 
								 | 
							
								a
							 | 
						||
| 
								 | 
							
								1
							 | 
						||
| 
								 | 
							
								# Drop tables on master and slave
							 | 
						||
| 
								 | 
							
								DROP TABLE t1;
							 | 
						||
| 
								 | 
							
								DROP TABLE t1;
							 | 
						||
| 
								 | 
							
								# Federated cleanup
							 | 
						||
| 
								 | 
							
								DROP TABLE IF EXISTS federated.t1;
							 | 
						||
| 
								 | 
							
								DROP DATABASE federated;
							 | 
						||
| 
								 | 
							
								DROP TABLE IF EXISTS federated.t1;
							 | 
						||
| 
								 | 
							
								DROP DATABASE federated;
							 |