diff options
author | Sinisa@sinisa.nasamreza.org <> | 2003-09-12 19:17:30 +0300 |
---|---|---|
committer | Sinisa@sinisa.nasamreza.org <> | 2003-09-12 19:17:30 +0300 |
commit | a424ccee17b7f3fb10c261448f97b37e00461912 (patch) | |
tree | d99b70e327f3202d97b4fd6adaa5ef6bea466062 /sql/sql_yacc.yy | |
parent | 5e328057134ef81e4bf4f8896fd74a61e464f60c (diff) | |
download | mariadb-git-a424ccee17b7f3fb10c261448f97b37e00461912.tar.gz |
Fix for a bug #1231
Parse error caused global ORDER BY to be initialized although it should
not have been.
Diffstat (limited to 'sql/sql_yacc.yy')
-rw-r--r-- | sql/sql_yacc.yy | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sql/sql_yacc.yy b/sql/sql_yacc.yy index b84a21b1440..4046aef892b 100644 --- a/sql/sql_yacc.yy +++ b/sql/sql_yacc.yy @@ -5267,9 +5267,12 @@ optional_order_or_limit: SELECT_LEX *sel= lex->current_select; SELECT_LEX_UNIT *unit= sel->master_unit(); SELECT_LEX *fake= unit->fake_select_lex; - unit->global_parameters= fake; - fake->no_table_names_allowed= 1; - lex->current_select= fake; + if (fake) + { + unit->global_parameters= fake; + fake->no_table_names_allowed= 1; + lex->current_select= fake; + } thd->where= "global ORDER clause"; } order_or_limit |