~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/field.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:
1607
1607
      /* Allow empty as default value. */
1608
1608
      String str,*res;
1609
1609
      res= fld_default_value->val_str(&str);
 
1610
      if (res->length())
 
1611
      {
 
1612
        my_error(ER_BLOB_CANT_HAVE_DEFAULT, MYF(0),
 
1613
                 fld_name);
 
1614
        return(true);
 
1615
      }
 
1616
 
1610
1617
    }
1611
1618
    flags|= BLOB_FLAG;
1612
1619
    break;