mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fixed bug #1323 (varchar fields becoming char fields adter create ... select)
This commit is contained in:
@ -78,7 +78,7 @@ Field Type Null Key Default Extra
|
|||||||
x varchar(50) YES NULL
|
x varchar(50) YES NULL
|
||||||
describe t2;
|
describe t2;
|
||||||
Field Type Null Key Default Extra
|
Field Type Null Key Default Extra
|
||||||
x char(50) YES NULL
|
x varchar(50) YES NULL
|
||||||
drop table t2;
|
drop table t2;
|
||||||
create table t2 select now() as a , curtime() as b, curdate() as c , 1+1 as d , 1.0 + 1 as e , 33333333333333333 + 3 as f;
|
create table t2 select now() as a , curtime() as b, curdate() as c , 1+1 as d , 1.0 + 1 as e , 33333333333333333 + 3 as f;
|
||||||
describe t2;
|
describe t2;
|
||||||
|
@ -3706,6 +3706,8 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type,
|
|||||||
new_field->field_name=item->name;
|
new_field->field_name=item->name;
|
||||||
if (org_field->maybe_null())
|
if (org_field->maybe_null())
|
||||||
new_field->flags&= ~NOT_NULL_FLAG; // Because of outer join
|
new_field->flags&= ~NOT_NULL_FLAG; // Because of outer join
|
||||||
|
if (org_field->type()==FIELD_TYPE_VAR_STRING)
|
||||||
|
table->db_create_options|= HA_OPTION_PACK_RECORD;
|
||||||
}
|
}
|
||||||
return new_field;
|
return new_field;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user