summaryrefslogtreecommitdiff
path: root/mysql-test/suite/pbxt/t/pbxt_assertions.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/suite/pbxt/t/pbxt_assertions.test')
-rw-r--r--mysql-test/suite/pbxt/t/pbxt_assertions.test31
1 files changed, 31 insertions, 0 deletions
diff --git a/mysql-test/suite/pbxt/t/pbxt_assertions.test b/mysql-test/suite/pbxt/t/pbxt_assertions.test
new file mode 100644
index 00000000000..3699ab04568
--- /dev/null
+++ b/mysql-test/suite/pbxt/t/pbxt_assertions.test
@@ -0,0 +1,31 @@
+
+#
+# BUG: doing a SELECT COUNT(*) on a table with extended records and without indexes
+# caused assertion violation in debug version
+#
+--disable_warnings
+DROP TABLE IF EXISTS t1;
+--enable_warnings
+CREATE TABLE t1 (c1 VARCHAR(255), c2 VARCHAR(255), c3 INT);
+INSERT INTO t1 VALUES (REPEAT('x', 255), REPEAT('y', 255), 1);
+INSERT INTO t1 VALUES (REPEAT('x', 255), REPEAT('y', 255), 2);
+INSERT INTO t1 VALUES (REPEAT('x', 255), REPEAT('y', 255), 3);
+SELECT COUNT(*) FROM t1;
+
+#
+# BUG: the following SELECT query caused assertion violation. The engine
+# code expected that index_int/index_end will be called nested in relation to
+# handler locking functions, which was not true for the case below
+#
+
+--disable_warnings
+drop table if exists t1;
+--enable_warnings
+create table t1 (a int, unique index indexa (a));
+insert into t1 values (-1), (-4), (-2), (NULL);
+select -10 IN (select a from t1 FORCE INDEX (indexa));
+
+--disable_query_log
+drop table t1;
+drop database pbxt;
+--enable_query_log