• anozdrin/alik@quad.'s avatar
    A patch for Bug#18834: ALTER TABLE ADD INDEX on table with · 6bf1306b
    anozdrin/alik@quad. authored
    two timestamp fields.
      
    The actual problem here was that CREATE TABLE allowed zero
    date as a default value for a TIMESTAMP column in NO_ZERO_DATE mode.
      
    The thing is that for TIMESTAMP date type specific rule is applied:
      column_name TIMESTAMP == column_name TIMESTAMP DEFAULT 0
    whever for any other date data type
      column_name TYPE == column_name TYPE DEFAULT NULL
      
    The fix is to raise an error when we're in NO_ZERO_DATE mode and
    there is TIMESTAMP column w/o default value.
    6bf1306b
create.result 104 KB