mirror of
				https://github.com/MariaDB/server.git
				synced 2025-10-27 05:56:07 +03:00 
			
		
		
		
	For this particular bug report it was rpl_loadfile.test that did not make proper cleanup, but the patch includes fixes for other tests aswell. mysql-test/r/rpl_loaddata2.result: Cleanup mysql-test/r/rpl_redirect.result: Cleanup mysql-test/r/rpl_slave_status.result: Cleanup mysql-test/t/rpl_LD_INFILE.test: Most rpl tests need to execute sync_slave_with_master to ensure that cleanup is done on slave mysql-test/t/rpl_drop_temp.test: Most rpl tests need to execute sync_slave_with_master to ensure that cleanup is done on slave mysql-test/t/rpl_ignore_table.test: Most rpl tests need to execute sync_slave_with_master to ensure that cleanup is done on slave mysql-test/t/rpl_loaddata2.test: Most rpl tests need to execute sync_slave_with_master to ensure that cleanup is done on slave mysql-test/t/rpl_loaddata_m.test: Most rpl tests need to execute sync_slave_with_master to ensure that cleanup is done on slave mysql-test/t/rpl_loaddata_s.test: Most rpl tests need to execute sync_slave_with_master to ensure that cleanup is done on slave mysql-test/t/rpl_loadfile.test: Most rpl tests need to execute sync_slave_with_master to ensure that cleanup is done on slave mysql-test/t/rpl_multi_update4.test: Most rpl tests need to execute sync_slave_with_master to ensure that cleanup is done on slave mysql-test/t/rpl_ndb_basic.test: Most rpl tests need to execute sync_slave_with_master to ensure that cleanup is done on slave mysql-test/t/rpl_redirect.test: Most rpl tests need to execute sync_slave_with_master to ensure that cleanup is done on slave mysql-test/t/rpl_row_func001.test: Most rpl tests need to execute sync_slave_with_master to ensure that cleanup is done on slave mysql-test/t/rpl_row_func002.test: Most rpl tests need to execute sync_slave_with_master to ensure that cleanup is done on slave mysql-test/t/rpl_row_sp001.test: Most rpl tests need to execute sync_slave_with_master to ensure that cleanup is done on slave mysql-test/t/rpl_row_sp005.test: Most rpl tests need to execute sync_slave_with_master to ensure that cleanup is done on slave mysql-test/t/rpl_row_sp008.test: Most rpl tests need to execute sync_slave_with_master to ensure that cleanup is done on slave mysql-test/t/rpl_row_sp009.test: Most rpl tests need to execute sync_slave_with_master to ensure that cleanup is done on slave mysql-test/t/rpl_row_sp010.test: Most rpl tests need to execute sync_slave_with_master to ensure that cleanup is done on slave mysql-test/t/rpl_row_sp011.test: Most rpl tests need to execute sync_slave_with_master to ensure that cleanup is done on slave mysql-test/t/rpl_row_sp012.test: Most rpl tests need to execute sync_slave_with_master to ensure that cleanup is done on slave mysql-test/t/rpl_row_trig001.test: Most rpl tests need to execute sync_slave_with_master to ensure that cleanup is done on slave mysql-test/t/rpl_row_trig002.test: Most rpl tests need to execute sync_slave_with_master to ensure that cleanup is done on slave mysql-test/t/rpl_skip_error.test: Most rpl tests need to execute sync_slave_with_master to ensure that cleanup is done on slave mysql-test/t/rpl_slave_status.test: Most rpl tests need to execute sync_slave_with_master to ensure that cleanup is done on slave mysql-test/t/rpl_sp.test: Most rpl tests need to execute sync_slave_with_master to ensure that cleanup is done on slave mysql-test/t/rpl_sp004.test: Most rpl tests need to execute sync_slave_with_master to ensure that cleanup is done on slave
		
			
				
	
	
		
			75 lines
		
	
	
		
			2.2 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			75 lines
		
	
	
		
			2.2 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| #############################################################################
 | |
| # Original Author: JBM                                                      #
 | |
| # Original Date: Aug/22/2005                                                #
 | |
| # Update: 08/29/2005  Added save pos and sync                               #
 | |
| #############################################################################
 | |
| #TEST: SP to test security and current_user and user                        #
 | |
| #############################################################################
 | |
| 
 | |
| 
 | |
| # Includes
 | |
| -- source include/have_binlog_format_row.inc
 | |
| -- source include/not_embedded.inc
 | |
| -- source include/master-slave.inc
 | |
| 
 | |
| 
 | |
| # Begin clean up test section
 | |
| connection master;
 | |
| --disable_warnings
 | |
| DROP PROCEDURE IF EXISTS test.p1;
 | |
| DROP PROCEDURE IF EXISTS test.p2;
 | |
| DROP PROCEDURE IF EXISTS test.p3;
 | |
| 
 | |
| 
 | |
| # Begin test section 1 
 | |
| # Create user user1 with no particular access rights
 | |
| grant usage on *.* to user1@localhost;
 | |
| flush privileges;
 | |
| 
 | |
| SELECT CURRENT_USER();
 | |
| SELECT USER();
 | |
| CREATE PROCEDURE test.p1 () SQL SECURITY INVOKER SELECT CURRENT_USER(), USER();
 | |
| CREATE PROCEDURE test.p2 () SQL SECURITY DEFINER CALL test.p1();
 | |
| CREATE PROCEDURE test.p3 () SQL SECURITY INVOKER CALL test.p1();
 | |
| GRANT EXECUTE ON PROCEDURE p1 TO user1@localhost;
 | |
| GRANT EXECUTE ON PROCEDURE p2 TO user1@localhost;
 | |
| GRANT EXECUTE ON PROCEDURE p3 TO user1@localhost;
 | |
| 
 | |
| # Need to wait for the rights to be applied at the slave
 | |
| sync_slave_with_master;
 | |
| 
 | |
| let $message=<********  Master user1 p3 & p2 calls *******>;
 | |
| --source include/show_msg.inc
 | |
| connect (muser1,localhost,user1,,);
 | |
| connection muser1;
 | |
| SELECT CURRENT_USER();
 | |
| SELECT USER();
 | |
| CALL test.p3();
 | |
| CALL test.p2();
 | |
| 
 | |
| let $message=<********  Slave user1 p3 & p2 calls *******>;
 | |
| --source include/show_msg.inc
 | |
| connect (suser1,127.0.0.1,user1,,test,$SLAVE_MYPORT,);
 | |
| 
 | |
| connection master;
 | |
| save_master_pos;
 | |
| connection suser1;
 | |
| sync_with_master;
 | |
| 
 | |
| SELECT CURRENT_USER();
 | |
| SELECT USER();
 | |
| CALL test.p3();
 | |
| CALL test.p2();
 | |
| 
 | |
| # Cleanup
 | |
| connection master;
 | |
| DROP PROCEDURE IF EXISTS test.p1;
 | |
| DROP PROCEDURE IF EXISTS test.p3;
 | |
| DROP PROCEDURE IF EXISTS test.p2;
 | |
| DROP TABLE IF EXISTS test.t1;
 | |
| DROP TABLE IF EXISTS test.t2;
 | |
| sync_slave_with_master;
 | |
| 
 | |
| # End of 5.0 test case
 | |
| 
 |