Login | Register
My pages Projects Community openCollabNet

propel
Reply to message

* = Required fields
* Subject
* Body
Attachments
Send reply to
Topic
Author (directly in email)
Please type the letters in the image above.

Original message

Author hlellelid
Full name Hans Lellelid
Date 2006-11-17 08:02:56 PST
Message Hi Soenke,

Oh, ok -- I was thinking we would set it in Propel class (probably
getConnection() method?), but this certainly works too. I don't know if
there's an advantage to one over the other.

Hans

Soenke Ruempler - NorthClick wrote:
> Hans Lellelid <mailto:hans at velum dot net> wrote on Friday, November 17, 2006
> 3:19 PM:
>
>
>> Thanks, Soenke, you beat me too it :)
>>
>> Yeah, maybe we could do that by default for MySQL, though it does
>> seem like a bit of a hack. We should probably issue a debug logging
>> statement indicating that we're doing that, if we do turn
>> that on behind
>> the scenes. If you want to look into it, I'd be grateful, as I'm
>> probably not going to get to it today otherwise.
>>
>
> I guess for beta-testing this "hack"/workaround without logging should be
> enough, shouldn't it?
>
> Index: PropelPDO.php
> ====================​====================​====================​=======
> --- PropelPDO.php (revision 497)
> +++ PropelPDO.php (working copy)
> @@ -41,6 +41,22 @@
> class PropelPDO extends PDO {
>
> /**
> + * The constructor - currently just for a MySQL driver workaround
> + *
> + */
> + public function __construct($dsn, $username = null, $password =
> null, array $driver_options = array()) {
> +
> + parent::__construct($dsn, $username, $password,
> $driver_options);
> +
> + // Toggle PS Emulation for MySQL driver as the native
> server-side
> + // implementation seems to be buggy and slow
> + if ($this->getAttri​bute(PDO::ATTR_DRIVE​R_NAME) == 'mysql') {
> + $this->setAttrib​ute(PDO::ATTR_EMULAT​E_PREPARES,
> true);
> + }
> +
> + }
> +
> + /**
> * The current transaction depth.
> * @var int
> */
>
> If no one complains, I'll create a ticket and commit the patch.
>
> -soenke
>
> --------------------​--------------------​--------------------​---------
> To unsubscribe, e-mail: dev-unsubscribe@prop​el.tigris.org
> For additional commands, e-mail: dev-help at propel dot tigris dot org
>
>