|
I also ran into this one. Updated versions etc:
CREATE TABLE t (c DECIMAL(65,10));
|
SET SESSION div_precision_increment=65550;
|
SELECT CEILING (AVG(c)) FROM t;
|
Leads to:
|
11.1.0 2b61ff8f2221745f0a96855a0feb0825c426f993 (Debug)
|
mariadbd: /test/11.1_dbg/sql/item_func.cc:2287: void Item_func_int_val::fix_length_and_dec_int_or_decimal(): Assertion `args[0]->max_length <= ((9 * 9) + 2)' failed.
|
|
11.1.0 2b61ff8f2221745f0a96855a0feb0825c426f993 (Debug)
|
Core was generated by `/test/MD070423-mariadb-11.1.0-linux-x86_64-dbg/bin/mariadbd --no-defaults --cor'.
|
Program terminated with signal SIGABRT, Aborted.
|
#0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=22849092798016)
|
at ./nptl/pthread_kill.c:44
|
[Current thread is 1 (Thread 0x14c7f80f4640 (LWP 486620))]
|
(gdb) bt
|
#0 __pthread_kill_implementation (no_tid=0, signo=6, threadid=22849092798016) at ./nptl/pthread_kill.c:44
|
#1 __pthread_kill_internal (signo=6, threadid=22849092798016) at ./nptl/pthread_kill.c:78
|
#2 __GI___pthread_kill (threadid=22849092798016, signo=signo@entry=6) at ./nptl/pthread_kill.c:89
|
#3 0x000014c81527d476 in __GI_raise (sig=sig@entry=6) at ../sysdeps/posix/raise.c:26
|
#4 0x000014c8152637f3 in __GI_abort () at ./stdlib/abort.c:79
|
#5 0x000014c81526371b in __assert_fail_base (fmt=0x14c815418150 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", assertion=0x55dd2b911660 "args[0]->max_length <= ((9 * 9) + 2)", file=0x55dd2b90fec8 "/test/11.1_dbg/sql/item_func.cc", line=2287, function=<optimized out>) at ./assert/assert.c:92
|
#6 0x000014c815274e96 in __GI___assert_fail (assertion=0x55dd2b911660 "args[0]->max_length <= ((9 * 9) + 2)", file=0x55dd2b90fec8 "/test/11.1_dbg/sql/item_func.cc", line=2287, function=0x55dd2b9115f0 "void Item_func_int_val::fix_length_and_dec_int_or_decimal()") at ./assert/assert.c:101
|
#7 0x000055dd2afc228b in Item_func_int_val::fix_length_and_dec_int_or_decimal (this=0x14c7b8013a70) at /test/11.1_dbg/sql/item_func.cc:2287
|
#8 0x000055dd2ae52da2 in Type_handler_decimal_result::Item_func_int_val_fix_length_and_dec (this=<optimized out>, item=<optimized out>) at /test/11.1_dbg/sql/sql_type.cc:6482
|
#9 0x000055dd2afb1c67 in Item_func_int_val::fix_length_and_dec (this=0x14c7b8013a70, thd=<optimized out>) at /test/11.1_dbg/sql/item_func.cc:2354
|
#10 0x000055dd2afb54fd in Item_func::fix_fields (this=0x14c7b8013a70, thd=0x14c7b8000d58, ref=<optimized out>) at /test/11.1_dbg/sql/item_func.cc:362
|
#11 0x000055dd2abe9bcd in Item::fix_fields_if_needed (ref=0x14c7b8013b30, thd=0x14c7b8000d58, this=0x14c7b8013a70) at /test/11.1_dbg/sql/item.h:1147
|
#12 Item::fix_fields_if_needed_for_scalar (ref=0x14c7b8013b30, thd=0x14c7b8000d58, this=0x14c7b8013a70) at /test/11.1_dbg/sql/item.h:1156
|
#13 setup_fields (thd=0x14c7b8000d58, ref_pointer_array=<optimized out>, fields=<optimized out>, column_usage=<optimized out>, sum_func_list=sum_func_list@entry=0x14c7b8015040, pre_fix=0x14c7b80134f0, allow_sum_func=true) at /test/11.1_dbg/sql/sql_base.cc:8034
|
#14 0x000055dd2acd876c in JOIN::prepare (this=this@entry=0x14c7b8014c90, tables_init=tables_init@entry=0x14c7b8013ba8, conds_init=conds_init@entry=0x0, og_num=og_num@entry=0, order_init=order_init@entry=0x0, skip_order_by=skip_order_by@entry=false, group_init=0x0, having_init=0x0, proc_param_init=0x0, select_lex_arg=0x14c7b8013218, unit_arg=0x14c7b8004fa0) at /test/11.1_dbg/sql/sql_select.cc:1489
|
#15 0x000055dd2acefe1d in mysql_select (thd=thd@entry=0x14c7b8000d58, tables=0x14c7b8013ba8, fields=@0x14c7b80134d8: {<base_list> = {<Sql_alloc> = {<No data fields>}, first = 0x14c7b8013b28, last = 0x14c7b8013b28, elements = 1}, <No data fields>}, conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2164525824, result=0x14c7b8014c68, unit=0x14c7b8004fa0, select_lex=0x14c7b8013218) at /test/11.1_dbg/sql/sql_select.cc:5130
|
#16 0x000055dd2acf001e in handle_select (thd=thd@entry=0x14c7b8000d58, lex=lex@entry=0x14c7b8004ec8, result=result@entry=0x14c7b8014c68, setup_tables_done_option=setup_tables_done_option@entry=0) at /test/11.1_dbg/sql/sql_select.cc:611
|
#17 0x000055dd2ac56314 in execute_sqlcom_select (thd=thd@entry=0x14c7b8000d58, all_tables=0x14c7b8013ba8) at /test/11.1_dbg/sql/sql_parse.cc:6024
|
#18 0x000055dd2ac61974 in mysql_execute_command (thd=thd@entry=0x14c7b8000d58, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /test/11.1_dbg/sql/sql_parse.cc:3944
|
#19 0x000055dd2ac67f05 in mysql_parse (thd=thd@entry=0x14c7b8000d58, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x14c7f80f3230) at /test/11.1_dbg/sql/sql_parse.cc:7760
|
#20 0x000055dd2ac6a099 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x14c7b8000d58, packet=packet@entry=0x14c7b800ae49 "SELECT CEILING (AVG(c)) FROM t", packet_length=packet_length@entry=30, blocking=blocking@entry=true) at /test/11.1_dbg/sql/sql_class.h:242
|
#21 0x000055dd2ac6bef5 in do_command (thd=0x14c7b8000d58, blocking=blocking@entry=true) at /test/11.1_dbg/sql/sql_parse.cc:1405
|
#22 0x000055dd2adbdcfc in do_handle_one_connection (connect=<optimized out>, connect@entry=0x55dd2d038de8, put_in_cache=put_in_cache@entry=true) at /test/11.1_dbg/sql/sql_connect.cc:1416
|
#23 0x000055dd2adbdf5b in handle_one_connection (arg=0x55dd2d038de8) at /test/11.1_dbg/sql/sql_connect.cc:1318
|
#24 0x000014c8152cfb43 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
|
#25 0x000014c815361a00 in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
|
Bug confirmed present in:
MariaDB: 10.4.29 (dbg), 10.5.20 (dbg), 10.6.13 (dbg), 10.7.8 (dbg), 10.8.8 (dbg), 10.9.6 (dbg), 10.10.4 (dbg), 10.11.3 (dbg), 11.0.2 (dbg), 11.1.0 (dbg), 11.2.0 (dbg)
Bug (or feature/syntax) confirmed not present in:
MariaDB: 10.4.29 (opt), 10.5.20 (opt), 10.6.13 (opt), 10.7.8 (opt), 10.8.8 (opt), 10.9.6 (opt), 10.10.4 (opt), 10.11.3 (opt), 11.0.2 (opt), 11.1.0 (opt), 11.2.0 (opt)
MySQL: 5.5.62 (dbg), 5.5.62 (opt), 5.6.51 (dbg), 5.6.51 (opt), 5.7.40 (dbg), 5.7.40 (opt), 8.0.31 (dbg), 8.0.31 (opt)
|