Bug #112510 | Assertion Failure in /mysql-8.0.34/sql/sql_const_folding.cc:275 | ||
---|---|---|---|
Submitted: | 26 Sep 2023 12:15 | Modified: | 29 Sep 2023 13:54 |
Reporter: | xin wen | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: DML | Severity: | S6 (Debug Builds) |
Version: | 8.0.34 | OS: | Ubuntu (20.04) |
Assigned to: | CPU Architecture: | Any |
[26 Sep 2023 12:15]
xin wen
[26 Sep 2023 12:17]
MySQL Verification Team
Hello xin wen, Thank you for the report and test case. Observed that 8.0.34 debug build is affected. regards, Umesh
[26 Sep 2023 12:18]
MySQL Verification Team
- debug is affected ./mtr --nocheck-testcases bug112510 --debug-server Logging: ./mtr --nocheck-testcases bug112510 --debug-server MySQL Version 8.0.34 Checking supported features - Binaries are debug compiled Using 'all' suites Collecting tests Checking leftover processes Removing old var directory Creating var directory '/export/home/tmp/ushastry/mysql-8.0.34/mysql-test/var' Installing system database Using parallel: 1 ============================================================================== TEST NAME RESULT TIME (ms) COMMENT ------------------------------------------------------------------------------ CREATE TABLE t0 ( c3 INT , c60 INT ) ; INSERT INTO t0 VALUES ( 84 , 18 ) , ( -106 , -59 ) ; ALTER TABLE t0 ADD COLUMN c34 INT AFTER c3 ; INSERT INTO t0 ( c3 , c60 ) VALUES ( ASIN ( 1157445836312102258 ) * RAND ( ) = 6 IS NOT TRUE , 54 ) , ( -73 , -96 ) ; SELECT t0 . c34 AS c20 FROM ( SELECT POW ( -32 , -47 ) AS c53 FROM t0 ) AS t1 JOIN t0 ON t1 . c53 = t0 . c3 ; [ 50%] main.bug112510 [ fail ] Test ended at 2023-09-26 14:17:30 CURRENT_TEST: main.bug112510 mysqltest: At line 5: Query 'SELECT t0 . c34 AS c20 FROM ( SELECT POW ( -32 , -47 ) AS c53 FROM t0 ) AS t1 JOIN t0 ON t1 . c53 = t0 . c3 ' failed. ERROR 2013 (HY000): Lost connection to MySQL server during query -bt #0 0x00007fd035e05aa1 in pthread_kill () from /lib64/libpthread.so.0 #1 0x000000000402c28e in my_write_core(int) () #2 0x00000000032d235e in handle_fatal_signal () #3 <signal handler called> #4 0x00007fd034150387 in raise () from /lib64/libc.so.6 #5 0x00007fd034151a78 in abort () from /lib64/libc.so.6 #6 0x00007fd0341491a6 in __assert_fail_base () from /lib64/libc.so.6 #7 0x00007fd034149252 in __assert_fail () from /lib64/libc.so.6 #8 0x000000000360dddb in analyze_int_field_constant(THD*, Item_field*, Item**, Item_func::Functype, bool, Range_placement*, bool*) () #9 0x000000000360f5cc in analyze_field_constant(THD*, Item_field*, Item**, Item_func*, bool, Range_placement*, bool*, bool*) () #10 0x000000000360fe80 in fold_condition(THD*, Item*, Item**, Item::cond_result*, bool) () #11 0x000000000313e9b4 in fold_condition_exec(THD*, Item*, Item**, Item::cond_result*) () #12 0x000000000313e713 in remove_eq_conds(THD*, Item*, Item**, Item::cond_result*) [clone .localalias] () #13 0x000000000314c938 in optimize_cond(THD*, Item**, COND_EQUAL**, mem_root_deque<Table_ref*>*, Item::cond_result*) () #14 0x000000000314ffee in JOIN::optimize(bool) () #15 0x00000000031b755f in Query_block::optimize(THD*, bool) () #16 0x000000000322d695 in Query_expression::optimize(THD*, TABLE*, bool, bool) () #17 0x00000000031b7187 in Sql_cmd_dml::execute_inner(THD*) () #18 0x00000000031c0beb in Sql_cmd_dml::execute(THD*) () #19 0x0000000003161263 in mysql_execute_command(THD*, bool) () #20 0x00000000031626a2 in dispatch_sql_command(THD*, Parser_state*) () #21 0x0000000003163cd5 in dispatch_command(THD*, COM_DATA const*, enum_server_command) () #22 0x000000000316596c in do_command(THD*) () #23 0x00000000032c437c in handle_connection () #24 0x00000000047e1af5 in pfs_spawn_thread () #25 0x00007fd035e00ea5 in start_thread () from /lib64/libpthread.so.0 #26 0x00007fd034218b2d in clone () from /lib64/libc.so.6
[29 Sep 2023 13:54]
Tor Didriksen
Posted by developer: commit 32a87561747aa56ab2d6165d3f7db2314f977cae Author: Dag Wanvik <dag.wanvik@oracle.com> Date: Tue May 30 13:09:51 2023 +0200 Bug#35200367 WHERE condition assertion error Wrong assertion: we can have loss of precision/truncation error when converting float to decimal even though the result is not 0.0, as evidenced by the repro: 05687.3E-84 Fix: remove the assertion, and add test for the repro case.