732
769
bzero((char*) &lex->create_info,sizeof(lex->create_info));
733
770
lex->create_info.options=$2 | $4;
734
771
lex->create_info.db_type= (enum db_type) lex->thd->variables.table_type;
772
lex->create_info.table_charset=NULL;
738
| CREATE opt_unique_or_fulltext INDEX ident ON table_ident
776
| CREATE opt_unique_or_fulltext INDEX ident key_alg ON table_ident
741
779
lex->sql_command= SQLCOM_CREATE_INDEX;
742
if (!add_table_to_list($6,NULL,1))
780
if (!add_table_to_list($7,NULL,1))
744
782
lex->create_list.empty();
745
783
lex->key_list.empty();
746
784
lex->col_list.empty();
747
785
lex->change=NullS;
752
lex->key_list.push_back(new Key($2,$4.str,lex->col_list));
791
lex->key_list.push_back(new Key($2,$4.str, $5, lex->col_list));
753
792
lex->col_list.empty();
755
| CREATE DATABASE opt_if_not_exists ident
794
| CREATE DATABASE opt_if_not_exists ident default_charset
758
797
lex->sql_command=SQLCOM_CREATE_DB;
759
798
lex->name=$4.str;
760
799
lex->create_info.options=$3;
800
lex->create_info.table_charset=lex->charset;
762
802
| CREATE udf_func_type UDF_SYM ident
897
942
Lex->col_list.empty(); /* Alloced by sql_alloc */
899
| key_type opt_ident '(' key_list ')'
944
| key_type opt_ident key_alg '(' key_list ')'
902
lex->key_list.push_back(new Key($1,$2,lex->col_list));
947
lex->key_list.push_back(new Key($1,$2, $3, lex->col_list));
903
948
lex->col_list.empty(); /* Alloced by sql_alloc */
905
950
| opt_constraint FOREIGN KEY_SYM opt_ident '(' key_list ')' references
907
Lex->col_list.empty(); /* Alloced by sql_alloc */
953
lex->key_list.push_back(new foreign_key($4, lex->col_list,
958
lex->fk_match_option));
959
lex->col_list.empty(); /* Alloced by sql_alloc */
909
961
| opt_constraint CHECK_SYM '(' expr ')'
928
981
if (add_field_to_list($1.str,
929
982
(enum enum_field_types) $3,
930
983
lex->length,lex->dec,lex->type,
931
lex->default_value,lex->change,
984
lex->default_value, lex->comment,
985
lex->change,lex->interval,lex->charset))
964
1017
$$=FIELD_TYPE_TINY_BLOB; }
965
1018
| BLOB_SYM { Lex->type|=BINARY_FLAG;
966
1019
$$=FIELD_TYPE_BLOB; }
1020
| GEOMETRY_SYM { Lex->type|=BINARY_FLAG;
1021
$$=FIELD_TYPE_GEOMETRY; }
967
1022
| MEDIUMBLOB { Lex->type|=BINARY_FLAG;
968
1023
$$=FIELD_TYPE_MEDIUM_BLOB; }
969
1024
| LONGBLOB { Lex->type|=BINARY_FLAG;
970
1025
$$=FIELD_TYPE_LONG_BLOB; }
971
1026
| LONG_SYM VARBINARY { Lex->type|=BINARY_FLAG;
972
1027
$$=FIELD_TYPE_MEDIUM_BLOB; }
973
| LONG_SYM varchar { $$=FIELD_TYPE_MEDIUM_BLOB; }
974
| TINYTEXT { $$=FIELD_TYPE_TINY_BLOB; }
975
| TEXT_SYM { $$=FIELD_TYPE_BLOB; }
976
| MEDIUMTEXT { $$=FIELD_TYPE_MEDIUM_BLOB; }
977
| LONGTEXT { $$=FIELD_TYPE_LONG_BLOB; }
1028
| LONG_SYM varchar opt_binary { $$=FIELD_TYPE_MEDIUM_BLOB; }
1029
| TINYTEXT opt_binary { $$=FIELD_TYPE_TINY_BLOB; }
1030
| TEXT_SYM opt_binary { $$=FIELD_TYPE_BLOB; }
1031
| MEDIUMTEXT opt_binary { $$=FIELD_TYPE_MEDIUM_BLOB; }
1032
| LONGTEXT opt_binary { $$=FIELD_TYPE_LONG_BLOB; }
978
1033
| DECIMAL_SYM float_options field_options
979
1034
{ $$=FIELD_TYPE_DECIMAL;}
980
1035
| NUMERIC_SYM float_options field_options
1066
1121
| PRIMARY_SYM KEY_SYM { Lex->type|= PRI_KEY_FLAG | NOT_NULL_FLAG; }
1067
1122
| UNIQUE_SYM { Lex->type|= UNIQUE_FLAG; }
1068
1123
| UNIQUE_SYM KEY_SYM { Lex->type|= UNIQUE_KEY_FLAG; }
1069
| COMMENT_SYM text_literal {};
1124
| COMMENT_SYM text_literal { Lex->comment= $2; };
1129
if (!(Lex->charset=get_charset_by_name($1.str,MYF(0))))
1131
net_printf(¤t_thd->net,ER_UNKNOWN_CHARACTER_SET,$1.str);
1136
charset_or_nocharset:
1138
| DEFAULT {Lex->charset=NULL; }
1073
| BINARY { Lex->type|=BINARY_FLAG; };
1141
/* empty */ { Lex->charset=NULL; }
1142
| BINARY { Lex->type|=BINARY_FLAG; Lex->charset=NULL; }
1143
| CHAR_SYM SET charset {/* charset is already in Lex->charset */} ;
1146
/* empty */ { Lex->charset=NULL; }
1147
| DEFAULT CHAR_SYM SET charset_or_nocharset ;
1076
REFERENCES table_ident opt_on_delete {}
1077
| REFERENCES table_ident '(' key_list ')' opt_on_delete
1079
Lex->col_list.empty(); /* Alloced by sql_alloc */
1150
REFERENCES table_ident
1153
lex->fk_delete_opt= lex->fk_update_opt= lex->fk_match_option= 0;
1154
lex->ref_list.empty();
1162
/* empty */ opt_on_delete {}
1163
| '(' ref_list ')' opt_on_delete {};
1166
ref_list ',' ident { Lex->ref_list.push_back(new key_part_spec($3.str)); }
1167
| ident { Lex->ref_list.push_back(new key_part_spec($1.str)); };
1087
1175
opt_on_delete_list opt_on_delete_item {}
1088
1176
| opt_on_delete_item {};
1091
1178
opt_on_delete_item:
1092
ON DELETE_SYM delete_option {}
1093
| ON UPDATE_SYM delete_option {}
1179
ON DELETE_SYM delete_option { Lex->fk_delete_opt= $3; }
1180
| ON UPDATE_SYM delete_option { Lex->fk_update_opt= $3; }
1181
| MATCH FULL { Lex->fk_match_option= foreign_key::FK_MATCH_FULL; }
1182
| MATCH PARTIAL { Lex->fk_match_option= foreign_key::FK_MATCH_PARTIAL; }
1183
| MATCH SIMPLE_SYM { Lex->fk_match_option= foreign_key::FK_MATCH_SIMPLE; };
1186
RESTRICT { $$= (int) foreign_key::FK_OPTION_RESTRICT; }
1187
| CASCADE { $$= (int) foreign_key::FK_OPTION_CASCADE; }
1188
| SET NULL_SYM { $$= (int) foreign_key::FK_OPTION_SET_NULL; }
1189
| NO_SYM ACTION { $$= (int) foreign_key::FK_OPTION_NO_ACTION; }
1190
| SET DEFAULT { $$= (int) foreign_key::FK_OPTION_DEFAULT; };
1105
1193
opt_constraint PRIMARY_SYM KEY_SYM { $$= Key::PRIMARY; }
1106
1194
| key_or_index { $$= Key::MULTIPLE; }
1107
1195
| FULLTEXT_SYM { $$= Key::FULLTEXT; }
1108
1196
| FULLTEXT_SYM key_or_index { $$= Key::FULLTEXT; }
1197
| SPATIAL_SYM { $$= Key::SPATIAL; }
1198
| SPATIAL_SYM key_or_index { $$= Key::SPATIAL; }
1109
1199
| opt_constraint UNIQUE_SYM { $$= Key::UNIQUE; }
1110
1200
| opt_constraint UNIQUE_SYM key_or_index { $$= Key::UNIQUE; };
1121
1211
opt_unique_or_fulltext:
1122
1212
/* empty */ { $$= Key::MULTIPLE; }
1123
1213
| UNIQUE_SYM { $$= Key::UNIQUE; }
1124
| FULLTEXT_SYM { $$= Key::FULLTEXT; };
1214
| SPATIAL_SYM { $$= Key::SPATIAL; };
1217
/* empty */ { $$= HA_KEY_ALG_UNDEF; }
1218
| USING opt_btree_or_rtree { $$= $2; };
1221
BTREE_SYM { $$= HA_KEY_ALG_BTREE; }
1222
| RTREE_SYM { $$= HA_KEY_ALG_RTREE; }
1223
| HASH_SYM { $$= HA_KEY_ALG_HASH; };
1127
1226
key_list ',' key_part order_dir { Lex->col_list.push_back($3); }
1164
1263
bzero((char*) &lex->create_info,sizeof(lex->create_info));
1165
1264
lex->create_info.db_type= DB_TYPE_DEFAULT;
1166
1265
lex->create_info.row_type= ROW_TYPE_NOT_USED;
1266
lex->create_info.table_charset=NULL;
1167
1267
lex->alter_keys_onoff=LEAVE_AS_IS;
1168
1268
lex->simple_alter=1;
1272
| ALTER DATABASE ident default_charset
1275
lex->sql_command=SQLCOM_ALTER_DB;
1277
lex->create_info.table_charset=lex->charset;
1173
1282
| alter_list_item
1174
1283
| alter_list ',' alter_list_item;
1185
1294
lex->change= $3.str; lex->simple_alter=0;
1187
1296
field_spec opt_place
1188
| MODIFY_SYM opt_column field_ident
1191
lex->length=lex->dec=0; lex->type=0; lex->interval=0;
1192
lex->default_value=0;
1297
| MODIFY_SYM opt_column field_ident
1300
lex->length=lex->dec=0; lex->type=0; lex->interval=0;
1301
lex->default_value=lex->comment=0;
1193
1302
lex->simple_alter=0;
1198
if (add_field_to_list($3.str,
1199
(enum enum_field_types) $5,
1200
lex->length,lex->dec,lex->type,
1201
lex->default_value, $3.str,
1307
if (add_field_to_list($3.str,
1308
(enum enum_field_types) $5,
1309
lex->length,lex->dec,lex->type,
1310
lex->default_value, lex->comment,
1311
$3.str, lex->interval, lex->charset))
1206
1315
| DROP opt_column field_ident opt_restrict
1570
1685
| expr '+' INTERVAL_SYM expr interval
1571
1686
{ $$= new Item_date_add_interval($1,$4,$5,0); }
1572
1687
| expr '-' INTERVAL_SYM expr interval
1573
{ $$= new Item_date_add_interval($1,$4,$5,1); };
1688
{ $$= new Item_date_add_interval($1,$4,$5,1); }
1689
| expr COLLATE_SYM ident
1691
if (!(Lex->charset=get_charset_by_name($3.str,MYF(0))))
1693
net_printf(¤t_thd->net,ER_UNKNOWN_CHARACTER_SET,$3.str);
1696
$$= new Item_func_set_collation($1,Lex->charset);
1575
1699
/* expressions that begin with 'expr' that do NOT follow IN_SYM */
1689
1816
| CASE_SYM opt_expr WHEN_SYM when_list opt_else END
1690
1817
{ $$= new Item_func_case(* $4, $2, $5 ); }
1691
1818
| CONVERT_SYM '(' expr ',' cast_type ')' { $$= create_func_cast($3, $5); }
1819
| CONVERT_SYM '(' expr USING charset ')'
1820
{ $$= new Item_func_conv_charset($3,Lex->charset); }
1821
| CONVERT_SYM '(' expr ',' expr ',' expr ')'
1823
$$= new Item_func_conv_charset3($3,$7,$5);
1692
1825
| FUNC_ARG0 '(' ')'
1693
1826
{ $$= ((Item*(*)(void))($1.symbol->create_func))();}
1694
1827
| FUNC_ARG1 '(' expr ')'
1766
1901
| FIELD_FUNC '(' expr ',' expr_list ')'
1767
1902
{ $$= new Item_func_field($3, *$5); }
1903
| GEOMFROMTEXT '(' expr ')'
1904
{ $$= new Item_func_geometry_from_text($3); }
1905
| GEOMFROMTEXT '(' expr ',' expr ')'
1906
{ $$= new Item_func_geometry_from_text($3); }
1907
| GEOMETRYCOLLECTION '(' expr_list ')'
1908
{ $$= new Item_func_spatial_collection(* $3,
1909
Geometry::wkbGeometryCollection,
1910
Geometry::wkbPoint); }
1768
1911
| HOUR_SYM '(' expr ')'
1769
1912
{ $$= new Item_func_hour($3); }
1770
1913
| IF '(' expr ',' expr ',' expr ')'
1790
1933
| LEFT '(' expr ',' expr ')'
1791
1934
{ $$= new Item_func_left($3,$5); }
1935
| LINESTRING '(' expr_list ')'
1936
{ $$= new Item_func_spatial_collection(* $3,
1937
Geometry::wkbLineString, Geometry::wkbPoint); }
1792
1938
| LOCATE '(' expr ',' expr ')'
1793
1939
{ $$= new Item_func_locate($5,$3); }
1794
1940
| LOCATE '(' expr ',' expr ',' expr ')'
1795
1941
{ $$= new Item_func_locate($5,$3,$7); }
1796
| GREATEST_SYM '(' expr ',' expr_list ')'
1942
| GEOMCOLLFROMTEXT '(' expr ')'
1943
{ $$= new Item_func_geometry_from_text($3); }
1944
| GEOMCOLLFROMTEXT '(' expr ',' expr ')'
1945
{ $$= new Item_func_geometry_from_text($3); }
1946
| GREATEST_SYM '(' expr ',' expr_list ')'
1797
1947
{ $5->push_front($3); $$= new Item_func_max(*$5); }
1798
1948
| LEAST_SYM '(' expr ',' expr_list ')'
1799
1949
{ $5->push_front($3); $$= new Item_func_min(*$5); }
1800
1950
| LOG_SYM '(' expr ')'
1801
{ $$= new Item_func_log($3); }
1951
{ $$= new Item_func_log($3); }
1802
1952
| LOG_SYM '(' expr ',' expr ')'
1803
{ $$= new Item_func_log($3, $5); }
1953
{ $$= new Item_func_log($3, $5); }
1954
| LINEFROMTEXT '(' expr ')'
1955
{ $$= new Item_func_geometry_from_text($3); }
1956
| LINEFROMTEXT '(' expr ',' expr ')'
1957
{ $$= new Item_func_geometry_from_text($3); }
1804
1958
| MINUTE_SYM '(' expr ')'
1805
1959
{ $$= new Item_func_minute($3); }
1806
1960
| MONTH_SYM '(' expr ')'
1807
1961
{ $$= new Item_func_month($3); }
1962
| MULTILINESTRING '(' expr_list ')'
1963
{ $$= new Item_func_spatial_collection(* $3,
1964
Geometry::wkbMultiLineString, Geometry::wkbLineString); }
1965
| MLINEFROMTEXT '(' expr ')'
1966
{ $$= new Item_func_geometry_from_text($3); }
1967
| MLINEFROMTEXT '(' expr ',' expr ')'
1968
{ $$= new Item_func_geometry_from_text($3); }
1969
| MPOINTFROMTEXT '(' expr ')'
1970
{ $$= new Item_func_geometry_from_text($3); }
1971
| MPOINTFROMTEXT '(' expr ',' expr ')'
1972
{ $$= new Item_func_geometry_from_text($3); }
1973
| MPOLYFROMTEXT '(' expr ')'
1974
{ $$= new Item_func_geometry_from_text($3); }
1975
| MPOLYFROMTEXT '(' expr ',' expr ')'
1976
{ $$= new Item_func_geometry_from_text($3); }
1977
| MULTIPOINT '(' expr_list ')'
1978
{ $$= new Item_func_spatial_collection(* $3,
1979
Geometry::wkbMultiPoint, Geometry::wkbPoint); }
1980
| MULTIPOLYGON '(' expr_list ')'
1981
{ $$= new Item_func_spatial_collection(* $3,
1982
Geometry::wkbMultiPolygon, Geometry::wkbPolygon ); }
1808
1983
| NOW_SYM optional_braces
1809
1984
{ $$= new Item_func_now(); current_thd->safe_to_cache_query=0;}
1810
1985
| NOW_SYM '(' expr ')'
1814
1989
$$= new Item_func_password($3);
1991
| POINTFROMTEXT '(' expr ')'
1992
{ $$= new Item_func_geometry_from_text($3); }
1993
| POINTFROMTEXT '(' expr ',' expr ')'
1994
{ $$= new Item_func_geometry_from_text($3); }
1995
| POLYFROMTEXT '(' expr ')'
1996
{ $$= new Item_func_geometry_from_text($3); }
1997
| POLYFROMTEXT '(' expr ',' expr ')'
1998
{ $$= new Item_func_geometry_from_text($3); }
1999
| POLYGON '(' expr_list ')'
2000
{ $$= new Item_func_spatial_collection(* $3,
2001
Geometry::wkbPolygon, Geometry::wkbLineString); }
1816
2002
| POSITION_SYM '(' no_in_expr IN_SYM expr ')'
1817
2003
{ $$ = new Item_func_locate($5,$3); }
1818
2004
| RAND '(' expr ')'
1839
2025
| SUBSTRING_INDEX '(' expr ',' expr ',' expr ')'
1840
2026
{ $$= new Item_func_substr_index($3,$5,$7); }
1841
2027
| TRIM '(' expr ')'
1842
{ $$= new Item_func_trim($3,new Item_string(" ",1)); }
2028
{ $$= new Item_func_trim($3,new Item_string(" ",1,default_charset_info)); }
1843
2029
| TRIM '(' LEADING opt_pad FROM expr ')'
1844
2030
{ $$= new Item_func_ltrim($6,$4); }
1845
2031
| TRIM '(' TRAILING opt_pad FROM expr ')'
2089
2275
| '{' ident join_table LEFT OUTER JOIN_SYM join_table ON expr '}'
2090
{ add_join_on($7,$9); $7->outer_join|=JOIN_TYPE_LEFT; $$=$7; };
2276
{ add_join_on($7,$9); $7->outer_join|=JOIN_TYPE_LEFT; $$=$7; }
2277
| '(' SELECT_SYM select_part3 ')' opt_table_alias
2280
SELECT_LEX_UNIT *unit= lex->select->master_unit();
2281
lex->select= unit->outer_select();
2282
if (!($$= add_table_to_list(new Table_ident(unit),
2290
lex->derived_tables= true;
2291
if (lex->select->linkage == GLOBAL_OPTIONS_TYPE ||
2292
mysql_new_select(lex, 1))
2294
mysql_init_select(lex);
2295
lex->select->linkage= DERIVED_TABLE_TYPE;
2297
select_options select_item_list select_intoto
2115
2326
key_usage_list2:
2116
2327
key_usage_list2 ',' ident
2117
{ Select->interval_list.push_back(new String((const char*) $3.str,$3.length)); }
2328
{ Select->interval_list.push_back(new String((const char*) $3.str,$3.length,default_charset_info)); }
2119
{ Select->interval_list.push_back(new String((const char*) $1.str,$1.length)); }
2330
{ Select->interval_list.push_back(new String((const char*) $1.str,$1.length,default_charset_info)); }
2121
{ Select->interval_list.push_back(new String("PRIMARY",7)); };
2332
{ Select->interval_list.push_back(new String("PRIMARY",7,default_charset_info)); };
2709
2919
if (!add_table_to_list($3,NULL,0))
2922
| COLUMN_SYM TYPES_SYM
2925
lex->sql_command= SQLCOM_SHOW_COLUMN_TYPES;
2927
| TABLE_SYM TYPES_SYM
2930
lex->sql_command= SQLCOM_SHOW_TABLE_TYPES;
2935
lex->sql_command= SQLCOM_SHOW_PRIVILEGES;
2937
| COUNT_SYM '(' '*' ')' WARNINGS
2938
{ Lex->sql_command = SQLCOM_SHOW_WARNS_COUNT;}
2939
| COUNT_SYM '(' '*' ')' ERRORS
2940
{ Lex->sql_command = SQLCOM_SHOW_ERRORS_COUNT;}
2941
| WARNINGS {Select->offset_limit=0L;} limit_clause
2942
{ Lex->sql_command = SQLCOM_SHOW_WARNS;}
2943
| ERRORS {Select->offset_limit=0L;} limit_clause
2944
{ Lex->sql_command = SQLCOM_SHOW_ERRORS;}
2712
2945
| STATUS_SYM wild
2713
2946
{ Lex->sql_command= SQLCOM_SHOW_STATUS; }
2714
2947
| INNOBASE_SYM STATUS_SYM
2963
3203
/* Common definitions */
2966
TEXT_STRING { $$ = new Item_string($1.str,$1.length); }
3206
TEXT_STRING { $$ = new Item_string($1.str,$1.length,default_charset_info); }
3207
| UNDERSCORE_CHARSET TEXT_STRING { $$ = new Item_string($2.str,$2.length,Lex->charset); }
2967
3208
| text_literal TEXT_STRING
2968
3209
{ ((Item_string*) $1)->append($2.str,$2.length); };
2971
TEXT_STRING { $$= new String($1.str,$1.length); }
3212
TEXT_STRING { $$= new String($1.str,$1.length,default_charset_info); }
2974
Item *tmp = new Item_varbinary($1.str,$1.length);
3215
Item *tmp = new Item_varbinary($1.str,$1.length,default_charset_info);
2975
3216
$$= tmp ? tmp->val_str((String*) 0) : (String*) 0;
3221
if(current_thd->prepare_command)
3223
Lex->param_list.push_back($$=new Item_param());
3224
current_thd->param_count++;
3228
yyerror("You have an error in your SQL syntax");
2979
3233
text_literal { $$ = $1; }
2980
3234
| NUM { $$ = new Item_int($1.str, (longlong) atol($1.str),$1.length); }
2984
3238
| FLOAT_NUM { $$ = new Item_float($1.str, $1.length); }
2985
3239
| NULL_SYM { $$ = new Item_null();
2986
3240
Lex->next_state=STATE_OPERATOR_OR_IDENT;}
2987
| HEX_NUM { $$ = new Item_varbinary($1.str,$1.length);}
3241
| HEX_NUM { $$ = new Item_varbinary($1.str,$1.length,default_charset_info);}
2988
3242
| DATE_SYM text_literal { $$ = $2; }
2989
3243
| TIME_SYM text_literal { $$ = $2; }
2990
3244
| TIMESTAMP text_literal { $$ = $2; };
3257
3514
/* empty */ { $$=OPT_SESSION; }
3515
| GLOBAL_SYM { $$=OPT_GLOBAL; }
3258
3516
| LOCAL_SYM { $$=OPT_SESSION; }
3259
3517
| SESSION_SYM { $$=OPT_SESSION; }
3260
| GLOBAL_SYM { $$=OPT_GLOBAL; }
3263
3520
opt_var_ident_type:
3264
3521
/* empty */ { $$=OPT_DEFAULT; }
3522
| GLOBAL_SYM '.' { $$=OPT_GLOBAL; }
3265
3523
| LOCAL_SYM '.' { $$=OPT_SESSION; }
3266
3524
| SESSION_SYM '.' { $$=OPT_SESSION; }
3267
| GLOBAL_SYM '.' { $$=OPT_GLOBAL; }
3632
3889
column_list_id:
3635
String *new_str = new String((const char*) $1.str,$1.length);
3892
String *new_str = new String((const char*) $1.str,$1.length,default_charset_info);
3636
3893
List_iterator <LEX_COLUMN> iter(Lex->columns);
3637
3894
class LEX_COLUMN *point;
3639
3896
while ((point=iter++))
3641
if (!my_strcasecmp(point->column.ptr(),new_str->ptr()))
3898
if (!my_strcasecmp(system_charset_info,
3899
point->column.ptr(), new_str->ptr()))
3644
3902
lex->grant_tot_col|= lex->which_columns;
3746
4004
if (!lex->select->braces)
3748
4006
send_error(&lex->thd->net, ER_SYNTAX_ERROR);
3751
if (mysql_new_select(lex))
3753
mysql_init_select(lex);
3754
lex->select->linkage=NOT_A_SELECT;
3755
lex->select->select_limit=lex->thd->variables.select_limit;
4009
lex->select->master_unit()->global_parameters=
4010
lex->select->master_unit();
4012
Following type conversion looks like hack, but all that need
4013
SELECT_LEX fields always check linkage type.
4015
lex->select= (SELECT_LEX*)lex->select->master_unit();
4016
lex->select->select_limit=lex->thd->default_select_limit;
3757
opt_order_clause limit_clause
4018
opt_order_clause limit_clause
3762
| ALL { Lex->union_option=1; }
4023
| ALL {Lex->union_option=1;};
4025
singleval_subselect:
4026
subselect_start singleval_subselect_init
4032
singleval_subselect_init:
4035
$$= new Item_singleval_subselect(current_thd, Lex->select);
4039
subselect_start exists_subselect_init
4045
exists_subselect_init:
4048
$$= new Item_exists_subselect(current_thd, Lex->select);
4054
if (mysql_new_select(Lex, 1))
4062
lex->select = lex->select->outer_select();