summaryrefslogtreecommitdiff
path: root/mysql-test/t/errors.test
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t/errors.test')
-rw-r--r--mysql-test/t/errors.test21
1 files changed, 21 insertions, 0 deletions
diff --git a/mysql-test/t/errors.test b/mysql-test/t/errors.test
index 55461002fd4..72d432a2edc 100644
--- a/mysql-test/t/errors.test
+++ b/mysql-test/t/errors.test
@@ -203,6 +203,8 @@ drop table t1;
#
# errors caused by max_session_mem_used
#
+set @max_session_mem_used_save= @@max_session_mem_used;
+
--disable_result_log
set max_session_mem_used = 50000;
--error 0,ER_OPTION_PREVENTS_STATEMENT
@@ -213,3 +215,22 @@ select * from seq_1_to_1000;
--enable_result_log
# We may not be able to execute any more queries with this connection
# because of too little memory#
+
+set max_session_mem_used = @max_session_mem_used_save;
+
+--echo #
+--echo # MDEV-20604: Duplicate key value is silently truncated to 64
+--echo # characters in print_keydup_error
+--echo #
+
+create table t1 (a varchar(100), UNIQUE KEY akey (a));
+
+insert into t1 values ("1234567890123456789012345678901234567890123456789012345678901234567890_end");
+--echo # The value in the error message should show truncation with "..."
+--error ER_DUP_ENTRY
+insert into t1 values ("1234567890123456789012345678901234567890123456789012345678901234567890_end");
+
+drop table t1;
+
+
+--echo # End of 10.2 tests