I'm starting to learn how to use ProxySQL and I'm a perfect newbie...
I made few tests using a Spring Boot application with HikariCP pointing to a ProxySQL configured to use a Percona XtraDB Cluster. ProxySQL was configured automatically by proxysql-admin with a single writer and 2 readers (I need a master-slave configuration with synchronous replication).
Running these tests I noticed that with the default configuration only queries starting with "SELECT..." get directed toward the slaves (excluding "SELECT... FOR UPDATE" that are directed toward the write master).
The problem is that even selects inside a "write" transaction get directed to the slaves. I'm afraid that this behavior will get tricky results when a select is used after an insert or an update in the same transaction, because that select will be directed to a slave, where the updated data is missing because the transaction isn't yet committed.
I don't really understand how I can configure proxysql to route all read_only transaction to the slaves and all other transactions to the master (even if they are select queries)... Is there some documentation I can look at to achieve this? I'd like something very close to how MySQL Replication Driver works (I can't use it because HikariCP doesn't support it).
Thanks,
Daniele