I'm trying to do the same SELECT query in 3 tables. Those tables are equal in structure and data but different in table type: Table_orig - a big MyISAM table Table_raid - RAID table (mysql compiled with --with-raid) Table_merge - MERGE table
It all worked well, except for Table_merge: when i do the query, the mysql daemon dies and restarts itself: All tables have the following structure (i've removed some int fields that were not used in the query): CREATE TABLE `Table_00` ( `idx` varchar(25) NOT NULL default '', `theme_id` int(10) unsigned NOT NULL default '0', `data` date NOT NULL default '0000-00-00', `tempo` time NOT NULL default '00:00:00', `ip_orig` varchar(30) NOT NULL default '', `real_ip` varchar(30) NOT NULL default '', `hostname` varchar(80) NOT NULL default '', `referer` varchar(255) default NULL, `filtrado` enum('Yes','No') NOT NULL default 'Yes', PRIMARY KEY (`idx`) ) TYPE=MyISAM PACK_KEYS=1 Data was inserted and packed: INSERT INTO Table_00 SELECT * FROM Table_orig ORDER BY data,tempo,idx LIMIT 0,697927; INSERT INTO Table_01 SELECT * FROM Table_orig ORDER BY data,tempo,idx LIMIT 697927,697927; INSERT INTO Table_02 SELECT * FROM Table_orig ORDER BY data,tempo,idx LIMIT 1395854,697927; myisampack Table_00; myisamchk -rq -a -S Table_00; myisampack Table_01; myisamchk -rq -a -S Table_01; myisampack Table_02; myisamchk -rq -a -S Table_02; And the merge table is: CREATE TABLE `Table_merge` ( `idx` varchar(25) NOT NULL default '', `theme_id` int(10) unsigned NOT NULL default '0', `data` date NOT NULL default '0000-00-00', `tempo` time NOT NULL default '00:00:00', `ip_orig` varchar(30) NOT NULL default '', `real_ip` varchar(30) NOT NULL default '', `hostname` varchar(80) NOT NULL default '', `referer` varchar(255) default NULL, `filtrado` enum('Yes','No') NOT NULL default 'Yes', PRIMARY KEY (`idx`) ) TYPE=MERGE UNION=(Table_00,Table_01,Table_02) Finally, the fatal query: mysql> SELECT tempo, ip_orig, real_ip, hostname, referer, filtrado, -> data, Theme.nome INTO OUTFILE '/tmp/teste_merge' -> FROM Table_merge,Theme -> WHERE data>=20010521 AND data<20011107 AND -> Theme.theme_id=Table_merge.theme_id -> ORDER BY data,tempo limit 5000; ERROR 2013: Lost connection to MySQL server during query mysql> Number of processes running now: 0 020121 18:06:47 mysqld restarted This is the error from the log file: mysqld got signal 11; This could be because you hit a bug. It is also possible that this binary or one of the libraries it was linked agaist is corrupt, improperly built,or misconfigured. This error can also be caused by malfunctioning hardware. We will try our best to scrape up some info that will hopefully help diagnose the problem, but since we have already crashed, something is definitely wrong and this may fail key_buffer_size=16773120 record_buffer=131072 sort_buffer=524280 max_used_connections=2 max_connections=100 threads_connected=1 It is possible that mysqld could use up to key_buffer_size + (record_buffer + sort_buffer)*max_connections = 80379 K bytes of memory Hope that's ok, if not, decrease some variables in the equation .... then the stack pointer.... i've already used the stack trace info but i've not concluded anything. Am i missing something about merge tables ?!?! Does anyone know anything that could help ? Thanx in advance, -- Diana Soares [EMAIL PROTECTED] --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php