List:Commits« Previous MessageNext Message »
From:Christopher Powers Date:August 26 2010 5:05pm
Subject:Re: bzr commit into mysql-5.5-bugfixing branch (marc.alff:3192) Bug#52312
View as plain text  
Patch approved.

On 8/25/10 2:00 PM, Marc Alff wrote:
> #At file:///home/malff/BZR_TREE/mysql-5.5-bugfixing-52312/ based on
> revid:epotemkin@stripped
>
>   3192 Marc Alff	2010-08-25
>        Bug#52312 lost Handler_read_last status variable
>
>        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.
>
>      added:
>        mysql-test/r/handler_read_last.result
>        mysql-test/t/handler_read_last.test
>      modified:
>        mysql-test/r/create.result
>        mysql-test/r/insert_select.result
>        mysql-test/r/join.result
>        mysql-test/r/join_outer.result
>        mysql-test/r/null_key.result
>        mysql-test/r/partition.result
>        mysql-test/r/select.result
>        mysql-test/r/single_delete_update.result
>        mysql-test/r/subselect3.result
>        mysql-test/r/update.result
>        sql/mysqld.cc
> === modified file 'mysql-test/r/create.result'
> --- a/mysql-test/r/create.result	2010-08-18 09:35:41 +0000
> +++ b/mysql-test/r/create.result	2010-08-25 19:00:38 +0000
> @@ -1542,6 +1542,7 @@ show status like 'handler_read%';
>   Variable_name	Value
>   Handler_read_first	0
>   Handler_read_key	0
> +Handler_read_last	0
>   Handler_read_next	0
>   Handler_read_prev	0
>   Handler_read_rnd	0
>
> === added file 'mysql-test/r/handler_read_last.result'
> --- a/mysql-test/r/handler_read_last.result	1970-01-01 00:00:00 +0000
> +++ b/mysql-test/r/handler_read_last.result	2010-08-25 19:00:38 +0000
> @@ -0,0 +1,60 @@
> +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;
>
> === modified file 'mysql-test/r/insert_select.result'
> --- a/mysql-test/r/insert_select.result	2009-09-22 21:41:37 +0000
> +++ b/mysql-test/r/insert_select.result	2010-08-25 19:00:38 +0000
> @@ -694,6 +694,7 @@ 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
>
> === modified file 'mysql-test/r/join.result'
> --- a/mysql-test/r/join.result	2010-04-29 20:33:06 +0000
> +++ b/mysql-test/r/join.result	2010-08-25 19:00:38 +0000
> @@ -854,6 +854,7 @@ show status like 'Handler_read%';
>   Variable_name	Value
>   Handler_read_first	0
>   Handler_read_key	0
> +Handler_read_last	0
>   Handler_read_next	0
>   Handler_read_prev	0
>   Handler_read_rnd	0
>
> === modified file 'mysql-test/r/join_outer.result'
> --- a/mysql-test/r/join_outer.result	2010-06-01 07:57:23 +0000
> +++ b/mysql-test/r/join_outer.result	2010-08-25 19:00:38 +0000
> @@ -1238,6 +1238,7 @@ show status like 'Handler_read%';
>   Variable_name	Value
>   Handler_read_first	0
>   Handler_read_key	5
> +Handler_read_last	0
>   Handler_read_next	0
>   Handler_read_prev	0
>   Handler_read_rnd	0
>
> === modified file 'mysql-test/r/null_key.result'
> --- a/mysql-test/r/null_key.result	2008-03-11 12:47:16 +0000
> +++ b/mysql-test/r/null_key.result	2010-08-25 19:00:38 +0000
> @@ -424,6 +424,7 @@ SHOW STATUS LIKE "handler_read%";
>   Variable_name	Value
>   Handler_read_first	0
>   Handler_read_key	6
> +Handler_read_last	0
>   Handler_read_next	2
>   Handler_read_prev	0
>   Handler_read_rnd	0
>
> === modified file 'mysql-test/r/partition.result'
> --- a/mysql-test/r/partition.result	2010-05-28 05:47:58 +0000
> +++ b/mysql-test/r/partition.result	2010-08-25 19:00:38 +0000
> @@ -359,6 +359,7 @@ SHOW STATUS LIKE 'Handler_read_%';
>   Variable_name	Value
>   Handler_read_first	0
>   Handler_read_key	2
> +Handler_read_last	0
>   Handler_read_next	4
>   Handler_read_prev	0
>   Handler_read_rnd	0
> @@ -377,6 +378,7 @@ SHOW STATUS LIKE 'Handler_read_%';
>   Variable_name	Value
>   Handler_read_first	0
>   Handler_read_key	2
> +Handler_read_last	0
>   Handler_read_next	4
>   Handler_read_prev	0
>   Handler_read_rnd	0
> @@ -407,6 +409,7 @@ SHOW STATUS LIKE 'Handler_read_%';
>   Variable_name	Value
>   Handler_read_first	0
>   Handler_read_key	1
> +Handler_read_last	0
>   Handler_read_next	2
>   Handler_read_prev	0
>   Handler_read_rnd	0
> @@ -423,6 +426,7 @@ SHOW STATUS LIKE 'Handler_read_%';
>   Variable_name	Value
>   Handler_read_first	0
>   Handler_read_key	1
> +Handler_read_last	0
>   Handler_read_next	2
>   Handler_read_prev	0
>   Handler_read_rnd	0
> @@ -439,6 +443,7 @@ SHOW STATUS LIKE 'Handler_read_%';
>   Variable_name	Value
>   Handler_read_first	0
>   Handler_read_key	1
> +Handler_read_last	0
>   Handler_read_next	2
>   Handler_read_prev	0
>   Handler_read_rnd	0
> @@ -455,6 +460,7 @@ SHOW STATUS LIKE 'Handler_read_%';
>   Variable_name	Value
>   Handler_read_first	0
>   Handler_read_key	1
> +Handler_read_last	0
>   Handler_read_next	2
>   Handler_read_prev	0
>   Handler_read_rnd	0
>
> === modified file 'mysql-test/r/select.result'
> --- a/mysql-test/r/select.result	2010-07-15 13:47:50 +0000
> +++ b/mysql-test/r/select.result	2010-08-25 19:00:38 +0000
> @@ -4338,6 +4338,7 @@ SHOW STATUS LIKE 'Handler_read%';
>   Variable_name	Value
>   Handler_read_first	0
>   Handler_read_key	2
> +Handler_read_last	0
>   Handler_read_next	0
>   Handler_read_prev	0
>   Handler_read_rnd	0
>
> === modified file 'mysql-test/r/single_delete_update.result'
> --- a/mysql-test/r/single_delete_update.result	2010-06-22 20:32:29 +0000
> +++ b/mysql-test/r/single_delete_update.result	2010-08-25 19:00:38 +0000
> @@ -25,6 +25,7 @@ SHOW STATUS LIKE 'Handler_read_%';
>   Variable_name	Value
>   Handler_read_first	0
>   Handler_read_key	1
> +Handler_read_last	0
>   Handler_read_next	4
>   Handler_read_prev	0
>   Handler_read_rnd	0
> @@ -41,6 +42,7 @@ SHOW STATUS LIKE 'Handler_read_%';
>   Variable_name	Value
>   Handler_read_first	0
>   Handler_read_key	1
> +Handler_read_last	0
>   Handler_read_next	4
>   Handler_read_prev	0
>   Handler_read_rnd	0
> @@ -74,6 +76,7 @@ SHOW STATUS LIKE 'Handler_read_%';
>   Variable_name	Value
>   Handler_read_first	0
>   Handler_read_key	0
> +Handler_read_last	0
>   Handler_read_next	0
>   Handler_read_prev	0
>   Handler_read_rnd	0
> @@ -90,6 +93,7 @@ SHOW STATUS LIKE 'Handler_read_%';
>   Variable_name	Value
>   Handler_read_first	0
>   Handler_read_key	0
> +Handler_read_last	0
>   Handler_read_next	0
>   Handler_read_prev	0
>   Handler_read_rnd	5
> @@ -120,6 +124,7 @@ SHOW STATUS LIKE 'Handler_read_%';
>   Variable_name	Value
>   Handler_read_first	0
>   Handler_read_key	0
> +Handler_read_last	0
>   Handler_read_next	0
>   Handler_read_prev	0
>   Handler_read_rnd	0
> @@ -136,6 +141,7 @@ SHOW STATUS LIKE 'Handler_read_%';
>   Variable_name	Value
>   Handler_read_first	0
>   Handler_read_key	0
> +Handler_read_last	0
>   Handler_read_next	0
>   Handler_read_prev	0
>   Handler_read_rnd	1
> @@ -170,6 +176,7 @@ SHOW STATUS LIKE 'Handler_read_%';
>   Variable_name	Value
>   Handler_read_first	1
>   Handler_read_key	0
> +Handler_read_last	0
>   Handler_read_next	4
>   Handler_read_prev	0
>   Handler_read_rnd	0
> @@ -186,6 +193,7 @@ SHOW STATUS LIKE 'Handler_read_%';
>   Variable_name	Value
>   Handler_read_first	1
>   Handler_read_key	0
> +Handler_read_last	0
>   Handler_read_next	4
>   Handler_read_prev	0
>   Handler_read_rnd	0
> @@ -214,6 +222,7 @@ SHOW STATUS LIKE 'Handler_read_%';
>   Variable_name	Value
>   Handler_read_first	0
>   Handler_read_key	0
> +Handler_read_last	0
>   Handler_read_next	0
>   Handler_read_prev	0
>   Handler_read_rnd	0
> @@ -230,6 +239,7 @@ SHOW STATUS LIKE 'Handler_read_%';
>   Variable_name	Value
>   Handler_read_first	0
>   Handler_read_key	0
> +Handler_read_last	0
>   Handler_read_next	0
>   Handler_read_prev	0
>   Handler_read_rnd	1
> @@ -256,6 +266,7 @@ SHOW STATUS LIKE 'Handler_read_%';
>   Variable_name	Value
>   Handler_read_first	0
>   Handler_read_key	0
> +Handler_read_last	0
>   Handler_read_next	0
>   Handler_read_prev	0
>   Handler_read_rnd	1
> @@ -272,6 +283,7 @@ SHOW STATUS LIKE 'Handler_read_%';
>   Variable_name	Value
>   Handler_read_first	0
>   Handler_read_key	0
> +Handler_read_last	0
>   Handler_read_next	0
>   Handler_read_prev	0
>   Handler_read_rnd	1
> @@ -301,6 +313,7 @@ SHOW STATUS LIKE 'Handler_read_%';
>   Variable_name	Value
>   Handler_read_first	0
>   Handler_read_key	2
> +Handler_read_last	0
>   Handler_read_next	7
>   Handler_read_prev	0
>   Handler_read_rnd	4
> @@ -322,6 +335,7 @@ SHOW STATUS LIKE 'Handler_read_%';
>   Variable_name	Value
>   Handler_read_first	0
>   Handler_read_key	2
> +Handler_read_last	0
>   Handler_read_next	7
>   Handler_read_prev	0
>   Handler_read_rnd	8
> @@ -357,6 +371,7 @@ SHOW STATUS LIKE 'Handler_read_%';
>   Variable_name	Value
>   Handler_read_first	0
>   Handler_read_key	1
> +Handler_read_last	0
>   Handler_read_next	0
>   Handler_read_prev	4
>   Handler_read_rnd	0
> @@ -373,6 +388,7 @@ SHOW STATUS LIKE 'Handler_read_%';
>   Variable_name	Value
>   Handler_read_first	0
>   Handler_read_key	1
> +Handler_read_last	0
>   Handler_read_next	0
>   Handler_read_prev	4
>   Handler_read_rnd	0
> @@ -406,6 +422,7 @@ SHOW STATUS LIKE 'Handler_read_%';
>   Variable_name	Value
>   Handler_read_first	0
>   Handler_read_key	0
> +Handler_read_last	0
>   Handler_read_next	0
>   Handler_read_prev	0
>   Handler_read_rnd	0
> @@ -422,6 +439,7 @@ SHOW STATUS LIKE 'Handler_read_%';
>   Variable_name	Value
>   Handler_read_first	0
>   Handler_read_key	0
> +Handler_read_last	0
>   Handler_read_next	0
>   Handler_read_prev	0
>   Handler_read_rnd	5
> @@ -464,6 +482,7 @@ SHOW STATUS LIKE 'Handler_read_%';
>   Variable_name	Value
>   Handler_read_first	1
>   Handler_read_key	0
> +Handler_read_last	0
>   Handler_read_next	4
>   Handler_read_prev	0
>   Handler_read_rnd	0
> @@ -486,6 +505,7 @@ 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	4
>   Handler_read_rnd	0
> @@ -502,6 +522,7 @@ 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	4
>   Handler_read_rnd	0
> @@ -536,6 +557,7 @@ SHOW STATUS LIKE 'Handler_read_%';
>   Variable_name	Value
>   Handler_read_first	0
>   Handler_read_key	1
> +Handler_read_last	0
>   Handler_read_next	4
>   Handler_read_prev	0
>   Handler_read_rnd	0
> @@ -552,6 +574,7 @@ SHOW STATUS LIKE 'Handler_read_%';
>   Variable_name	Value
>   Handler_read_first	0
>   Handler_read_key	1
> +Handler_read_last	0
>   Handler_read_next	4
>   Handler_read_prev	0
>   Handler_read_rnd	5
> @@ -590,6 +613,7 @@ SHOW STATUS LIKE 'Handler_read_%';
>   Variable_name	Value
>   Handler_read_first	0
>   Handler_read_key	0
> +Handler_read_last	0
>   Handler_read_next	0
>   Handler_read_prev	0
>   Handler_read_rnd	0
> @@ -606,6 +630,7 @@ SHOW STATUS LIKE 'Handler_read_%';
>   Variable_name	Value
>   Handler_read_first	0
>   Handler_read_key	0
> +Handler_read_last	0
>   Handler_read_next	0
>   Handler_read_prev	0
>   Handler_read_rnd	5
> @@ -641,6 +666,7 @@ SHOW STATUS LIKE 'Handler_read_%';
>   Variable_name	Value
>   Handler_read_first	0
>   Handler_read_key	0
> +Handler_read_last	0
>   Handler_read_next	0
>   Handler_read_prev	0
>   Handler_read_rnd	0
> @@ -657,6 +683,7 @@ SHOW STATUS LIKE 'Handler_read_%';
>   Variable_name	Value
>   Handler_read_first	0
>   Handler_read_key	0
> +Handler_read_last	0
>   Handler_read_next	0
>   Handler_read_prev	0
>   Handler_read_rnd	1
> @@ -691,6 +718,7 @@ SHOW STATUS LIKE 'Handler_read_%';
>   Variable_name	Value
>   Handler_read_first	1
>   Handler_read_key	0
> +Handler_read_last	0
>   Handler_read_next	4
>   Handler_read_prev	0
>   Handler_read_rnd	0
> @@ -707,6 +735,7 @@ SHOW STATUS LIKE 'Handler_read_%';
>   Variable_name	Value
>   Handler_read_first	1
>   Handler_read_key	0
> +Handler_read_last	0
>   Handler_read_next	4
>   Handler_read_prev	0
>   Handler_read_rnd	5
> @@ -735,6 +764,7 @@ SHOW STATUS LIKE 'Handler_read_%';
>   Variable_name	Value
>   Handler_read_first	0
>   Handler_read_key	0
> +Handler_read_last	0
>   Handler_read_next	0
>   Handler_read_prev	0
>   Handler_read_rnd	0
> @@ -751,6 +781,7 @@ SHOW STATUS LIKE 'Handler_read_%';
>   Variable_name	Value
>   Handler_read_first	0
>   Handler_read_key	0
> +Handler_read_last	0
>   Handler_read_next	0
>   Handler_read_prev	0
>   Handler_read_rnd	1
> @@ -778,6 +809,7 @@ SHOW STATUS LIKE 'Handler_read_%';
>   Variable_name	Value
>   Handler_read_first	0
>   Handler_read_key	0
> +Handler_read_last	0
>   Handler_read_next	0
>   Handler_read_prev	0
>   Handler_read_rnd	1
> @@ -794,6 +826,7 @@ SHOW STATUS LIKE 'Handler_read_%';
>   Variable_name	Value
>   Handler_read_first	0
>   Handler_read_key	0
> +Handler_read_last	0
>   Handler_read_next	0
>   Handler_read_prev	0
>   Handler_read_rnd	1
> @@ -824,6 +857,7 @@ SHOW STATUS LIKE 'Handler_read_%';
>   Variable_name	Value
>   Handler_read_first	0
>   Handler_read_key	2
> +Handler_read_last	0
>   Handler_read_next	7
>   Handler_read_prev	0
>   Handler_read_rnd	4
> @@ -845,6 +879,7 @@ SHOW STATUS LIKE 'Handler_read_%';
>   Variable_name	Value
>   Handler_read_first	0
>   Handler_read_key	2
> +Handler_read_last	0
>   Handler_read_next	7
>   Handler_read_prev	0
>   Handler_read_rnd	8
> @@ -884,6 +919,7 @@ SHOW STATUS LIKE 'Handler_read_%';
>   Variable_name	Value
>   Handler_read_first	0
>   Handler_read_key	1
> +Handler_read_last	0
>   Handler_read_next	0
>   Handler_read_prev	4
>   Handler_read_rnd	0
> @@ -900,6 +936,7 @@ SHOW STATUS LIKE 'Handler_read_%';
>   Variable_name	Value
>   Handler_read_first	0
>   Handler_read_key	1
> +Handler_read_last	0
>   Handler_read_next	0
>   Handler_read_prev	4
>   Handler_read_rnd	5
> @@ -938,6 +975,7 @@ SHOW STATUS LIKE 'Handler_read_%';
>   Variable_name	Value
>   Handler_read_first	0
>   Handler_read_key	0
> +Handler_read_last	0
>   Handler_read_next	0
>   Handler_read_prev	0
>   Handler_read_rnd	0
> @@ -954,6 +992,7 @@ SHOW STATUS LIKE 'Handler_read_%';
>   Variable_name	Value
>   Handler_read_first	0
>   Handler_read_key	0
> +Handler_read_last	0
>   Handler_read_next	0
>   Handler_read_prev	0
>   Handler_read_rnd	5
> @@ -990,6 +1029,7 @@ SHOW STATUS LIKE 'Handler_read_%';
>   Variable_name	Value
>   Handler_read_first	1
>   Handler_read_key	0
> +Handler_read_last	0
>   Handler_read_next	4
>   Handler_read_prev	0
>   Handler_read_rnd	0
> @@ -1012,6 +1052,7 @@ 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	4
>   Handler_read_rnd	0
> @@ -1028,6 +1069,7 @@ 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	4
>   Handler_read_rnd	5
>
> === modified file 'mysql-test/r/subselect3.result'
> --- a/mysql-test/r/subselect3.result	2010-03-24 15:03:44 +0000
> +++ b/mysql-test/r/subselect3.result	2010-08-25 19:00:38 +0000
> @@ -113,6 +113,7 @@ show status like '%Handler_read%';
>   Variable_name	Value
>   Handler_read_first	0
>   Handler_read_key	0
> +Handler_read_last	0
>   Handler_read_next	0
>   Handler_read_prev	0
>   Handler_read_rnd	0
>
> === modified file 'mysql-test/r/update.result'
> --- a/mysql-test/r/update.result	2010-07-19 09:21:24 +0000
> +++ b/mysql-test/r/update.result	2010-08-25 19:00:38 +0000
> @@ -273,6 +273,7 @@ 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
> @@ -284,6 +285,7 @@ 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	2
> @@ -294,6 +296,7 @@ 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
> @@ -304,6 +307,7 @@ 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
> @@ -315,6 +319,7 @@ show status like 'handler_read%';
>   Variable_name	Value
>   Handler_read_first	0
>   Handler_read_key	0
> +Handler_read_last	0
>   Handler_read_next	0
>   Handler_read_prev	0
>   Handler_read_rnd	1
> @@ -368,6 +373,7 @@ show status like 'handler_read%';
>   Variable_name	Value
>   Handler_read_first	0
>   Handler_read_key	1
> +Handler_read_last	0
>   Handler_read_next	1
>   Handler_read_prev	0
>   Handler_read_rnd	1
> @@ -405,6 +411,7 @@ show status like '%Handler_read%';
>   Variable_name	Value
>   Handler_read_first	0
>   Handler_read_key	1
> +Handler_read_last	0
>   Handler_read_next	0
>   Handler_read_prev	0
>   Handler_read_rnd	0
> @@ -415,6 +422,7 @@ show status like '%Handler_read%';
>   Variable_name	Value
>   Handler_read_first	0
>   Handler_read_key	2
> +Handler_read_last	0
>   Handler_read_next	0
>   Handler_read_prev	0
>   Handler_read_rnd	0
> @@ -424,6 +432,7 @@ show status like '%Handler_read%';
>   Variable_name	Value
>   Handler_read_first	0
>   Handler_read_key	3
> +Handler_read_last	0
>   Handler_read_next	0
>   Handler_read_prev	0
>   Handler_read_rnd	0
> @@ -433,6 +442,7 @@ show status like '%Handler_read%';
>   Variable_name	Value
>   Handler_read_first	0
>   Handler_read_key	3
> +Handler_read_last	0
>   Handler_read_next	0
>   Handler_read_prev	0
>   Handler_read_rnd	0
>
> === added file 'mysql-test/t/handler_read_last.test'
> --- a/mysql-test/t/handler_read_last.test	1970-01-01 00:00:00 +0000
> +++ b/mysql-test/t/handler_read_last.test	2010-08-25 19:00:38 +0000
> @@ -0,0 +1,40 @@
> +# Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
> +#
> +# This program is free software; you can redistribute it and/or modify
> +# it under the terms of the GNU General Public License as published by
> +# the Free Software Foundation; version 2 of the License.
> +#
> +# This program is distributed in the hope that it will be useful,
> +# but WITHOUT ANY WARRANTY; without even the implied warranty of
> +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> +# GNU General Public License for more details.
> +#
> +# You should have received a copy of the GNU General Public License
> +# along with this program; if not, write to the Free Software Foundation,
> +# 51 Franklin Street, Suite 500, Boston, MA 02110-1335 USA
> +
> +--disable_warnings
> +DROP TABLE IF EXISTS t1;
> +--enable_warnings
> +
> +CREATE TABLE t1 (a INT, INDEX (a));
> +INSERT INTO t1 VALUES (),(),(),(),(),(),(),(),(),();
> +
> +FLUSH STATUS;
> +SELECT a FROM t1 ORDER BY a LIMIT 1;
> +SHOW STATUS LIKE 'HANDLER_READ%';
> +
> +FLUSH STATUS;
> +SELECT a FROM t1 ORDER BY a DESC LIMIT 1;
> +SHOW STATUS LIKE 'HANDLER_READ%';
> +
> +FLUSH STATUS;
> +SELECT a FROM t1 ORDER BY a LIMIT 3;
> +SHOW STATUS LIKE 'HANDLER_READ%';
> +
> +FLUSH STATUS;
> +SELECT a FROM t1 ORDER BY a DESC LIMIT 3;
> +SHOW STATUS LIKE 'HANDLER_READ%';
> +
> +DROP TABLE t1;
> +
>
> === modified file 'sql/mysqld.cc'
> --- a/sql/mysqld.cc	2010-08-20 08:24:32 +0000
> +++ b/sql/mysqld.cc	2010-08-25 19:00:38 +0000
> @@ -6439,6 +6439,7 @@ SHOW_VAR status_vars[]= {
>     {"Handler_prepare",          (char*) offsetof(STATUS_VAR, ha_prepare_count), 
> SHOW_LONG_STATUS},
>     {"Handler_read_first",       (char*) offsetof(STATUS_VAR, ha_read_first_count),
> SHOW_LONG_STATUS},
>     {"Handler_read_key",         (char*) offsetof(STATUS_VAR, ha_read_key_count),
> SHOW_LONG_STATUS},
> +  {"Handler_read_last",        (char*) offsetof(STATUS_VAR, ha_read_last_count),
> SHOW_LONG_STATUS},
>     {"Handler_read_next",        (char*) offsetof(STATUS_VAR, ha_read_next_count),
> SHOW_LONG_STATUS},
>     {"Handler_read_prev",        (char*) offsetof(STATUS_VAR, ha_read_prev_count),
> SHOW_LONG_STATUS},
>     {"Handler_read_rnd",         (char*) offsetof(STATUS_VAR, ha_read_rnd_count),
> SHOW_LONG_STATUS},
>
>
>
>
>
Thread
bzr commit into mysql-5.5-bugfixing branch (marc.alff:3192) Bug#52312Marc Alff25 Aug
  • Re: bzr commit into mysql-5.5-bugfixing branch (marc.alff:3192) Bug#52312Christopher Powers26 Aug