Edit report at http://bugs.php.net/bug.php?id=53483&edit=1
ID: 53483 Comment by: jbreton at kronostechnologies dot com Reported by: squarious at gmail dot com Summary: using mysqli_stmt::send_long_data() makes execute() fail Status: Open Type: Bug Package: MySQLi related Operating System: linux PHP Version: 5.3.3 Block user comment: N Private report: N New Comment: I am experiencing the same problem, but I'm starting to think it is related to MySQL. I'm also using php5.3.3 and mysql5.1.49, but colleague is using php5.3.3 and mysql5.1.41 and your test passes without any problem. Previous Comments: ------------------------------------------------------------------------ [2010-12-06 12:22:36] squarious at gmail dot com Description: ------------ This bug was found from a framework test units after a system upgrade (ubuntu/10.04 -> ubuntu/10.10). The bug was tracked that the send_long_data() stopped working completely. If I try to use it for large packets, the following execute() command will fail with error "Error executing prepared statement. Incorrect arguments to mysqld_stmt_execute". I made a script that reproduces 100% the bug and I ran it at ubuntu/10.04(php5.3.2, mysql5.1.41) PASS, ubuntu/10.10(php5.3.3, mysql5.1.49) FAIL, debian/squeeze(php5.3.3, mysql5.1.49) FAIL. So I assume its a regression at php's 5.3.3. Test script: --------------- //Full test @ http://codepad.org/eKnJnWnC // Code chunk that trigger the problem. if (!$stmt->bind_param('b', $null)) die("Error binding parameters. {$stmt->error}\n"); foreach(str_split($big_data, $max_allowed_packet) as $packet ) if (!$stmt->send_long_data(0, $packet)) die("Error sending long packet. {$stmt->error}\n"); if (!$stmt->execute()) die("Error executing prepared statement. {$stmt->error}\n"); Expected result: ---------------- OK: Executed prepared statement with blob less than max_allowed_packet. OK: Executed prepared statement with blob bigger than max_allowed_packet, sent at chunks. Actual result: -------------- OK: Executed prepared statement with blob less than max_allowed_packet. Error executing prepared statement. Incorrect arguments to mysqld_stmt_execute ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/bug.php?id=53483&edit=1