306
inline bool open_list_store(Table *table, open_table_list_st& open_list);
307
inline bool open_list_store(Table *table, open_table_list_st& open_list)
309
table->restoreRecordAsDefault();
310
table->field[0]->store(open_list.db.c_str(), open_list.db.length(), system_charset_info);
311
table->field[1]->store(open_list.table.c_str(), open_list.table.length(), system_charset_info);
312
table->field[2]->store((int64_t) open_list.in_use, true);
313
table->field[3]->store((int64_t) open_list.locked, true);
314
if (schema_table_store_record(table->in_use, table))
306
320
int OpenTablesISMethods::fillTable(Session *session, TableList *tables, COND *)
308
322
const char *wild= session->lex->wild ? session->lex->wild->ptr() : NULL;
309
Table *table= tables->table;
310
const CHARSET_INFO * const cs= system_charset_info;
311
OPEN_TableList *open_list;
312
if (! (open_list= list_open_tables(session->lex->select_lex.db, wild)) &&
313
session->is_fatal_error)
318
for (; open_list ; open_list=open_list->next)
320
table->restoreRecordAsDefault();
321
table->field[0]->store(open_list->db, strlen(open_list->db), cs);
322
table->field[1]->store(open_list->table, strlen(open_list->table), cs);
323
table->field[2]->store((int64_t) open_list->in_use, true);
324
table->field[3]->store((int64_t) open_list->locked, true);
325
if (schema_table_store_record(session, table))
324
if ((list_open_tables(session->lex->select_lex.db, wild, open_list_store, tables->table) == true) && session->is_fatal_error)
333
330
class ShowPlugins : public unary_function<st_plugin_int *, bool>