Bug #79808 [NEW]: fetch General error
| From: | admin at yurunsoft dot com | Date: | Wed, 08 Jul 2020 08:53:36 +0000 |
| Subject: | Bug #79808 [NEW]: fetch General error | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-227882@lists.php.net to get a copy of this message | ||
From: admin at yurunsoft dot com
Operating system: Linux
PHP version: 8.0.0alpha1
Package: PDO MySQL
Bug Type: Bug
Bug description:fetch General error
Description:
------------
The bug is only in php8
Test script:
---------------
<?php
$pdo = new
PDO('mysql:host=192.168.0.222;port=3306;dbname=db_imi_test;charset=utf8',
'root', 'root');
$stmt = $pdo->query('update tb_article set id = 1 where id = 1');
var_dump($stmt);
var_dump($stmt->fetch());
Expected result:
----------------
object(PDOStatement)#2 (1) {
["queryString"]=>
string(41) "update tb_article set id = 1 where id = 1"
}
bool(false)
Actual result:
--------------
object(PDOStatement)#2 (1) {
["queryString"]=>
string(40) "update tb_member set id = 1 where id = 1"
}
Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error in
/mnt/d/projects/imi/test2.php:5
Stack trace:
#0 /mnt/d/projects/imi/test2.php(5): PDOStatement->fetch()
#1 {main}
thrown in /mnt/d/projects/imi/test2.php on line 5
--
Edit bug report at https://bugs.php.net/bug.php?id=79808&edit=1
--
Fix committed: https://bugs.php.net/fix.php?id=79808&r=fixed
Fixed in release: https://bugs.php.net/fix.php?id=79808&r=alreadyfixed
Need backtrace: https://bugs.php.net/fix.php?id=79808&r=needtrace
Need Reproduce Script: https://bugs.php.net/fix.php?id=79808&r=needscript
Try newer version: https://bugs.php.net/fix.php?id=79808&r=oldversion
Not developer issue: https://bugs.php.net/fix.php?id=79808&r=support
Expected behavior: https://bugs.php.net/fix.php?id=79808&r=notwrong
Not enough info: https://bugs.php.net/fix.php?id=79808&r=notenoughinfo
Submitted twice: https://bugs.php.net/fix.php?id=79808&r=submittedtwice
register_globals: https://bugs.php.net/fix.php?id=79808&r=globals
PHP version support discontinued: https://bugs.php.net/fix.php?id=79808&r=phptooold
Daylight Savings: https://bugs.php.net/fix.php?id=79808&r=dst
IIS Stability: https://bugs.php.net/fix.php?id=79808&r=isapi
Install GNU Sed: https://bugs.php.net/fix.php?id=79808&r=gnused
Floating point limitations: https://bugs.php.net/fix.php?id=79808&r=float
No Zend Extensions: https://bugs.php.net/fix.php?id=79808&r=nozend
MySQL Configuration Error: https://bugs.php.net/fix.php?id=79808&r=mysqlcfg