1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-20604: Duplicate key value is silently truncated to 64 characters in print_keydup_error

Added indication of truncated string for "s" and "M" formats
This commit is contained in:
Oleksandr Byelkin
2020-03-16 16:53:10 +01:00
parent a1846b7a64
commit cb4da5da74
68 changed files with 736 additions and 669 deletions

View File

@ -172,7 +172,20 @@ UPDATE t1 SET a = 'new'
WHERE COLUMN_CREATE( 1, 'v', 1, 'w' ) IS NULL;
ERROR 22007: Illegal value used as argument of dynamic column function
drop table t1;
set @max_session_mem_used_save= @@max_session_mem_used;
set max_session_mem_used = 50000;
select * from seq_1_to_1000;
set max_session_mem_used = 8192;
select * from seq_1_to_1000;
set max_session_mem_used = @max_session_mem_used_save;
#
# MDEV-20604: Duplicate key value is silently truncated to 64
# characters in print_keydup_error
#
create table t1 (a varchar(100), UNIQUE KEY akey (a));
insert into t1 values ("1234567890123456789012345678901234567890123456789012345678901234567890_end");
# The value in the error message should show truncation with "..."
insert into t1 values ("1234567890123456789012345678901234567890123456789012345678901234567890_end");
ERROR 23000: Duplicate entry '1234567890123456789012345678901234567890123456789012345678901...' for key 'akey'
drop table t1;
# End of 10.2 tests