Loading...
Loading...
SELECT statement containing LIKE predicates used in combination with RANGE predicates may return incorrect results. This defect is applicable for SQL/MX MXCMP SPRs starting T1050L37^ATP.SQL/MX returns incorrect results if all the following conditions are met:1)The table has a column of CHARACTER string datatype, which is part of primary key or clustering key.2)The SELECT statement has at least one LIKE predicate on that character string column.3) The LIKE predicate is used in combination with one or more RANGE predicates (specified using <=, >= and/or BETWEEN operators).4) The RANGE predicate specified in the predicate must be a subset of the overall range covered by the LIKE predicate5) If the literal in the LIKE predicate contains x characters (where x > 0), then the literals in the RANGE predicate must contain at least x + 1 characters. Additionally, the first x characters of both literals must be identical.Example:Consider the following table:CREATE TABLE T(C1 CHAR(10), -- condition 1PRIMARY KEY (C1) -- condition 2);INSERT INTO T VALUES ('A'), ('AA'), ('Aa'), ('B'), ('Bb'), ('BBB'),('bb'), ('C'),('Cc'), ('CCcc');Correct result:SELECT * FROM TWHEREC1 LIKE 'A%' -- condition 3ANDC1 BETWEEN 'AA' AND 'AZ'; -- conditions 4,5C1----------AA--- 1 row(s) selected.Incorrect result:SELECT * FROM TWHEREC1 LIKE 'A%'ANDC1 BETWEEN 'AA' AND 'AZ';--- 0 row(s) selected.Likelihood: CERTAIN.
The defect is also applicable for SQL/MP tables accessed via SQL/MX.Affected Software Product Revisions (SPRs):T1050L37^ATP to T1050^L40.Release Version Updates (RVUs) containing the affected SPR(s):L20.10 - L25.09Additional RVUs potentially affected because one or more of the SPRslisted above is usable with them:NoneFollowing SQL/MX versions are not affected:All SQL/MX versions prior to and including SQL/MX R3.7.1
Workaround:Re-write the query without 'LIKE' predicate as shown below -select count(*) from t where C1 BETWEEN 'AA' AND 'AZ';Please ensure that the re-written query is semantically the same as the original one before deploying it on production systems.Fix:Install the appropriate SPR for T1050 as shown below, depending on your release version.SQL/MX 3.8:T1050L38^AUT - SPR is availableThis SPR already present in these RVUs: NoneThis SPR is usable with the following RVUs: L19.08 to L25.02SQL/MX R3.9:T1050L39^AUS - SPR is availableThis SPR is usable with the following RVUs: L25.02SQL.MX R4.0:The SPR containing the fix applicable on L40 will be released in future.Installation impact:Cold-load may be required due to unconditional requisites.Minimal Impact if requisites SPRs are present in the system.You can check with the GNSC for applicability of the above SPRs to RVURs released since publication of this Hotstuff.Please refer to the appropriate softdoc for detailed SPR information, including installation instructions, superseded SPRs, and requisite SPR lists.Note: In some cases, requisite SPRs might have greater installation impact than the SPRs described in this Hotstuff.Revision HistoryDocument VersionRelease DateDetails2November 21,2025Clarified Defect Applicability for SQL/MP Tables. Updated Installation Impact1November 17,2025Initial Version
Operating Systems Affected:NonStop OS L20.10, NonStop OS L21.06, NonStop OS L22.09, NonStop OS L23.08, NonStop OS L24.08, NonStop OS L25.02, Nonstop OS L25.09
Click on a version to see all relevant bugs
Hewlett Packard Enterprise Integration
Learn more about where this data comes from
BugZero Plan
Streamline upgrades with automated vendor bug scrubs
BugZero Prevent
Wish you caught this bug sooner? Get proactive today.