~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_yacc.yy

  • Committer: Brian Aker
  • Date: 2010-02-15 18:29:31 UTC
  • mto: (1273.13.68 build)
  • mto: This revision was merged to the branch mainline in revision 1303.
  • Revision ID: brian@gaz-20100215182931-ooy48h72plspoehy
More removal of show code.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4820
4820
              DRIZZLE_YYABORT;
4821
4821
          }
4822
4822
        | opt_var_type STATUS_SYM show_wild
4823
 
          {
4824
 
            LEX *lex= Lex;
4825
 
            lex->sql_command= SQLCOM_SHOW_STATUS;
4826
 
            lex->statement=
4827
 
              new(std::nothrow) statement::ShowStatus(YYSession,
4828
 
                                                    &LOCK_status);
4829
 
            if (lex->statement == NULL)
4830
 
              DRIZZLE_YYABORT;
4831
 
            lex->option_type= $1;
4832
 
            if (prepare_schema_table(YYSession, lex, 0, "OLD_STATUS"))
4833
 
              DRIZZLE_YYABORT;
4834
 
          }
 
4823
           {
 
4824
             LEX *lex= Lex;
 
4825
             lex->sql_command= SQLCOM_SELECT;
 
4826
             lex->statement=
 
4827
               new(std::nothrow) statement::Select(YYSession);
 
4828
             if (lex->statement == NULL)
 
4829
               DRIZZLE_YYABORT;
 
4830
 
 
4831
             Session *session= YYSession;
 
4832
 
 
4833
             if ($1 == OPT_GLOBAL)
 
4834
             {
 
4835
               if (prepare_new_schema_table(session, lex, "GLOBAL_STATUS"))
 
4836
                 DRIZZLE_YYABORT;
 
4837
             }
 
4838
             else
 
4839
             {
 
4840
               if (prepare_new_schema_table(session, lex, "SESSION_STATUS"))
 
4841
                 DRIZZLE_YYABORT;
 
4842
             }
 
4843
 
 
4844
             std::string key("Variable_name");
 
4845
             std::string value("Value");
 
4846
 
 
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);
 
4850
 
 
4851
             if (session->add_item_to_list(my_field))
 
4852
               DRIZZLE_YYABORT;
 
4853
 
 
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);
 
4857
 
 
4858
             if (session->add_item_to_list(my_field))
 
4859
               DRIZZLE_YYABORT;
 
4860
           }
4835
4861
        | PROCESSLIST_SYM
4836
4862
          {
4837
4863
           {