Edit report at https://bugs.php.net/bug.php?id=65411&edit=1

 ID:                 65411
 Updated by:         johan...@php.net
 Reported by:        tecdoc at ukr dot net
 Summary:            die() don't terminate the current script if
                     mysqli::query use MYSQLI_USE_RESULT
 Status:             Not a bug
 Type:               Bug
 Package:            MySQLi related
 Operating System:   Windows 7 32bit
 PHP Version:        Irrelevant
 Block user comment: N
 Private report:     N

 New Comment:

Why do you request lots of data if you don't use it?


Previous Comments:
------------------------------------------------------------------------
[2013-08-07 11:59:49] tecdoc at ukr dot net

because you do script on table with small count of rows
do you try did script when table have more than 3 000 000 rows?

------------------------------------------------------------------------
[2013-08-07 10:04:14] johan...@php.net

After fixing the error and escaping the ' in the die call 
   die('why don\'t terminated script?');
the script works as expected. I don't now what effect you see as "not 
terminating"

------------------------------------------------------------------------
[2013-08-07 08:55:40] tecdoc at ukr dot net

Description:
------------
Tested on PHP version is 5.4.16 and 5.3.13

die() don't terminate the current script when mysqli::query use 
MYSQLI_USE_RESULT

---
>From manual page: http://www.php.net/mysqli.query#refsect1-mysqli.query-seealso
---

Test script:
---------------
$mysqli = new mysqli('localhost', 'root', '', 'db1');
if (!$mysqli->set_charset("utf8"))
    die('Set Charset Error: ' . $mysqli->error);

// tab - it is a table that have more than 3 000 000 rows
$q = "SELECT * FROM tab1";

// open query and try close all
$result = $mysqli->query($q, MYSQLI_USE_RESULT);
$result->free();
$mysqli->close();
die('why don't terminated script?');

// this end of script don't terminate also
$result = $mysqli->query($q, MYSQLI_USE_RESULT);
$result->free();
$thread = $mysqli->thread_id;
$mysqli->kill($thread);
$mysqli->close();
die('why don't terminated script?');




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



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

Reply via email to