Bug #118535 | Arithmetic operations fail on fulltext-indexed fields inserted with DISABLE KEYS | ||
---|---|---|---|
Submitted: | 26 Jun 17:43 | Modified: | 27 Jun 19:27 |
Reporter: | Matthew Westcott | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: FULLTEXT search | Severity: | S3 (Non-critical) |
Version: | 9.3.0, 8.4.5, 8.0.42 | OS: | Ubuntu (25.04 Server) |
Assigned to: | CPU Architecture: | x86 |
[26 Jun 17:43]
Matthew Westcott
[26 Jun 18:12]
Matthew Westcott
The exact error raised is: ERROR 1690 (22003): DOUBLE value is out of range in '((match `testdb`.`articles`.`title` against ('test')) * 1)'
[27 Jun 7:15]
MySQL Verification Team
Hello Matthew Westcott, Thank you for the report and test case. regards, Umesh
[27 Jun 19:27]
Matthew Westcott
Have just found that the same thing happens if ALTER TABLE is used to add another fulltext index on the same table (even on an unrelated field) after the insertion: (tested on 8.0.42) CREATE TABLE articles ( `id` int NOT NULL AUTO_INCREMENT, `title` text, `other` text, PRIMARY KEY (`id`), FULLTEXT KEY `fulltext_title` (`title`) ) ENGINE=InnoDB; INSERT INTO articles (title, other) VALUES ('test', 'test'); -- Query succeeds SELECT MATCH (title) AGAINST ('test') * 1 FROM articles; ALTER TABLE articles ADD FULLTEXT INDEX `fulltext_other` (`other`); -- Query fails with ERROR 1690 (22003): DOUBLE value is out of range in '((match `testdb`.`articles`.`title` against ('test')) * 1)' SELECT MATCH (title) AGAINST ('test') * 1 FROM articles; INSERT INTO articles (title, other) VALUES ('foo', 'foo'); DELETE FROM articles WHERE title = 'foo'; -- Query now succeeds again SELECT MATCH (title) AGAINST ('test') * 1 FROM articles;