|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2009-04-03 19:39 UTC] johannes@php.net
[2009-04-06 07:09 UTC] jan dot schmidt at vitronic dot de
[2009-04-06 07:16 UTC] pajoye@php.net
[2009-04-06 09:12 UTC] jan dot schmidt at vitronic dot de
[2009-04-30 10:47 UTC] jani@php.net
[2009-04-30 12:34 UTC] jan dot schmidt at vitronic dot de
[2009-12-08 23:19 UTC] felipe@php.net
[2009-12-16 01:00 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sat Dec 06 08:00:01 2025 UTC |
Description: ------------ I'm running an Apache 2.2.9 Webserver and a MySQL 5.1.31 Database and want to insert a lot of rows over PDO MySQL Extension. But if the testscript is very often requested, php crashes while preparing a statement. I find out that the easiest way to reproduce the crash is to open the testscript in firefox and keep the F5 Key pressed. For the backtrace i used the php 5.2 snap from 2009-04-01. Only the pdo and pdo_mysql extensions are loaded. Reproduce code: --------------- <?php $dbhandle = new PDO('mysql:host=localhost', 'root', 'mypass',array(PDO::ATTR_PERSISTENT => true)); $dbhandle->exec('SET CHARACTER SET utf8'); $dbhandle->exec('CREATE DATABASE testdb'); $dbhandle->exec('CREATE TABLE testdb.testtable(id bigint(20) NOT NULL AUTO_INCREMENT, testcol text collate utf8_unicode_ci NOT NULL, PRIMARY KEY(id))'); for($i = 0;$i < 100;$i++) { $stmt = $dbhandle->prepare('INSERT INTO testdb.testtable (testcol) VALUES (:testcol)'); $stmt->bindValue(':testcol','testentrie nr '.$i,PDO::PARAM_STR); $stmt->execute(); } ?> Expected result: ---------------- Script insert 100 rows to Table testtable. Actual result: -------------- Script Crashes Backtrace: _zend_mm_free_int(_zend_mm_heap * 0x0110faf8, void * 0x002e0000) line 1974 + 132 bytes _efree(void * 0x00fb5200) line 2306 + 11 bytes _zval_ptr_dtor(_zval_struct * * 0x0558fa8c) line 415 + 37 bytes zend_std_write_property(_zval_struct * 0x015e2b9a, _zval_struct * 0x05d6d530, _zval_struct * 0x00fb5200, void * * * 0x05d6d230) line 417 + 12 bytes pdo_stmt_construct(_pdo_stmt_t * 0x015e2a0d, _zval_struct * 0x05d6d348, _zend_class_entry * 0x05d6d530, _zval_struct * 0x00fb5090, void * * * 0x00000000) line 447 zim_PDO_prepare(int 7916969, _zval_struct * 0x00fb5090, _zval_struct * * 0x05d6d530, _zval_struct * 0x00000000, int 93948008, void * * * 0x00000001) line 581 + 22 bytes zend_do_fcall_common_helper_SPEC(_zend_execute_data * 0x0078c5c5, void * * * 0x0558fbb0) line 200 + 61 bytes ZEND_DO_FCALL_BY_NAME_SPEC_HANDLER(_zend_execute_data * 0x0558fbb0, void * * * 0x0110ece0) line 322 + 17 bytes execute(_zend_op_array * 0x0082e6fd, void * * * 0x00000008) line 92 + 12 bytes php_execute_script(_zend_file_handle * 0x05d6d4dc, void * * * 0x00000000) line 2023 + 18 bytes 05d6d19c() 05d6d190() PHP_PDO! pdo_row_object_handlers + 200 bytes