Bug #3345 fulltext messes up min/max
Submitted: 31 Mar 2004 8:50 Modified: 31 Mar 2004 10:08
Reporter: Marcin Mank Email Updates:
Status: Can't repeat Impact on me:
None 
Category:MySQL Server: MyISAM storage engine Severity:S2 (Serious)
Version:3.23.52-log OS:Linux (linux)
Assigned to: Dean Ellis CPU Architecture:Any

[31 Mar 2004 8:50] Marcin Mank
Description:
adding a fulltext index on a column makes min/max work incorrectly

How to repeat:
mysql> create table test(a varchar(100));
mysql> insert into test values('aaa');
mysql> insert into test values('bbb');
mysql> insert into test values('ccccc');
mysql> insert into test values('defg');
mysql> insert into test values('hijk');
mysql> select min(a) from test;
+--------+
| min(a) |
+--------+
| aaa    |
+--------+
1 row in set (0.00 sec)

mysql> alter table test add fulltext(a);
Query OK, 5 rows affected (0.01 sec)
Records: 5  Duplicates: 0  Warnings: 0

mysql> select min(a) from test;
+--------+
| min(a) |
+--------+
| ccccc  |
+--------+
1 row in set (0.00 sec)

Suggested fix:
dunno
[31 Mar 2004 9:22] Marcin Mank
is a bug in 4.0.17 also. This time:
mysql> select min(a) from test;
+--------+
| min(a) |
+--------+
| NULL   |
+--------+
1 row in set (0.01 sec)
[31 Mar 2004 10:08] Dean Ellis
I see this in 4.0.18 as well, however I cannot repeat this against 4.0.19.
[31 Mar 2004 12:51] Marcin Mank
Well, for now 4.0.19 isn`t available to wider public. I am sure You will fix it by the time it is ;)

As for reproducing the bug - just try min/max on any bigger table - it showed up on many different datasets.