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

In trigger's CREATED time microseconds are misinterpreted

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • N/A
    • N/A
    • Triggers
    • None

    Description

      use test;
      drop table if exists t1;
      create table t1 (i int);
       
      SET TIMESTAMP=UNIX_TIMESTAMP('2016-01-01 10:10:10.33');
      select now(2);
      create or replace trigger tr1 after insert on t1 for each row set @a=@a+1;
       
      SET TIMESTAMP=UNIX_TIMESTAMP('2016-01-01 10:10:10.99');
      select now(2);
      create or replace trigger tr2 after insert on t1 for each row set @a=@a+1;
       
      select now(2);
      select trigger_name, action_order, created from information_schema.triggers 
        where event_object_table = 't1' and trigger_schema='test';
        
      drop table t1;
      

      MariaDB [test]> select trigger_name, action_order, created from information_schema.triggers 
          ->   where event_object_table = 't1' and trigger_schema='test';
      +--------------+--------------+------------------------+
      | trigger_name | action_order | created                |
      +--------------+--------------+------------------------+
      | tr1          |            1 | 2016-01-01 10:10:13.30 |
      | tr2          |            2 | 2016-01-01 10:10:19.90 |
      +--------------+--------------+------------------------+
      

      It looks like microseconds are shifted one position left.

      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.