~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_yacc.yy

Updates for DD.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4810
4810
              DRIZZLE_YYABORT;
4811
4811
          }
4812
4812
        | opt_var_type STATUS_SYM show_wild
4813
 
          {
4814
 
            LEX *lex= Lex;
4815
 
            lex->sql_command= SQLCOM_SHOW_STATUS;
4816
 
            lex->statement=
4817
 
              new(std::nothrow) statement::ShowStatus(YYSession,
4818
 
                                                    &LOCK_status);
4819
 
            if (lex->statement == NULL)
4820
 
              DRIZZLE_YYABORT;
4821
 
            lex->option_type= $1;
4822
 
            if (prepare_schema_table(YYSession, lex, 0, "OLD_STATUS"))
4823
 
              DRIZZLE_YYABORT;
4824
 
          }
 
4813
           {
 
4814
             LEX *lex= Lex;
 
4815
             lex->sql_command= SQLCOM_SELECT;
 
4816
             lex->statement=
 
4817
               new(std::nothrow) statement::Select(YYSession);
 
4818
             if (lex->statement == NULL)
 
4819
               DRIZZLE_YYABORT;
 
4820
 
 
4821
             Session *session= YYSession;
 
4822
 
 
4823
             if ($1 == OPT_GLOBAL)
 
4824
             {
 
4825
               if (prepare_new_schema_table(session, lex, "GLOBAL_STATUS"))
 
4826
                 DRIZZLE_YYABORT;
 
4827
             }
 
4828
             else
 
4829
             {
 
4830
               if (prepare_new_schema_table(session, lex, "SESSION_STATUS"))
 
4831
                 DRIZZLE_YYABORT;
 
4832
             }
 
4833
 
 
4834
             std::string key("Variable_name");
 
4835
             std::string value("Value");
 
4836
 
 
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);
 
4840
 
 
4841
             if (session->add_item_to_list(my_field))
 
4842
               DRIZZLE_YYABORT;
 
4843
 
 
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);
 
4847
 
 
4848
             if (session->add_item_to_list(my_field))
 
4849
               DRIZZLE_YYABORT;
 
4850
           }
4825
4851
        | PROCESSLIST_SYM
4826
4852
          {
4827
4853
           {