summaryrefslogtreecommitdiffstats
path: root/mysql-test/main/innodb_bug878769.result
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 18:00:34 +0000
commit3f619478f796eddbba6e39502fe941b285dd97b1 (patch)
treee2c7b5777f728320e5b5542b6213fd3591ba51e2 /mysql-test/main/innodb_bug878769.result
parentInitial commit. (diff)
downloadmariadb-3f619478f796eddbba6e39502fe941b285dd97b1.tar.xz
mariadb-3f619478f796eddbba6e39502fe941b285dd97b1.zip
Adding upstream version 1:10.11.6.upstream/1%10.11.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'mysql-test/main/innodb_bug878769.result')
-rw-r--r--mysql-test/main/innodb_bug878769.result57
1 files changed, 57 insertions, 0 deletions
diff --git a/mysql-test/main/innodb_bug878769.result b/mysql-test/main/innodb_bug878769.result
new file mode 100644
index 00000000..db7ba3d2
--- /dev/null
+++ b/mysql-test/main/innodb_bug878769.result
@@ -0,0 +1,57 @@
+drop table if exists t1,t2;
+#
+# Bug #878769: valgrind complains when using join cache
+# to join an InnoDB table without primary key
+#
+CREATE TABLE t1 (
+col_int_key int(11), col_time_key time, col_varchar_key varchar(1),
+KEY (col_int_key), KEY (col_varchar_key,col_int_key)
+) ENGINE=InnoDB;
+INSERT IGNORE INTO t1 VALUES
+(7,'10:19:31','d'),(1,'14:40:36','r'),(7,'04:37:47','f'),(9,'19:34:06','y'),
+(2,'00:00:00','m'),(4,'00:13:25','q'),(0,'03:47:16',NULL),(4,'01:41:48','d'),
+(8,'00:00:00','g'),(NULL,'22:32:04','x'),(NULL,'16:44:14','f'),
+(0,'17:38:37','p'),(NULL,'08:46:48','j'),(8,'14:11:27','c');
+CREATE TABLE t2 (
+col_int_nokey int(11), col_int_key int(11),
+col_datetime_key datetime, col_datetime_nokey datetime,
+col_varchar_key varchar(1), col_varchar_nokey varchar(1),
+KEY (col_int_key), KEY (col_varchar_key,col_int_key)
+);
+INSERT IGNORE INTO t2 VALUES
+(150,62,'2008-01-03 10:33:32','2008-01-03 10:33:32','v','v'),
+(2,1,'2007-10-09 19:53:04','2007-10-09 19:53:04',NULL,NULL),
+(5,0,'2001-11-08 21:02:12','2001-11-08 21:02:12','x','x'),
+(3,7,'2003-04-01 00:00','2003-04-01 00:00','i','i'),
+(1,7,'1900-01-01 00:00','1900-01-01 00:00:00','e','e'),
+(NULL,7,'2005-04-04 01:21','2005-04-04 01:21','s','s'),
+(2,1,'1900-01-01 00:00','1900-01-01 00:00','j','j'),
+(8,0,'2004-04-28 21:44','2004-04-28 21:44','a','a'),
+(6,8,'2001-04-18 00:00','2001-04-18 00:00:00','y','y'),
+(8,1,'2008-12-18 19:39:55','2008-12-18 19:39:55',NULL,NULL),
+(3,1,'2000-08-01 12:19:39','2000-08-01 12:19:39','r','r'),
+(3,9,'2004-09-25 21:29:06','2004-09-25 21:29:06','v','v');
+set session optimizer_switch='mrr=on,mrr_sort_keys=on';
+set session join_cache_level=6;
+EXPLAIN
+SELECT t1.col_time_key, t1.col_varchar_key
+FROM t2 STRAIGHT_JOIN t1 ON t1.col_int_key = t2.col_int_key
+GROUP BY 1,2;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t2 index col_int_key col_int_key 5 NULL 12 Using where; Using index; Using temporary; Using filesort
+1 SIMPLE t1 ref col_int_key col_int_key 5 test.t2.col_int_key 1 Using join buffer (flat, BKA join); Key-ordered Rowid-ordered scan
+SELECT t1.col_time_key, t1.col_varchar_key
+FROM t2 STRAIGHT_JOIN t1 ON t1.col_int_key = t2.col_int_key
+GROUP BY 1,2;
+col_time_key col_varchar_key
+00:00:00 g
+03:47:16 NULL
+04:37:47 f
+10:19:31 d
+14:11:27 c
+14:40:36 r
+17:38:37 p
+19:34:06 y
+set session optimizer_switch=default;
+set session join_cache_level=default;
+DROP TABLE t1,t2;