Commit dc87075f authored by bell@sanja.is.com.ua's avatar bell@sanja.is.com.ua

postmerge fixes

parent c64efa60
...@@ -65,22 +65,22 @@ insert into t1 values (1,'one'); ...@@ -65,22 +65,22 @@ insert into t1 values (1,'one');
insert into t1 values (2,'two'); insert into t1 values (2,'two');
set @arg00=1 ; set @arg00=1 ;
select @arg00 FROM t1 where a=1 union distinct select 1 FROM t1 where a=1; select @arg00 FROM t1 where a=1 union distinct select 1 FROM t1 where a=1;
Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def @arg00 @arg00 8 20 1 Y 32768 0 63 def @arg00 @arg00 8 20 1 Y 32768 0 63
@arg00 @arg00
1 1
select * from (select @arg00) aaa; select * from (select @arg00) aaa;
Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def aaa @arg00 @arg00 8 20 1 Y 32768 0 63 def aaa @arg00 @arg00 8 20 1 Y 32768 0 63
@arg00 @arg00
1 1
select 1 union select 1; select 1 union select 1;
Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def 1 1 8 20 1 N 32769 0 63 def 1 1 8 20 1 N 32769 0 63
1 1
1 1
select * from (select 1 union select 1) aaa; select * from (select 1 union select 1) aaa;
Catalog Database Table Table_alias Column Column_alias Name Type Length Max length Is_null Flags Decimals Charsetnr Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def aaa 1 1 8 20 1 N 32769 0 63 def aaa 1 1 8 20 1 N 32769 0 63
1 1
1 1
......
...@@ -2908,24 +2908,30 @@ uint32 Item_type_holder::display_length(Item *item) ...@@ -2908,24 +2908,30 @@ uint32 Item_type_holder::display_length(Item *item)
Field *Item_type_holder::make_field_by_type(TABLE *table) Field *Item_type_holder::make_field_by_type(TABLE *table)
{ {
if (fld_type == MYSQL_TYPE_ENUM || fld_type == MYSQL_TYPE_SET) /*
The field functions defines a field to be not null if null_ptr is not 0
*/
uchar *null_ptr= maybe_null ? (uchar*) "" : 0;
switch (fld_type)
{ {
case MYSQL_TYPE_ENUM:
DBUG_ASSERT(enum_set_typelib); DBUG_ASSERT(enum_set_typelib);
/* return new Field_enum((char *) 0, max_length, null_ptr, 0,
The field functions defines a field to be not null if null_ptr is not 0 Field::NONE, name,
*/ table, get_enum_pack_length(enum_set_typelib->count),
uchar *null_ptr= maybe_null ? (uchar*) "" : 0; enum_set_typelib, collation.collation);
case MYSQL_TYPE_SET:
if (fld_type == MYSQL_TYPE_ENUM) DBUG_ASSERT(enum_set_typelib);
return new Field_enum((char *) 0, max_length, null_ptr, 0, return new Field_set((char *) 0, max_length, null_ptr, 0,
Field::NONE, name, Field::NONE, name,
table, get_enum_pack_length(enum_set_typelib->count), table, get_set_pack_length(enum_set_typelib->count),
enum_set_typelib, collation.collation); enum_set_typelib, collation.collation);
else case MYSQL_TYPE_VAR_STRING:
return new Field_set((char *) 0, max_length, null_ptr, 0, table->db_create_options|= HA_OPTION_PACK_RECORD;
Field::NONE, name, return new Field_string(max_length, maybe_null, name, table,
table, get_set_pack_length(enum_set_typelib->count), collation.collation);
enum_set_typelib, collation.collation); default:
break;
} }
return tmp_table_field_from_field_type(table); return tmp_table_field_from_field_type(table);
} }
......
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