Commit 639e8750 authored by igor@rurik.mysql.com's avatar igor@rurik.mysql.com

Post merge fixes

parent 37ac7822
...@@ -611,6 +611,16 @@ count(distinct (f1+1)) ...@@ -611,6 +611,16 @@ count(distinct (f1+1))
1 1
3 3
drop table t1; drop table t1;
create table t1 (f1 int unsigned, f2 varchar(255));
insert into t1 values (1,repeat('a',255)),(2,repeat('b',255));
select f2,group_concat(f1) from t1 group by f2;
Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
def test t1 t1 f2 f2 253 255 255 Y 0 0 8
def group_concat(f1) 253 400 1 Y 128 0 63
f2 group_concat(f1)
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 1
bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 2
drop table t1;
set names latin1; set names latin1;
create table t1 (a char, b char); create table t1 (a char, b char);
insert into t1 values ('a', 'a'), ('a', 'b'), ('b', 'a'), ('b', 'b'); insert into t1 values ('a', 'a'), ('a', 'b'), ('b', 'a'), ('b', 'b');
......
...@@ -6361,11 +6361,12 @@ bool st_select_lex_unit::add_fake_select_lex(THD *thd) ...@@ -6361,11 +6361,12 @@ bool st_select_lex_unit::add_fake_select_lex(THD *thd)
fake_select_lex->include_standalone(this, fake_select_lex->include_standalone(this,
(SELECT_LEX_NODE**)&fake_select_lex); (SELECT_LEX_NODE**)&fake_select_lex);
fake_select_lex->select_number= INT_MAX; fake_select_lex->select_number= INT_MAX;
fake_select_lex->parent_lex= thd->lex; /* Used in init_query. */
fake_select_lex->make_empty_select(); fake_select_lex->make_empty_select();
fake_select_lex->linkage= GLOBAL_OPTIONS_TYPE; fake_select_lex->linkage= GLOBAL_OPTIONS_TYPE;
fake_select_lex->select_limit= 0; fake_select_lex->select_limit= 0;
fake_select_lex->context.outer_context= first_sl->context.outer_context; fake_select_lex->context.outer_context=first_sl->context.outer_context;
/* allow item list resolving in fake select for ORDER BY */ /* allow item list resolving in fake select for ORDER BY */
fake_select_lex->context.resolve_in_select_list= TRUE; fake_select_lex->context.resolve_in_select_list= TRUE;
fake_select_lex->context.select_lex= fake_select_lex; fake_select_lex->context.select_lex= fake_select_lex;
......
...@@ -202,7 +202,7 @@ bool st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result, ...@@ -202,7 +202,7 @@ bool st_select_lex_unit::prepare(THD *thd_arg, select_result *sel_result,
thd_arg->lex->current_select= sl= first_sl; thd_arg->lex->current_select= sl= first_sl;
found_rows_for_union= first_sl->options & OPTION_FOUND_ROWS; found_rows_for_union= first_sl->options & OPTION_FOUND_ROWS;
is_union= test(first_select->next_select() || fake_select_lex); is_union= first_sl->next_select() || fake_select_lex;
/* Global option */ /* Global option */
......
...@@ -5719,7 +5719,7 @@ order_clause: ...@@ -5719,7 +5719,7 @@ order_clause:
SELECT_LEX *first_sl= unit->first_select(); SELECT_LEX *first_sl= unit->first_select();
if (!first_sl->next_select() && if (!first_sl->next_select() &&
(first_sl->order_list.elements || (first_sl->order_list.elements ||
first_sl->select_limit != HA_POS_ERROR) && first_sl->select_limit) &&
unit->add_fake_select_lex(lex->thd)) unit->add_fake_select_lex(lex->thd))
YYABORT; YYABORT;
} }
......
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