Bug #111377 | int mysql_execute_command(THD*, bool): Assertion `!thd->in_sub_stmt' failed | ||
---|---|---|---|
Submitted: | 13 Jun 2023 2:40 | Modified: | 13 Jun 2023 7:54 |
Reporter: | Yu Liang | Email Updates: | |
Status: | Verified | Impact on me: | |
Category: | MySQL Server: DML | Severity: | S6 (Debug Builds) |
Version: | 8.0.33 | OS: | Ubuntu (20.04 LTS) |
Assigned to: | CPU Architecture: | x86 (Intel(R) Core(TM) i7-10700 CPU) |
[13 Jun 2023 2:40]
Yu Liang
[13 Jun 2023 7:54]
MySQL Verification Team
Hello Yu Liang, Thank you for the report and test case. Observed that 8.0.33 only debug build is affected. regards, Umesh
[13 Jun 2023 7:55]
MySQL Verification Team
-- release build ./mtr bug111377 --nocheck-testcases Logging: ./mtr bug111377 --nocheck-testcases MySQL Version 8.0.33 Checking supported features Using 'all' suites Collecting tests Checking leftover processes Removing old var directory Creating var directory '/export/home/tmp/ushastry/binaries/mysql-8.0.33/mysql-test/var' Installing system database Using parallel: 1 ============================================================================== TEST NAME RESULT TIME (ms) COMMENT ------------------------------------------------------------------------------ drop database if exists test123; Warnings: Note 1008 Can't drop database 'test123'; database doesn't exist create database test123; use test123; create table v0(c1 INT); INSERT DELAYED IGNORE v0 SET c1 = DEFAULT AS v2 ON DUPLICATE KEY UPDATE c1 = DEFAULT ; Warnings: Warning 3005 INSERT DELAYED is no longer supported. The statement was converted to INSERT. CREATE TRIGGER t2 AFTER UPDATE ON v0 FOR EACH ROW CREATE FUNCTION f3 RETURNS REAL SONAME 'any_name' ; UPDATE IGNORE v0 SET c1 = DEFAULT ; [ 50%] main.bug111377 [ fail ] Test ended at 2023-06-13 09:52:12 CURRENT_TEST: main.bug111377 mysqltest: At line 7: Query 'UPDATE IGNORE v0 SET c1 = DEFAULT ' failed. ERROR 1422 (HY000): Explicit or implicit commit is not allowed in stored function or trigger. -- debug build - affected ./mtr bug111377 --nocheck-testcases --debug-server Logging: ./mtr bug111377 --nocheck-testcases --debug-server MySQL Version 8.0.33 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/binaries/mysql-8.0.33/mysql-test/var' Installing system database Using parallel: 1 ============================================================================== TEST NAME RESULT TIME (ms) COMMENT ------------------------------------------------------------------------------ drop database if exists test123; Warnings: Note 1008 Can't drop database 'test123'; database doesn't exist create database test123; use test123; create table v0(c1 INT); INSERT DELAYED IGNORE v0 SET c1 = DEFAULT AS v2 ON DUPLICATE KEY UPDATE c1 = DEFAULT ; Warnings: Warning 3005 INSERT DELAYED is no longer supported. The statement was converted to INSERT. CREATE TRIGGER t2 AFTER UPDATE ON v0 FOR EACH ROW CREATE FUNCTION f3 RETURNS REAL SONAME 'any_name' ; UPDATE IGNORE v0 SET c1 = DEFAULT ; [ 50%] main.bug111377 [ fail ] Test ended at 2023-06-13 09:52:56 CURRENT_TEST: main.bug111377 mysqltest: At line 7: Query 'UPDATE IGNORE v0 SET c1 = DEFAULT ' failed. ERROR 2013 (HY000): Lost connection to MySQL server during query -bt #0 0x00007fb1a3269aa1 in pthread_kill () from /lib64/libpthread.so.0 #1 0x0000000004005426 in my_write_core(int) () #2 0x00000000032b0166 in handle_fatal_signal () #3 <signal handler called> #4 0x00007fb1a172a387 in raise () from /lib64/libc.so.6 #5 0x00007fb1a172ba78 in abort () from /lib64/libc.so.6 #6 0x00007fb1a17231a6 in __assert_fail_base () from /lib64/libc.so.6 #7 0x00007fb1a1723252 in __assert_fail () from /lib64/libc.so.6 #8 0x000000000313c414 in mysql_execute_command(THD*, bool) () #9 0x000000000307cc53 in sp_instr_stmt::exec_core(THD*, unsigned int*) () #10 0x000000000307e489 in sp_lex_instr::reset_lex_and_exec_core(THD*, unsigned int*, bool) () #11 0x000000000307e9b9 in sp_lex_instr::validate_lex_and_execute_core(THD*, unsigned int*, bool) () #12 0x000000000307f19c in sp_instr_stmt::execute(THD*, unsigned int*) () #13 0x000000000307455d in sp_head::execute(THD*, bool) () #14 0x0000000003074db8 in sp_head::execute_trigger(THD*, MYSQL_LEX_CSTRING const&, MYSQL_LEX_CSTRING const&, GRANT_INFO*) () #15 0x000000000325beaf in Trigger::execute(THD*) () #16 0x000000000325d54b in Trigger_chain::execute_triggers(THD*) () #17 0x000000000325460e in Table_trigger_dispatcher::process_triggers(THD*, enum_trigger_event_type, enum_trigger_action_time_type, bool) () #18 0x00000000032153c1 in Sql_cmd_update::update_single_table(THD*) () #19 0x0000000003215ae3 in Sql_cmd_update::execute_inner(THD*) () #20 0x000000000319e6cc in Sql_cmd_dml::execute(THD*) () #21 0x000000000313d2da in mysql_execute_command(THD*, bool) () #22 0x0000000003140bc8 in dispatch_sql_command(THD*, Parser_state*) () #23 0x00000000031421fb in dispatch_command(THD*, COM_DATA const*, enum_server_command) () #24 0x0000000003143e97 in do_command(THD*) () #25 0x00000000032a219e in handle_connection () #26 0x00000000047b1601 in pfs_spawn_thread () #27 0x00007fb1a3264ea5 in start_thread () from /lib64/libpthread.so.0 #28 0x00007fb1a17f2b2d in clone () from /lib64/libc.so.6