mirror of
				https://github.com/MariaDB/server.git
				synced 2025-10-31 02:46:29 +01:00 
			
		
		
		
	 b86a2f03b6
			
		
	
	
	
	
	b86a2f03b6Reset the connection_name to contain a null string, if the pointer points to the same space as that of the system variable default_master_connection. We do this because the system variable may be updated which could free the pointer and create a new one, causing use-after-free for re-execution of prepared statements and stored procedures where the LEX may be reused. This allows connection_name to be set again be to the system variable pointer in the next call of this function (see earlier in this function), after any possible updates to the system variable.
		
			
				
	
	
		
			15 lines
		
	
	
	
		
			576 B
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			15 lines
		
	
	
	
		
			576 B
		
	
	
	
		
			Text
		
	
	
	
	
	
| PREPARE s_1 FROM 'SHOW RELAYLOG EVENTS';
 | |
| /* 1 */ SET default_master_connection='MASTER';
 | |
| /* 1 */ EXECUTE s_1;
 | |
| ERROR HY000: There is no master connection 'MASTER'
 | |
| /* 2 */ SET default_master_connection='MASTER';
 | |
| /* 2 */ EXECUTE s_1;
 | |
| ERROR HY000: There is no master connection 'MASTER'
 | |
| create procedure p() SHOW RELAYLOG EVENTS;
 | |
| /* 1 */ SET default_master_connection='MASTER';
 | |
| /* 1 */ call p;
 | |
| ERROR HY000: There is no master connection 'MASTER'
 | |
| /* 2 */ SET default_master_connection='MASTER';
 | |
| /* 2 */ call p;
 | |
| ERROR HY000: There is no master connection 'MASTER'
 | |
| drop procedure p;
 |