~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/show_dictionary/show_columns.cc

  • Committer: Lee Bieber
  • Date: 2010-11-07 19:34:48 UTC
  • mfrom: (1910.1.2 build)
  • Revision ID: kalebral@gmail.com-20101107193448-64kdu912qej354sh
Merge Stewart - including adapting and expanding the "differences from mysql" page from the wiki.
Merge Stewart - fix bug 668143: drizzleslap with --commit runs second iteration data load in a transaction

Show diffs side-by-side

added added

removed removed

Lines of Context:
57
57
  is_columns_primed(false),
58
58
  column_iterator(0)
59
59
{
60
 
  if (not isShowQuery())
61
 
   return;
62
 
 
63
60
  statement::Show *select= static_cast<statement::Show *>(getSession().lex->statement);
64
61
 
65
62
  if (not select->getShowTable().empty() && not select->getShowSchema().empty())
66
63
  {
67
64
    table_name.append(select->getShowTable().c_str());
68
 
    identifier::Table identifier(select->getShowSchema().c_str(), select->getShowTable().c_str());
 
65
    TableIdentifier identifier(select->getShowSchema().c_str(), select->getShowTable().c_str());
69
66
 
70
67
    is_tables_primed= plugin::StorageEngine::getTableDefinition(getSession(),
71
68
                                                                identifier,
88
85
    is_columns_primed= true;
89
86
  }
90
87
 
91
 
  if (column_iterator >= getTableProto()->field_size())
 
88
  if (column_iterator >= getTableProto().field_size())
92
89
    return false;
93
90
 
94
 
  column= getTableProto()->field(column_iterator);
 
91
  column= getTableProto().field(column_iterator);
95
92
 
96
93
  return true;
97
94
}
147
144
  case message::Table::Field::DATE:
148
145
    push(DATE);
149
146
    break;
150
 
  case message::Table::Field::EPOCH:
 
147
  case message::Table::Field::TIMESTAMP:
151
148
    push(TIMESTAMP);
152
149
    break;
153
150
  case message::Table::Field::DATETIME:
166
163
  pushType(column.type(), column.string_options().collation());
167
164
 
168
165
  /* Null */
169
 
  push(not column.constraints().is_notnull());
 
166
  push(column.constraints().is_nullable());
170
167
 
171
168
  /* Default */
172
169
  if (column.options().has_default_value())