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 Soenke Ruempler - NorthClick <soenke.ruempler@northclick.de>
Full name Soenke Ruempler - NorthClick <soenke.ruempler@northclick.de>
Date 2006-11-17 08:31:55 PST
Message Soenke Ruempler - NorthClick <> wrote on Friday, November 17, 2006 5:22 PM:

> Ron Rademaker <mailto:r.rademak​er@virtualbuilding.n​l> wrote on
> Friday, November 17, 2006 5:15 PM:
>
>> I guess the options from the runtime conf will be set later? (Just
>> in case anyone ever wants to override the default).
>
> Currently not, but it should, yes.
>
> I don't know if PDO makes a difference between
> driver-specific options and
> global attributes like "PDO::ATTR_EMULATE_PREPARES". Are the
> constructor-options from $driver_options the same as those
> are passed to
> PDO::setAttribute()?

Yes they are. Finally:

Index: Propel.php
====================​====================​====================​=======
--- Propel.php (revision 497)
+++ Propel.php (working copy)
@@ -429,8 +429,16 @@
                        $user = isset($conparams['user']) ?
$conparams['user'] : null;
                        $password = isset($conparams['password']) ?
$conparams['password'] : null;

+ $driver_options = array();
+
+ // Toggle PS Emulation for MySQL driver as the
native server-side
+ // implementation seems to be buggy and slow.
+ // This can be overridden in the connection
parameters
+ if (strpos($conparams['dsn'], 'mysql') === 0) {
+ $driver_options[PDO​::ATTR_EMULATE_PREPA​RES]
= true;
+ }
+
                        // load any driver options from the INI file
- $driver_options = array();
                        if ( isset($conparams['options']) &&
is_array($conparams['options']) ) {
                                try {
                                        self::processDriverOptions(
$conparams['options'], $driver_options );

-soenke