Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-37508

Year 2038 support not working on 32bit systems

    XMLWordPrintable

Details

    • Bug
    • Status: Needs Feedback (View Workflow)
    • Major
    • Resolution: Unresolved
    • 12.1.1
    • None
    • Server
    • None

    Description

      There seems to be a bug in the code where support for 64bit time is not working on 32bit systems.

      In include/my_time.h:62 there is the IS_TIME_T_VALID_FOR_TIMESTAMP macro defined. If this fails the server will fail with

      sql_print_error("This server doesn't support dates later than 2038");
      

      in sql/mysqld.cc.

      However this macro seems to be the wrong way around,

      if SIZEOF_TIME_T > 4 || defined(TIME_T_UNSIGNED)

      is the condition for 64bit time support but in the truthy case defines a check for timestamps <INT32_MAX. It should be the other way around.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              lal12 Luca Lindhorst
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.