summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/myisam.result23
-rw-r--r--mysql-test/t/myisam.test19
2 files changed, 42 insertions, 0 deletions
diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result
index 81a2001c28c..38a77ceb346 100644
--- a/mysql-test/r/myisam.result
+++ b/mysql-test/r/myisam.result
@@ -2546,3 +2546,26 @@ myisam_block_size 1024
select @@global.myisam_block_size;
@@global.myisam_block_size
1024
+#
+# MDEV-20704 An index on a double column erroneously uses prefix compression
+#
+CREATE TABLE t1 (
+id INT NOT NULL PRIMARY KEY,
+d DOUBLE,
+KEY (d)
+) ENGINE=MyISAM;
+
+MyISAM file: MYSQLD_DATADIR/test/t1
+Record format: Fixed length
+Character set: latin1_swedish_ci (8)
+Data records: 0 Deleted blocks: 0
+Recordlength: 13
+
+table description:
+Key Start Len Index Type
+1 2 4 unique long
+2 6 8 multip. double NULL
+DROP TABLE t1;
+#
+# End of 5.5 tests
+#
diff --git a/mysql-test/t/myisam.test b/mysql-test/t/myisam.test
index c4bb93b6bfe..29bc5ca187e 100644
--- a/mysql-test/t/myisam.test
+++ b/mysql-test/t/myisam.test
@@ -1765,3 +1765,22 @@ DROP TABLE t1;
#
show variables like 'myisam_block_size';
select @@global.myisam_block_size;
+
+
+--echo #
+--echo # MDEV-20704 An index on a double column erroneously uses prefix compression
+--echo #
+
+CREATE TABLE t1 (
+ id INT NOT NULL PRIMARY KEY,
+ d DOUBLE,
+ KEY (d)
+) ENGINE=MyISAM;
+let $MYSQLD_DATADIR= `select @@datadir`;
+--replace_result $MYSQLD_DATADIR MYSQLD_DATADIR
+--exec $MYISAMCHK -d $MYSQLD_DATADIR/test/t1
+DROP TABLE t1;
+
+--echo #
+--echo # End of 5.5 tests
+--echo #