MariaDB [test]> drop database if exists test; create database test; create table test.test (id int);  insert into test.test (id) values (1) returning 1; select count(*) from test.test;
Query OK, 1 row affected (0.016 sec)

Query OK, 1 row affected (0.001 sec)

Query OK, 0 rows affected (0.004 sec)

+---+
| 1 |
+---+
| 1 |
+---+
1 row in set (0.002 sec)

+----------+
| count(*) |
+----------+
|        0 |
+----------+
1 row in set (0.004 sec)



2025-02-25 10:55:15   info   : (1) (Read-Write-Service); (log_transaction_status): > Autocommit: [enabled], trx is [not open], cmd: (0x3) COM_QUERY, plen: 33, type: sql::TYPE_WRITE, stmt: drop database if exists test
2025-02-25 10:55:15   info   : (1) [readwritesplit] (Read-Write-Service); (handle_got_target): Route query to primary: masterslave-mdb-ms-0 <
2025-02-25 10:55:15   info   : (1) [readwritesplit] (Read-Write-Service); (handle_got_target): is_causal_read=0, add_prefix=0, send_sync=0
2025-02-25 10:55:15   info   : (1) [readwritesplit] (Read-Write-Service); (client_reply): Reply complete from 'masterslave-mdb-ms-0' (OK: 1 rows affected, 0 warnings, GTID 500001-500001-192)
2025-02-25 10:55:15   info   : (1) (Read-Write-Service); (log_transaction_status): > Autocommit: [enabled], trx is [not open], cmd: (0x3) COM_QUERY, plen: 22, type: sql::TYPE_READ, stmt: SELECT DATABASE()
2025-02-25 10:55:15   info   : (1) [readwritesplit] (Read-Write-Service); (handle_got_target): Route query to replica: masterslave-mdb-ms-1 <
2025-02-25 10:55:15   info   : (1) [readwritesplit] (Read-Write-Service); (handle_got_target): is_causal_read=1, add_prefix=1, send_sync=0
2025-02-25 10:55:15   info   : (1) [readwritesplit] (Read-Write-Service); (add_prefix_wait_gtid): add_prefix_wait_gtid, sql: SET @maxscale_secret_variable=(SELECT CASE WHEN MASTER_GTID_WAIT('500001-500001-192', 10) = 0 THEN 1 ELSE (SELECT 1 FROM INFORMATION_SCHEMA.ENGINES) END);
2025-02-25 10:55:15   info   : (1) [readwritesplit] (Read-Write-Service); (client_reply): Reply complete from 'masterslave-mdb-ms-1' (Resultset: 1 rows in 81B)
2025-02-25 10:55:15   info   : (1) (Read-Write-Service); (log_transaction_status): > Autocommit: [enabled], trx is [not open], cmd: (0x3) COM_QUERY, plen: 25, type: sql::TYPE_WRITE, stmt: create database test
2025-02-25 10:55:15   info   : (1) [readwritesplit] (Read-Write-Service); (handle_got_target): Route query to primary: masterslave-mdb-ms-0 <
2025-02-25 10:55:15   info   : (1) [readwritesplit] (Read-Write-Service); (handle_got_target): is_causal_read=0, add_prefix=0, send_sync=0
2025-02-25 10:55:15   info   : (1) [readwritesplit] (Read-Write-Service); (client_reply): Reply complete from 'masterslave-mdb-ms-0' (OK: 1 rows affected, 0 warnings, GTID 500001-500001-193)
2025-02-25 10:55:15   info   : (1) (Read-Write-Service); (log_transaction_status): > Autocommit: [enabled], trx is [not open], cmd: (0x3) COM_QUERY, plen: 36, type: sql::TYPE_WRITE, stmt: create table test.test (id int)
2025-02-25 10:55:15   info   : (1) [readwritesplit] (Read-Write-Service); (handle_got_target): Route query to primary: masterslave-mdb-ms-0 <
2025-02-25 10:55:15   info   : (1) [readwritesplit] (Read-Write-Service); (handle_got_target): is_causal_read=0, add_prefix=0, send_sync=0
2025-02-25 10:55:15   info   : (1) [readwritesplit] (Read-Write-Service); (client_reply): Reply complete from 'masterslave-mdb-ms-0' (OK: 0 rows affected, 0 warnings, GTID 500001-500001-194)
2025-02-25 10:55:15   info   : (1) (Read-Write-Service); (log_transaction_status): > Autocommit: [enabled], trx is [not open], cmd: (0x3) COM_QUERY, plen: 54, type: sql::TYPE_WRITE, stmt: insert into test.test (id) values (1) returning 1
2025-02-25 10:55:15   info   : (1) [readwritesplit] (Read-Write-Service); (handle_got_target): Route query to primary: masterslave-mdb-ms-0 <
2025-02-25 10:55:15   info   : (1) [readwritesplit] (Read-Write-Service); (handle_got_target): is_causal_read=0, add_prefix=0, send_sync=0
2025-02-25 10:55:15   info   : (1) [readwritesplit] (Read-Write-Service); (client_reply): Reply complete from 'masterslave-mdb-ms-0' (Resultset: 1 rows in 58B)
2025-02-25 10:55:15   info   : (1) (Read-Write-Service); (log_transaction_status): > Autocommit: [enabled], trx is [not open], cmd: (0x3) COM_QUERY, plen: 35, type: sql::TYPE_READ, stmt: select count(*) from test.test
2025-02-25 10:55:15   info   : (1) [readwritesplit] (Read-Write-Service); (handle_got_target): Route query to replica: masterslave-mdb-ms-1 <
2025-02-25 10:55:15   info   : (1) [readwritesplit] (Read-Write-Service); (handle_got_target): is_causal_read=1, add_prefix=1, send_sync=0
2025-02-25 10:55:15   info   : (1) [readwritesplit] (Read-Write-Service); (add_prefix_wait_gtid): add_prefix_wait_gtid, sql: SET @maxscale_secret_variable=(SELECT CASE WHEN MASTER_GTID_WAIT('500001-500001-194', 10) = 0 THEN 1 ELSE (SELECT 1 FROM INFORMATION_SCHEMA.ENGINES) END);
2025-02-25 10:55:15   info   : (1) [readwritesplit] (Read-Write-Service); (client_reply): Reply complete from 'masterslave-mdb-ms-1' (Resultset: 1 rows in 76B)