mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Fixed such that we fail if using integer constants for character set fields, now need to have correct constant types
This commit is contained in:
@@ -2240,6 +2240,11 @@ static int add_column_list_values(File fptr, partition_info *part_info,
|
||||
else
|
||||
field_cs= NULL;
|
||||
}
|
||||
if (result_type != item_expr->result_type())
|
||||
{
|
||||
my_error(ER_WRONG_TYPE_COLUMN_VALUE_ERROR, MYF(0));
|
||||
return 1;
|
||||
}
|
||||
if (field_cs && field_cs != item_expr->collation.collation)
|
||||
{
|
||||
if (!(item_expr= convert_charset_partition_constant(item_expr,
|
||||
@@ -2249,11 +2254,6 @@ static int add_column_list_values(File fptr, partition_info *part_info,
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
if (result_type != item_expr->result_type())
|
||||
{
|
||||
my_error(ER_WRONG_TYPE_COLUMN_VALUE_ERROR, MYF(0));
|
||||
return 1;
|
||||
}
|
||||
{
|
||||
String val_conv;
|
||||
res= item_expr->val_str(&str);
|
||||
|
||||
Reference in New Issue
Block a user