ID: 50323 Updated by: f...@php.net Reported By: winner5 at interia dot pl Status: Open Bug Type: PDO related Operating System: Linux PHP Version: 5.3.1 New Comment:
Yes, I'm terribly sorry. To be more on-topic then, afaik SQLite doesn't even allow ';' as part of either database or table name, so I was under the impression mysql wasn't either. Verified on 5.2.6-1+lenny3 Problem seems to lie somewhere in ext/pdo/pdo_dbh.c in dbh_constructor fwiw. Previous Comments: ------------------------------------------------------------------------ [2009-11-29 21:29:20] kelt3we at gmail dot com This is by no means a proper way to provide feedback to a bug report, even if the user's claim is wrong. Next time remember this is not a humor site ;-) ------------------------------------------------------------------------ [2009-11-29 14:51:23] f...@php.net IBTB (In before the bogus): http://xkcd.com/327/ ------------------------------------------------------------------------ [2009-11-29 14:09:18] alfredorj at walla dot com Why do you don't go to see if I'm on the corner? This bug is not a bug! Who does make a database with ";" chars? You are a really loser. ------------------------------------------------------------------------ [2009-11-29 13:25:13] winner5 at interia dot pl Description: ------------ There is no way to escape semicolon in dsn to be treated like a char, not as a separator. Reproduce code: --------------- <?php $pdo = new PDO('mysql:host=localhost;dbname=t\\;', 'user', 'pass'); ?> Expected result: ---------------- Successfully established connection Actual result: -------------- Fatal error: Uncaught exception 'PDOException' with message 'SQLSTATE[42000] [1049] Unknown database 't\'' in ./index.php:1 Stack trace: #0 ./index.php(1): PDO->__construct('mysql:host=loca...', 'user', 'pass') #1 {main} thrown in ./index.php on line 1 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=50323&edit=1