~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/show.cc

  • Committer: Brian Aker
  • Date: 2009-07-11 05:59:19 UTC
  • mfrom: (1089.1.9 merge)
  • Revision ID: brian@gaz-20090711055919-m4px3crrdgta5lie
Collection of patches from new-cleanup (includes asserts for field in debug)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1949
1949
                                 show_table_list->db_length, false);
1950
1950
 
1951
1951
 
 
1952
   table->setWriteSet();
1952
1953
   error= test(schema_table->processTable(session, show_table_list,
1953
1954
                                          table, res, db_name,
1954
1955
                                          table_name));
2092
2093
    res= schema_table->processTable(session, &table_list, table,
2093
2094
                                    res, db_name, table_name);
2094
2095
  }
 
2096
  /* For the moment we just set everything to read */
 
2097
  table->setReadSet();
2095
2098
 
2096
2099
  release_table_share(share);
2097
2100
 
2202
2205
    goto err;
2203
2206
  }
2204
2207
 
 
2208
  table->setWriteSet();
2205
2209
  if (make_db_list(session, db_names, &lookup_field_vals, &with_i_schema))
2206
2210
    goto err;
2207
2211
 
2484
2488
  {
2485
2489
    ptr= show_table->field;
2486
2490
    timestamp_field= show_table->timestamp_field;
2487
 
    show_table->use_all_columns();               // Required for default
2488
2491
  }
2489
2492
  else
2490
2493
  {
2491
2494
    ptr= show_table_share->field;
2492
2495
    timestamp_field= show_table_share->timestamp_field;
2493
 
    /*
2494
 
      read_set may be inited in case of
2495
 
      temporary table
2496
 
    */
2497
 
    if (!show_table->read_set)
2498
 
    {
2499
 
      /* to satisfy 'field->val_str' ASSERTs */
2500
 
      unsigned char *bitmaps;
2501
 
      uint32_t bitmap_size= show_table_share->column_bitmap_size;
2502
 
      if (!(bitmaps= (unsigned char*) alloc_root(session->mem_root, bitmap_size)))
2503
 
        return(0);
2504
 
      bitmap_init(&show_table->def_read_set,
2505
 
                  (my_bitmap_map*) bitmaps, show_table_share->fields);
2506
 
      bitmap_set_all(&show_table->def_read_set);
2507
 
      show_table->read_set= &show_table->def_read_set;
2508
 
    }
2509
 
    show_table->setReadSet();
2510
 
  }
 
2496
  }
 
2497
 
 
2498
  /* For the moment we just set everything to read */
 
2499
  if (!show_table->read_set)
 
2500
  {
 
2501
    bitmap_set_all(&show_table->def_read_set);
 
2502
    show_table->read_set= &show_table->def_read_set;
 
2503
  }
 
2504
  show_table->use_all_columns();               // Required for default
2511
2505
 
2512
2506
  for (; (field= *ptr) ; ptr++)
2513
2507
  {
2927
2921
bool get_schema_tables_result(JOIN *join,
2928
2922
                              enum enum_schema_table_state executed_place)
2929
2923
{
2930
 
  JOIN_TAB *tmp_join_tab= join->join_tab+join->tables;
 
2924
  JoinTable *tmp_join_tab= join->join_tab+join->tables;
2931
2925
  Session *session= join->session;
2932
2926
  LEX *lex= session->lex;
2933
2927
  bool result= 0;
2934
2928
 
2935
2929
  session->no_warnings_for_error= 1;
2936
 
  for (JOIN_TAB *tab= join->join_tab; tab < tmp_join_tab; tab++)
 
2930
  for (JoinTable *tab= join->join_tab; tab < tmp_join_tab; tab++)
2937
2931
  {
2938
2932
    if (!tab->table || !tab->table->pos_in_table_list)
2939
2933
      break;