Bug #4822 VIEWS don't work with FULLTEXT index
Submitted: 30 Jul 2004 9:15 Modified: 26 Aug 2004 10:52
Reporter: Georg Richter Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:5.0.1 OS:
Assigned to: Oleksandr Byelkin CPU Architecture:Any

[30 Jul 2004 9:15] Georg Richter
Description:
When using MATCH .. AGAINST in a view, view returns all records from underlying table. 

How to repeat:
mysql> CREATE TABLE t1 (c1 int not null auto_increment primary key, c2 varchar(20), fulltext(c2)); 
Query OK, 0 rows affected (0.10 sec) 
 
mysql> insert into t1 (c2) VALUES ('real Beer'),('Water'),('Kossu'),('Coca-Cola'),('Wodka'),('Wine'),
('US Beer'); 
Query OK, 7 rows affected (0.05 sec) 
Records: 7  Duplicates: 0  Warnings: 0 
 
mysql> select * from t1 WHERE match (c2) against ('Beer'); 
+----+-----------+ 
| c1 | c2        | 
+----+-----------+ 
|  7 | US Beer   | 
|  1 | real Beer | 
+----+-----------+ 
2 rows in set (0.02 sec) 
 
mysql> CREATE VIEW v1 AS SELECT  * from t1 WHERE match (c2) against ('Beer'); 
ERROR 1050 (42S01): Table 'v1' already exists 
mysql> drop view v1; 
Query OK, 0 rows affected (0.00 sec) 
 
mysql> CREATE VIEW v1 AS SELECT  * from t1 WHERE match (c2) against ('Beer'); 
Query OK, 0 rows affected (0.00 sec) 
 
mysql> select * from v1; 
+----+-----------+ 
| c1 | c2        | 
+----+-----------+ 
|  1 | real Beer | 
|  2 | Water     | 
|  3 | Kossu     | 
|  4 | Coca-Cola | 
|  5 | Wodka     | 
|  6 | Wine      | 
|  7 | US Beer   | 
+----+-----------+ 
7 rows in set (0.01 sec)
[6 Aug 2004 3:38] MySQL Verification Team
Verified against latest BK 5.0 tree.
[25 Aug 2004 15:15] Oleksandr Byelkin
ChangeSet 
  1.1732 04/08/25 16:14:42 bell@sanja.is.com.ua +3 -0 
  full text function moving to current select (BUG#4822)
[26 Aug 2004 10:52] Oleksandr Byelkin
Thank you for bugreport. Bug is fixed, patch is pushed into source repository.