mirror of
				https://github.com/MariaDB/server.git
				synced 2025-10-24 07:13:33 +03:00 
			
		
		
		
	 b99e11c8bd
			
		
	
	b99e11c8bd
	
	
	
		
			
			run at startup" The server returned an error when trying to execute init-file with a stored procedure that could return multiple result sets to the client. A stored procedure can return multiple result sets if it contains PREPARE, SELECT, SHOW and similar statements. The fix is to set client_capabilites|=CLIENT_MULTI_RESULTS in sql_parse.cc:handle_bootstrap(). There is no "client" really, so nothing is ever sent. This makes init-file feature behave consistently: the prepared statements that can be called directly in the init-file can be used in a stored procedure too. Re-committed the patch originally submitted by Per-Erik after review.
		
			
				
	
	
		
			21 lines
		
	
	
		
			386 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			21 lines
		
	
	
		
			386 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| #
 | |
| # This is a regression test for bug #2526 "--init-file crashes MySQL if it
 | |
| # contains a large select"
 | |
| #
 | |
| # See mysql-test/std_data/init_file.dat and
 | |
| # mysql-test/t/init_file-master.opt for the actual test
 | |
| # 
 | |
| 
 | |
| --echo ok
 | |
| --echo end of 4.1 tests
 | |
| #
 | |
| # Chec 5.x features
 | |
| #
 | |
| # Expected:
 | |
| #   3, 5, 7, 11, 13 
 | |
| select * from t1;
 | |
| # Expected:
 | |
| #   30, 3, 11, 13
 | |
| select * from t2;
 | |
| drop table t1, t2;
 |