~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/generator/all_tables.h

  • Committer: lbieber
  • Date: 2010-10-01 13:06:31 UTC
  • mfrom: (1802.2.2 drizzle-bug-651948)
  • mto: This revision was merged to the branch mainline in revision 1805.
  • Revision ID: lbieber@orisndriz08-20101001130631-xubscnhmj7r5dn6g
Merge Andrew - Fix bug 651948 - Index lengths not retrieved using drizzledump

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
class AllTables
30
30
{
31
31
  Session &session;
32
 
  message::table::shared_ptr table;
 
32
  message::Table table;
33
33
 
34
 
  identifier::Table::vector table_names;
35
 
  identifier::Table::vector::const_iterator table_iterator;
 
34
  TableIdentifiers table_names;
 
35
  TableIdentifiers::const_iterator table_iterator;
36
36
 
37
37
  drizzled::generator::Schema schema_generator;
38
 
  const drizzled::identifier::Schema *schema_ptr;
 
38
  const drizzled::SchemaIdentifier *schema_ptr;
39
39
 
40
40
  bool table_setup();
41
41
 
45
45
 
46
46
  void reset();
47
47
 
48
 
  operator const drizzled::message::table::shared_ptr()
 
48
  operator const drizzled::message::Table*()
49
49
  {
50
50
    do {
51
51
      while (table_iterator != table_names.end())
52
52
      {
 
53
        table.Clear();
53
54
        bool is_table_parsed= plugin::StorageEngine::getTableDefinition(session, *table_iterator, table);
54
55
        table_iterator++;
55
56
 
56
57
        if (is_table_parsed)
57
 
          return table;
 
58
          return &table;
58
59
      }
59
60
    } while ((schema_ptr= schema_generator) && table_setup());
60
61
 
61
 
    return message::table::shared_ptr();
 
62
    return NULL;
62
63
  }
63
64
 
64
 
  operator const drizzled::identifier::Table*()
 
65
  operator const drizzled::TableIdentifier*()
65
66
  {
66
67
    do {
67
68
      while (table_iterator != table_names.end())
68
69
      {
69
 
        const drizzled::identifier::Table *_ptr= &(*table_iterator);
 
70
        const drizzled::TableIdentifier *_ptr= &(*table_iterator);
70
71
        table_iterator++;
71
72
 
72
73
        return _ptr;