mirror of
https://github.com/MariaDB/server.git
synced 2026-01-06 05:22:24 +03:00
Code that had to be changed so that CREATE ... SELECT ... always
creates proper column types, out of any function, expression or from other tables. mysql-test/r/create.result: This is a result for the test which creates all proper column types out of CREATE ... SELECT ...
This commit is contained in:
@@ -704,8 +704,11 @@ TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info,
|
||||
my_error(ER_WRONG_COLUMN_NAME,MYF(0),item->name);
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
Field *field=create_tmp_field(thd, &tmp_table, item, item->type(),
|
||||
Field *field;
|
||||
if (item->type() == Item::FUNC_ITEM)
|
||||
field=item->tmp_table_field(&tmp_table);
|
||||
else
|
||||
field=create_tmp_field(thd, &tmp_table, item, item->type(),
|
||||
(Item_result_field***) 0, &tmp_field,0,0);
|
||||
if (!field ||
|
||||
!(cr_field=new create_field(field,(item->type() == Item::FIELD_ITEM ?
|
||||
|
||||
Reference in New Issue
Block a user