~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/serialize/table_reader.cc

Create default_values record from proto instead of reading from FRM. assert if different to FRM.

Restore the "blob can't have default value" error message.

Fix default values for: blob, vachar, enum and varbinary.
Default value for a BLOB can be "" thanks to TINYTEXT or something.
proto now has default_bin_value as well as default_value. the default_bin_value used for varbinary and in future, blobs.

Load enum values out of proto instead of FRM and fill in the crazy interval structures.

Jay will fix up the create.test change (incorrect datetime for timestamp "0").

Show diffs side-by-side

added added

removed removed

Lines of Context:
110
110
  if (field.options().has_default_value())
111
111
    cout << " DEFAULT `" << field.options().default_value() << "` " ;
112
112
 
 
113
  if (field.options().has_default_bin_value())
 
114
  {
 
115
    string v= field.options().default_bin_value();
 
116
    cout << " DEFAULT 0x";
 
117
    for(unsigned int i=0; i< v.length(); i++)
 
118
    {
 
119
      printf("%.2x", *(v.c_str()+i));
 
120
    }
 
121
  }
 
122
 
113
123
  if (field.type() == Table::Field::TIMESTAMP)
114
124
    if (field.timestamp_options().has_auto_updates()
115
125
      && field.timestamp_options().auto_updates())