~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_yacc.yy

  • Committer: Brian Aker
  • Date: 2010-03-01 22:24:10 UTC
  • mto: (1309.2.12 build)
  • mto: This revision was merged to the branch mainline in revision 1317.
  • Revision ID: brian@gaz-20100301222410-w509prhp73pg6z4n
Update the code so use a faster index lookup method.

Show diffs side-by-side

added added

removed removed

Lines of Context:
4891
4891
          }
4892
4892
        | keys_or_index from_or_in table_ident opt_db where_clause
4893
4893
          {
4894
 
            Item_field *my_field;
4895
4894
             LEX *lex= Lex;
4896
4895
             Session *session= YYSession;
4897
4896
             statement::Select *select;
4922
4921
               }
4923
4922
             }
4924
4923
 
4925
 
             if (prepare_new_schema_table(session, lex, "INDEX_PARTS"))
4926
 
               DRIZZLE_YYABORT;
4927
 
 
4928
 
             my_field= new Item_field(&session->lex->current_select->context, NULL, NULL, "TABLE_NAME");
4929
 
             my_field->is_autogenerated_name= false;
4930
 
             my_field->set_name("Table");
4931
 
             if (session->add_item_to_list(my_field))
4932
 
               DRIZZLE_YYABORT;
4933
 
 
4934
 
#if 0
4935
 
             my_field= new Item_field(&session->lex->current_select->context, NULL, NULL, "IS_UNIQUE");
4936
 
             my_field->is_autogenerated_name= false;
4937
 
             my_field->set_name("Non_unique");
4938
 
             if (session->add_item_to_list(my_field))
4939
 
               DRIZZLE_YYABORT;
4940
 
#endif
4941
 
 
4942
 
             my_field= new Item_field(&session->lex->current_select->context, NULL, NULL, "INDEX_NAME");
4943
 
             my_field->is_autogenerated_name= false;
4944
 
             my_field->set_name("Key_name");
4945
 
             if (session->add_item_to_list(my_field))
4946
 
               DRIZZLE_YYABORT;
4947
 
 
4948
 
             my_field= new Item_field(&session->lex->current_select->context, NULL, NULL, "SEQUENCE_IN_INDEX");
4949
 
             my_field->is_autogenerated_name= false;
4950
 
             my_field->set_name("Seq_in_index");
4951
 
             if (session->add_item_to_list(my_field))
4952
 
               DRIZZLE_YYABORT;
4953
 
 
4954
 
             my_field= new Item_field(&session->lex->current_select->context, NULL, NULL, "COLUMN_NAME");
4955
 
             my_field->is_autogenerated_name= false;
4956
 
             my_field->set_name("Column_name");
4957
 
             if (session->add_item_to_list(my_field))
4958
 
               DRIZZLE_YYABORT;
 
4924
             if (prepare_new_schema_table(session, lex, "show_indexes"))
 
4925
               DRIZZLE_YYABORT;
 
4926
 
 
4927
             if (session->add_item_to_list( new Item_field(&session->lex->current_select->
 
4928
                                                           context,
 
4929
                                                           NULL, NULL, "*")))
 
4930
               DRIZZLE_YYABORT;
 
4931
             (session->lex->current_select->with_wild)++;
4959
4932
          }
4960
4933
        | COUNT_SYM '(' '*' ')' WARNINGS
4961
4934
          {