~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/default_value.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:
69
69
    goto error;
70
70
  memcpy(def_field, field_arg->field, field_arg->field->size_of());
71
71
  def_field->move_field_offset((ptrdiff_t)
72
 
                               (def_field->table->s->default_values -
73
 
                                def_field->table->record[0]));
 
72
                               (def_field->getTable()->getDefaultValues() - def_field->getTable()->record[0]));
74
73
  set_field(def_field);
75
74
  return false;
76
75
 
107
106
      }
108
107
 
109
108
      {
110
 
        push_warning_printf(field_arg->table->in_use,
 
109
        push_warning_printf(field_arg->getTable()->in_use,
111
110
                            DRIZZLE_ERROR::WARN_LEVEL_WARN,
112
111
                            ER_NO_DEFAULT_FOR_FIELD,
113
112
                            ER(ER_NO_DEFAULT_FOR_FIELD),