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

SET STATEMENT last_insert_id FOR ... does not affect the value written to the binlog

Details

    Description

      MariaDB [test]> set statement last_insert_id = 112 for create table tmp as select last_insert_id();
      Query OK, 1 row affected (1.30 sec)
      Records: 1  Duplicates: 0  Warnings: 0
       
      MariaDB [test]> show binlog events;
      ...
      | wheezy-64-bin.000001 | 316 | Gtid              |         1 |         354 | GTID 0-1-1                                                                                     |
      | wheezy-64-bin.000001 | 354 | Intvar            |         1 |         382 | LAST_INSERT_ID=0                                                                               |
      | wheezy-64-bin.000001 | 382 | Query             |         1 |         527 | use `test`; set statement last_insert_id = 112 for create table tmp as select last_insert_id() |
      +----------------------+-----+-------------------+-----------+-------------+------------------------------------------------------------------------------------------------+

      commit d6981391eb8f904135dfdedb5b90a7592b35e648
      Author: Oleksandr Byelkin <sanja@mariadb.com>
      Date:   Thu Oct 30 19:34:54 2014 +0100
       
          MDEV_6976: Assertion `! is_set() || m_can_overwrite_status' failed in Diagnostics_area::set_error_status on SET STATEMENT debug_sync
          
          DEBUG_SYNC has complex logic of using different from other variables so it is prohibited in SEt STATENT

      Percona server works okay.

      Attachments

        Issue Links

          Activity

            Transition Time In Source Status Execution Times
            Oleksandr Byelkin made transition -
            Open In Progress
            19d 4h 57m 1
            Oleksandr Byelkin made transition -
            In Progress Stalled
            6d 11h 43m 2
            Oleksandr Byelkin made transition -
            Stalled In Progress
            31d 4h 7m 5
            Oleksandr Byelkin made transition -
            In Progress In Review
            2d 28m 4
            Sergei Golubchik made transition -
            In Review Stalled
            73d 7h 38m 4
            Oleksandr Byelkin made transition -
            Stalled Closed
            5h 18m 1

            People

              sanja Oleksandr Byelkin
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.