Re: mysqlnd_qc (mysqlnd query cache) 1.0.1 with prepared statement support
| From: | Lukas Kahwe Smith | Date: | Tue, 13 Jul 2010 21:30:09 +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 | Groups: | php.pdo |
| Request: | Send a blank email to pdo+get-467@lists.php.net to get a copy of this message | ||
On 13.07.2010, at 23:27, Ulf Wendel wrote:
> Lukas Kahwe Smith schrieb:
>> On 13.07.2010, at 21:16, Ulf Wendel wrote:
>>> Lukas Kahwe Smith schrieb:
>>>> On 13.07.2010, at 19:55, Ulf Wendel wrote:
>>>>> Lukas Kahwe Smith schrieb:
>>>>>> On 13.07.2010, at 19:26, Ulf Wendel wrote:
>>>>>>> Benjamin Eberlei schrieb:
>>>>>>>> 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.
>>>>>> by default? since when?
>>>>> Since when does it not?
>>>>>
>>>> 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.
>>> 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.
>> 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.
>
> 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?
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.
regards,
Lukas Kahwe Smith
mls@pooteeweet.org