-
Notifications
You must be signed in to change notification settings - Fork 977
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Prepare Statements in mysqli for php fail #444
Comments
Prepared statements are currently not supported. If you really need prepared statement, this feature can be added but the first implementation will disable a lot of other features, like multiplexing, query re-execution, transparent failover . |
Thanks Rene, a lot of ORMs use prepared statements so perhaps it could be a flag feature so that people can enable but know they will loose capabilities by using them. Thanks t |
You are perfectly right. |
yeah since we use an ORM and it uses prepared statements
|
Which ORM? Andrei Ismail Software Engineer |
We're using a PHP code base and use prepared statements. We'd really like to see this feature |
I use Ecto as an ORM for Elixir which use prepared statements for all queries. |
As said in a previous comment, a first implementation of prepared statements won't support a lot of features available for the text protocol. |
Manual switching connection is most important for me.
With MySQL router or another proxy, I should restart such process to switch connection destination. This cause not a few failer to application. Using ProxySQL, this technique is also useful, when alter table to huge and heavy load table(alter offline, and then switch connection) |
This issue also affects sysbench:
|
For the time being, until prepared statements are supported (work in progress), please use sysbench with |
Are these supported yet or any plans to bring it in anytime soon? |
Support for prepared statements is the main development focus right now. |
HI Rene,do you have a plan when will take this feature into Proxysql? I use php whih the laravel Framework, it use prepare statement to avoid the SQL Injection. Tow question about this:
@renecannao thanks! |
MySQL supports two type of prepared statements:
SQL support currently not supported either, because API support is planned in ProxySQL 1.3 . Thanks |
OK,I'm very glad to keep focus on this project. |
The only load-balancing algorithm currently used is weighted random |
Was there some progress made, here? I'm seeing lots of Commits on different branches related to Prepared Statements, is there any version we could test? Is there something that needs to be done to activate support (e.g. feature flag)? We'd really need those Prepared Statements, too. Would be willing to test, if there is something to test right now :). We're currently running the Docker Image on latest. |
After reading this thread I'd realised my error. I was running on 1.2.x, because of a very outdated Docker Hub Repository by Percona: https://hub.docker.com/r/perconalab/proxysql/ This should be my problem :) Will search for a better Docker Image now. |
AFAIK, there is no Docker image with 1.3 out there. |
That's no problem, I've forked the base-repo for the Docker Image by percona anyway. Just updated the version that's installed, and it works perfectly fine! :) Sorry for the noise! |
This issue needed to be closed long time ago. |
When ever I go over the proxy the prepare statements fail
connect_errno) { echo "Failed to connect to MySQL: (" . $mysqli->connect_errno . ") " . $mysqli->connect_error; } if (!($stmt = $mysqli->prepare("SELECT t0.id AS id1, t0.product AS product2, t0.name AS name3, t0.environment AS environment4, t0.whitelist_users AS whitelist_users5, t0.blacklist_users AS blacklist_users6, t0.percentage AS percentage7, t0.start_date AS start_date8, t0.end_date AS end_date9, t0.min_version AS min_version10, t0.max_version AS max_version11, t0.install_date AS install_date12 FROM FeatureToggles t0 WHERE t0.product = ? AND t0.name = ? AND t0.environment = ? LIMIT 1"))) { echo "Prepare failed: (" . $mysqli->errno . ") " . $mysqli->error; } Prepare failed: (1045) Command not supported[root@cfcg-fl1-1 ~]#The text was updated successfully, but these errors were encountered: