diff options
author | unknown <vva@eagle.mysql.r18.ru> | 2003-10-03 17:54:32 -0400 |
---|---|---|
committer | unknown <vva@eagle.mysql.r18.ru> | 2003-10-03 17:54:32 -0400 |
commit | 8c1ce4255d952c1f441e760b7e666d78be5c6b89 (patch) | |
tree | a9b68d26bfdbc6fcca2a455c8fd7cbbc2f284841 | |
parent | 1e5a03cf954f4c59108e3dfdd941b9c4184515cf (diff) | |
download | mariadb-git-8c1ce4255d952c1f441e760b7e666d78be5c6b89.tar.gz |
Fixed bug #1323 (varchar fields becoming char fields adter create ... select)
-rw-r--r-- | mysql-test/r/create.result | 2 | ||||
-rw-r--r-- | sql/sql_select.cc | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/mysql-test/r/create.result b/mysql-test/r/create.result index e6192eb6ccb..7b784e3c3ee 100644 --- a/mysql-test/r/create.result +++ b/mysql-test/r/create.result @@ -78,7 +78,7 @@ Field Type Null Key Default Extra x varchar(50) YES NULL describe t2; Field Type Null Key Default Extra -x char(50) YES NULL +x varchar(50) YES NULL 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; describe t2; diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 53c41482a36..bffe3cd7968 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -3706,6 +3706,8 @@ Field *create_tmp_field(THD *thd, TABLE *table,Item *item, Item::Type type, new_field->field_name=item->name; if (org_field->maybe_null()) 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; } |