1
0
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:
Mikael Ronstrom
2009-10-30 21:44:41 +01:00
parent 319e843509
commit cf8fddb910
3 changed files with 26 additions and 7 deletions

View File

@@ -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);