summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnnamalai Gurusami <annamalai.gurusami@oracle.com>2011-12-13 17:10:09 +0530
committerAnnamalai Gurusami <annamalai.gurusami@oracle.com>2011-12-13 17:10:09 +0530
commit76383243b2c46d12f08d7c3f50f55d235affbc5a (patch)
tree813f036d890ac8c8e19783a7be1746d25a5b923f
parent091a2e3b0b5ee83733858f9dded538d55a9ababa (diff)
parentad84fb5c3763b3a5c6c2146c8fc824f0d385c77c (diff)
downloadmariadb-git-76383243b2c46d12f08d7c3f50f55d235affbc5a.tar.gz
Merging from mysql-5.1 to mysql-5.5.
-rw-r--r--mysql-test/suite/innodb/r/innodb.result11
-rw-r--r--mysql-test/suite/innodb/t/innodb.test11
-rw-r--r--storage/innobase/handler/ha_innodb.cc1
3 files changed, 22 insertions, 1 deletions
diff --git a/mysql-test/suite/innodb/r/innodb.result b/mysql-test/suite/innodb/r/innodb.result
index 54908961b1c..27b51ea8262 100644
--- a/mysql-test/suite/innodb/r/innodb.result
+++ b/mysql-test/suite/innodb/r/innodb.result
@@ -3191,3 +3191,14 @@ Handler_update 1
Variable_name Value
Handler_delete 1
DROP TABLE bug58912;
+create table t1 (f1 integer primary key) engine=innodb;
+flush status;
+show status like "handler_read_key";
+Variable_name Value
+Handler_read_key 0
+select f1 from t1;
+f1
+show status like "handler_read_key";
+Variable_name Value
+Handler_read_key 1
+drop table t1;
diff --git a/mysql-test/suite/innodb/t/innodb.test b/mysql-test/suite/innodb/t/innodb.test
index 0b0e746bf2f..3038bb0331e 100644
--- a/mysql-test/suite/innodb/t/innodb.test
+++ b/mysql-test/suite/innodb/t/innodb.test
@@ -2578,6 +2578,17 @@ SET GLOBAL innodb_thread_concurrency = @innodb_thread_concurrency_orig;
# Clean up after the Bug#55284/Bug#58912 test case.
DROP TABLE bug58912;
+#
+# Test fix for bug 13117023. InnoDB increments HA_READ_KEY_COUNT (aka
+# HANDLER_READ_KEY) when it should not.
+#
+create table t1 (f1 integer primary key) engine=innodb;
+flush status;
+show status like "handler_read_key";
+select f1 from t1;
+show status like "handler_read_key";
+drop table t1;
+
#######################################################################
# #
# Please, DO NOT TOUCH this file as well as the innodb.result file. #
diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
index 4e01f7e1cf4..371ef9787c1 100644
--- a/storage/innobase/handler/ha_innodb.cc
+++ b/storage/innobase/handler/ha_innodb.cc
@@ -5792,7 +5792,6 @@ ha_innobase::innobase_get_index(
dict_index_t* index = 0;
DBUG_ENTER("innobase_get_index");
- ha_statistic_increment(&SSV::ha_read_key_count);
if (keynr != MAX_KEY && table->s->keys > 0) {
key = table->key_info + keynr;