mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-31633 Assertion `!item->null_value' failed in Type_handler::Item_send_str
This commit is contained in:
@@ -5511,6 +5511,15 @@ NULL
|
|||||||
select hex(aes_decrypt(x'9E6F76516B4DE68FED7A77632FC0913D', 'bar', 'abcdefghabcdefgh', 'aes-128-ctr')) `expected garbage`;
|
select hex(aes_decrypt(x'9E6F76516B4DE68FED7A77632FC0913D', 'bar', 'abcdefghabcdefgh', 'aes-128-ctr')) `expected garbage`;
|
||||||
expected garbage
|
expected garbage
|
||||||
98D7BC3151620F384B0A953686AF37C9
|
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
|
# End of 11.2 tests
|
||||||
#
|
#
|
||||||
|
@@ -2456,6 +2456,13 @@ select aes_decrypt(x'9E6F76516B4DE68FED7A77632FC0913D', 'bar', 'abcdefghabcdefgh
|
|||||||
# but ctr doesn't use padding, so:
|
# but ctr doesn't use padding, so:
|
||||||
select hex(aes_decrypt(x'9E6F76516B4DE68FED7A77632FC0913D', 'bar', 'abcdefghabcdefgh', 'aes-128-ctr')) `expected garbage`;
|
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 #
|
||||||
--echo # End of 11.2 tests
|
--echo # End of 11.2 tests
|
||||||
--echo #
|
--echo #
|
||||||
|
@@ -405,6 +405,7 @@ String *Item_aes_crypt::val_str(String *str2)
|
|||||||
str2->length((uint) aes_length);
|
str2->length((uint) aes_length);
|
||||||
DBUG_ASSERT(collation.collation == &my_charset_bin);
|
DBUG_ASSERT(collation.collation == &my_charset_bin);
|
||||||
str2->set_charset(&my_charset_bin);
|
str2->set_charset(&my_charset_bin);
|
||||||
|
null_value= 0;
|
||||||
return str2;
|
return str2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user