ID:               29019
 User updated by:  cyberlot at cyberlot dot net
 Reported By:      cyberlot at cyberlot dot net
 Status:           Open
 Bug Type:         MySQL related
 Operating System: Fedora Core 2
 PHP Version:      5.0.0RC3
 New Comment:

My C more then sucks so excuse me for even trying..

in mysqli.c intern->zo.ce = class_type;

intern->zo.ce is only used 4 places in mysqli.c
1. When you assign it
2. stmt and result entrys, not changed my extending the class
3. line 135, when closing the object, In this same statement you also
run mysql_close.

This if statement is returning false because
intern->zo.ce == mysqli_link_class_entry is wrong, by extending the
class I have changed the class type therefore breaking the closing of
the object.

I hope this helps fix the problem


Previous Comments:
------------------------------------------------------------------------

[2004-07-05 19:51:23] cyberlot at cyberlot dot net

narrowed the problem down further, Its directly related to me trying to
extend the mysqli class. If I take out the extend it closes properly, If
I put in the extend with no functions at all it does not close properly

So
<?
$mysqli = new
extend_mysqli('localhost','billing','billing','billing');
if (mysqli_connect_errno()) {
    printf("Connect failed: %s\n", mysqli_connect_error());
    exit();
}
?>
Connection does not close properly
<?
$mysqli = new mysqli('localhost','billing','billing','billing');
if (mysqli_connect_errno()) {
    printf("Connect failed: %s\n", mysqli_connect_error());
    exit();
}
?>
Connection does close properly.

------------------------------------------------------------------------

[2004-07-05 19:39:22] cyberlot at cyberlot dot net

Description:
------------
mysqli, using class interface not not closing connection at end of
script unless you specificly call $mysqli->close

This is a change of behavior from the normal mysql extension which does
not "require" you to close connection.

Reproduce code:
---------------
<?
$mysqli = new
extend_mysqli('localhost','billing','billing','billing');
if (mysqli_connect_errno()) {
    printf("Connect failed: %s\n", mysqli_connect_error());
    exit();
}
?>

Expected result:
----------------
Every time its run it should release the database connection

Actual result:
--------------
Each time you run it a new db connection is done until you max out the
mysql server.


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=29019&edit=1

Reply via email to