diff --git a/mysql-test/suite/innodb/r/index_ahi_option,ahi.rdiff b/mysql-test/suite/innodb/r/index_ahi_option,ahi.rdiff
new file mode 100644
index 00000000000..887683848a3
--- /dev/null
+++ b/mysql-test/suite/innodb/r/index_ahi_option,ahi.rdiff
@@ -0,0 +1,101 @@
+--- index_ahi_option.result
++++ index_ahi_option,ahi.result
+@@ -2,7 +2,7 @@
+ # Test InnoDB index-level adaptive_hash_index options
+ #
+ SET @start_global_value = @@global.innodb_adaptive_hash_index;
+-SET GLOBAL innodb_adaptive_hash_index=OFF;
++SET GLOBAL innodb_adaptive_hash_index=ON;
+ #
+ # Scenario 1: complete_fields parameter with point lookups
+ #
+@@ -24,13 +24,13 @@
+ ANALYZE
+ {
+   "query_optimization": {
+-    "r_total_time_ms": 0.089624449
++    "r_total_time_ms": 0.092080617
+   },
+   "query_block": {
+     "select_id": 1,
+     "cost": 0.076308585,
+     "r_loops": 1,
+-    "r_total_time_ms": 0.984301457,
++    "r_total_time_ms": 1.028991107,
+     "nested_loop": [
+       {
+         "table": {
+@@ -46,10 +46,10 @@
+           "rows": 509,
+           "r_rows": 509,
+           "cost": 0.076308585,
+-          "r_table_time_ms": 0.842086467,
+-          "r_other_time_ms": 0.138919733,
++          "r_table_time_ms": 0.880483787,
++          "r_other_time_ms": 0.145201295,
+           "r_engine_stats": {
+-            "pages_accessed": 6
++            "pages_accessed": 5
+           },
+           "filtered": 100,
+           "r_total_filtered": 100,
+@@ -66,13 +66,13 @@
+ ANALYZE
+ {
+   "query_optimization": {
+-    "r_total_time_ms": 0.114105792
++    "r_total_time_ms": 0.115489253
+   },
+   "query_block": {
+     "select_id": 1,
+     "cost": 0.077099705,
+     "r_loops": 1,
+-    "r_total_time_ms": 1.221060407,
++    "r_total_time_ms": 1.268004364,
+     "nested_loop": [
+       {
+         "table": {
+@@ -87,10 +87,10 @@
+           "rows": 509,
+           "r_rows": 509,
+           "cost": 0.077099705,
+-          "r_table_time_ms": 0.883163644,
+-          "r_other_time_ms": 0.33322236,
++          "r_table_time_ms": 0.932038489,
++          "r_other_time_ms": 0.331224428,
+           "r_engine_stats": {
+-            "pages_accessed": 4
++            "pages_accessed": 3
+           },
+           "filtered": 100,
+           "r_total_filtered": 100,
+@@ -108,13 +108,13 @@
+ ANALYZE
+ {
+   "query_optimization": {
+-    "r_total_time_ms": 0.116697785
++    "r_total_time_ms": 0.117832527
+   },
+   "query_block": {
+     "select_id": 1,
+     "cost": 0.077099705,
+     "r_loops": 1,
+-    "r_total_time_ms": 1.392505277,
++    "r_total_time_ms": 1.407020755,
+     "nested_loop": [
+       {
+         "table": {
+@@ -129,10 +129,10 @@
+           "rows": 509,
+           "r_rows": 509,
+           "cost": 0.077099705,
+-          "r_table_time_ms": 1.030433722,
+-          "r_other_time_ms": 0.357424534,
++          "r_table_time_ms": 1.050062494,
++          "r_other_time_ms": 0.352062158,
+           "r_engine_stats": {
+-            "pages_accessed": 6
++            "pages_accessed": 5
+           },
+           "filtered": 100,
+           "r_total_filtered": 100,
diff --git a/mysql-test/suite/innodb/r/index_ahi_option.result b/mysql-test/suite/innodb/r/index_ahi_option.result
new file mode 100644
index 00000000000..b30901d087e
--- /dev/null
+++ b/mysql-test/suite/innodb/r/index_ahi_option.result
@@ -0,0 +1,148 @@
+#
+# Test InnoDB index-level adaptive_hash_index options
+#
+SET @start_global_value = @@global.innodb_adaptive_hash_index;
+SET GLOBAL innodb_adaptive_hash_index=OFF;
+#
+# Scenario 1: complete_fields parameter with point lookups
+#
+CREATE TABLE t1 (
+id INT PRIMARY KEY,
+col1 INT, col2 INT, col3 INT,
+INDEX idx_1 (col1),
+INDEX idx_2 (col1, col2),
+INDEX idx_3 (col1, col2, col3) 
+) ENGINE=InnoDB;
+INSERT INTO t1 SELECT seq, seq % 100, seq % 10, seq % 5 FROM seq_1_to_50000;
+INSERT INTO t1 VALUES (50001, 50, 1, 1), (50002, 50, 2, 2),
+(50003, 50, 3, 3), (50004, 50, 4, 4), (50005, 50, 5, 0),
+(50006, 50, 6, 1), (50007, 50, 7, 2), (50008, 50, 8, 3),
+(50009, 50, 9, 4);
+# Analyze format idx_1
+ANALYZE FORMAT=JSON
+SELECT COUNT(*) FROM t1 FORCE INDEX(idx_1) WHERE col1 = 50;
+ANALYZE
+{
+  "query_optimization": {
+    "r_total_time_ms": 0.089624449
+  },
+  "query_block": {
+    "select_id": 1,
+    "cost": 0.076308585,
+    "r_loops": 1,
+    "r_total_time_ms": 0.984301457,
+    "nested_loop": [
+      {
+        "table": {
+          "table_name": "t1",
+          "access_type": "ref",
+          "possible_keys": ["idx_1"],
+          "key": "idx_1",
+          "key_length": "5",
+          "used_key_parts": ["col1"],
+          "ref": ["const"],
+          "loops": 1,
+          "r_loops": 1,
+          "rows": 509,
+          "r_rows": 509,
+          "cost": 0.076308585,
+          "r_table_time_ms": 0.842086467,
+          "r_other_time_ms": 0.138919733,
+          "r_engine_stats": {
+            "pages_accessed": 6
+          },
+          "filtered": 100,
+          "r_total_filtered": 100,
+          "r_filtered": 100,
+          "using_index": true
+        }
+      }
+    ]
+  }
+}
+# Analyze format idx_2
+ANALYZE FORMAT=JSON
+SELECT COUNT(*) FROM t1 FORCE INDEX(idx_2) WHERE col1 = 50 AND col2 BETWEEN 0 AND 9;
+ANALYZE
+{
+  "query_optimization": {
+    "r_total_time_ms": 0.114105792
+  },
+  "query_block": {
+    "select_id": 1,
+    "cost": 0.077099705,
+    "r_loops": 1,
+    "r_total_time_ms": 1.221060407,
+    "nested_loop": [
+      {
+        "table": {
+          "table_name": "t1",
+          "access_type": "range",
+          "possible_keys": ["idx_2"],
+          "key": "idx_2",
+          "key_length": "10",
+          "used_key_parts": ["col1", "col2"],
+          "loops": 1,
+          "r_loops": 1,
+          "rows": 509,
+          "r_rows": 509,
+          "cost": 0.077099705,
+          "r_table_time_ms": 0.883163644,
+          "r_other_time_ms": 0.33322236,
+          "r_engine_stats": {
+            "pages_accessed": 4
+          },
+          "filtered": 100,
+          "r_total_filtered": 100,
+          "attached_condition": "t1.col1 = 50 and t1.col2 between 0 and 9",
+          "r_filtered": 100,
+          "using_index": true
+        }
+      }
+    ]
+  }
+}
+# Analyze format idx_3
+ANALYZE FORMAT=JSON
+SELECT COUNT(*) FROM t1 FORCE INDEX(idx_3) WHERE col1 = 50 AND col2 BETWEEN 0 AND 9 AND col3 BETWEEN 0 AND 9;
+ANALYZE
+{
+  "query_optimization": {
+    "r_total_time_ms": 0.116697785
+  },
+  "query_block": {
+    "select_id": 1,
+    "cost": 0.077099705,
+    "r_loops": 1,
+    "r_total_time_ms": 1.392505277,
+    "nested_loop": [
+      {
+        "table": {
+          "table_name": "t1",
+          "access_type": "range",
+          "possible_keys": ["idx_3"],
+          "key": "idx_3",
+          "key_length": "15",
+          "used_key_parts": ["col1", "col2", "col3"],
+          "loops": 1,
+          "r_loops": 1,
+          "rows": 509,
+          "r_rows": 509,
+          "cost": 0.077099705,
+          "r_table_time_ms": 1.030433722,
+          "r_other_time_ms": 0.357424534,
+          "r_engine_stats": {
+            "pages_accessed": 6
+          },
+          "filtered": 100,
+          "r_total_filtered": 100,
+          "attached_condition": "t1.col1 = 50 and t1.col2 between 0 and 9 and t1.col3 between 0 and 9",
+          "r_filtered": 100,
+          "using_index": true
+        }
+      }
+    ]
+  }
+}
+DROP TABLE t1;
+SET @@global.innodb_adaptive_hash_index = @start_global_value;
diff --git a/mysql-test/suite/innodb/t/index_ahi_option.test b/mysql-test/suite/innodb/t/index_ahi_option.test
new file mode 100644
index 00000000000..dcdcb9b8577
--- /dev/null
+++ b/mysql-test/suite/innodb/t/index_ahi_option.test
@@ -0,0 +1,60 @@
+--source include/have_innodb.inc
+--source include/have_sequence.inc
+
+--echo #
+--echo # Test InnoDB index-level adaptive_hash_index options
+--echo #
+
+SET @start_global_value = @@global.innodb_adaptive_hash_index;
+if ($MTR_COMBINATION_AHI == 1) {
+SET GLOBAL innodb_adaptive_hash_index=ON;
+}
+if (!$MTR_COMBINATION_AHI) {
+SET GLOBAL innodb_adaptive_hash_index=OFF;
+}
+
+--echo #
+--echo # Scenario 1: complete_fields parameter with point lookups
+--echo #
+
+CREATE TABLE t1 (
+  id INT PRIMARY KEY,
+  col1 INT, col2 INT, col3 INT,
+  INDEX idx_1 (col1),
+  INDEX idx_2 (col1, col2),
+  INDEX idx_3 (col1, col2, col3) 
+) ENGINE=InnoDB;
+
+INSERT INTO t1 SELECT seq, seq % 100, seq % 10, seq % 5 FROM seq_1_to_50000;
+
+INSERT INTO t1 VALUES (50001, 50, 1, 1), (50002, 50, 2, 2),
+(50003, 50, 3, 3), (50004, 50, 4, 4), (50005, 50, 5, 0),
+(50006, 50, 6, 1), (50007, 50, 7, 2), (50008, 50, 8, 3),
+(50009, 50, 9, 4);
+
+let $i = 120;
+while ($i)
+{
+  --disable_query_log
+  --disable_result_log
+  SELECT COUNT(*) FROM t1 FORCE INDEX(idx_1) WHERE col1 = 50;
+  SELECT COUNT(*) FROM t1 FORCE INDEX(idx_2) WHERE col1 = 50 AND col2 >= 0;
+  SELECT count(*) FROM t1 FORCE INDEX(idx_3) WHERE col1 = 50 and col2 >= 0 and col3 = 0;
+  --enable_result_log
+  --enable_query_log
+  dec $i;
+}
+
+--echo # Analyze format idx_1
+ANALYZE FORMAT=JSON
+SELECT COUNT(*) FROM t1 FORCE INDEX(idx_1) WHERE col1 = 50;
+
+--echo # Analyze format idx_2
+ANALYZE FORMAT=JSON
+SELECT COUNT(*) FROM t1 FORCE INDEX(idx_2) WHERE col1 = 50 AND col2 BETWEEN 0 AND 9;
+
+--echo # Analyze format idx_3
+ANALYZE FORMAT=JSON
+SELECT COUNT(*) FROM t1 FORCE INDEX(idx_3) WHERE col1 = 50 AND col2 BETWEEN 0 AND 9 AND col3 BETWEEN 0 AND 9;
+DROP TABLE t1;
+SET @@global.innodb_adaptive_hash_index = @start_global_value;
