Bug #110434 WHERE condition assertion error
Submitted: 20 Mar 2023 11:43 Modified: 2 Jun 2023 20:49
Reporter: Pedro Ferreira Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Optimizer Severity:S6 (Debug Builds)
Version:8.0.32 OS:Ubuntu (22.04)
Assigned to: CPU Architecture:x86 (x86_64)
Tags: decimal, where

[20 Mar 2023 11:43] Pedro Ferreira
Description:
Run these queries:

CREATE TABLE t0 (c0 BIGINT);
SELECT 1 FROM t0 WHERE t0.c0 = 05687.3E-84;

It will trigger an assertion on the server at sql/sql_const_folding.cc:275

assert(my_decimal_cmp(&n, &dec) == 0);

The compilation parameters are the same as issue 108148:

-DWITH_DEBUG=1 -DWITH_ASAN=ON -DWITH_UBSAN=ON and boost library version 1.77

How to repeat:
Run the queries above.
[20 Mar 2023 11:49] MySQL Verification Team
Hello Pedro Ferreira,

Thank you for the report and feedback.

regards,
Umesh
[8 Jun 2023 0:18] Jon Stephens
Documented fix as follows in the MySQL 8.1.0 changelog:

    An impossible WHERE of the form WHERE int_col = 05687.3E-84 was
    not handled correctly.

Closed.