Commit 60479953 authored by unknown's avatar unknown

merge


sql/item.cc:
  Auto merged
parents 91427f24 80b0baa7
......@@ -1235,6 +1235,20 @@ show columns from t2;
Field Type Null Key Default Extra
a varchar(3) YES NULL
drop table t2, t1;
CREATE TABLE t1 (a mediumtext);
CREATE TABLE t2 (b varchar(20));
INSERT INTO t1 VALUES ('a'),('b');
SELECT left(a,100000000) FROM t1 UNION SELECT b FROM t2;
left(a,100000000)
a
b
create table t3 SELECT left(a,100000000) FROM t1 UNION SELECT b FROM t2;
show create table t3;
Table Create Table
t3 CREATE TABLE `t3` (
`left(a,100000000)` longtext
) ENGINE=MyISAM DEFAULT CHARSET=latin1
drop tables t1,t2,t3;
create table t1 ( id int not null auto_increment, primary key (id), col1 int);
insert into t1 (col1) values (2),(3),(4),(5),(6);
select 99 union all select id from t1 order by 1;
......
......@@ -743,6 +743,16 @@ create table t2 select a from t1 union select b from t1;
show columns from t2;
drop table t2, t1;
#
# correct conversion long string to TEXT (BUG#10025)
#
CREATE TABLE t1 (a mediumtext);
CREATE TABLE t2 (b varchar(20));
INSERT INTO t1 VALUES ('a'),('b');
SELECT left(a,100000000) FROM t1 UNION SELECT b FROM t2;
create table t3 SELECT left(a,100000000) FROM t1 UNION SELECT b FROM t2;
show create table t3;
drop tables t1,t2,t3;
#
# Bug #10032 Bug in parsing UNION with ORDER BY when one node does not use FROM
......
......@@ -3100,8 +3100,8 @@ Field *Item_type_holder::make_field_by_type(TABLE *table)
enum_set_typelib, collation.collation);
case MYSQL_TYPE_VAR_STRING:
table->db_create_options|= HA_OPTION_PACK_RECORD;
return new Field_string(max_length, maybe_null, name, table,
collation.collation);
fld_type= MYSQL_TYPE_STRING;
break;
default:
break;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment