distal-attribute
distal-attribute
distal-attribute
distal-attribute

Range check error / Out of memory

User, date Message
Written by kalvaro
7 years ago
Category: General
595 posts since Thu, 29 Nov 07
I'm getting weird error messages and memory issues with release 3.2 and I'd like to confirm whether there's actually a problem with the software or it's only my computer.

I've prepared a test dataset (please find the dump at the end of the message). Check this out:

SELECT
`field1` AS 'Nombre',
`field2`
FROM table1
INNER JOIN table2
ON table1.id=table2.id_tabla
INNER JOIN table3
ON table2.table3_actual=table3.id
WHERE table2.workflow=1



If I run it several times I get a Range check error one out of two times. Also, Windows Task Manager shows that HeidiSQL allocates 100MB of RAM instantly. It gets fixed if I remove the AS 'Nombre' part or rename "Nombre" as "foo".

The query runs fine in other MySQL front ends. Other similar queries in this database have similar memory problems; sometimes HeidiSQL allocates 300MB instantly and it gets released when I perform another query.

Any clue? Should I report it as a bug?

# HeidiSQL Dump
#
# --------------------------------------------------------
# Host: XXXXXXXXXXXXXX
# Database: test
# Server version: 4.1.13
# Server OS: Win32
# Target-Compatibility: MySQL 3.23
# max_allowed_packet: 1047552
# HeidiSQL version: 3.2 Revision: 1129
# --------------------------------------------------------

/*!40100 SET CHARACTER SET latin1*/;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0*/;


DROP TABLE IF EXISTS `table1`;

#
# Table structure for table 'table1'
#

CREATE TABLE `table1` (
`id` int(10) unsigned NOT NULL auto_increment,
`field1` longtext,
`field2` longtext,
PRIMARY KEY (`id`)
) TYPE=MyISAM /*!40100 DEFAULT CHARSET=latin1*/;



#
# Dumping data for table 'table1'
#

# (No data found.)



DROP TABLE IF EXISTS `table2`;

#
# Table structure for table 'table2'
#

CREATE TABLE `table2` (
`id` int(10) unsigned NOT NULL auto_increment,
`table3_actual` int(10) unsigned NOT NULL default '0',
`workflow` int(10) unsigned NOT NULL default '0',
`id_tabla` int(10) unsigned NOT NULL default '0',
PRIMARY KEY (`id`),
KEY `instanciaworkflow_FKIndex1` (`workflow`),
KEY `instanciaworkflow_FKIndex3` (`table3_actual`)
) TYPE=MyISAM /*!40100 DEFAULT CHARSET=latin1*/;



#
# Dumping data for table 'table2'
#

# (No data found.)



DROP TABLE IF EXISTS `table3`;

#
# Table structure for table 'table3'
#

CREATE TABLE `table3` (
`id` int(10) unsigned NOT NULL auto_increment,
`workflow` int(10) unsigned NOT NULL default '0',
`nombre` varchar(255) default NULL,
PRIMARY KEY (`id`),
KEY `table3_FKIndex1` (`workflow`)
) TYPE=MyISAM /*!40100 DEFAULT CHARSET=latin1*/;



#
# Dumping data for table 'table3'
#

LOCK TABLES `table3` WRITE;
/*!40000 ALTER TABLE `table3` DISABLE KEYS*/;
INSERT INTO `table3` (`id`, `workflow`, `nombre`) VALUES
('1','1','inicial');
/*!40000 ALTER TABLE `table3` ENABLE KEYS*/;
UNLOCK TABLES;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS*/;

[/b][/code][i:10abea607a][/i:10abea607a]
Written by rosenfield
7 years ago
127 posts since Wed, 24 Jan 07
> Should I report it as a bug?

Definitely!
Why would you not report it as a bug?

> Any clue?

Ufortunately no, but looks interesting enough. I personally do not have time to look at it now, but if you post a bug it will be fixed - the developers go through the bug database pretty often.
Written by ansgar
7 years ago
5023 posts since Fri, 07 Apr 06
Not sure if that's the same issue but it looks like a similar bug is already posted here. But feel very free to leave a comment on that page - especially with that detailed reproduction recipe.
Written by rosenfield
7 years ago
127 posts since Wed, 24 Jan 07
Or create a new issue, we can always close one of them if it proves to be a duplicate..

Either way, good thing to post in the bug tracker, since it helps us, erh, keep track of things..

I cannot reproduce using the table dump and query you've posted above, neither in v3.2 (r1129) nor in r1147.

Maybe our server versions differ?..
Written by kalvaro
7 years ago
595 posts since Thu, 29 Nov 07
I've just reported it as bug:

http://sourceforge.net/tracker/index.php?func=detail&aid=1841608&group_id=164593&atid=832347

I hope it can be reproduced.
Written by ansgar
7 years ago
5023 posts since Fri, 07 Apr 06
Thanks a lot! That will definitely help fixing it!
 

Please login to leave a reply, or register at first.