#39885 [NEW]: memory leak when doing loads of INSERT's and there are duplicate key errors
| From: | jacques@php.net | Date: | Tue, 19 Dec 2006 13:45:47 +0000 |
| Subject: | #39885 [NEW]: memory leak when doing loads of INSERT's and there are duplicate key errors | ||
| Groups: | php.bugs | ||
| Request: | Send a blank email to php-bugs+get-106560@lists.php.net to get a copy of this message | ||
From: jacques@php.net
Operating system: Redhat Linux RHEL4
PHP version: 5.2.0
PHP Bug Type: MySQL related
Bug description: memory leak when doing loads of INSERT's and there are duplicate key errors
Description:
------------
When doing loads of INSERT INTO table VALUES (col1,col2,col3,...) VALUES
(value1, value2, value3, ....) and the row primary key already exists, the
mysql extension leaks memory. If the row does not exist, the mysql
extension does not leak memory.
It uses more than 1.2G+ of RAM.
I've tried using references to the result set etc. and it makes no
difference to the memory utilization.
Reproduce code:
---------------
Working on getting reproduce to contain nothing proprietary.
Expected result:
----------------
I would expect it to continue using around 7Mb of RAM, not 1.2Gb+.
Actual result:
--------------
24968 mysql_ad 16 0 1179m 616m 1188 S 19.0 30.4 1:42.77 php
...
24968 mysql_ad 16 0 1211m 649m 1188 S 5.0 32.0 1:45.73 php
...
24968 mysql_ad 16 0 1284m 721m 1188 R 41.0 35.6 1:52.29 php
...
24968 mysql_ad 16 0 1442m 877m 1188 R 20.6 43.3 2:06.87 php
...
24968 mysql_ad 16 0 1554m 847m 1164 S 38.9 41.8 2:16.74 php
...
24968 mysql_ad 16 0 1601m 894m 1164 S 36.6 44.2 2:20.88 php
...
24968 mysql_ad 16 0 1646m 939m 1164 S 46.6 46.3 2:24.70 php
...
24968 mysql_ad 16 0 2304m 904m 1124 S 62.0 44.7 3:19.94 php
...
24968 mysql_ad 16 0 2359m 960m 1124 S 62.5 47.4 3:24.56 php
...
24968 mysql_ad 16 0 2403m 1.0g 1124 S 61.8 49.6 3:28.30 php
...
24968 mysql_ad 16 0 2436m 1.0g 1124 R 64.2 51.2 3:31.10 php
...
24968 mysql_ad 16 0 2481m 1.1g 1124 R 62.5 53.4 3:34.84 php
--
Edit bug report at http://bugs.php.net/?id=39885&edit=1
--
Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=39885&r=trysnapshot44
Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=39885&r=trysnapshot52
Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=39885&r=trysnapshot60
Fixed in CVS: http://bugs.php.net/fix.php?id=39885&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=39885&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=39885&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=39885&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=39885&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=39885&r=support
Expected behavior: http://bugs.php.net/fix.php?id=39885&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=39885&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=39885&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=39885&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=39885&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=39885&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=39885&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=39885&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=39885&r=float
No Zend Extensions: http://bugs.php.net/fix.php?id=39885&r=nozend
MySQL Configuration Error: http://bugs.php.net/fix.php?id=39885&r=mysqlcfg