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

Connect engine does not support 32-bit timestamp

    XMLWordPrintable

Details

    Description

      INSTALL SONAME 'ha_connect';
       
      create table t (c timestamp) ENGINE=Connect TABLE_TYPE=DOS;
       
      insert into t values (from_unixtime(power(2,31)-1));
      insert into t values (from_unixtime(power(2,32)-1));
       
      select c, unix_timestamp(c) from t;
       
      # Cleanup
      drop table t;
      uninstall soname 'ha_connect';
      

      bb-11.4-timestamp 6a706d142be3309de89c28bcb48e91a72e8e8f69

      insert into t values (from_unixtime(power(2,31)-1));
      insert into t values (from_unixtime(power(2,32)-1));
      select c, unix_timestamp(c) from t;
      c	unix_timestamp(c)
      2038-01-19 05:14:07	2147483647
      0000-00-00 00:00:00	0
      Warnings:
      Warning	1264	Out of range value for column 'c' at row 2
      Warning	1105	Out of range value -1 for column 'c' at row 2
      

      Noticeably, INSERT works without a warning, the problem only happens (or becomes visible) upon SELECT.

      Attachments

        Issue Links

          Activity

            People

              monty Michael Widenius
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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