• unknown's avatar
    Bug#7806 - insert on duplicate key and auto-update of timestamp · 3be2d489
    unknown authored
    Modified the check for the timestamp field so that the flags for
    the automatic for inserts and updates are cleared independently.
    
    
    mysql-test/r/type_timestamp.result:
      Bug#7806 - insert on duplicate key and auto-update of timestamp
      The test result.
    mysql-test/t/type_timestamp.test:
      Bug#7806 - insert on duplicate key and auto-update of timestamp
      The test case.
    sql/mysql_priv.h:
      Bug#7806 - insert on duplicate key and auto-update of timestamp
      Made check_insert_fields() static. It is used only in sql_insert.cc.
    sql/sql_insert.cc:
      Bug#7806 - insert on duplicate key and auto-update of timestamp
      Modified the check of the insert fields so that an explicit
      assignment of the timestamp field does only disable the automatic
      for inserts and retains the automatic for updates.
      Added a check if the update fields contain the timestamp field.
      In this case, the automatic on update is disabled, but not the
      automatic on insert. This is called from mysql_prepare_insert().
    sql/table.h:
      Bug#7806 - insert on duplicate key and auto-update of timestamp
      Extended a comment to warn about usage of enum timestamp_auto_set_type.
    3be2d489
mysql_priv.h 47.7 KB