1007
1089
query verb_clause create change select drop insert replace insert2
1008
1090
insert_values update delete truncate rename
1009
show describe load alter optimize keycache flush
1091
show describe load alter optimize keycache preload flush
1010
1092
reset purge begin commit rollback savepoint release
1011
1093
slave master_def master_defs master_file_def slave_until_opts
1012
1094
repair analyze check start checksum
1013
1095
field_list field_list_item field_spec kill column_def key_def
1014
keycache_list assign_to_keycache
1096
keycache_list assign_to_keycache preload_list preload_keys
1015
1097
select_item_list select_item values_list no_braces
1016
1098
opt_limit_clause delete_limit_clause fields opt_values values
1017
opt_precision opt_ignore opt_column
1018
set lock unlock string_list
1019
opt_binary table_lock_list table_lock
1099
opt_precision opt_ignore opt_column opt_restrict
1100
set lock unlock string_list field_options field_option
1101
field_opt_list opt_binary table_lock_list table_lock
1020
1102
ref_list opt_match_clause opt_on_update_delete use
1021
opt_delete_options opt_delete_option varchar
1103
opt_delete_options opt_delete_option varchar nchar nvarchar
1022
1104
opt_outer table_list table_name table_alias_ref_list table_alias_ref
1023
1105
opt_option opt_place
1024
1106
opt_attribute opt_attribute_list attribute
1179
1260
Lex->mi.heartbeat_period < 0.0)
1181
1262
char buf[sizeof(SLAVE_MAX_HEARTBEAT_PERIOD*4)];
1182
sprintf(buf, "%d seconds", SLAVE_MAX_HEARTBEAT_PERIOD);
1263
my_sprintf(buf, (buf, "%d seconds", SLAVE_MAX_HEARTBEAT_PERIOD));
1183
1264
my_error(ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE,
1185
1266
" is negative or exceeds the maximum ",
1189
1270
if (Lex->mi.heartbeat_period > slave_net_timeout)
1191
push_warning_printf(YYTHD, DRIZZLE_ERROR::WARN_LEVEL_WARN,
1272
push_warning_printf(YYTHD, MYSQL_ERROR::WARN_LEVEL_WARN,
1192
1273
ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE,
1193
1274
ER(ER_SLAVE_HEARTBEAT_VALUE_OUT_OF_RANGE),
1194
1275
" exceeds the value of `slave_net_timeout' sec.",
1554
1657
Lex->create_info.used_fields|= HA_CREATE_USED_KEY_BLOCK_SIZE;
1555
1658
Lex->create_info.key_block_size= $3;
1660
| TRANSACTIONAL_SYM opt_equal choice
1662
Lex->create_info.used_fields|= HA_CREATE_USED_TRANSACTIONAL;
1663
Lex->create_info.transactional= $3;
1668
opt_default charset opt_equal charset_name_or_default
1670
HA_CREATE_INFO *cinfo= &Lex->create_info;
1671
if ((cinfo->used_fields & HA_CREATE_USED_DEFAULT_CHARSET) &&
1672
cinfo->default_table_charset && $4 &&
1673
!my_charset_same(cinfo->default_table_charset,$4))
1675
my_error(ER_CONFLICTING_DECLARATIONS, MYF(0),
1676
"CHARACTER SET ", cinfo->default_table_charset->csname,
1677
"CHARACTER SET ", $4->csname);
1680
Lex->create_info.default_table_charset= $4;
1681
Lex->create_info.used_fields|= HA_CREATE_USED_DEFAULT_CHARSET;
1559
1685
default_collation:
1713
1839
lex->default_value= lex->on_update_value= 0;
1714
1840
lex->comment=null_lex_str;
1715
1841
lex->charset=NULL;
1842
lex->storage_type= HA_SM_DEFAULT;
1716
1843
lex->column_format= COLUMN_FORMAT_TYPE_DEFAULT;
1717
lex->vcol_info= NULL;
1722
1848
if (add_field_to_list(lex->thd, &$1, (enum enum_field_types) $3,
1723
1849
lex->length,lex->dec,lex->type,
1850
lex->storage_type, lex->column_format,
1725
1851
lex->default_value, lex->on_update_value,
1727
lex->change,&lex->interval_list,lex->charset,
1733
type opt_attribute {}
1734
| VIRTUAL_SYM type AS '(' virtual_column_func ')' vcol_opt_attribute
1736
$$=DRIZZLE_TYPE_VIRTUAL;
1737
Lex->vcol_info->set_field_type((enum enum_field_types) $2);
1743
| vcol_opt_attribute_list {}
1746
vcol_opt_attribute_list:
1747
vcol_opt_attribute_list vcol_attribute {}
1755
lex->type|= UNIQUE_FLAG;
1756
lex->alter_info.flags|= ALTER_ADD_INDEX;
1758
| UNIQUE_SYM KEY_SYM
1761
lex->type|= UNIQUE_KEY_FLAG;
1762
lex->alter_info.flags|= ALTER_ADD_INDEX;
1764
| COMMENT_SYM TEXT_STRING_sys { Lex->comment= $2; }
1767
Lex->vcol_info->set_field_stored(true);
1772
PARSE_VCOL_EXPR_SYM '(' virtual_column_func ')'
1775
"PARSE_VCOL_EXPR" can only be used by the SQL server
1776
when reading a '*.frm' file.
1777
Prevent the end user from invoking this command.
1779
if (not Lex->parse_vcol_expr)
1781
my_message(ER_SYNTAX_ERROR, ER(ER_SYNTAX_ERROR), MYF(0));
1787
virtual_column_func:
1788
remember_name expr remember_end
1790
Lex->vcol_info= new virtual_column_info();
1791
if (not Lex->vcol_info)
1793
my_error(ER_OUTOFMEMORY, MYF(0), sizeof(virtual_column_info));
1796
uint expr_len= (uint)($3 - $1) - 1;
1797
Lex->vcol_info->expr_str.str= (char* ) sql_memdup($1 + 1, expr_len);
1798
Lex->vcol_info->expr_str.length= expr_len;
1799
Lex->vcol_info->expr_item= $2;
1853
lex->change,&lex->interval_list,lex->charset))
1807
Lex->length=(char*) 0; /* use default length */
1809
| real_type opt_precision { $$=$1; }
1859
int_type opt_len field_options { $$=$1; }
1860
| real_type opt_precision field_options { $$=$1; }
1861
| FLOAT_SYM float_options field_options { $$=MYSQL_TYPE_FLOAT; }
1864
Lex->length= (char*) "1";
1867
| BIT_SYM '(' NUM ')'
1869
Lex->length= $3.str;
1874
Lex->length=(char*) "1";
1879
Lex->length=(char*) "1";
1810
1882
| char '(' NUM ')' opt_binary
1812
1884
Lex->length=$3.str;
1813
$$=DRIZZLE_TYPE_VARCHAR;
1885
$$=MYSQL_TYPE_STRING;
1815
1887
| char opt_binary
1817
1889
Lex->length=(char*) "1";
1818
$$=DRIZZLE_TYPE_VARCHAR;
1890
$$=MYSQL_TYPE_STRING;
1892
| nchar '(' NUM ')' opt_bin_mod
1895
$$=MYSQL_TYPE_STRING;
1896
Lex->charset=national_charset_info;
1900
Lex->length=(char*) "1";
1901
$$=MYSQL_TYPE_STRING;
1902
Lex->charset=national_charset_info;
1904
| BINARY '(' NUM ')'
1907
Lex->charset=&my_charset_bin;
1908
$$=MYSQL_TYPE_STRING;
1912
Lex->length= (char*) "1";
1913
Lex->charset=&my_charset_bin;
1914
$$=MYSQL_TYPE_STRING;
1820
1916
| varchar '(' NUM ')' opt_binary
1822
1918
Lex->length=$3.str;
1823
$$= DRIZZLE_TYPE_VARCHAR;
1919
$$= MYSQL_TYPE_VARCHAR;
1921
| nvarchar '(' NUM ')' opt_bin_mod
1924
$$= MYSQL_TYPE_VARCHAR;
1925
Lex->charset=national_charset_info;
1825
1927
| VARBINARY '(' NUM ')'
1827
1929
Lex->length=$3.str;
1828
1930
Lex->charset=&my_charset_bin;
1829
$$= DRIZZLE_TYPE_VARCHAR;
1931
$$= MYSQL_TYPE_VARCHAR;
1933
| YEAR_SYM opt_len field_options
1934
{ $$=MYSQL_TYPE_YEAR; }
1832
{ $$=DRIZZLE_TYPE_NEWDATE; }
1936
{ $$=MYSQL_TYPE_DATE; }
1834
{ $$=DRIZZLE_TYPE_TIME; }
1938
{ $$=MYSQL_TYPE_TIME; }
1837
1941
/* Unlike other types TIMESTAMP fields are NOT NULL by default */
1838
1942
Lex->type|= NOT_NULL_FLAG;
1839
$$=DRIZZLE_TYPE_TIMESTAMP;
1943
$$=MYSQL_TYPE_TIMESTAMP;
1842
{ $$=DRIZZLE_TYPE_DATETIME; }
1845
Lex->charset=&my_charset_bin;
1846
$$=DRIZZLE_TYPE_BLOB;
1847
Lex->length=(char*) 0; /* use default length */
1849
| TEXT_SYM opt_binary
1851
$$=DRIZZLE_TYPE_BLOB;
1852
Lex->length=(char*) 0; /* use default length */
1854
| DECIMAL_SYM float_options
1855
{ $$=DRIZZLE_TYPE_NEWDECIMAL;}
1856
| NUMERIC_SYM float_options
1857
{ $$=DRIZZLE_TYPE_NEWDECIMAL;}
1858
| FIXED_SYM float_options
1859
{ $$=DRIZZLE_TYPE_NEWDECIMAL;}
1946
{ $$=MYSQL_TYPE_DATETIME; }
1949
Lex->charset=&my_charset_bin;
1950
$$=MYSQL_TYPE_TINY_BLOB;
1954
Lex->charset=&my_charset_bin;
1959
Lex->charset=&my_charset_bin;
1960
$$=MYSQL_TYPE_MEDIUM_BLOB;
1964
Lex->charset=&my_charset_bin;
1965
$$=MYSQL_TYPE_LONG_BLOB;
1967
| LONG_SYM VARBINARY
1969
Lex->charset=&my_charset_bin;
1970
$$=MYSQL_TYPE_MEDIUM_BLOB;
1972
| LONG_SYM varchar opt_binary
1973
{ $$=MYSQL_TYPE_MEDIUM_BLOB; }
1974
| TINYTEXT opt_binary
1975
{ $$=MYSQL_TYPE_TINY_BLOB; }
1976
| TEXT_SYM opt_len opt_binary
1977
{ $$=MYSQL_TYPE_BLOB; }
1978
| MEDIUMTEXT opt_binary
1979
{ $$=MYSQL_TYPE_MEDIUM_BLOB; }
1980
| LONGTEXT opt_binary
1981
{ $$=MYSQL_TYPE_LONG_BLOB; }
1982
| DECIMAL_SYM float_options field_options
1983
{ $$=MYSQL_TYPE_NEWDECIMAL;}
1984
| NUMERIC_SYM float_options field_options
1985
{ $$=MYSQL_TYPE_NEWDECIMAL;}
1986
| FIXED_SYM float_options field_options
1987
{ $$=MYSQL_TYPE_NEWDECIMAL;}
1861
1989
{Lex->interval_list.empty();}
1862
1990
'(' string_list ')' opt_binary
1863
{ $$=DRIZZLE_TYPE_ENUM; }
1991
{ $$=MYSQL_TYPE_ENUM; }
1993
{ Lex->interval_list.empty();}
1994
'(' string_list ')' opt_binary
1995
{ $$=MYSQL_TYPE_SET; }
1996
| LONG_SYM opt_binary
1997
{ $$=MYSQL_TYPE_MEDIUM_BLOB; }
1866
$$=DRIZZLE_TYPE_LONGLONG;
1867
Lex->type|= (AUTO_INCREMENT_FLAG | NOT_NULL_FLAG | UNIQUE_FLAG);
2000
$$=MYSQL_TYPE_LONGLONG;
2001
Lex->type|= (AUTO_INCREMENT_FLAG | NOT_NULL_FLAG | UNSIGNED_FLAG |
2187
if (!($$=get_charset_by_csname($1.str,MY_CS_PRIMARY,MYF(0))))
2189
my_error(ER_UNKNOWN_CHARACTER_SET, MYF(0), $1.str);
2193
| BINARY { $$= &my_charset_bin; }
2196
charset_name_or_default:
2197
charset_name { $$=$1; }
2198
| DEFAULT { $$=NULL; }
2201
opt_load_data_charset:
2202
/* Empty */ { $$= NULL; }
2203
| charset charset_name_or_default { $$= $2; }
2206
old_or_new_charset_name:
2209
if (!($$=get_charset_by_csname($1.str,MY_CS_PRIMARY,MYF(0))) &&
2210
!($$=get_old_charset_by_name($1.str)))
2212
my_error(ER_UNKNOWN_CHARACTER_SET, MYF(0), $1.str);
2216
| BINARY { $$= &my_charset_bin; }
2219
old_or_new_charset_name_or_default:
2220
old_or_new_charset_name { $$=$1; }
2221
| DEFAULT { $$=NULL; }
2002
2224
collation_name:
2005
2227
if (!($$=get_charset_by_name($1.str,MYF(0))))
2007
2229
my_error(ER_UNKNOWN_COLLATION, MYF(0), $1.str);
2236
/* empty */ { $$=NULL; }
2237
| COLLATE_SYM collation_name_or_default { $$=$2; }
2013
2240
collation_name_or_default:
2014
2241
collation_name { $$=$1; }
2015
2242
| DEFAULT { $$=NULL; }
2024
2251
/* empty */ { Lex->charset=NULL; }
2252
| ASCII_SYM opt_bin_mod { Lex->charset=&my_charset_latin1; }
2025
2253
| BYTE_SYM { Lex->charset=&my_charset_bin; }
2254
| UNICODE_SYM opt_bin_mod
2256
if (!(Lex->charset=get_charset_by_csname("ucs2",
2257
MY_CS_PRIMARY,MYF(0))))
2259
my_error(ER_UNKNOWN_CHARACTER_SET, MYF(0), "ucs2");
2263
| charset charset_name opt_bin_mod { Lex->charset=$2; }
2264
| BINARY opt_bin_charset { Lex->type|= BINCMP_FLAG; }
2026
2269
| BINARY { Lex->type|= BINCMP_FLAG; }
2273
/* empty */ { Lex->charset= NULL; }
2274
| ASCII_SYM { Lex->charset=&my_charset_latin1; }
2277
if (!(Lex->charset=get_charset_by_csname("ucs2",
2278
MY_CS_PRIMARY,MYF(0))))
2280
my_error(ER_UNKNOWN_CHARACTER_SET, MYF(0), "ucs2");
2284
| charset charset_name { Lex->charset=$2; }
2030
2288
'(' real_ulong_num
2034
2292
my_parse_error(ER(ER_SYNTAX_ERROR));
2400
2666
lex->comment=null_lex_str;
2401
2667
lex->charset= NULL;
2402
2668
lex->alter_info.flags|= ALTER_CHANGE_COLUMN;
2669
lex->storage_type= HA_SM_DEFAULT;
2403
2670
lex->column_format= COLUMN_FORMAT_TYPE_DEFAULT;
2404
lex->vcol_info= NULL;
2409
2675
if (add_field_to_list(lex->thd,&$3,
2410
2676
(enum enum_field_types) $5,
2411
2677
lex->length,lex->dec,lex->type,
2678
lex->storage_type, lex->column_format,
2413
2679
lex->default_value, lex->on_update_value,
2415
$3.str, &lex->interval_list, lex->charset,
2681
$3.str, &lex->interval_list, lex->charset))
2420
| DROP opt_column field_ident
2685
| DROP opt_column field_ident opt_restrict
2423
2688
lex->alter_info.drop_list.push_back(new Alter_drop(Alter_drop::COLUMN,
2475
2740
if (lex->select_lex.db == NULL &&
2476
2741
lex->copy_db_to(&lex->select_lex.db, &dummy))
2480
2745
if (check_table_name($3->table.str,$3->table.length) || ($3->db.str && check_db_name(&$3->db)))
2482
2747
my_error(ER_WRONG_TABLE_NAME, MYF(0), $3->table.str);
2485
2750
lex->name= $3->table;
2486
2751
lex->alter_info.flags|= ALTER_RENAME;
2488
| CONVERT_SYM TO_SYM collation_name_or_default
2753
| CONVERT_SYM TO_SYM charset charset_name_or_default opt_collate
2492
2757
THD *thd= YYTHD;
2493
$3= thd->variables.collation_database;
2758
$4= thd->variables.collation_database;
2761
if (!my_charset_same($4,$5))
2763
my_error(ER_COLLATION_CHARSET_MISMATCH, MYF(0),
2764
$5->name, $4->csname);
2496
2768
lex->create_info.table_charset=
2497
lex->create_info.default_table_charset= $3;
2769
lex->create_info.default_table_charset= $5;
2498
2770
lex->create_info.used_fields|= (HA_CREATE_USED_CHARSET |
2499
2771
HA_CREATE_USED_DEFAULT_CHARSET);
2500
2772
lex->alter_info.flags|= ALTER_CONVERT;
4000
4380
| table_ref RIGHT opt_outer JOIN_SYM table_ref
4003
DRIZZLE_YYABORT_UNLESS($1 && $5);
4383
MYSQL_YYABORT_UNLESS($1 && $5);
4004
4384
/* Change the current name resolution context to a local context. */
4005
4385
if (push_new_name_resolution_context(YYTHD, $1, $5))
4007
4387
Select->parsing_place= IN_ON;
4012
4392
if (!($$= lex->current_select->convert_right_join()))
4014
4394
add_join_on($$, $8);
4015
4395
Lex->pop_context();
4016
4396
Select->parsing_place= NO_MATTER;
4018
4398
| table_ref RIGHT opt_outer JOIN_SYM table_factor
4020
DRIZZLE_YYABORT_UNLESS($1 && $5);
4400
MYSQL_YYABORT_UNLESS($1 && $5);
4022
4402
USING '(' using_list ')'
4025
4405
if (!($$= lex->current_select->convert_right_join()))
4027
4407
add_join_natural($$,$5,$9,Select);
4029
4409
| table_ref NATURAL RIGHT opt_outer JOIN_SYM table_factor
4031
DRIZZLE_YYABORT_UNLESS($1 && $6);
4411
MYSQL_YYABORT_UNLESS($1 && $6);
4032
4412
add_join_natural($6,$1,NULL,Select);
4034
4414
if (!($$= lex->current_select->convert_right_join()))
4491
4871
group_list ',' order_ident order_dir
4492
{ if (add_group_to_list(YYTHD, $3,(bool) $4)) DRIZZLE_YYABORT; }
4872
{ if (add_group_to_list(YYTHD, $3,(bool) $4)) MYSQL_YYABORT; }
4493
4873
| order_ident order_dir
4494
{ if (add_group_to_list(YYTHD, $1,(bool) $2)) DRIZZLE_YYABORT; }
4874
{ if (add_group_to_list(YYTHD, $1,(bool) $2)) MYSQL_YYABORT; }
4882
'WITH CUBE' is reserved in the MySQL syntax, but not implemented,
4883
and cause LALR(2) conflicts.
4884
This syntax is not standard.
4885
MySQL syntax: GROUP BY col1, col2, col3 WITH CUBE
4886
SQL-2003: GROUP BY ... CUBE(col1, col2, col3)
4889
if (lex->current_select->linkage == GLOBAL_OPTIONS_TYPE)
4891
my_error(ER_WRONG_USAGE, MYF(0), "WITH CUBE",
4892
"global union parameters");
4895
lex->current_select->olap= CUBE_TYPE;
4896
my_error(ER_NOT_SUPPORTED_YET, MYF(0), "CUBE");
4499
4899
| WITH_ROLLUP_SYM
4674
5078
| HEX_NUM { $$= (ulong) strtol($1.str, (char**) 0, 16); }
4675
5079
| LONG_NUM { int error; $$= (ulong) my_strtoll10($1.str, (char**) 0, &error); }
4676
5080
| ULONGLONG_NUM { int error; $$= (ulong) my_strtoll10($1.str, (char**) 0, &error); }
4677
| dec_num_error { DRIZZLE_YYABORT; }
5081
| dec_num_error { MYSQL_YYABORT; }
4681
NUM { int error; $$= (uint64_t) my_strtoll10($1.str, (char**) 0, &error); }
4682
| ULONGLONG_NUM { int error; $$= (uint64_t) my_strtoll10($1.str, (char**) 0, &error); }
4683
| LONG_NUM { int error; $$= (uint64_t) my_strtoll10($1.str, (char**) 0, &error); }
4684
| DECIMAL_NUM { int error; $$= (uint64_t) my_strtoll10($1.str, (char**) 0, &error); }
4685
| FLOAT_NUM { int error; $$= (uint64_t) my_strtoll10($1.str, (char**) 0, &error); }
5085
NUM { int error; $$= (ulonglong) my_strtoll10($1.str, (char**) 0, &error); }
5086
| ULONGLONG_NUM { int error; $$= (ulonglong) my_strtoll10($1.str, (char**) 0, &error); }
5087
| LONG_NUM { int error; $$= (ulonglong) my_strtoll10($1.str, (char**) 0, &error); }
5088
| DECIMAL_NUM { int error; $$= (ulonglong) my_strtoll10($1.str, (char**) 0, &error); }
5089
| FLOAT_NUM { int error; $$= (ulonglong) my_strtoll10($1.str, (char**) 0, &error); }
5181
5585
lex->lock_option= TL_READ;
5182
5586
mysql_init_select(lex);
5183
5587
lex->current_select->parsing_place= SELECT_LIST;
5184
memset(&lex->create_info, 0, sizeof(lex->create_info));
5588
bzero((char*) &lex->create_info,sizeof(lex->create_info));
5595
DATABASES wild_and_where
5194
5598
lex->sql_command= SQLCOM_SHOW_DATABASES;
5195
5599
if (prepare_schema_table(YYTHD, lex, 0, SCH_SCHEMATA))
5198
| opt_full TABLES opt_db show_wild
5602
| opt_full TABLES opt_db wild_and_where
5201
5605
lex->sql_command= SQLCOM_SHOW_TABLES;
5202
5606
lex->select_lex.db= $3;
5203
5607
if (prepare_schema_table(YYTHD, lex, 0, SCH_TABLE_NAMES))
5206
| TABLE_SYM STATUS_SYM opt_db show_wild
5610
| TABLE_SYM STATUS_SYM opt_db wild_and_where
5209
5613
lex->sql_command= SQLCOM_SHOW_TABLE_STATUS;
5210
5614
lex->select_lex.db= $3;
5211
5615
if (prepare_schema_table(YYTHD, lex, 0, SCH_TABLES))
5214
| OPEN_SYM TABLES opt_db show_wild
5618
| OPEN_SYM TABLES opt_db wild_and_where
5217
5621
lex->sql_command= SQLCOM_SHOW_OPEN_TABLES;
5218
5622
lex->select_lex.db= $3;
5219
5623
if (prepare_schema_table(YYTHD, lex, 0, SCH_OPEN_TABLES))
5222
5626
| ENGINE_SYM known_storage_engines STATUS_SYM /* This should either go... well it should go */
5224
5628
Lex->create_info.db_type= $2;
5225
5629
Lex->sql_command= SQLCOM_SHOW_ENGINE_STATUS;
5227
| opt_full COLUMNS from_or_in table_ident opt_db show_wild
5631
| opt_full COLUMNS from_or_in table_ident opt_db wild_and_where
5230
5634
lex->sql_command= SQLCOM_SHOW_FIELDS;
5232
5636
$4->change_db($5);
5233
5637
if (prepare_schema_table(YYTHD, lex, $4, SCH_COLUMNS))
5236
5640
| master_or_binary LOGS_SYM
5238
5642
Lex->sql_command = SQLCOM_SHOW_BINLOGS;
5646
Lex->sql_command = SQLCOM_SHOW_SLAVE_HOSTS;
5648
| BINLOG_SYM EVENTS_SYM binlog_in binlog_from
5651
lex->sql_command= SQLCOM_SHOW_BINLOG_EVENTS;
5652
} opt_limit_clause_init
5240
5653
| keys_or_index from_or_in table_ident opt_db where_clause
5254
5667
{ Lex->sql_command = SQLCOM_SHOW_WARNS;}
5255
5668
| ERRORS opt_limit_clause_init
5256
5669
{ Lex->sql_command = SQLCOM_SHOW_ERRORS;}
5257
| opt_var_type STATUS_SYM show_wild
5670
| opt_var_type STATUS_SYM wild_and_where
5260
5673
lex->sql_command= SQLCOM_SHOW_STATUS;
5261
5674
lex->option_type= $1;
5262
5675
if (prepare_schema_table(YYTHD, lex, 0, SCH_STATUS))
5265
5678
| opt_full PROCESSLIST_SYM
5266
5679
{ Lex->sql_command= SQLCOM_SHOW_PROCESSLIST;}
5267
| opt_var_type VARIABLES show_wild
5680
| opt_var_type VARIABLES wild_and_where
5270
5683
lex->sql_command= SQLCOM_SHOW_VARIABLES;
5271
5684
lex->option_type= $1;
5272
5685
if (prepare_schema_table(YYTHD, lex, 0, SCH_VARIABLES))
5688
| charset wild_and_where
5691
lex->sql_command= SQLCOM_SHOW_CHARSETS;
5692
if (prepare_schema_table(YYTHD, lex, 0, SCH_CHARSETS))
5695
| COLLATION_SYM wild_and_where
5698
lex->sql_command= SQLCOM_SHOW_COLLATIONS;
5699
if (prepare_schema_table(YYTHD, lex, 0, SCH_COLLATIONS))
5275
5702
| CREATE DATABASE opt_if_not_exists ident