4810
4810
DRIZZLE_YYABORT;
4812
4812
| opt_var_type STATUS_SYM show_wild
4815
lex->sql_command= SQLCOM_SHOW_STATUS;
4817
new(std::nothrow) statement::ShowStatus(YYSession,
4819
if (lex->statement == NULL)
4821
lex->option_type= $1;
4822
if (prepare_schema_table(YYSession, lex, 0, "OLD_STATUS"))
4815
lex->sql_command= SQLCOM_SELECT;
4817
new(std::nothrow) statement::Select(YYSession);
4818
if (lex->statement == NULL)
4821
Session *session= YYSession;
4823
if ($1 == OPT_GLOBAL)
4825
if (prepare_new_schema_table(session, lex, "GLOBAL_STATUS"))
4830
if (prepare_new_schema_table(session, lex, "SESSION_STATUS"))
4834
std::string key("Variable_name");
4835
std::string value("Value");
4837
Item_field *my_field= new Item_field(&session->lex->current_select->context, NULL, NULL, "VARIABLE_NAME");
4838
my_field->is_autogenerated_name= false;
4839
my_field->set_name(key.c_str(), key.length(), system_charset_info);
4841
if (session->add_item_to_list(my_field))
4844
my_field= new Item_field(&session->lex->current_select->context, NULL, NULL, "VARIABLE_VALUE");
4845
my_field->is_autogenerated_name= false;
4846
my_field->set_name(value.c_str(), value.length(), system_charset_info);
4848
if (session->add_item_to_list(my_field))
4825
4851
| PROCESSLIST_SYM