mirror of
				https://github.com/MariaDB/server.git
				synced 2025-10-31 15:50:51 +03:00 
			
		
		
		
	 38486e83c1
			
		
	
	38486e83c1
	
	
	
		
			
			The idea of the patch is to separate statement processing logic, such as parsing, validation of the parsed tree, execution and cleanup, from global query processing logic, such as logging, resetting priorities of a thread, resetting stored procedure cache, resetting thread count of errors and warnings. This makes PREPARE and EXECUTE behave similarly to the rest of SQL statements and allows their use in stored procedures. This patch contains a change in behaviour: until recently for each SQL prepared statement command, 2 queries were written to the general log, e.g. [Query] prepare stmt from @stmt_text; [Prepare] select * from t1 <-- contents of @stmt_text The chagne was necessary to prevent [Prepare] commands from being written to the general log when executing a stored procedure with Dynamic SQL. We should consider whether the old behavior is preferrable and probably restore it. This patch refixes Bug#7115, Bug#10975 (partially), Bug#10605 (various bugs in Dynamic SQL reported before it was disabled).
		
			
				
	
	
		
			6 lines
		
	
	
		
			192 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			6 lines
		
	
	
		
			192 B
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| prepare stmt1 from ' show full processlist ';
 | |
| execute stmt1;
 | |
| Id	User	Host	db	Command	Time	State	Info
 | |
| number	root	localhost	test	Query	time	NULL	show full processlist
 | |
| deallocate prepare stmt1;
 |