summaryrefslogtreecommitdiff
path: root/mysql-test/main/type_binary.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/main/type_binary.test')
-rw-r--r--mysql-test/main/type_binary.test28
1 files changed, 28 insertions, 0 deletions
diff --git a/mysql-test/main/type_binary.test b/mysql-test/main/type_binary.test
index 952bc6ef231..9f7a0db66d5 100644
--- a/mysql-test/main/type_binary.test
+++ b/mysql-test/main/type_binary.test
@@ -126,3 +126,31 @@ DROP TABLE t1;
--echo # End of 10.0 tests
--echo #
+--echo #
+--echo # Start of 10.5 tests
+--echo #
+
+--echo #
+--echo # MDEV-20818 ER_CRASHED_ON_USAGE or Assertion `length <= column->length' failed in write_block_record on temporary table
+--echo #
+
+CREATE TABLE t1 (a VARCHAR(39));
+--enable_metadata
+SELECT
+ CAST(a AS BINARY(0)),
+ CAST(a AS BINARY(1)),
+ CAST(a AS BINARY(16)),
+ CAST(a AS BINARY(255)),
+ CAST(a AS BINARY(256)),
+ CAST(a AS BINARY(512)),
+ CAST(a AS BINARY(513)),
+ CAST(a AS BINARY(65532)),
+ CAST(a AS BINARY(65533)),
+ CAST(a AS BINARY(65534)),
+ CAST(a AS BINARY(65535)),
+ CAST(a AS BINARY(65536)),
+ CAST(a AS BINARY(16777215)),
+ CAST(a AS BINARY(16777216))
+FROM t1;
+--disable_metadata
+DROP TABLE t1;