| 1 |
# |
| 2 |
# Bug#32831765 CREATE FULLTEXT INDEX fails with ERROR 1062 (23000): |
| 3 |
# Duplicate entry 'NULL-NULL' |
| 4 |
# |
| 5 |
CREATE TABLE tt ( |
| 6 |
`col1` varchar(255) DEFAULT NULL, |
| 7 |
`col2` varchar(255) DEFAULT NULL |
| 8 |
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; |
| 9 |
CREATE PROCEDURE populate() |
| 10 |
BEGIN |
| 11 |
SET @rows = 30000; |
| 12 |
REPEAT |
| 13 |
INSERT INTO tt (col1, col2) VALUES ( |
| 14 |
'tokens which repeat in the the first and second columns at the same positions', |
| 15 |
'tokens which repeat in the the first and second columns at the same positions' |
| 16 |
); |
| 17 |
SET @rows = @rows-1; |
| 18 |
UNTIL @rows=0 END REPEAT; |
| 19 |
END% |
| 20 |
CALL POPULATE; |
| 21 |
CREATE FULLTEXT INDEX search ON tt (col1, col2); |
| 22 |
Warnings: |
| 23 |
Warning 124 InnoDB rebuilding table to add column FTS_DOC_ID |
| 24 |
DROP PROCEDURE populate; |
| 25 |
DROP TABLE tt; |