From:             cap at unagon dot com
Operating system: Redhat 3 Enterprise
PHP version:      5.2.5
PHP Bug Type:     MySQLi related
Bug description:  error in prepare but mysqli_error is empty

Description:
------------
if there is an obvious error in a prepare statement, the error is
recognized correctly but mysqli_error is the empty string

Reproduce code:
---------------
     $stmt=DB::$mysqli->prepare ('INSERT INTO TYPES (TYPENAME,TYPESPEC)
VALUES (?,?,ppp)');
      if (!$stmt) {throw new Exception ("Error: Prepare failed in
registerType: ".(DB::$mysqli->error));}   

Expected result:
----------------
Expecting an exception to be thrwon with a text containing some meaningful
error description

Actual result:
--------------
Exception is thrown, but error is empty and errno is 0.

-- 
Edit bug report at http://bugs.php.net/?id=44766&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=44766&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=44766&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=44766&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=44766&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=44766&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=44766&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=44766&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=44766&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=44766&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=44766&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=44766&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=44766&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=44766&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=44766&r=php4
Daylight Savings:             http://bugs.php.net/fix.php?id=44766&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=44766&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=44766&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=44766&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=44766&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=44766&r=mysqlcfg

Reply via email to