ID:               48859
 Updated by:       ka...@php.net
 Reported By:      techi at techi dot name
-Status:           Open
+Status:           Analyzed
 Bug Type:         PDO related
 Operating System: all
 PHP Version:      5.2.10
 New Comment:

The question here is trival, because internally we use
mysql_options(MYSQL_INIT_COMMAND) which does not support multiple
queries then. We could probably work around it with some hackish code,
but I'll leave this up to the mysql guys to judge


Previous Comments:
------------------------------------------------------------------------

[2009-07-08 22:59:46] techi at techi dot name

Description:
------------
When using intial SQL query with PDO::MYSQL_ATTR_INIT_COMMAND, only one

query can be queried. More queries throws exception SQLSTATE[HY000]: 
General error: 2014

I am not sure, if this is bug or feature or some PDO limitation, but 
sometimes more than one initial query is needed

Reproduce code:
---------------
$pdo = new PDO( 
    'mysql:host=hostname;dbname=defaultDbName', 
    'username', 
    'password', 
    array(PDO::MYSQL_ATTR_INIT_COMMAND => "SET NAMES utf8;SET time_zone
= 'Europe/Prague'") 
); 


Actual result:
--------------
SQLSTATE[HY000]: General error: 2014


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=48859&edit=1

Reply via email to