Mantis - Quercus
Viewing Issue Advanced Details
3300 minor always 01-28-09 05:01 01-28-09 08:02
tolmi  
 
normal  
new 3.2.1  
open  
none    
none  
0003300: mysqli_errno returns 0 when error happened
mysql_errno and mysqli_errno should return a non-zero value when something went wrong on the last time a mysql function was used.

This turned out while running Drupal on Quercus and the database went offline. Drupal checks mysqli_errno() to be bigger than zero.

Attached a patch to fix the issue.
 mysqli_errno_fix.patch [^] (1,128 bytes) 01-28-09 05:01

Notes
(0003782)
tolmi   
01-28-09 08:02   
I re-read my description and the errno functions are incorrect. mysql_errno() in this case irrelevant, and mysqli_errno should not be used to check if the connection had any errors. Instead the mysqli_connect_errno() should be used.

Of course the problem still exists, the patch fixes it anyway I just wanted to clarify.