~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/show.cc

Merged in latest plugin-slot-reorg.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1443
1443
}
1444
1444
 
1445
1445
 
1446
 
 
1447
 
 
1448
 
static int schema_tables_add(Session *session,
1449
 
                             vector<LEX_STRING*> &files,
1450
 
                             const char *wild)
1451
 
{
1452
 
  plugin::Registry &plugins= plugin::Registry::singleton();
1453
 
  return plugins.info_schema.addTableToList(session, files, wild);
1454
 
}
1455
 
 
1456
 
 
1457
1446
/**
1458
1447
  @brief          Create table names list
1459
1448
 
1485
1474
  {
1486
1475
    if (with_i_schema)
1487
1476
    {
1488
 
      if (find_schema_table(lookup_field_vals->table_value.str))
 
1477
      if (plugin::InfoSchemaTable::getTable(lookup_field_vals->table_value.str))
1489
1478
      {
1490
1479
        table_names.push_back(&lookup_field_vals->table_value);
1491
1480
      }
1502
1491
    to the list
1503
1492
  */
1504
1493
  if (with_i_schema)
1505
 
    return (schema_tables_add(session, table_names,
1506
 
                              lookup_field_vals->table_value.str));
 
1494
    return plugin::InfoSchemaTable::addTableToList(session, table_names,
 
1495
                                      lookup_field_vals->table_value.str);
1507
1496
 
1508
1497
  string db(db_name->str);
1509
1498
 
1510
 
  service::TableNameIterator tniter(db);
 
1499
  plugin::TableNameIterator tniter(db);
1511
1500
  int err= 0;
1512
1501
  string table_name;
1513
1502
 
2226
2215
}
2227
2216
 
2228
2217
 
2229
 
/*
2230
 
  Find schema_tables elment by name
2231
 
 
2232
 
  SYNOPSIS
2233
 
    find_schema_table()
2234
 
    table_name          table name
2235
 
 
2236
 
  RETURN
2237
 
    0   table not found
2238
 
    #   pointer to 'schema_tables' element
2239
 
*/
2240
 
 
2241
 
plugin::InfoSchemaTable *find_schema_table(const char* table_name)
2242
 
{
2243
 
  
2244
 
  plugin::Registry &plugins= plugin::Registry::singleton();
2245
 
  return plugins.info_schema.getTable(table_name);
2246
 
}
2247
 
 
2248
 
 
2249
2218
Table *plugin::InfoSchemaMethods::createSchemaTable(Session *session, TableList *table_list)
2250
2219
  const
2251
2220
{
2447
2416
bool make_schema_select(Session *session, Select_Lex *sel,
2448
2417
                        const string& schema_table_name)
2449
2418
{
2450
 
  plugin::InfoSchemaTable *schema_table= find_schema_table(schema_table_name.c_str());
 
2419
  plugin::InfoSchemaTable *schema_table= plugin::InfoSchemaTable::getTable(schema_table_name.c_str());
2451
2420
  LEX_STRING db, table;
2452
2421
  /*
2453
2422
     We have to make non const db_name & table_name