Answering to myself: my file had a typo: it's COM_STMT and not COM_STMNT...
Other than that, my basic question remains.
By now, I'm trying to send all prepared statements to the master. But I still get a NULL answer to my query.
in rw-splitting.lua, function read_query, I added at the end of the
big if statement starting with
if not is_in_transaction and
cmd.type == proxy.COM_QUERY then
I added
-- addition
elseif cmd.type == proxy.COM_STMT_PREPARE or
cmd.type == proxy.COM_STMT_EXECUTE or
cmd.type == proxy.COM_STMT_CLOSE then
-- let's pick a master as a good default
--
print( "["..os.date("%c", os.time()).."]" .. " I'm in a prepared statement, using master by default")
proxy.connection.backend_ndx = lb.idle_failsafe_rw()
end
-- end addition
Still, I don't get the correct answer. How is it possible?