Skip to content
  • Praveenkumar Hulakund's avatar
    418bb091
    Bug#29191994 - MULTIPLE CONSTRAINTS ARE NOT ACCEPTED WHEN FIRST IS CHECK CONSTRAINT IN COLUMN · 418bb091
    Praveenkumar Hulakund authored
    This is a follow-up task for WL929. As part of this patch following
    changes are done,
    
      *) Support multiple constraints when check constraint is also
         defined in a column definition.
    
          WL929 implemented support for check constraint definition
          in a column definition. But multiple constraint definition
          are not accepted when first is check constraint.
    
          As part of this patch, parser code is changed to support
          the same.
    
      *) THD::m_cc_adjusted_names_map is removed.
    
          During ALTER TABLE operation, this member maintained mapping
          from adjusted(temporary) name to actual name of check constraints.
          This was required for the proper error reporting during ALTER
          TABLE operation. But holding this name mapping in THD instance
          looks incorrect.
    
          As part of this patch, removed THD::m_cc_adjusted_names_map
          member. Added members to Sql_check_constraints_spec,
          dd::Check_constraint classes to hold the temporary names
          and adjusted ALTER TABLE operation code.
    
      *) Skip invocation of check constraints if column used by check
         constraint is not part of a table write_set.
    
      *) Fixed few doxygen comment and minor code level issues.
    
      *) Added test case to verify behavior when before trigger adjusts
         values so that check constraint evaluation passes always.
    
    Change-Id: Ie1202d6b76cb245ac718cede282897759164007b
    418bb091
    Bug#29191994 - MULTIPLE CONSTRAINTS ARE NOT ACCEPTED WHEN FIRST IS CHECK CONSTRAINT IN COLUMN
    Praveenkumar Hulakund authored
    This is a follow-up task for WL929. As part of this patch following
    changes are done,
    
      *) Support multiple constraints when check constraint is also
         defined in a column definition.
    
          WL929 implemented support for check constraint definition
          in a column definition. But multiple constraint definition
          are not accepted when first is check constraint.
    
          As part of this patch, parser code is changed to support
          the same.
    
      *) THD::m_cc_adjusted_names_map is removed.
    
          During ALTER TABLE operation, this member maintained mapping
          from adjusted(temporary) name to actual name of check constraints.
          This was required for the proper error reporting during ALTER
          TABLE operation. But holding this name mapping in THD instance
          looks incorrect.
    
          As part of this patch, removed THD::m_cc_adjusted_names_map
          member. Added members to Sql_check_constraints_spec,
          dd::Check_constraint classes to hold the temporary names
          and adjusted ALTER TABLE operation code.
    
      *) Skip invocation of check constraints if column used by check
         constraint is not part of a table write_set.
    
      *) Fixed few doxygen comment and minor code level issues.
    
      *) Added test case to verify behavior when before trigger adjusts
         values so that check constraint evaluation passes always.
    
    Change-Id: Ie1202d6b76cb245ac718cede282897759164007b
Loading