Bug #119054 Incorrect SOUNDS LIKE result in WHERE clause with complex function arguments and type casting

Submitted: 22 Sep 2025 10:35 Modified: 22 Sep 2025 17:39
Reporter: zz z Email Updates:
Status: Unsupported Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:9.4.0 8.4.6 OS:Any
Assigned to: MySQL Verification Team CPU Architecture:Any

[22 Sep 2025 10:35] zz z
Description:
The query incorrectly returns an empty set, while a verification query demonstrates that one row should have been returned. 

How to repeat:
CREATE TABLE IF NOT EXISTS t156 (c1 DECIMAL, c2 FLOAT) ;
INSERT INTO t156 (c1,c2) VALUES (611,1.009);
INSERT INTO t156 (c1,c2) VALUES (-788,-2.9309427E38);

SELECT * FROM t156 WHERE (((c2) SOUNDS LIKE (TIMESTAMPADD(MONTH, (BIN(-49)), c1)))) ; -- 0;
SELECT SUM(count) FROM (SELECT ((((c2) SOUNDS LIKE (TIMESTAMPADD(MONTH, (BIN(-49)), c1))))) IS TRUE AS count FROM t156) AS ta_norec; -- 1;
[22 Sep 2025 17:39] MySQL Verification Team
Hi,

SOUNDS LIKE uses SOUNDEX that is only made to work properly with English words. Any other usage can cause unpredictable results.

Portions of this website are copyright © 2001, 2002 The PHP Group

Page generated in 0.050 sec. using MySQL 8.4.7-u6-cloud

Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.