~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_yacc.yy

Updates for show table status.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4917
4917
         | TABLE_SYM STATUS_SYM opt_db show_wild
4918
4918
           {
4919
4919
             LEX *lex= Lex;
4920
 
             lex->sql_command= SQLCOM_SHOW_TABLE_STATUS;
 
4920
             lex->sql_command= SQLCOM_SELECT;
4921
4921
             lex->statement=
4922
4922
               new(std::nothrow) statement::Select(YYSession);
4923
4923
             if (lex->statement == NULL)
4924
4924
               DRIZZLE_YYABORT;
4925
 
             lex->select_lex.db= $3;
4926
 
             if (prepare_schema_table(YYSession, lex, 0, "OLD_TABLES"))
4927
 
               DRIZZLE_YYABORT;
 
4925
 
 
4926
             Session *session= YYSession;
 
4927
 
 
4928
             std::string column_name= "Tables_in_";
 
4929
 
 
4930
             if ($3)
 
4931
             {
 
4932
               message::Schema schema_message;
 
4933
               lex->select_lex.db= $3;
 
4934
 
 
4935
               if (not plugin::StorageEngine::getSchemaDefinition($3, schema_message))
 
4936
               {
 
4937
                 my_error(ER_BAD_DB_ERROR, MYF(0), $3);
 
4938
               }
 
4939
             }
 
4940
 
 
4941
             if (prepare_new_schema_table(session, lex, "LOCAL_TABLE_STATUS"))
 
4942
               DRIZZLE_YYABORT;
 
4943
 
 
4944
             if (session->add_item_to_list( new Item_field(&session->lex->current_select->
 
4945
                                                           context,
 
4946
                                                           NULL, NULL, "*")))
 
4947
               DRIZZLE_YYABORT;
 
4948
             (session->lex->current_select->with_wild)++;
4928
4949
           }
4929
4950
        | COLUMNS from_or_in table_ident opt_db show_wild
4930
4951
          {