2537
2537
select_options:
2539
2539
| select_option_list
2541
if (Lex->current_select->options & SELECT_DISTINCT &&
2542
Lex->current_select->options & SELECT_ALL)
2544
my_error(ER_WRONG_USAGE, MYF(0), "ALL", "DISTINCT");
2550
2543
select_option_list:
2552
2545
| select_option
2548
select_option_distinct_or_all:
2551
Lex->current_select->options|= SELECT_DISTINCT;
2553
if (Lex->current_select->options & SELECT_DISTINCT && Lex->current_select->options & SELECT_ALL)
2555
my_error(ER_WRONG_USAGE, MYF(0), "ALL", "DISTINCT");
2561
Lex->current_select->options|= SELECT_ALL;
2563
if (Lex->current_select->options & SELECT_DISTINCT && Lex->current_select->options & SELECT_ALL)
2565
my_error(ER_WRONG_USAGE, MYF(0), "ALL", "DISTINCT");
2571
select_option_small_or_big:
2574
Lex->current_select->options|= SELECT_SMALL_RESULT;
2576
if (Lex->current_select->options & SELECT_SMALL_RESULT && Lex->current_select->options & SELECT_BIG_RESULT)
2578
my_error(ER_WRONG_USAGE, MYF(0), "SELECT_SMALL_RESULT", "SELECT_SMALL_RESULT");
2584
Lex->current_select->options|= SELECT_BIG_RESULT;
2586
if (Lex->current_select->options & SELECT_SMALL_RESULT && Lex->current_select->options & SELECT_BIG_RESULT)
2588
my_error(ER_WRONG_USAGE, MYF(0), "SELECT_SMALL_RESULT", "SELECT_SMALL_RESULT");
2556
2596
STRAIGHT_JOIN { Lex->current_select->options|= SELECT_STRAIGHT_JOIN; }
2557
| DISTINCT { Lex->current_select->options|= SELECT_DISTINCT; }
2558
| SQL_SMALL_RESULT { Lex->current_select->options|= SELECT_SMALL_RESULT; }
2559
| SQL_BIG_RESULT { Lex->current_select->options|= SELECT_BIG_RESULT; }
2560
2597
| SQL_BUFFER_RESULT
2562
2599
if (check_simple_select(YYSession))
2563
2600
DRIZZLE_YYABORT;
2564
2601
Lex->current_select->options|= OPTION_BUFFER_RESULT;
2603
| select_option_small_or_big
2605
| select_option_distinct_or_all
2566
2607
| SQL_CALC_FOUND_ROWS
2568
2609
if (check_simple_select(YYSession))
2569
2610
DRIZZLE_YYABORT;
2570
2611
Lex->current_select->options|= OPTION_FOUND_ROWS;
2572
| ALL { Lex->current_select->options|= SELECT_ALL; }
2575
2615
select_lock_type: