Open nickloose opened 5 years ago
I believe I have run into this same issue - I have a Wordpress site that was giving incorrect results with SELECT FOUND_ROWS() even though I have multiplexing completely disabled. I ended up having to write a specific query rule to direct the queries at the writer hostgroup as a temporary solution.
Edit: Forgot to mention, I'm using ProxySQL version 2.0.6-73-gc746bf7, codename Truls
I have a Primary/Replica Setup and get the wrong results from FOUND_ROWS() in >50% of all queries when using prepared statements. Most of the time the result count is 1 but sometimes it's also 0. It only happens if the query to get the data is a prepared statement. It looks like multiplexing is not disabled when using prepared statements like the wiki says.
So I tested it with a new Database and a basic php script using MySQLi and got the results below. I checked with PDO and got the same results.
Sadly this makes proxysql for us unusable because we have many prepared statements using SQL_CALC_FOUND_ROWS.
Test Results
Test Setup
Test Table:
Test SELECT:
Test PHP
Setup Versions
ProxySQL Config:
mysql_servers
mysql_replication_hostgroups
mysql_query_rules
global_variables
Error Log
Nothing is written to the error log