ID:               44274
 Updated by:       [EMAIL PROTECTED]
 Reported By:      cadastro at luciana dot pro dot br
-Status:           Open
+Status:           Feedback
 Bug Type:         MySQLi related
 Operating System: linux
 PHP Version:      5.2.5
 New Comment:

 Hi,
I can't reproduce it with CVS of 5.3 and 5.2
I used the following test case

<?php
class myclass extends mysqli {
  function connect() {
    parent::connect( "localhost", "root", "xxx" );
  }
  function kill() {
    var_dump($this->thread_id);
    parent::kill( $this->thread_id ); // <<<<< BUG!! 
  }
}
$a = new myclass();
$a->connect();
$a->kill();
?>

Output:
int(1834)

Then I check with SHOW PROCESSLIST what are the running processes -
nothing is left.



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

[2008-02-27 21:03:04] cadastro at luciana dot pro dot br

PHP Version 5.2.0-8+etch10

compile date: 2008-01-18

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

[2008-02-27 21:01:44] cadastro at luciana dot pro dot br

Description:
------------
 Fixed bug #28430 (Extending mysqli class). (Georg)

this fix is SO NOT TRUE !!

The bug is STILL THERE THE SAME AS IT WAS 4 YEARS AGO !!!



I CAN'T GET THE THREAD_ID VALUE !! AND THAT'S CAUSING A BIG ISSUE :

I OPEN CONNECTION, USE AND CLOSE IT. IT ACTUALLY CLOSES (I TESTED), BUT
IT LETS AN ORPHAN >>>> THREAD <<<< IN MEMORY - WHICH IS CONSUMING
RESOURCES UNTIL MAX THREAD OF MYSQL IS REACHED, MAKING MYSQL GO DOWN
WHEN IT HAPPENS. 

TO FIX IT I NEED TO MANUALLY KILL THE THREAD THAT IS NOT BEEING CLOSED
BY MYSQLI! BUT HOW IF THE THING IS BUGGED?! :/

I HOPE IT GETS REALLY FIXED !!

THANKS!



Reproduce code:
---------------
EXAMPLE FOR TESTING THE BUG :

--------------------------------------------------------
myclass inherits mysqli {

function connect() {
     
     parent::connect( <conection stuff> );
}


function kill() {
     
     parent::kill( parent::thread_id ); // <<<<< BUG!! 
}

}
--------------------------------------------


Expected result:
----------------
I expect the thread to be REMOVED FROM MEMORY !!!

Actual result:
--------------
MYSQLI is letting OPRHAN THREADS in memory, and if mysql limit is 100
and I reload page 100 times, it will take mysql off business :/


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


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

Reply via email to