ID:               35155
 User updated by:  f dot engelhardt at 21torr dot com
 Reported By:      f dot engelhardt at 21torr dot com
 Status:           Assigned
 Bug Type:         MySQLi related
 Operating System: Linux 2.6
 PHP Version:      5CVS-2005-11-09 (snap)
 Assigned To:      georg
 New Comment:

This Problem is very annoying, becouse i am using innodb tables with
foreign key constraints, and if i use mysqli_stmt_send_long_data() for
any of the fields, all the other arent NULL anymore. So my constraint
fails!

Example:
<?php

$GLOBALS['CONN'] = mysqli_connect(...);

mysqli_select_db(..);

$s =
file_get_contents('/usr/portage/distfiles/vim-runtime-20050601.tar.bz2')
;

$one = NULL;
$two = NULL;

$q = 'INSERT INTO dbfs_data_chunk VALUES (?,?,?)';
$stmt = mysqli_stmt_init($GLOBALS['CONN']);
mysqli_stmt_prepare($stmt,$q);
mysqli_stmt_bind_param($stmt,'iib',$one,$two,$s);
//mysqli_stmt_send_long_data($stmt,2,$s);
mysqli_stmt_execute($stmt);
mysqli_stmt_close($stmt);

exit;

?>

without mysqli_stmt_send_long_data() i have the problem as described,
and with mysqli_stmt_send_long_data() on the blob field, mysql tells
me, that the constraint gets violated!
This can only happen, if the variables $one and $two are not  NULL.


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

[2005-11-08 23:28:54] [EMAIL PROTECTED]

Assigned to the maintainer.

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

[2005-11-08 23:26:59] f dot engelhardt at 21torr dot com

it doesn´t work, but the behavior changed a little:
Every insert without mysqli_stmt_send_long_data()
inserts 0 Bytes into the blob field, with this function
it works as in the other version (5.0.5)

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

[2005-11-08 17:43:53] [EMAIL PROTECTED]

Please try using this CVS snapshot:

  http://snaps.php.net/php5-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5-win32-latest.zip



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

[2005-11-08 17:06:50] f dot engelhardt at 21torr dot com

it seems to work with mysqli_stmt_send_long_data(), but it has to work
without, as the doc says, you only have to use it, if you send data
larger than max_allowed_packet. This value is set to 16M, that data is
only 2mb.

Kind regards

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

[2005-11-08 17:06:19] [EMAIL PROTECTED]

RTFM:

http://www.php.net/manual/en/function.mysqli-stmt-send-long-data.php

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

The remainder of the comments for this report are too long. To view
the rest of the comments, please view the bug report online at
    http://bugs.php.net/35155

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

Reply via email to