diff options
-rw-r--r-- | sql/item_create.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sql/item_create.cc b/sql/item_create.cc index 723610c0df4..3edec7fdab0 100644 --- a/sql/item_create.cc +++ b/sql/item_create.cc @@ -464,8 +464,8 @@ Item *create_func_cast(Item *a, Item_cast cast_type, CHARSET_INFO *cs) switch (cast_type) { case ITEM_CAST_BINARY: res= new Item_func_binary(a); break; case ITEM_CAST_CHAR: - res= (cs == NULL) ? new Item_char_typecast(a) : - new Item_func_conv_charset(a,cs); + res= (cs == NULL) ? (Item*) new Item_char_typecast(a) : + (Item*) new Item_func_conv_charset(a,cs); break; case ITEM_CAST_SIGNED_INT: res= new Item_func_signed(a); break; case ITEM_CAST_UNSIGNED_INT: res= new Item_func_unsigned(a); break; |