crash. when sql syntax is invalid
| Bug #41596 | crash. when sql syntax is invalid | ||||
|---|---|---|---|---|---|
| Submitted: | 2007-06-05 10:48 UTC | Modified: | 2007-06-05 22:56 UTC | ||
| From: | develar at gmail dot com | Assigned: | iliaa (profile) | ||
| Status: | Closed | Package: | PDO related | ||
| PHP Version: | 5.2.3 | OS: | Windows XP SP2 | ||
| Private report: | No | CVE-ID: | None | ||
[2007-06-05 10:48 UTC] develar at gmail dot com
Description:
------------
'delete from users."users where id = :id' is wrong, must be 'delete from users."users" where id = :id', but why pdo crash.
Reproduce code:
---------------
<?php
$Db = new PDO('pgsql:host=192.168.0.66;dbname=test', 'postgres', 'password');
$Db->setAttribute(PDO::ATTR_DEFAULT_FETCH_MODE, PDO::FETCH_ASSOC);
$Db->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_WARNING);
$Pdo = $Db->prepare('delete from users."users where id = :id');
$Pdo->bindValue(':id', 45, PDO::PARAM_INT);
$Pdo->execute();
?>
Expected result:
----------------
not crash
Actual result:
--------------
crash
Patches
Pull Requests
History
AllCommentsChangesGit/SVN commits
[2007-06-05 11:03 UTC] develar at gmail dot com
[2007-06-05 15:20 UTC] develar at gmail dot com
[2007-06-05 17:00 UTC] develar at gmail dot com
[2007-06-05 22:56 UTC] iliaa@php.net