Bug #12175 hangup while sorting
Submitted: 26 Jul 2005 10:33 Modified: 29 Jul 2005 7:34
Reporter: János Fehér Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S1 (Critical)
Version:4.1.12, 4.1.13 OS:FreeBSD (FreeBSD 4.9)
Assigned to: CPU Architecture:Any

[26 Jul 2005 10:33] János Fehér
Description:
When a query sorted by a text field, mysql hangs up. Maybe a collation bug? But, it seems to me it doesn't depend on the charset/collation. The table type is MyISAM.

How to repeat:
select * from foo order by bar;

where bar is a varchar field.
[26 Jul 2005 10:35] János Fehér
hangs up=the thread is running for forever
[26 Jul 2005 10:47] Valeriy Kravchuk
So, is it enough to just create a table with varchar field and a couple of rows:

mysql> create table foo2 (c1 int, bar varchar(200)) engine=MyISAM;
Query OK, 0 rows affected (0.08 sec)

mysql> insert into foo2 values(1, '111');
Query OK, 1 row affected (0.03 sec)

mysql> insert into foo2 values(2, '222');
Query OK, 1 row affected (0.01 sec)

mysql> select * from foo2 order by bar;
+------+------+
| c1   | bar  |
+------+------+
|    1 | 111  |
|    2 | 222  |
+------+------+
2 rows in set (0.00 sec)

mysql> select version();
+------------+
| version()  |
+------------+
| 4.1.12a-nt |
+------------+
1 row in set (0.01 sec)

As you can see, I can't reproduce it with a simple test case on 4.1.12. 

Please, provide the additional information: table description, sample data etc.
[29 Jul 2005 7:34] János Fehér
I've exported out/imported in the tables, and now everything is OK. Sorry, I musn't send the myisam files to you for further analyzing.