Changed title: migrate TIMESTAMP to DATETIMEs to support dates past 2038?
For native MariaDB 10.5.8, MySqlLeaseMgrTest.maxDate*
tests pass.
When starting MariaDB 10.5.8 in docker with this script, they fail:
$ ./src/lib/dhcpsrv/tests/libdhcpsrv_unittests --gtest_filter='MySqlLeaseMgrTest.maxDate*'
Note: Google Test filter = MySqlLeaseMgrTest.maxDate* [==========] Running 4 tests from 1 test suite. [----------] Global test environment set-up. [----------] 4 tests from MySqlLeaseMgrTest [ RUN ] MySqlLeaseMgrTest.maxDate4 wipeMySQLData failed:[sh /home/andrei/work/isc/kea/src/share/database/scripts/mysql/wipe_data.sh 9.5 -N -B --user=keatest --password=keatest keatest 2>/dev/null ] test_utils.cc:54: Failure Expected equality of these values: first->cltt_ Which is: 2147483647 second->cltt_ Which is: 1610629470 [ FAILED ] MySqlLeaseMgrTest.maxDate4 (1679 ms) [ RUN ] MySqlLeaseMgrTest.maxDate4MultiThreading test_utils.cc:54: Failure Expected equality of these values: first->cltt_ Which is: 2147483647 second->cltt_ Which is: 1610629470 [ FAILED ] MySqlLeaseMgrTest.maxDate4MultiThreading (56 ms) [ RUN ] MySqlLeaseMgrTest.maxDate6 test_utils.cc:87: Failure Expected equality of these values: first->cltt_ Which is: 2147483647 second->cltt_ Which is: 1610629470 [ FAILED ] MySqlLeaseMgrTest.maxDate6 (56 ms) [ RUN ] MySqlLeaseMgrTest.maxDate6MultiThreading test_utils.cc:87: Failure Expected equality of these values: first->cltt_ Which is: 2147483647 second->cltt_ Which is: 1610629470 [ FAILED ] MySqlLeaseMgrTest.maxDate6MultiThreading (56 ms) [----------] 4 tests from MySqlLeaseMgrTest (1847 ms total)[----------] Global test environment tear-down [==========] 4 tests from 1 test suite ran. (1847 ms total) [ PASSED ] 0 tests. [ FAILED ] 4 tests, listed below: [ FAILED ] MySqlLeaseMgrTest.maxDate4 [ FAILED ] MySqlLeaseMgrTest.maxDate4MultiThreading [ FAILED ] MySqlLeaseMgrTest.maxDate6 [ FAILED ] MySqlLeaseMgrTest.maxDate6MultiThreading
4 FAILED TESTS
The date that is returned is the current time. When looking into the database, the date that is inserted inside the test is MAX_DATE. When doing a manual select via mysql
client, it is MAX_DATE. So the problem must be on the SELECT statement when using the MySQL libs which were the same version when I tested mariadb-libs 10.5.8
.