List:MySQL and Perl« Previous MessageNext Message »
From:Jochen Wiedmann Date:March 5 2004 7:36pm
Subject:Re: LIMIT clause and placeholders
View as plain text  
Rudy Lippan wrote:

> However, Patrick Galbraith <patg@stripped> submitted a patch for
> serverside placeholder support that also parsed the statement for the
> LIMIT clause and set the placeholders to default to numeric, and another
> bit to turn off server-side prepare on statements that have a LIMIT
> clause, so it looks the driver will end up supporting ?s with LIMITs.

Does that mean, that the client parses the statement without any
serious reason? I would stongly recommend not to accept this part
of the patch. It contradicts the advantages of server side
placeholders, IMO.


> For the LIMITS, instead of parsing the statment looking for them I might
> make DBD::mysql not quote /^(\d+)$/ which would make it work like it did
> (with LIMITS) before the change, and the ints should get casted to VARCHAR
> when used as a param to VARCHAR.

Don't. Go to server side placeholders and leave everything to the
server as soon as possible.


Jochen

Thread
LIMIT clause and placeholdersBeau E. Cox5 Mar
  • Re: LIMIT clause and placeholdersJochen Wiedmann5 Mar
    • Re: LIMIT clause and placeholdersTim Bunce5 Mar
    • Re: LIMIT clause and placeholdersBeau E. Cox5 Mar
      • Re: LIMIT clause and placeholdersRudy Lippan5 Mar
        • Re: LIMIT clause and placeholdersBeau E. Cox5 Mar
          • Re: LIMIT clause and placeholdersRudy Lippan6 Mar
            • Re: LIMIT clause and placeholdersBeau E. Cox6 Mar
        • Re: LIMIT clause and placeholdersJochen Wiedmann5 Mar
          • Re: LIMIT clause and placeholdersGarth Webb5 Mar
            • Re: LIMIT clause and placeholdersGarth Webb5 Mar
              • Re: LIMIT clause and placeholdersDaniel Koch5 Mar
              • Re: LIMIT clause and placeholdersJochen Wiedmann5 Mar
            • Re: LIMIT clause and placeholdersJochen Wiedmann5 Mar
          • Re: LIMIT clause and placeholdersRudy Lippan6 Mar