table proto having default_null set to false falsely has default value (that isn't null)

Bug #600635 reported by Stewart Smith
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Drizzle
Fix Released
Low
Stewart Smith
Dexter
Fix Released
Low
Stewart Smith

Bug Description

turns out the table_function code was the only thing hitting it.

having default_null set to false (instead of defaulting to not having it) causes this condition to be hit when parsing it:

  if (pfield.options().has_default_value() ||
        pfield.options().has_default_null() ||
        pfield.options().has_default_bin_value())
    {
      default_value= default_value_item(field_type,
                                        charset,
                                        pfield.options().default_null(),
                                        &pfield.options().default_value(),
                                        &pfield.options().default_bin_value());
    }

when it really shouldn't be.

this gives something like this in SHOW CREATE TABLE:
  `CHARACTER_SET_NAME` varchar(256) NOT NULL DEFAULT '',
instead of
  `CHARACTER_SET_NAME` varchar(256) NOT NULL,

Related branches

Stewart Smith (stewart)
Changed in drizzle:
status: Confirmed → Fix Committed
Stewart Smith (stewart)
Changed in drizzle:
milestone: 2010-07-05 → 2010-07-19
Stewart Smith (stewart)
Changed in drizzle:
milestone: 2010-07-19 → 2010-08-02
Stewart Smith (stewart)
Changed in drizzle:
milestone: 2010-08-02 → 2010-08-14
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.