~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/ident.cc

  • Committer: Stewart Smith
  • Date: 2010-07-27 00:49:32 UTC
  • mto: (1720.1.1 drizzle)
  • mto: This revision was merged to the branch mainline in revision 1721.
  • Revision ID: stewart@flamingspork.com-20100727004932-basq3vx9szmmbswm
fix storing and manipulating foreign keys in the proto around ALTER TABLE, CREATE TABLE and ALTER TABLE ADD/DROP FOREIGN KEY. We also (mostly) emulate the naming of innodb foreign keys in the upper layer.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
#include <drizzled/current_session.h>
24
24
#include <drizzled/item/ident.h>
25
25
 
 
26
#include <cstdio>
 
27
 
26
28
using namespace std;
27
29
 
28
30
namespace drizzled
189
191
  tmp_field->charsetnr= field->charset()->number;
190
192
  tmp_field->length=field->field_length;
191
193
  tmp_field->type=field->type();
192
 
  tmp_field->flags= field->table->maybe_null ?
 
194
  tmp_field->flags= field->getTable()->maybe_null ?
193
195
    (field->flags & ~NOT_NULL_FLAG) : field->flags;
194
196
  tmp_field->decimals= field->decimals();
195
197
}