~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/show.cc

  • Committer: Brian Aker
  • Date: 2009-08-05 08:23:47 UTC
  • mfrom: (1109.1.6 merge)
  • Revision ID: brian@gaz-20090805082347-j2l9604jru68iu7s
Merge Brian

Show diffs side-by-side

added added

removed removed

Lines of Context:
234
234
  String buffer(buff, sizeof(buff), system_charset_info);
235
235
 
236
236
  /* Only one table for now, but VIEW can involve several tables */
237
 
  if (session->open_normal_and_derived_tables(table_list, 0))
 
237
  if (session->openTables(table_list))
238
238
  {
239
239
    if (session->is_error())
240
240
      return true;
387
387
{
388
388
  Table *table;
389
389
 
390
 
  if (session->open_normal_and_derived_tables(table_list, 0))
 
390
  if (session->openTables(table_list))
391
391
    return;
392
392
  table= table_list->table;
393
393
 
1757
1757
    SQLCOM_SHOW_FIELDS is used because it satisfies 'only_view_structure()'
1758
1758
  */
1759
1759
  lex->sql_command= SQLCOM_SHOW_FIELDS;
1760
 
  res= session->open_normal_and_derived_tables(show_table_list, DRIZZLE_LOCK_IGNORE_FLUSH);
 
1760
  res= session->openTables(show_table_list, DRIZZLE_LOCK_IGNORE_FLUSH);
1761
1761
  lex->sql_command= save_sql_command;
1762
1762
  /*
1763
1763
    get_all_tables() returns 1 on failure and 0 on success thus
2114
2114
          lex->sql_command= SQLCOM_SHOW_FIELDS;
2115
2115
          show_table_list->i_s_requested_object=
2116
2116
            schema_table->getRequestedObject();
2117
 
          res= session->open_normal_and_derived_tables(show_table_list, DRIZZLE_LOCK_IGNORE_FLUSH);
 
2117
          res= session->openTables(show_table_list, DRIZZLE_LOCK_IGNORE_FLUSH);
2118
2118
          lex->sql_command= save_sql_command;
2119
2119
          /*
2120
2120
            XXX->  show_table_list has a flag i_is_requested,
2121
 
            and when it's set, open_normal_and_derived_tables()
 
2121
            and when it's set, openTables()
2122
2122
            can return an error without setting an error message
2123
2123
            in Session, which is a hack. This is why we have to
2124
2124
            check for res, then for session->is_error() only then
2723
2723
        table_list->table->file->extra(HA_EXTRA_NO_CACHE);
2724
2724
        table_list->table->file->extra(HA_EXTRA_RESET_STATE);
2725
2725
        table_list->table->file->ha_delete_all_rows();
2726
 
        free_io_cache(table_list->table);
2727
 
        filesort_free_buffers(table_list->table,1);
 
2726
        table_list->table->free_io_cache();
 
2727
        table_list->table->filesort_free_buffers(true);
2728
2728
        table_list->table->null_row= 0;
2729
2729
      }
2730
2730
      else