Hello!

I am running:
Server version          4.1.2-alpha-max-log
On linux RedHat.

When I execute a simple select, it's dying, with no error message
reported or so, the query is simply dying together with the server.
After query is died entire server is hang on. I can't even shut it down.
Query shows as *** DEAD *** in mysql processlist.

Here is a query:
select contest_id, question_id, answer_id, answer,
count(distinct(answer_id)) as count from user_answer
group by question_id, answer_id, answer
order by question_id, answer_id

The table is:
CREATE TABLE `user_answer` (
  `user_id` int(11) NOT NULL default '0',
  `contest_id` int(11) NOT NULL default '0',
  `question_id` int(11) NOT NULL default '0',
  `answer_id` int(11) NOT NULL default '0',
  `answer` char(255) NOT NULL default '',
  `date` datetime NOT NULL default '0000-00-00 00:00:00',
  KEY `user_id` (`user_id`),
  KEY `contest_id` (`contest_id`),
  KEY `question_id` (`question_id`),
  KEY `answer_id` (`answer_id`),
  KEY `date` (`date`),
  CONSTRAINT `0_3488` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`),
  CONSTRAINT `0_3489` FOREIGN KEY (`contest_id`) REFERENCES `contest`
(`id`),
  CONSTRAINT `0_3490` FOREIGN KEY (`question_id`) REFERENCES `question`
(`id`),
  CONSTRAINT `0_3491` FOREIGN KEY (`answer_id`) REFERENCES `answer` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
A real table has 52000 records.

I tested it on a 4.0.1 version - the result is same.

Any idead what is wrong with it ?

--
With best regards,
Ivan Latysh.


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to