1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

MDEV-31633 Assertion `!item->null_value' failed in Type_handler::Item_send_str

This commit is contained in:
Sergei Golubchik
2023-07-21 13:37:00 +02:00
parent 5de39c5ae3
commit 00089ead50
3 changed files with 17 additions and 0 deletions

View File

@ -5511,6 +5511,15 @@ NULL
select hex(aes_decrypt(x'9E6F76516B4DE68FED7A77632FC0913D', 'bar', 'abcdefghabcdefgh', 'aes-128-ctr')) `expected garbage`;
expected garbage
98D7BC3151620F384B0A953686AF37C9
set @@block_encryption_mode=default;
#
# MDEV-31633 Assertion `!item->null_value' failed in Type_handler::Item_send_str
#
select aes_encrypt(a,a) is null from (values('a'),(NULL),('b')) x;
aes_encrypt(a,a) is null
0
1
0
#
# End of 11.2 tests
#

View File

@ -2456,6 +2456,13 @@ select aes_decrypt(x'9E6F76516B4DE68FED7A77632FC0913D', 'bar', 'abcdefghabcdefgh
# but ctr doesn't use padding, so:
select hex(aes_decrypt(x'9E6F76516B4DE68FED7A77632FC0913D', 'bar', 'abcdefghabcdefgh', 'aes-128-ctr')) `expected garbage`;
set @@block_encryption_mode=default;
--echo #
--echo # MDEV-31633 Assertion `!item->null_value' failed in Type_handler::Item_send_str
--echo #
select aes_encrypt(a,a) is null from (values('a'),(NULL),('b')) x;
--echo #
--echo # End of 11.2 tests
--echo #

View File

@ -405,6 +405,7 @@ String *Item_aes_crypt::val_str(String *str2)
str2->length((uint) aes_length);
DBUG_ASSERT(collation.collation == &my_charset_bin);
str2->set_charset(&my_charset_bin);
null_value= 0;
return str2;
}
}