| Bug #17023 | Memory overwlow on big simple request | ||
|---|---|---|---|
| Submitted: | 1 Feb 2006 21:05 | Modified: | 3 Feb 2006 9:45 |
| Reporter: | Artem Prysyazhnuk | Email Updates: | |
| Status: | Duplicate | Impact on me: | |
| Category: | MySQL Server | Severity: | S2 (Serious) |
| Version: | 5.0.18 | OS: | Linux (RHEL R3 (Kernel 2.6.15.1)) |
| Assigned to: | CPU Architecture: | Any | |
[1 Feb 2006 21:05]
Artem Prysyazhnuk
[1 Feb 2006 23:25]
Jorge del Conde
Thanks for your bug report
[1 Feb 2006 23:27]
Jorge del Conde
This bug seems to be the same as the one reported here: http://bugs.mysql.com/bug.php?id=15872
[2 Feb 2006 0:20]
Artem Prysyazhnuk
May be this bug is simmilar to http://bugs.mysql.com/bug.php?id=15872 but with two exceptions: 1) It's about SELECT statement not UPDATE as in 15872; 2) On empty table my statement execute OK without memeory owerflow, exception raised only on big table.
[2 Feb 2006 14:41]
Valeriy Kravchuk
Send, please, the results of EXPLAIN select min(event_id) FROM shedule WHERE event_id <= 218134277 AND event_id NOT IN (218134244,218134111,218134110,218134108, ......... , 612,110,80,76,7,5,4); and SHOW CREATE TABLE shedule results. How many items are there in that NOT IN list?
[3 Feb 2006 0:17]
Artem Prysyazhnuk
After running full query
EXPLAIN select min(event_id) FROM shedule WHERE event_id <= 218134277 AND
event_id NOT IN (218134244,218134111,218134110,218134108, ......... ,
612,110,80,76,7,5,4);
Server died - same as without EXPLAIN.
If I cut query to several event_id in not in statement, resultat:
EXPLAIN select min(event_id) FROM shedule WHERE event_id <= 218134277 AND event_id NOT IN (218134244,218134111,218134110,218134108);
+----+-------------+---------+-------+---------------+---------+---------+------+--------+--------------------------+
| id | select_type | table | type | possible_keys | key | key_len | ref | rows | Extra |
+----+-------------+---------+-------+---------------+---------+---------+------+--------+--------------------------+
| 1 | SIMPLE | shedule | range | PRIMARY | PRIMARY | 4 | NULL | 320879 | Using where; Using index |
+----+-------------+---------+-------+---------------+---------+---------+------+--------+--------------------------+
1 row in set (0.16 sec)
SHOW CREATE TABLE shedule;
CREATE TABLE `shedule` (
`event_id` int(11) NOT NULL auto_increment,
`task_id` int(11) NOT NULL default '0',
`event_user_id` int(11) NOT NULL default '0',
`first_fail_event_id` int(11) NOT NULL default '-1',
`fail_event_ord` int(11) NOT NULL default '0',
`shost_id` int(11) NOT NULL default '0',
`request_start_time` double NOT NULL default '-1',
`prev_event_id` int(11) NOT NULL default '-1',
`prev_request_start_time` double NOT NULL default '-1',
`request_done_time` double NOT NULL default '-1',
`response_time` double NOT NULL default '-1',
`status` enum('skipped','wait','ok','error') NOT NULL default 'wait',
`ext_status_id` int(11) NOT NULL default '-1',
`size` int(11) NOT NULL default '-1',
`check_backward_link` enum('true','false') NOT NULL default 'false',
`notify_sent` enum('error_notify','recovery_notify','none') NOT NULL default 'none',
PRIMARY KEY (`event_id`),
KEY `task_id_time` (`task_id`,`request_start_time`),
KEY `request_start_time` (`request_start_time`,`task_id`),
KEY `request_start_time_3` (`request_start_time`,`prev_request_start_time`),
KEY `status` (`status`),
KEY `task_id` (`task_id`,`first_fail_event_id`),
KEY `first_fail_event_id` (`first_fail_event_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1
Length of NOT IN statement is 306535 elements.
[3 Feb 2006 9:45]
Valeriy Kravchuk
As UPDATE also search rows (perform SELECT internally), I think, this bug report is a duplicate of bug #15872 (or vice versa), but that bug is already verified and still not yet fixed.
