~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/info_schema/open_tables.cc

  • Committer: Padraig O'Sullivan
  • Date: 2009-11-26 03:47:13 UTC
  • mto: (1228.4.1 push)
  • mto: This revision was merged to the branch mainline in revision 1234.
  • Revision ID: osullivan.padraig@gmail.com-20091126034713-qozlea5ib13ibqtp
Modified the fillTable method to not take a TableList parameter anymore. Instead we now take a Table
and an InfoSchemaTable parameter. This should allow us to get rid of the schema_table member of the
TableList class a bit easier.

Show diffs side-by-side

added added

removed removed

Lines of Context:
133
133
  delete columns;
134
134
}
135
135
 
136
 
inline bool open_list_store(Table *table, open_table_list_st& open_list);
137
 
inline bool open_list_store(Table *table, open_table_list_st& open_list)
 
136
inline bool open_list_store(Table *table, 
 
137
                            open_table_list_st& open_list,
 
138
                            plugin::InfoSchemaTable *schema_table);
 
139
inline bool open_list_store(Table *table, 
 
140
                            open_table_list_st& open_list,
 
141
                            plugin::InfoSchemaTable *schema_table)
138
142
{
139
143
  table->restoreRecordAsDefault();
140
144
  table->setWriteSet(0);
145
149
  table->field[1]->store(open_list.table.c_str(), open_list.table.length(), system_charset_info);
146
150
  table->field[2]->store((int64_t) open_list.in_use, true);
147
151
  table->field[3]->store((int64_t) open_list.locked, true);
148
 
  TableList *tmp= table->pos_in_table_list;
149
 
  tmp->schema_table->addRow(table->record[0], table->s->reclength);
 
152
  schema_table->addRow(table->record[0], table->s->reclength);
150
153
 
151
154
  return false;
152
155
}
153
156
 
154
 
int OpenTablesISMethods::fillTable(Session *session, TableList *tables)
 
157
int OpenTablesISMethods::fillTable(Session *session, 
 
158
                                   Table *table,
 
159
                                   plugin::InfoSchemaTable *schema_table)
155
160
{
156
161
  const char *wild= session->lex->wild ? session->lex->wild->ptr() : NULL;
157
162
 
158
 
  if ((list_open_tables(session->lex->select_lex.db, wild, open_list_store, tables->table) == true) && session->is_fatal_error)
 
163
  if ((list_open_tables(session->lex->select_lex.db, wild, open_list_store, table, schema_table) == true) && session->is_fatal_error)
159
164
    return 1;
160
165
 
161
166
  return 0;