Commit 00089ead authored by Sergei Golubchik's avatar Sergei Golubchik

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

parent 5de39c5a
......@@ -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
#
......@@ -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 #
......@@ -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;
}
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment