[MDEV-33177] Assertion `!order->item[0]->with_sum_func()' failed Created: 2024-01-04  Updated: 2024-01-04

Status: Open
Project: MariaDB Server
Component/s: Optimizer
Affects Version/s: 11.2, 11.3, 11.4
Fix Version/s: 11.2

Type: Bug Priority: Major
Reporter: Sergei Golubchik Assignee: Sergei Petrunia
Resolution: Unresolved Votes: 0
Labels: None


 Description   

CREATE TABLE v0 ( v1 INT , v2 INT , v3 INT) ;
INSERT INTO v0 VALUES (1, 2, 3) ;
INSERT INTO v0 VALUES (3, 2, 1) ;
CREATE TABLE v4 ( v5 INT , v6 INT , v7 INT) ;
INSERT INTO v4 VALUES (4, 5, 6) ;
INSERT INTO v4 VALUES (6, 5, 4) ;
CREATE TABLE v8 ( v9 DOUBLE ) ;
INSERT INTO v8 ( v9 ) VALUES ( 80 ) ;
UPDATE v8 SET v9 = 11 WHERE v9 * 43231581.000000 ORDER BY AVG ( v9 ) , v9 ASC ;

mariadbd: /home/serg/Abk/maria/sql/sql_select.cc:17003: ORDER* simple_remove_const(ORDER*, COND*): Assertion `!order->item[0]->with_sum_func()' failed.
240104 11:24:55 [ERROR] mysqld got signal 6 ;
Sorry, we probably made a mistake, and this is a bug.
 
Your assistance in bug reporting will enable us to fix this for the next release.
To report this bug, see https://mariadb.com/kb/en/reporting-bugs
 
We will try our best to scrape up some info that will hopefully help
diagnose the problem, but since we have already crashed, 
something is definitely wrong and this may fail.
 
Server version: 11.4.0-MariaDB-debug-log source revision: 0544bf59829e46043b63fd1e0d37e8b7e1ae5458
key_buffer_size=1048576
read_buffer_size=131072
max_used_connections=1
max_threads=153
thread_count=1
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 63965 K  bytes of memory
Hope that's ok; if not, decrease some variables in the equation.
 
Thread pointer: 0x7f54a4000dc8
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
stack_bottom = 0x7f54c0357c78 thread_stack 0x49000
mysys/stacktrace.c:215(my_print_stacktrace)[0x558f93c874a7]
sql/signal_handler.cc:238(handle_fatal_signal)[0x558f9339f658]
libc_sigaction.c:0(__restore_rt)[0x7f54c51c2390]
nptl/pthread_kill.c:44(__pthread_kill_implementation)[0x7f54c520facc]
posix/raise.c:27(__GI_raise)[0x7f54c51c22f2]
stdlib/abort.c:81(__GI_abort)[0x7f54c51ac232]
intl/loadmsgcat.c:1177(_nl_load_domain)[0x7f54c51ac155]
/lib64/libc.so.6(+0x30282)[0x7f54c51bb282]
sql/sql_select.cc:17004(simple_remove_const(st_order*, Item*))[0x558f93020548]
sql/sql_update.cc:535(Sql_cmd_update::update_single_table(THD*))[0x558f930f9044]
sql/sql_update.cc:3076(Sql_cmd_update::execute_inner(THD*))[0x558f93102287]
sql/sql_select.cc:33587(Sql_cmd_dml::execute(THD*))[0x558f9304e9f6]
sql/sql_parse.cc:4375(mysql_execute_command(THD*, bool))[0x558f92f89c5f]
sql/sql_parse.cc:7798(mysql_parse(THD*, char*, unsigned int, Parser_state*))[0x558f92f95730]
sql/sql_parse.cc:1895(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool))[0x558f92f81e92]
sql/sql_parse.cc:1406(do_command(THD*, bool))[0x558f92f807eb]
sql/sql_connect.cc:1417(do_handle_one_connection(CONNECT*, bool))[0x558f9317d28a]
sql/sql_connect.cc:1321(handle_one_connection)[0x558f9317d004]
perfschema/pfs.cc:2203(pfs_spawn_thread)[0x558f936cdbb8]
nptl/pthread_create.c:444(start_thread)[0x7f54c520ddec]
x86_64/clone3.S:83(clone3)[0x7f54c5286bcc]
 
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort.
Query (0x7f54a4015770): UPDATE v8 SET v9 = 11 WHERE v9 * 43231581.000000 ORDER BY AVG ( v9 ) , v9 ASC


Generated at Thu Feb 08 10:36:57 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.