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

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.5.5
    • Fix Version/s: 2.5.6
    • Component/s: Core
    • Labels:
      None
    • Environment:
      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

            Assignee:
            markus makela markus makela
            Reporter:
            dicode Tim Westervoorde
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Git Integration