Bug #112516 Assertion Failure in /mysql-8.0.34/sql/item.cc:1202
Submitted: 26 Sep 12:29 Modified: 26 Sep 12:32
Reporter: xin wen Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: DDL Severity:S6 (Debug Builds)
Version:8.0.34 OS:Ubuntu (20.04)
Assigned to: CPU Architecture:Any

[26 Sep 12:29] xin wen
Description:
Run these queries:

CREATE TEMPORARY TABLE t0 ( c50 TEXT , INDEX i0 ( ( IF ( 110 , -27 , 39 ) IS NOT UNKNOWN ) DESC , ( t0 . c41 = OCT ( t0 . c50 ) LIKE IF ( t0 . c41 , t0 . c50 , CONVERT ( c41 , NCHAR ) ) ) ASC ) , c41 DOUBLE DEFAULT ( 25 ) , INDEX i1 ( ( c41 + 3 ) ) ) REPLACE AS SELECT 116 AS c16 GROUP BY 1 ;

Will trigger assertion failure:
mysqld: /home/wx/mysql-8.0.34/sql/item.cc:1202: bool Item::may_evaluate_const(const THD*) const: Assertion `!thd->lex->is_exec_started() || thd->lex->is_query_tables_locked()' failed.

How to repeat:
Run the queries above.
[26 Sep 12:29] xin wen
GDB info

Attachment: GDB_info.txt (text/plain), 8.28 KiB.

[26 Sep 12:32] 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