1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +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.
This commit is contained in:
Sinisa@sinisa.nasamreza.org
2001-12-29 15:15:51 +02:00
parent 1cef60bff6
commit d82830c591
7 changed files with 71 additions and 5 deletions

View File

@ -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 ?