电商网站分析报告怎么做,大型企业网络设计方案,crm软件排行榜前十名,东莞松山湖华为招聘信息MySQL
测试时间#xff1a;2023-8
启动MySQL服务后#xff0c;将系统时间调制2038年01月19日03时14分07秒之后的日期#xff0c;发现MySQL服务自动停止。
根据最新的MySQL源码#xff08;mysql-8.1.0#xff09;分析#xff0c;sql/sql_parse.cc中依然存在2038年千年虫…MySQL
测试时间2023-8
启动MySQL服务后将系统时间调制2038年01月19日03时14分07秒之后的日期发现MySQL服务自动停止。
根据最新的MySQL源码mysql-8.1.0分析sql/sql_parse.cc中依然存在2038年千年虫问题
/*If the time has gone past end of epoch we need to shutdown the server. Butthere is possibility of getting invalid time value on some platforms.For example, gettimeofday() might return incorrect value on solarisplatform. Hence validating the current time with 5 iterations beforeinitiating the normal server shutdown process because of time gettingpast 2038.
*/
if (tries max_tries) {/*If the time has got past epoch, we need to shut this server down.We do this by making sure every command is a shutdown and wehave enough privileges to shut the server downTODO: remove this when we have full 64 bit my_time_t support*/LogErr(ERROR_LEVEL, ER_UNSUPPORTED_DATE);const ulong master_access thd-security_context()-master_access();thd-security_context()-set_master_access(master_access | SHUTDOWN_ACL);error true;kill_mysql();}TODO: remove this when we have full 64 bit my_time_t support表示直到MySQL完成支持64位时间戳时才移除这个限制
PostgreSQL
测试时间2023-8
测试版本psql-10.1、psql-15.4
启动postgresql服务后将系统时间调制2038年01月19日03时14分07秒之后的日期psql-15.4版服务正常运行数据库可以正常读写但是重启服务postgresql失败也就是说postgresql在2038年后无法正常启动。psql-10.1服务直接挂掉不能使用。
日志分析 从日志上可以看出调整时间后重启postgresql日志中的记录时间有问题启动过程中一直报“D:/PostgresSQL/15/share/timezone”目录不存在这个问题可能是postgresql获取时区出了问题有可能是系统的问题。
Mariadb
测试时间2023-8
测试版本10.8.811.1.2-GA测试日期的最新版
现象与PostgreSQL类似调整时间后能正常读写但是不能重启。未分析日志
从Mariadb的官网上可以查到旧版计划5.6版本中就有用关于解决2038年千年虫问题的计划好像未彻底实时Mariadb不存在5.6版本。
总结
距离下一次千年虫还有15年的时间但愿MySQL能修复这个问题不过按照Oracle的德性不排除到了2038年停止MySQL社区版的维护强制用户升级到企业版大赚一笔。
Mariadb、PostgreSQL 未来几年修复千年虫问题的可能性还是比较大的毕竟已经修复了一部分我们尽请期待吧。