ts字段是timestamp类型且含有on update current_timestamp属性,dt字段是datetime类型且不含on update current_timestamp属性
更新前:
mysql -D dbtest -e "select * from test01;"
+---------------------+---------------------+------+
| ts
| dt
| id |
+---------------------+---------------------+------+
| 2018-01-12 14:15:19 | 2018-01-12 14:15:19 | NULL |
+---------------------+---------------------+------+
更新:
mysql -D dbtest -e "update test01 set id=1 where id is null"
更新后:
mysql -D dbtest -e "select * from test01;" Logging to file '/home/mysql/query.log'
+---------------------+---------------------+------+
| ts
| dt
| id |
+---------------------+---------------------+------+
| 2018-01-12 15:42:15 | 2018-01-12 14:15:19 | 1 |
+---------------------+---------------------+------+
2.不同版本下mysqldump结束时间分析
使用mysqldump备份的同仁都可能会注意到,正常备份结束的话,在文件结尾会有一条成功结束的表示,即 :-- Dump completed on 2018-01-12 6:22:25。