Bug #115365 EXPLAIN ANALYZE: Assertion `ret || !explain_thd->is_error()'
| Submitted: | 18 Jun 2024 2:02 | Modified: | 24 Jun 2024 7:52 |
|---|---|---|---|
| Reporter: | Mikhail Izioumtchenko | Email Updates: | |
| Status: | Verified | Impact on me: | |
| Category: | MySQL Server: Optimizer | Severity: | S6 (Debug Builds) |
| Version: | 8.4LTS-debug | OS: | Any |
| Assigned to: | CPU Architecture: | Any |
[18 Jun 2024 2:02]
Mikhail Izioumtchenko
[18 Jun 2024 2:06]
Mikhail Izioumtchenko
testcase
Attachment: b.sql (application/octet-stream, text), 48.76 MiB.
[20 Jun 2024 9:39]
MySQL Verification Team
Hello Mikhail, Thank you for the report and test case. I tried to reproduce using provided test case but not seeing the crash on 8.4.0 release/debug builds. Anything am I missing here? Thank you. If you are using the source build then please provide the exact cmake options used for the build. Thank you. -- bin/mysql -uroot -S/tmp/mysql.sock --force < 115365.sql . . wKLMNOr 65543 19 -45 8.4.0-debug iklmn01x col3 col4 col7 56rs231234FVWXYKLMNOBCopqrstu5hijkVWXYZ9AABE2fgOyPQDEFG89vwIJKefgQRS2340956789cdef01234dejQR745678abcdQRSTUBCD01234kLMNOlmnoCGABjklst10lABCDefghiABCDE3abcETUVWXJKLMGHIJKLMNOPOPQRBCTxyz0bcd 0 14397 2024-06-20 11:34:36 11 54 2024-06-20 4 17866 12345XYKLMNOHI72345tuvwx12334abcd2qrst3n0123Z0129nopqrabVWMNO9bcde 0 67 12345yz023459785678xy897lmwxUVWabc0123STU789nopCDEFGklmnnCDEEFGHbcdnopq01BCDQRSTUWXYZrbc456789Aw678stuvwdefgh01201TUVWXz01456vwxyzGHIJKi45678lMrstuv89ABghijkdwxPQtuv67nopqrqrshijkA893456jk 0 46 ERROR 1054 (42S22) at line 11002: Unknown column 'added_col_1564' in 'where clause' regards, Umesh
[22 Jun 2024 2:34]
Mikhail Izioumtchenko
I can reproduce it reliably with 8.4LTS-debug which I installed from yum repo. The system is a sandbox over OEL Linux 9 over WSL/Windows 11. This would not reproduce with non debugging build. I'm uploading another config file and a simplified testcase: b1.sql to drop and recreate all tables. b2.sql a short sequence of EXPLAIN statements. So it's over empty tables. It starts with SET explain_format=JSON; without this SET the assert would not happen. Another file I'm uploading is b2.out, output of b2.sql execution.
[22 Jun 2024 2:36]
Mikhail Izioumtchenko
drop and recreate schemas and tables
Attachment: b1.sql (application/octet-stream, text), 76.37 KiB.
[22 Jun 2024 2:37]
Mikhail Izioumtchenko
a few SET and EXPLAIN statements to kill mysqld
Attachment: b2.sql (application/octet-stream, text), 3.42 KiB.
[24 Jun 2024 5:08]
MySQL Verification Team
Hello Mikhail Izioumtchenko, Thank you for the confirmation. Let me try again and get back to you if anything further needed. Sincerely, Umesh
[24 Jun 2024 7:52]
MySQL Verification Team
Hello Mikhail,
Thank you for the feedback, with b2.sql I'm able to reproduce.
-
(gdb) bt
#0 0x00007f6150c7058c in __pthread_kill_implementation () from /lib64/libc.so.6
#1 0x000000000428a71a in my_write_core (sig=sig@entry=6) at ../../mysql-8.4.0/mysys/stacktrace.cc:340
#2 0x00000000034c968c in handle_fatal_signal (sig=6, info=0x7f61383f5170, ucontext=0x7f61383f5040) at ../../mysql-8.4.0/sql/signal_handler.cc:407
#3 <signal handler called>
#4 0x00007f6150c7058c in __pthread_kill_implementation () from /lib64/libc.so.6
#5 0x00007f6150c23d06 in raise () from /lib64/libc.so.6
#6 0x00007f6150bf77f3 in abort () from /lib64/libc.so.6
#7 0x00007f6150bf771b in __assert_fail_base.cold () from /lib64/libc.so.6
#8 0x00007f6150c1cca6 in __assert_fail () from /lib64/libc.so.6
#9 0x00000000037a4668 in explain_query_specification (explain_thd=explain_thd@entry=0x7f60b416b830, query_thd=query_thd@entry=0x7f60b416b830, query_term=query_term@entry=0x7f60b5de55a8, ctx=ctx@entry=CTX_JOIN)
at ../../mysql-8.4.0/sql/opt_explain.cc:2100
#10 0x0000000003413356 in Query_expression::explain_query_term (this=0x7f60b5de54c0, explain_thd=0x7f60b416b830, query_thd=0x7f60b416b830, qt=0x7f60b5de55a8) at ../../mysql-8.4.0/sql/sql_union.cc:1515
#11 0x00000000034133da in Query_expression::explain_query_term (this=this@entry=0x7f60b5de54c0, explain_thd=explain_thd@entry=0x7f60b416b830, query_thd=query_thd@entry=0x7f60b416b830, qt=0x7f60b5e3c1c8)
at ../../mysql-8.4.0/sql/sql_union.cc:1522
#12 0x00000000034136b9 in Query_expression::explain (this=this@entry=0x7f60b5de54c0, explain_thd=explain_thd@entry=0x7f60b416b830, query_thd=query_thd@entry=0x7f60b416b830) at ../../mysql-8.4.0/sql/sql_union.cc:1587
#13 0x00000000037a476a in mysql_explain_query_expression (explain_thd=explain_thd@entry=0x7f60b416b830, query_thd=query_thd@entry=0x7f60b416b830, unit=unit@entry=0x7f60b5de54c0) at ../../mysql-8.4.0/sql/opt_explain.cc:2392
#14 0x00000000037a7ea9 in explain_query (explain_thd=explain_thd@entry=0x7f60b416b830, query_thd=query_thd@entry=0x7f60b416b830, unit=unit@entry=0x7f60b5de54c0) at ../../mysql-8.4.0/sql/opt_explain.cc:2353
#15 0x00000000033a35b5 in Sql_cmd_dml::execute_inner (this=<optimized out>, thd=0x7f60b416b830) at ../../mysql-8.4.0/sql/sql_select.cc:1057
#16 0x00000000033a6bab in Sql_cmd_dml::execute (this=0x7f60b5e3da48, thd=0x7f60b416b830) at ../../mysql-8.4.0/sql/sql_select.cc:782
#17 0x0000000003344dee in mysql_execute_command (thd=thd@entry=0x7f60b416b830, first_level=first_level@entry=true) at ../../mysql-8.4.0/sql/sql_parse.cc:4737
#18 0x0000000003346289 in dispatch_sql_command (thd=0x7f60b416b830, parser_state=parser_state@entry=0x7f61383f7ba0) at ../../mysql-8.4.0/sql/sql_parse.cc:5392
#19 0x000000000334794f in dispatch_command (thd=<optimized out>, thd@entry=0x7f60b416b830, com_data=com_data@entry=0x7f61383f89e0, command=COM_QUERY) at ../../mysql-8.4.0/sql/sql_parse.cc:2136
#20 0x00000000033492e3 in do_command (thd=thd@entry=0x7f60b416b830) at ../../mysql-8.4.0/sql/sql_parse.cc:1465
#21 0x00000000034bac2a in handle_connection (arg=arg@entry=0xb114410) at ../../mysql-8.4.0/sql/conn_handler/connection_handler_per_thread.cc:304
#22 0x0000000004aa7ba0 in pfs_spawn_thread (arg=0xb2a2760) at ../../../mysql-8.4.0/storage/perfschema/pfs.cc:3051
#23 0x00007f6150c6e812 in start_thread () from /lib64/libc.so.6
#24 0x00007f6150c0e450 in clone3 () from /lib64/libc.so.6
(gdb)
regards,
Umesh
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.069 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.