Bug #76400 [NEW]: PDO cannot caught mysql error 1690:bigint unsigned value is out of range

From: Date: Fri, 01 Jun 2018 06:51:06 +0000
Subject: Bug #76400 [NEW]: PDO cannot caught mysql error 1690:bigint unsigned value is out of range
Groups: php.bugs 
Request: Send a blank email to php-bugs+get-215464@lists.php.net to get a copy of this message
From: kadovat at gmail dot com Operating system: Linux PHP version: 5.6.36 Package: PDO MySQL Bug Type: Bug Bug description:PDO cannot caught mysql error 1690:bigint unsigned value is out of range Description: ------------ PDO doesn't throw an exception when occurs mysql error 1690:bigint unsigned value is out of range,just return an empty array Test script: --------------- # CREATE TABLE test (id int(10) unsigned DEFAULT NULL, pv int(10) unsigned DEFAULT NULL,yesterday_pv int(10) unsigned DEFAULT NULL) ENGINE=InnoDB DEFAULT CHARSET=utf8 #insert into test set id=1,pv=1,yesterday_pv=2; <?php $dbh = new PDO("mysql:host=localhost;port=3306;dbname=testdb","root"); $sth = $dbh->prepare('select id,pv-yesterday_pv from test'); $sth->execute(); $result = $sth->fetchAll(); var_dump($result); Expected result: ---------------- throw a PDOException Actual result: -------------- array(0) { } -- Edit bug report at https://bugs.php.net/bug.php?id=76400&edit=1 -- Try a snapshot (PHP 5.4): https://bugs.php.net/fix.php?id=76400&r=trysnapshot54 Try a snapshot (PHP 5.5): https://bugs.php.net/fix.php?id=76400&r=trysnapshot55 Try a snapshot (trunk): https://bugs.php.net/fix.php?id=76400&r=trysnapshottrunk Fixed in SVN: https://bugs.php.net/fix.php?id=76400&r=fixed Fixed in release: https://bugs.php.net/fix.php?id=76400&r=alreadyfixed Need backtrace: https://bugs.php.net/fix.php?id=76400&r=needtrace Need Reproduce Script: https://bugs.php.net/fix.php?id=76400&r=needscript Try newer version: https://bugs.php.net/fix.php?id=76400&r=oldversion Not developer issue: https://bugs.php.net/fix.php?id=76400&r=support Expected behavior: https://bugs.php.net/fix.php?id=76400&r=notwrong Not enough info: https://bugs.php.net/fix.php?id=76400&r=notenoughinfo Submitted twice: https://bugs.php.net/fix.php?id=76400&r=submittedtwice register_globals: https://bugs.php.net/fix.php?id=76400&r=globals PHP 4 support discontinued: https://bugs.php.net/fix.php?id=76400&r=php4 Daylight Savings: https://bugs.php.net/fix.php?id=76400&r=dst IIS Stability: https://bugs.php.net/fix.php?id=76400&r=isapi Install GNU Sed: https://bugs.php.net/fix.php?id=76400&r=gnused Floating point limitations: https://bugs.php.net/fix.php?id=76400&r=float No Zend Extensions: https://bugs.php.net/fix.php?id=76400&r=nozend MySQL Configuration Error: https://bugs.php.net/fix.php?id=76400&r=mysqlcfg

« previous php.bugs (#215464) next »