• unknown's avatar
    Fixed bug #19089. · db5d1974
    unknown authored
    When a CREATE TABLE command created a table from a materialized
    view id does not inherit default values from the underlying table.
    Moreover the temporary table used for the view materialization
    does not inherit those default values.
    In the case when the underlying table contained ENUM fields it caused
    misleading error messages. In other cases the created table contained
    wrong default values.
    The code was modified to ensure inheritance of default values for
    materialized views.
    
    
    mysql-test/r/view.result:
      Added a test case for bug #19089.
    mysql-test/t/view.test:
      Added a test case for bug #19089.
    sql/field.cc:
      Fixed bug ##19089.
      Added field dflt_field to the class Field.
      This field is set for temp table fields that inherits
      default values of items from which they are created.
    sql/field.h:
      Fixed bug ##19089.
      Added field dflt_field to the class Field.
      This field is set for temp table fields that inherits
      default values of items from which they are created.
    sql/sql_select.cc:
      Fixed bug #19089.
      When a CREATE TABLE command created a table from a materialized
      view id does not inherit default values from the underlying table.
      Moreover the temporary table used for the view materialization
      does not inherit those default values.
      The code was modified to ensure inheritance of default values for
      materialized views.
    db5d1974
sql_select.cc 449 KB