~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/sql_parse.cc

  • Committer: lbieber at stabletransit
  • Date: 2010-10-18 20:26:50 UTC
  • mfrom: (1859.1.4 build)
  • Revision ID: lbieber@drizzle-build-n02.wc1.dfw1.stabletransit.com-20101018202650-hcvsp7yuaf1xy04s
Merge Monty - Adds support for a const std::string sys_var type.
Merge Monty - Make it possible to use sys_var directly from plugins.
Merge Padraig - Replaced a few unit8_t types that were being used as bitmaps with std::bitset

Show diffs side-by-side

added added

removed removed

Lines of Context:
368
368
                           const string& schema_table_name)
369
369
{
370
370
  LEX_STRING db, table;
 
371
  bitset<NUM_OF_TABLE_OPTIONS> table_options;
371
372
  /*
372
373
     We have to make non const db_name & table_name
373
374
     because of lower_case_table_names
376
377
  session->make_lex_string(&table, schema_table_name, false);
377
378
 
378
379
  if (! sel->add_table_to_list(session, new Table_ident(db, table),
379
 
                               NULL, 0, TL_READ))
 
380
                               NULL, table_options, TL_READ))
380
381
  {
381
382
    return true;
382
383
  }
903
904
*/
904
905
 
905
906
TableList *Select_Lex::add_table_to_list(Session *session,
906
 
                                             Table_ident *table,
907
 
                                             LEX_STRING *alias,
908
 
                                             uint32_t table_options,
909
 
                                             thr_lock_type lock_type,
910
 
                                             List<Index_hint> *index_hints_arg,
911
 
                                             LEX_STRING *option)
 
907
                                                             Table_ident *table,
 
908
                                                             LEX_STRING *alias,
 
909
                                                             const bitset<NUM_OF_TABLE_OPTIONS>& table_options,
 
910
                                                             thr_lock_type lock_type,
 
911
                                                             List<Index_hint> *index_hints_arg,
 
912
                                         LEX_STRING *option)
912
913
{
913
914
  register TableList *ptr;
914
915
  TableList *previous_table_ref; /* The table preceding the current one. */
918
919
  if (!table)
919
920
    return NULL;                                // End of memory
920
921
  alias_str= alias ? alias->str : table->table.str;
921
 
  if (!test(table_options & TL_OPTION_ALIAS) &&
 
922
  if (! table_options.test(TL_OPTION_ALIAS) &&
922
923
      check_table_name(table->table.str, table->table.length))
923
924
  {
924
925
    my_error(ER_WRONG_TABLE_NAME, MYF(0), table->table.str);
970
971
  ptr->table_name=table->table.str;
971
972
  ptr->table_name_length=table->table.length;
972
973
  ptr->lock_type=   lock_type;
973
 
  ptr->force_index= test(table_options & TL_OPTION_FORCE_INDEX);
974
 
  ptr->ignore_leaves= test(table_options & TL_OPTION_IGNORE_LEAVES);
 
974
  ptr->force_index= table_options.test(TL_OPTION_FORCE_INDEX);
 
975
  ptr->ignore_leaves= table_options.test(TL_OPTION_IGNORE_LEAVES);
975
976
  ptr->derived=     table->sel;
976
977
  ptr->select_lex=  lex->current_select;
977
978
  ptr->index_hints= index_hints_arg;