Uploaded image for project: 'MariaDB MaxScale'
  1. MariaDB MaxScale
  2. MXS-3282

Select query inside transactions are routed to slave with session_track_trx_state=true

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 2.5.5
    • 2.5.6
    • Core
    • None
    • MariaDB 10.3.25

    Description

      With MaxScale, inside a transaction the select statements get routed to slave causing uncommited rows not to show up.

      MariaDB [db]> start transaction;
      Query OK, 0 rows affected (0.000 sec)
       
      MariaDB [db]> insert into audit set event = 'BLAAAP', details = 'This is a test', created = 0;
      Query OK, 1 row affected (0.001 sec)
       
      MariaDB [db]> select * from audit where event = 'BLAAAP';
      Empty set (0.001 sec)
       
      MariaDB [db]> select * from audit where event = 'BLAAAP' for update;
      +---------+---------+--------+----------------+------------+---------+
      | id      | user_id | event  | details        | ip_address | created |
      +---------+---------+--------+----------------+------------+---------+
      | 2051146 |    NULL | BLAAAP | This is a test | NULL       |       0 |
      +---------+---------+--------+----------------+------------+---------+
      1 row in set (0.001 sec)
      
      

      Attachments

        Activity

          People

            markus makela markus makela
            dicode Tim Westervoorde
            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.