mirror of
				https://github.com/MariaDB/server.git
				synced 2025-10-31 15:50:51 +03:00 
			
		
		
		
	Before this fix, the ha_read_last_count status variable was defined and updated internally, for never exposed as a system variable. This fix exposes the system variable as "Handler_read_last", for completness of the Handler_read_* system variables interface. Adjusted tests results accordingly.
		
			
				
	
	
		
			61 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
			
		
		
	
	
			61 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Plaintext
		
	
	
	
	
	
| DROP TABLE IF EXISTS t1;
 | |
| CREATE TABLE t1 (a INT, INDEX (a));
 | |
| INSERT INTO t1 VALUES (),(),(),(),(),(),(),(),(),();
 | |
| FLUSH STATUS;
 | |
| SELECT a FROM t1 ORDER BY a LIMIT 1;
 | |
| a
 | |
| NULL
 | |
| SHOW STATUS LIKE 'HANDLER_READ%';
 | |
| Variable_name	Value
 | |
| Handler_read_first	1
 | |
| Handler_read_key	0
 | |
| Handler_read_last	0
 | |
| Handler_read_next	0
 | |
| Handler_read_prev	0
 | |
| Handler_read_rnd	0
 | |
| Handler_read_rnd_next	0
 | |
| FLUSH STATUS;
 | |
| SELECT a FROM t1 ORDER BY a DESC LIMIT 1;
 | |
| a
 | |
| NULL
 | |
| SHOW STATUS LIKE 'HANDLER_READ%';
 | |
| Variable_name	Value
 | |
| Handler_read_first	0
 | |
| Handler_read_key	0
 | |
| Handler_read_last	1
 | |
| Handler_read_next	0
 | |
| Handler_read_prev	0
 | |
| Handler_read_rnd	0
 | |
| Handler_read_rnd_next	0
 | |
| FLUSH STATUS;
 | |
| SELECT a FROM t1 ORDER BY a LIMIT 3;
 | |
| a
 | |
| NULL
 | |
| NULL
 | |
| NULL
 | |
| SHOW STATUS LIKE 'HANDLER_READ%';
 | |
| Variable_name	Value
 | |
| Handler_read_first	1
 | |
| Handler_read_key	0
 | |
| Handler_read_last	0
 | |
| Handler_read_next	2
 | |
| Handler_read_prev	0
 | |
| Handler_read_rnd	0
 | |
| Handler_read_rnd_next	0
 | |
| FLUSH STATUS;
 | |
| SELECT a FROM t1 ORDER BY a DESC LIMIT 3;
 | |
| a
 | |
| NULL
 | |
| NULL
 | |
| NULL
 | |
| SHOW STATUS LIKE 'HANDLER_READ%';
 | |
| Variable_name	Value
 | |
| Handler_read_first	0
 | |
| Handler_read_key	0
 | |
| Handler_read_last	1
 | |
| Handler_read_next	0
 | |
| Handler_read_prev	2
 | |
| Handler_read_rnd	0
 | |
| Handler_read_rnd_next	0
 | |
| DROP TABLE t1;
 |