4820
4820
DRIZZLE_YYABORT;
4822
4822
| opt_var_type STATUS_SYM show_wild
4825
lex->sql_command= SQLCOM_SHOW_STATUS;
4827
new(std::nothrow) statement::ShowStatus(YYSession,
4829
if (lex->statement == NULL)
4831
lex->option_type= $1;
4832
if (prepare_schema_table(YYSession, lex, 0, "OLD_STATUS"))
4825
lex->sql_command= SQLCOM_SELECT;
4827
new(std::nothrow) statement::Select(YYSession);
4828
if (lex->statement == NULL)
4831
Session *session= YYSession;
4833
if ($1 == OPT_GLOBAL)
4835
if (prepare_new_schema_table(session, lex, "GLOBAL_STATUS"))
4840
if (prepare_new_schema_table(session, lex, "SESSION_STATUS"))
4844
std::string key("Variable_name");
4845
std::string value("Value");
4847
Item_field *my_field= new Item_field(&session->lex->current_select->context, NULL, NULL, "VARIABLE_NAME");
4848
my_field->is_autogenerated_name= false;
4849
my_field->set_name(key.c_str(), key.length(), system_charset_info);
4851
if (session->add_item_to_list(my_field))
4854
my_field= new Item_field(&session->lex->current_select->context, NULL, NULL, "VARIABLE_VALUE");
4855
my_field->is_autogenerated_name= false;
4856
my_field->set_name(value.c_str(), value.length(), system_charset_info);
4858
if (session->add_item_to_list(my_field))
4835
4861
| PROCESSLIST_SYM