Re: mysqlnd_qc (mysqlnd query cache) 1.0.1 with prepared statement support
| From: | Ulf Wendel | Date: | Tue, 13 Jul 2010 21:42:18 +0000 |
| Subject: | Re: mysqlnd_qc (mysqlnd query cache) 1.0.1 with prepared statement support | ||
| References: | 1 2 3 4 5 6 7 8 9 10 | Groups: | php.pdo |
| Request: | Send a blank email to pdo+get-468@lists.php.net to get a copy of this message | ||
Lukas Kahwe Smith schrieb:
On 13.07.2010, at 23:27, Ulf Wendel wrote:Well, check the source. It will tell you. Emulation is not a default for all drivers. Its a driver decision. http://lxr.php.net/xref/PHP_5_2/ext/pdo_mysql/mysql_driver.c#474 http://lxr.php.net/xref/PHP_5_3/ext/pdo_mysql/mysql_driver.c#617 No change from 5.2 to 5.3. UlfLukas Kahwe Smith schrieb:ok moving the discussion to the pdo list. i guess first up we need to confirm if this is a general default or just the mysql default and when this all changed.On 13.07.2010, at 21:16, Ulf Wendel wrote:You are not the first one to be surprised about the status quo and you are certainly an insider. Yes, the PDO emulation is not the most sophisticated one. But I don't need to tell you about the shortcomings of the MySQL server and the drawbacks of native prepared statements. Although PDO_MYSQL will fallback to non-prepared statements, if the server hints that a statement cannot be prepared this does not solve the issue with the MySQL (Server) Query Cache for many. Also, the extra round trip to find out that a statement cannot be prepared is not desired. It is not an easy decision. Especially for me who always yells about abusing PS for security... How to move forward: improve documentation?Lukas Kahwe Smith schrieb:The documentation also only talks about emulation being used in case its not natively available. I have not looked at the source, but if indeed this has changed, then it ought to be documented and I am not sure I really like this change, especially in light of the rather crude and flaky parser used and the simplistic quoting logic used.On 13.07.2010, at 19:55, Ulf Wendel wrote:Well, a blog post... one would have to check the CVS log but I'm too lazy/tired... To add one "I recall and in this blog...", emulation should have been the default when we started adding mysqlnd support in mid 2008. Whenever... Question is if and when to disable the emulation default in favour of native PS. The answer may be a bit like with ext/mysql, it may be: fear the installed user base.Lukas Kahwe Smith schrieb:good question. it certainly didnt in the beginning: http://netevil.org/uuid/444a6017-0548-2459-2943-44a601714d58 as you can see the feature was added later on and had to be enabled manually.On 13.07.2010, at 19:26, Ulf Wendel wrote:Since when does it not?Benjamin Eberlei schrieb:by default? since when?Actually missing prepared statements and unbuffered queries were the only issues I had with the Query Cache so far. Can i compile the Mysqlnd + Query Cache PECL Trunk against 5.3.99-DEV only to test it?... remember that PDO emulates prepared statements by default.