Bug #71916 [NEW]: Two attribute constants use the same value
| From: | downsider84 at hotmail dot com | Date: | Tue, 29 Mar 2016 11:34:04 +0000 |
| Subject: | Bug #71916 [NEW]: Two attribute constants use the same value | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-200208@lists.php.net to get a copy of this message | ||
From: downsider84 at hotmail dot com
Operating system: Irrelevant
PHP version: 7.0.4
Package: PDO Core
Bug Type: Bug
Bug description:Two attribute constants use the same value
Description:
------------
The constants MYSQL_ATTR_USE_BUFFERED_QUERY and
PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT have the same value, 1000.
Setting MYSQL_ATTR_USE_BUFFERED_QUERY when using the pgsql driver causes
a "deprecated" warning about
PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT. This is non-obvious and
potentially difficult to debug.
Test script:
---------------
ini_set("display_errors", 1);
error_reporting(E_ALL);
// change credentials as appropriate
$dbName = "test";
$host = "locahost";
$username = "root";
$password = "";
$pdo = new \PDO("pgsql:$dbName=db;host=$host", $username, $password);
$pdo->setAttribute(\PDO:MYSQL_ATTR_USE_BUFFERED_QUERY, true);
Expected result:
----------------
Deprecated: PDO::setAttribute():
PDO::PGSQL_ATTR_DISABLE_NATIVE_PREPARED_STATEMENT is deprecated, use
PDO::ATTR_EMULATE_PREPARES instead in [filename] on line [lineno]
--
Edit bug report at https://bugs.php.net/bug.php?id=71916&edit=1
--
Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=71916&r=trysnapshot54
Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=71916&r=trysnapshot55
Try a snapshot (trunk): https://bugs.php.net/fix.php?id=71916&r=trysnapshottrunk
Fixed in SVN: https://bugs.php.net/fix.php?id=71916&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=71916&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=71916&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=71916&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=71916&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=71916&r=support
Expected behavior: https://bugs.php.net/fix.php?id=71916&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=71916&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=71916&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=71916&r=globals
PHP 4 support discontinued: https://bugs.php.net/fix.php?id=71916&r=php4
Daylight Savings: https://bugs.php.net/fix.php?id=71916&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=71916&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=71916&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=71916&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=71916&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=71916&r=mysqlcfg