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

    XMLWordPrintable

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

            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.