mirror of
				https://github.com/MariaDB/server.git
				synced 2025-10-31 19:06:14 +01:00 
			
		
		
		
	 47a5eed437
			
		
	
	
	47a5eed437
	
	
	
		
			
			This shows the maximum memory allocations used by the current connection. The value for @@global.max_memory_used is 0 as we are not collecting this value as it would cause a notable performance issue registering this for all threads for every memory allocation Reviewed-by: Sergei Golubchik <serg@mariadb.org>
		
			
				
	
	
		
			20 lines
		
	
	
	
		
			586 B
		
	
	
	
		
			Text
		
	
	
	
	
	
			
		
		
	
	
			20 lines
		
	
	
	
		
			586 B
		
	
	
	
		
			Text
		
	
	
	
	
	
| #
 | |
| # Added status variable "Max_memory_used" to SHOW STATUS
 | |
| #
 | |
| 
 | |
| let $l1=`show status like "max_memory_used"`;
 | |
| --disable_result_log
 | |
| select * from information_schema.processlist where id=0;
 | |
| --enable_result_log
 | |
| let $l2=`show status like "max_memory_used"`;
 | |
| 
 | |
| --disable_query_log
 | |
| eval SET @l1= SUBSTRING_INDEX('$l1', '	', -1);
 | |
| eval SET @l2= SUBSTRING_INDEX('$l2', '	', -1);
 | |
| eval select @l1 > 10000 as "should be true";
 | |
| eval select @l2+0 > @l1+0 as "should be true";
 | |
| 
 | |
| --enable_query_log
 | |
| # global max_memory should be NULL as we cannot calculate this
 | |
| show global status like "max_memory_used";
 | |
| 
 |