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

MariaDB 10.3.8 looses last transaction

    XMLWordPrintable

Details

    Description

      Our test script (az_test.php) does inserts into database. On error it reports last commited transaction:
      Last id was: 17687

      After (clean) restart of MariaDB 10.3.8 last commited transaction is not there any more:

      SELECT COUNT(*) FROM aaa_fromdual.test UNION ALL SELECT COUNT(*) FROM zzz_fromdual.test;
      +----------+
      | COUNT(*) |
      +----------+
      |    17686 |
      |    17686 |
      +----------+
      

      But General Log reports query as commited:

                          94 Query    START TRANSACTION
                          94 Query    INSERT INTO `aaa_fromdual`.`test` VALUES (NULL, "Test data on first table.", NULL)
                          94 Query    INSERT INTO `zzz_fromdual`.`test` VALUES (17687, "Test data on second table.", NULL)
                          94 Query    COMMIT
                          95 Query    shutdown
      

      MySQL was properly restarted:

      2018-11-11 18:32:33 0 [Note] /home/mysql/product/mariadb-10.3/bin/mysqld (initiated by: root[root] @ localhost []): Normal shutdown
      2018-11-11 18:32:33 0 [Note] Event Scheduler: Purging the queue. 0 events                                                                          
      2018-11-11 18:32:33 0 [Note] InnoDB: FTS optimize thread exiting.                                                                                  
      2018-11-11 18:32:33 0 [Note] InnoDB: Starting shutdown...                                                                                          
      2018-11-11 18:32:33 0 [Note] InnoDB: Dumping buffer pool(s) to /home/mysql/database/mariadb-103/data/ib_buffer_pool                                
      2018-11-11 18:32:33 0 [Note] InnoDB: Instance 0, restricted to 2048 pages due to innodb_buf_pool_dump_pct=25                                       
      2018-11-11 18:32:33 0 [Note] InnoDB: Buffer pool(s) dump completed at 181111 18:32:33                                                                              
      2018-11-11 18:32:34 0 [Note] InnoDB: Shutdown completed; log sequence number 859835539; transaction id 75652                                                       
      2018-11-11 18:32:34 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"                                                                                                   
      2018-11-11 18:32:34 0 [Note] /home/mysql/product/mariadb-10.3/bin/mysqld: Shutdown complete                                                                                             
                                                                                                                                                                                              
      2018-11-11 18:33:10 0 [Note] InnoDB: Using Linux native AIO
      2018-11-11 18:33:10 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
      2018-11-11 18:33:10 0 [Note] InnoDB: Uses event mutexes
       
      2018-11-11 18:33:10 0 [Note] InnoDB: Number of pools: 1This problem does not happen with your competitor.
       
      2018-11-11 18:33:10 0 [Note] InnoDB: Using SSE2 crc32 instructions
      2018-11-11 18:33:10 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
      2018-11-11 18:33:10 0 [Note] InnoDB: Completed initialization of buffer pool
      2018-11-11 18:33:10 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
      2018-11-11 18:33:10 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
      2018-11-11 18:33:10 0 [Note] InnoDB: Creating shared tablespace for temporary tables
      2018-11-11 18:33:10 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
      2018-11-11 18:33:10 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
      2018-11-11 18:33:10 0 [Note] InnoDB: 10.3.8 started; log sequence number 859835539; transaction id 75654
      2018-11-11 18:33:10 0 [Note] InnoDB: Loading buffer pool(s) from /home/mysql/database/mariadb-103/data/ib_buffer_pool
      2018-11-11 18:33:10 0 [Note] Plugin 'FEEDBACK' is disabled.
      2018-11-11 18:33:10 0 [Note] InnoDB: Buffer pool(s) load completed at 181111 18:33:10
      2018-11-11 18:33:10 0 [Note] Server socket created on IP: '::'.
      2018-11-11 18:33:10 0 [Note] Reading of all Master_info entries succeded
      2018-11-11 18:33:10 0 [Note] Added new Master_info '' to hash table
      2018-11-11 18:33:10 0 [Note] /home/mysql/product/mariadb-10.3/bin/mysqld: ready for connections.
      Version: '10.3.8-MariaDB-log'  socket: '/var/run/mysqld/mysql-3320.sock'  port: 3320  MariaDB Server
      

      Config was nothing sophisticated:

      [mysqld]
       
      port                           = 3320
      socket                         = /var/run/mysqld/mysql-3320.sock                              # Use mysqld.sock on Ubuntu, conflicts with AppArmor otherwise
      basedir                        = /home/mysql/product/mariadb-10.3
      datadir                        = /home/mysql/database/mariadb-103/data
      log_error                      = /home/mysql/database/mariadb-103/log/error.log
      log_bin                        = /home/mysql/database/mariadb-103/binlog/binlog
      performance_schema             = on
      performance_schema_consumer_events_statements_history_long = ON
      general_log                    = 1
      general_log_file               = /home/mysql/database/mariadb-103/log/general.log
      

      This problem does not happen with your competitor. And it is reproducible every time at will.

      Attachments

        Activity

          People

            Unassigned Unassigned
            oli Oli Sennhauser
            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.