'VALUES function' is deprecated and will be removed in a future release. Please use an alias (INSERT INTO ... VALUES (...) AS alias) and replace VALUES(col) in the ON DUPLICATE KEY UPDATE clause with alias.col instead
MySQL 8 版本之后,VALUES(col)函数被废弃,请使用别名替换:
新语法
自增主键的变化
If a table contains an AUTO_INCREMENT column and INSERT ... ON DUPLICATE KEY UPDATE inserts or updates a row, the LAST_INSERT_ID() function returns the AUTO_INCREMENT value.
自动更新时间的变化《数据无更新不会更新时间》
An auto-updated column remains unchanged if all other columns are set to their current values. To prevent an auto-updated column from updating when other columns change, explicitly set it to its current value.
To update an auto-updated column even when other columns do not change, explicitly set it to the value it should have (for example, set it to CURRENT_TIMESTAMP).
https://dev.mysql.com/worklog/task/?id=13325
https://dev.mysql.com/worklog/task/?id=6312
https://dev.mysql.com/doc/refman/8.4/en/insert-on-duplicate.html