#31526 [Opn->Asn]: mysqli_stmt_bind_param with SELECT crashes Apache2

From: Date: Fri, 04 Feb 2005 14:05:42 +0000
Subject: #31526 [Opn->Asn]: mysqli_stmt_bind_param with SELECT crashes Apache2
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-73463@lists.php.net to get a copy of this message
 ID:               31526
 Updated by:       georg@php.net
 Reported By:      wyatt dot mike at gmail dot com
-Status:           Open
+Status:           Assigned
 Bug Type:         MySQLi related
 Operating System: Windows XP SP2
 PHP Version:      5.0.3
-Assigned To:      
+Assigned To:      georg
 New Comment:

 


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

[2005-01-13 06:48:53] wyatt dot mike at gmail dot com

Description:
------------
the tables contain two fields, each with 10000 rows where the names are
just 10-digit numbers

when I use the mysqli_stmt_bind_param, I get the 'memory could not be
"read"' error, when not used I get no error

Reproduce code:
---------------
<?php
$db = new mysqli("localhost","root","","test");
$tables =
array('t_0','t_1','t_2','t_3','t_5','t_all');
foreach($tables AS $table){
	$stmt[$table] = $db->stmt_init();
	$stmt[$table]->prepare("SELECT id, name FROM " . $table . " WHERE name
= ?");
	$stmt[$table]->bind_param('i',$name);
}
for($i = 0;$i < 10;$i++){
	$name = "";
	for($j = 0;$j < 10;$j++){
		$name .= rand(0,9);
	}

	foreach($tables AS $table){
		$stmt[$table]->execute();
	}
}
$db->close();
?>

Actual result:
--------------
'The instruction "0x00df82df" referenced memory at "0x0000000064". The
memory could not be "read".'


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


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


Thread (4 messages)

« previous php.bugs (#73463) next »