Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-32718

Segmentation fault at /mariadb-11.3.0/sql/my_decimal.h:132

Details

    • Bug
    • Status: Confirmed (View Workflow)
    • Major
    • Resolution: Unresolved
    • 11.3.0, 10.5, 10.6, 10.11, 11.1(EOL), 11.2(EOL), 11.3(EOL), 11.4
    • 10.5, 10.6, 10.11, 11.4
    • Server
    • None
    • Ubuntu 20.04

    Description

      Run these queries in debug build:

      CREATE TABLE x ( x DEC PRIMARY KEY ) ;
      INSERT INTO x ( x ) VALUES ( 1 ) ;
      UPDATE x SET x = 1 WHERE ( x BETWEEN ( SELECT x FROM x AS x WHERE CASE WHEN x * ( SELECT x * ( SELECT x FROM ( SELECT x FROM x GROUP BY ( SELECT 1 ORDER BY x , x DESC , x , x IN ( SELECT DISTINCT x FROM x WHERE - 'x' >= x IS NOT NULL = ( 1 < x AND x < 'x' ) ) LIMIT 1 OFFSET 1 ) ) AS x ORDER BY x , x DESC , x , x LIMIT 1 OFFSET 1 ) FROM x GROUP BY 'x' , ( SELECT x ) + ( SELECT ( SELECT x ) AS x FROM x WINDOW x AS ( PARTITION BY x ORDER BY x DESC ) ORDER BY ( SELECT 1 FROM x WHERE x = x ) , ( x AND x IS NULL AND x IN ( 1 , 1 , 1 , 1 , 1 ) ) BETWEEN 1 AND CASE WHEN x = 1 THEN 'x' ELSE x END DESC , x , x ) >= 1 WINDOW x AS ( PARTITION BY FALSE ORDER BY x DESC ) ) <= 1 AND x = x THEN 'x' END BETWEEN 1 AND 1 GROUP BY x ) AND x ) AND x = 1 AND ( x = 1 OR x = 1 ) ORDER BY x + x , x ;

      Will trigger Segmentation fault.
      GDB info:
      #0 0x00005555578d4235 in my_decimal::operator= (this=0x7fffd1928650, rhs=...) at /home/wx/mariadb-11.3.0/sql/my_decimal.h:132
      #1 0x00005555578d44cc in my_decimal2decimal (from=0x0, to=0x7fffd1928650) at /home/wx/mariadb-11.3.0/sql/my_decimal.h:353
      #2 0x0000555557f446ed in my_decimal::to_binary (this=0x0, bin=0x62d000096490 '\276' <repeats 200 times>..., prec=11, scale=0, mask=30) at /home/wx/mariadb-11.3.0/sql/my_decimal.cc:206
      #3 0x0000555557b021af in Type_handler_decimal_result::make_sort_key_part (this=0x55555b7b6cc0 <type_handler_newdecimal>, to=0x62d000096490 '\276' <repeats 200 times>..., item=0x62d000083870, sort_field=0x62f000006a60, tmp_buffer=0x7fffd1928d28) at /home/wx/mariadb-11.3.0/sql/filesort.cc:1381
      #4 0x0000555557b0cd2d in make_sortkey (param=0x7fffd1928cb0, to=0x62d000096490 '\276' <repeats 200 times>...) at /home/wx/mariadb-11.3.0/sql/filesort.cc:2954
      #5 0x0000555557b02449 in make_sortkey (param=0x7fffd1928cb0, to=0x62d000096488 "\177\377\377\377\377\377\377\377", '\276' <repeats 192 times>..., ref_pos=0x61a00041f800 "\200", using_packed_sortkeys=false) at /home/wx/mariadb-11.3.0/sql/filesort.cc:1414
      #6 0x0000555557aff864 in find_all_keys (thd=0x62c0001e0288, param=0x7fffd1928cb0, select=0x62d000083558, fs_info=0x615000114980, buffpek_pointers=0x7fffd1928fb0, tempfile=0x7fffd1928e00, pq=0x0, found_rows=0x615000114b70) at /home/wx/mariadb-11.3.0/sql/filesort.cc:1030
      #7 0x0000555557afab66 in filesort (thd=0x62c0001e0288, table=0x619000096608, filesort=0x62d000083b80, tracker=0x62d000084328, join=0x62d000079850, first_table_bit=1) at /home/wx/mariadb-11.3.0/sql/filesort.cc:408
      #8 0x00005555573791c3 in create_sort_index (thd=0x62c0001e0288, join=0x62d000079850, tab=0x62d00007f650, fsort=0x62d000083b80) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:26843
      #9 0x00005555573677dd in st_join_table::sort_table (this=0x62d00007f650) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:24485
      #10 0x0000555557366bdc in join_init_read_record (tab=0x62d00007f650) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:24405
      #11 0x0000555557360006 in sub_select (join=0x62d000079850, join_tab=0x62d00007f650, end_of_records=false) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:23441
      #12 0x000055555735dadd in do_select (join=0x62d000079850, procedure=0x0) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:22961
      #13 0x00005555572dbfe9 in JOIN::exec_inner (this=0x62d000079850) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:4941
      #14 0x00005555572d93a0 in JOIN::exec (this=0x62d000079850) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:4718
      #15 0x0000555557dce72f in subselect_single_select_engine::exec (this=0x62900016ec70) at /home/wx/mariadb-11.3.0/sql/item_subselect.cc:4159
      #16 0x0000555557da9c85 in Item_subselect::exec (this=0x62900016ead0) at /home/wx/mariadb-11.3.0/sql/item_subselect.cc:812
      #17 0x0000555557db09eb in Item_singlerow_subselect::val_decimal (this=0x62900016ead0, decimal_value=0x7fffd192a118) at /home/wx/mariadb-11.3.0/sql/item_subselect.cc:1525
      #18 0x0000555557899e4f in VDec::set (this=0x7fffd192a110, item=0x62900016ead0) at /home/wx/mariadb-11.3.0/sql/sql_type.cc:286
      #19 0x0000555557cb45d2 in VDec2_lazy::VDec2_lazy (this=0x7fffd192a0c0, a=0x62d0000928c8, b=0x62900016ead0) at /home/wx/mariadb-11.3.0/sql/sql_type.h:510
      #20 0x0000555557c74bce in Item_func_plus::decimal_op (this=0x62900016ecb8, decimal_value=0x7fffd192a288) at /home/wx/mariadb-11.3.0/sql/item_func.cc:1196
      #21 0x000055555789a242 in VDec_op::VDec_op (this=0x7fffd192a280, item=0x62900016ecb8) at /home/wx/mariadb-11.3.0/sql/sql_type.cc:300
      #22 0x00005555578b7227 in Type_handler_decimal_result::Item_func_hybrid_field_type_val_decimal (this=0x55555b7b6cc0 <type_handler_newdecimal>, item=0x62900016ecb8, dec=0x7fffd192a3d8) at /home/wx/mariadb-11.3.0/sql/sql_type.cc:5347
      #23 0x0000555557181492 in Item_func_hybrid_field_type::val_decimal (this=0x62900016ecb8, dec=0x7fffd192a3d8) at /home/wx/mariadb-11.3.0/sql/item_func.h:912
      #24 0x000055555789a036 in VDec::VDec (this=0x7fffd192a3d0, item=0x62900016ecb8) at /home/wx/mariadb-11.3.0/sql/sql_type.cc:293
      #25 0x0000555557beaf4b in Arg_comparator::compare_decimal (this=0x62900016eec8) at /home/wx/mariadb-11.3.0/sql/item_cmpfunc.cc:865
      #26 0x0000555557c2e1d4 in Arg_comparator::compare (this=0x62900016eec8) at /home/wx/mariadb-11.3.0/sql/item_cmpfunc.h:104
      #27 0x0000555557bf5ec7 in Item_func_ge::val_int (this=0x62900016ee10) at /home/wx/mariadb-11.3.0/sql/item_cmpfunc.cc:1812
      #28 0x0000555557ba521f in Item::save_int_in_field (this=0x62900016ee10, field=0x61a000421a00, no_conversions=true) at /home/wx/mariadb-11.3.0/sql/item.cc:6843
      #29 0x00005555578b2242 in Type_handler_int_result::Item_save_in_field (this=0x55555b7b68c0 <type_handler_bool>, item=0x62900016ee10, field=0x61a000421a00, no_conversions=true) at /home/wx/mariadb-11.3.0/sql/sql_type.cc:4341
      #30 0x0000555557ba540b in Item::save_in_field (this=0x62900016ee10, field=0x61a000421a00, no_conversions=true) at /home/wx/mariadb-11.3.0/sql/item.cc:6853
      #31 0x0000555556ea7174 in Item_result_field::save_in_result_field (this=0x62900016ee10, no_conversions=true) at /home/wx/mariadb-11.3.0/sql/item.h:3490
      #32 0x00005555573879d1 in copy_funcs (func_ptr=0x62100014ac30, thd=0x62c0001e0288) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:28843
      #33 0x000055555736c428 in end_write (join=0x62d000075050, join_tab=0x62d000091a30, end_of_records=false) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:24979
      #34 0x00005555573a1a77 in AGGR_OP::put_record (this=0x62d000092ea0, end_of_records=false) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:32254
      #35 0x00005555573b632d in AGGR_OP::put_record (this=0x62d000092ea0) at /home/wx/mariadb-11.3.0/sql/sql_select.h:1180
      #36 0x000055555735ec6a in sub_select_postjoin_aggr (join=0x62d000075050, join_tab=0x62d000091a30, end_of_records=false) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:23134
      #37 0x000055555736194d in evaluate_join_record (join=0x62d000075050, join_tab=0x62d0000915b8, error=0) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:23677
      #38 0x00005555573601c2 in sub_select (join=0x62d000075050, join_tab=0x62d0000915b8, end_of_records=false) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:23444
      #39 0x000055555735dadd in do_select (join=0x62d000075050, procedure=0x0) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:22961
      #40 0x00005555572dbfe9 in JOIN::exec_inner (this=0x62d000075050) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:4941
      #41 0x00005555572d93a0 in JOIN::exec (this=0x62d000075050) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:4718
      #42 0x0000555557dce72f in subselect_single_select_engine::exec (this=0x62900016fe18) at /home/wx/mariadb-11.3.0/sql/item_subselect.cc:4159
      #43 0x0000555557da9c85 in Item_subselect::exec (this=0x62900016fc78) at /home/wx/mariadb-11.3.0/sql/item_subselect.cc:812
      #44 0x0000555557db09eb in Item_singlerow_subselect::val_decimal (this=0x62900016fc78, decimal_value=0x7fffd192b7b8) at /home/wx/mariadb-11.3.0/sql/item_subselect.cc:1525
      #45 0x0000555557899e4f in VDec::set (this=0x7fffd192b7b0, item=0x62900016fc78) at /home/wx/mariadb-11.3.0/sql/sql_type.cc:286
      #46 0x0000555557cb45d2 in VDec2_lazy::VDec2_lazy (this=0x7fffd192b760, a=0x6290000f7240, b=0x62900016fc78) at /home/wx/mariadb-11.3.0/sql/sql_type.h:510
      #47 0x0000555557c77568 in Item_func_mul::decimal_op (this=0x62900016fe60, decimal_value=0x7fffd192b928) at /home/wx/mariadb-11.3.0/sql/item_func.cc:1460
      #48 0x000055555789a242 in VDec_op::VDec_op (this=0x7fffd192b920, item=0x62900016fe60) at /home/wx/mariadb-11.3.0/sql/sql_type.cc:300
      #49 0x00005555578b7227 in Type_handler_decimal_result::Item_func_hybrid_field_type_val_decimal (this=0x55555b7b6cc0 <type_handler_newdecimal>, item=0x62900016fe60, dec=0x7fffd192ba78) at /home/wx/mariadb-11.3.0/sql/sql_type.cc:5347
      #50 0x0000555557181492 in Item_func_hybrid_field_type::val_decimal (this=0x62900016fe60, dec=0x7fffd192ba78) at /home/wx/mariadb-11.3.0/sql/item_func.h:912
      #51 0x000055555789a036 in VDec::VDec (this=0x7fffd192ba70, item=0x62900016fe60) at /home/wx/mariadb-11.3.0/sql/sql_type.cc:293
      #52 0x0000555557beaf4b in Arg_comparator::compare_decimal (this=0x629000170070) at /home/wx/mariadb-11.3.0/sql/item_cmpfunc.cc:865
      #53 0x0000555557c2e1d4 in Arg_comparator::compare (this=0x629000170070) at /home/wx/mariadb-11.3.0/sql/item_cmpfunc.h:104
      #54 0x0000555557bf6037 in Item_func_le::val_int (this=0x62900016ffb8) at /home/wx/mariadb-11.3.0/sql/item_cmpfunc.cc:1827
      #55 0x00005555578b4b6e in Type_handler_int_result::Item_val_bool (this=0x55555b7b68c0 <type_handler_bool>, item=0x62900016ffb8) at /home/wx/mariadb-11.3.0/sql/sql_type.cc:5082
      #56 0x0000555556e147f6 in Item::val_bool (this=0x62900016ffb8) at /home/wx/mariadb-11.3.0/sql/item.h:1701
      #57 0x0000555557c1797a in Item_cond_and::val_int (this=0x629000170690) at /home/wx/mariadb-11.3.0/sql/item_cmpfunc.cc:5524
      #58 0x00005555578b4b6e in Type_handler_int_result::Item_val_bool (this=0x55555b7b68c0 <type_handler_bool>, item=0x629000170690) at /home/wx/mariadb-11.3.0/sql/sql_type.cc:5082
      #59 0x0000555556e147f6 in Item::val_bool (this=0x629000170690) at /home/wx/mariadb-11.3.0/sql/item.h:1701
      #60 0x0000555557c03238 in Item_func_case_searched::find_item (this=0x6290001708b8) at /home/wx/mariadb-11.3.0/sql/item_cmpfunc.cc:3017
      #61 0x0000555557c03847 in Item_func_case::str_op (this=0x6290001708b8, str=0x6290001708e0) at /home/wx/mariadb-11.3.0/sql/item_cmpfunc.cc:3050
      #62 0x00005555578e473d in Item_func_hybrid_field_type::str_op_with_null_check (this=0x6290001708b8, str=0x6290001708e0) at /home/wx/mariadb-11.3.0/sql/item_func.h:837
      #63 0x0000555557c728c3 in Item_func_hybrid_field_type::val_decimal_from_str_op (this=0x6290001708b8, decimal_value=0x7fffd192bed8) at /home/wx/mariadb-11.3.0/sql/item_func.cc:959
      #64 0x00005555578b85a7 in Type_handler_string_result::Item_func_hybrid_field_type_val_decimal (this=0x55555b7b7080 <type_handler_varchar>, item=0x6290001708b8, dec=0x7fffd192bed8) at /home/wx/mariadb-11.3.0/sql/sql_type.cc:5627
      #65 0x0000555557181492 in Item_func_hybrid_field_type::val_decimal (this=0x6290001708b8, dec=0x7fffd192bed8) at /home/wx/mariadb-11.3.0/sql/item_func.h:912
      #66 0x000055555789a036 in VDec::VDec (this=0x7fffd192bed0, item=0x6290001708b8) at /home/wx/mariadb-11.3.0/sql/sql_type.cc:293
      #67 0x0000555557bfc13f in Item_func_between::val_int_cmp_decimal (this=0x629000170ad8) at /home/wx/mariadb-11.3.0/sql/item_cmpfunc.cc:2298
      #68 0x00005555578b8c24 in Type_handler_decimal_result::Item_func_between_val_int (this=0x55555b7b6cc0 <type_handler_newdecimal>, func=0x629000170ad8) at /home/wx/mariadb-11.3.0/sql/sql_type.cc:5713
      #69 0x0000555556eaae67 in Item_func_between::val_int (this=0x629000170ad8) at /home/wx/mariadb-11.3.0/sql/item_cmpfunc.h:996
      #70 0x0000555557360f52 in evaluate_join_record (join=0x62d000073c00, join_tab=0x62f000001ff8, error=0) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:23545
      #71 0x00005555573601c2 in sub_select (join=0x62d000073c00, join_tab=0x62f000001ff8, end_of_records=false) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:23444
      #72 0x000055555735dadd in do_select (join=0x62d000073c00, procedure=0x0) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:22961
      #73 0x00005555572dbfe9 in JOIN::exec_inner (this=0x62d000073c00) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:4941
      #74 0x00005555572d93a0 in JOIN::exec (this=0x62d000073c00) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:4718
      #75 0x0000555557dce72f in subselect_single_select_engine::exec (this=0x629000170f88) at /home/wx/mariadb-11.3.0/sql/item_subselect.cc:4159
      #76 0x0000555557da9c85 in Item_subselect::exec (this=0x629000170de8) at /home/wx/mariadb-11.3.0/sql/item_subselect.cc:812
      #77 0x0000555557db09eb in Item_singlerow_subselect::val_decimal (this=0x629000170de8, decimal_value=0x7fffd192cfb8) at /home/wx/mariadb-11.3.0/sql/item_subselect.cc:1525
      #78 0x000055555789a036 in VDec::VDec (this=0x7fffd192cfb0, item=0x629000170de8) at /home/wx/mariadb-11.3.0/sql/sql_type.cc:293
      #79 0x0000555557bfc21c in Item_func_between::val_int_cmp_decimal (this=0x629000171108) at /home/wx/mariadb-11.3.0/sql/item_cmpfunc.cc:2301
      #80 0x00005555578b8c24 in Type_handler_decimal_result::Item_func_between_val_int (this=0x55555b7b6cc0 <type_handler_newdecimal>, func=0x629000171108) at /home/wx/mariadb-11.3.0/sql/sql_type.cc:5713
      #81 0x0000555556eaae67 in Item_func_between::val_int (this=0x629000171108) at /home/wx/mariadb-11.3.0/sql/item_cmpfunc.h:996
      #82 0x00005555572dadd6 in JOIN::exec_inner (this=0x62d000072610) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:4835
      #83 0x00005555572d93a0 in JOIN::exec (this=0x62d000072610) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:4718
      #84 0x00005555573a840c in Sql_cmd_dml::execute_inner (this=0x6290000f62e0, thd=0x62c0001e0288) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:33413
      #85 0x0000555557569d49 in Sql_cmd_update::execute_inner (this=0x6290000f62e0, thd=0x62c0001e0288) at /home/wx/mariadb-11.3.0/sql/sql_update.cc:3069
      #86 0x00005555573a7f0d in Sql_cmd_dml::execute (this=0x6290000f62e0, thd=0x62c0001e0288) at /home/wx/mariadb-11.3.0/sql/sql_select.cc:33350
      #87 0x00005555571c1637 in mysql_execute_command (thd=0x62c0001e0288, is_called_from_prepared_stmt=false) at /home/wx/mariadb-11.3.0/sql/sql_parse.cc:4361
      #88 0x00005555571d95e2 in mysql_parse (thd=0x62c0001e0288, rawbuf=0x6290000f52a8 "UPDATE x SET x = 1 WHERE ( x BETWEEN ( SELECT x FROM x AS x WHERE CASE WHEN x * ( SELECT x * ( SELECT x FROM ( SELECT x FROM x GROUP BY ( SELECT 1 ORDER BY x , x DESC , x , x IN ( SELECT DISTINCT x FR"..., length=784, parser_state=0x7fffd192e870) at /home/wx/mariadb-11.3.0/sql/sql_parse.cc:7734
      #89 0x00005555571b1237 in dispatch_command (command=COM_QUERY, thd=0x62c0001e0288, packet=0x6290000fa289 " UPDATE x SET x = 1 WHERE ( x BETWEEN ( SELECT x FROM x AS x WHERE CASE WHEN x * ( SELECT x * ( SELECT x FROM ( SELECT x FROM x GROUP BY ( SELECT 1 ORDER BY x , x DESC , x , x IN ( SELECT DISTINCT x F"..., packet_length=788, blocking=true) at /home/wx/mariadb-11.3.0/sql/sql_parse.cc:1893
      #90 0x00005555571adf7c in do_command (thd=0x62c0001e0288, blocking=true) at /home/wx/mariadb-11.3.0/sql/sql_parse.cc:1406
      #91 0x000055555768e557 in do_handle_one_connection (connect=0x611000064ac8, put_in_cache=true) at /home/wx/mariadb-11.3.0/sql/sql_connect.cc:1445
      #92 0x000055555768deb4 in handle_one_connection (arg=0x611000064988) at /home/wx/mariadb-11.3.0/sql/sql_connect.cc:1347
      #93 0x00005555582fa350 in pfs_spawn_thread (arg=0x618000005508) at /home/wx/mariadb-11.3.0/storage/perfschema/pfs.cc:2201
      #94 0x00007ffff7115609 in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
      #95 0x00007ffff6ce8133 in clone () from /lib/x86_64-linux-gnu/libc.so.6

      Attachments

        Issue Links

          Activity

            Xin Wen Xin Wen created issue -
            alice Alice Sherepa made changes -
            Field Original Value New Value
            Affects Version/s 11.1 [ 28549 ]
            Affects Version/s 11.2 [ 28603 ]
            alice Alice Sherepa added a comment - - edited

            Thanks!
            Repeatable on 11.1-11.2, earier - ERROR 23000: Column 'x' in group statement is ambiguous

            Version: '11.1.3-MariaDB-debug-log'  
            231107 17:58:34 [ERROR] mysqld got signal 11 ;
             
            Server version: 11.1.3-MariaDB-debug-log source revision: 5d3e14d780a227d87ea2831481958ac4d5bbd905
             
            sigaction.c:0(__restore_rt)[0x7f7f852b0420]
            sql/my_decimal.h:132(my_decimal::operator=(my_decimal const&))[0x5620c8212b88]
            sql/my_decimal.h:354(my_decimal2decimal(my_decimal const*, my_decimal*))[0x5620c8212d79]
            sql/my_decimal.cc:207(my_decimal::to_binary(unsigned char*, int, unsigned short, unsigned int) const)[0x5620c84d8134]
            sql/filesort.cc:1381(Type_handler_decimal_result::make_sort_key_part(unsigned char*, Item*, SORT_FIELD_ATTR const*, String*) const)[0x5620c831c932]
            sql/filesort.cc:2959(make_sortkey(Sort_param*, unsigned char*))[0x5620c8320def]
            sql/filesort.cc:1412(make_sortkey(Sort_param*, unsigned char*, unsigned char*, bool))[0x5620c831ca65]
            sql/filesort.cc:1030(find_all_keys(THD*, Sort_param*, SQL_SELECT*, SORT_INFO*, st_io_cache*, st_io_cache*, Bounded_queue<unsigned char, unsigned char>*, unsigned long long*))[0x5620c831b678]
            sql/filesort.cc:408(filesort(THD*, TABLE*, Filesort*, Filesort_tracker*, JOIN*, unsigned long long))[0x5620c83193d6]
            sql/sql_select.cc:26914(create_sort_index(THD*, JOIN*, st_join_table*, Filesort*))[0x5620c7fe8d4b]
            sql/sql_select.cc:24553(st_join_table::sort_table())[0x5620c7fe2bea]
            sql/sql_select.cc:24473(join_init_read_record(st_join_table*))[0x5620c7fe2787]
            sql/sql_select.cc:23508(sub_select(JOIN*, st_join_table*, bool))[0x5620c7fe0243]
            sql/sql_select.cc:23028(do_select(JOIN*, Procedure*))[0x5620c7fdf3fc]
            sql/sql_select.cc:4943(JOIN::exec_inner())[0x5620c7fac228]
            sql/sql_select.cc:4720(JOIN::exec())[0x5620c7fab221]
            sql/item_subselect.cc:4159(subselect_single_select_engine::exec())[0x5620c8442b61]
            sql/item_subselect.cc:812(Item_subselect::exec())[0x5620c84350e9]
            sql/item_subselect.cc:1525(Item_singlerow_subselect::val_decimal(my_decimal*))[0x5620c8437817]
            sql/sql_type.cc:286(VDec::set(Item*))[0x5620c81f6a02]
            sql/sql_type.h:545(VDec2_lazy::VDec2_lazy(Item*, Item*))[0x5620c83cdb76]
            sql/item_func.cc:1206(Item_func_plus::decimal_op(my_decimal*))[0x5620c83b58e2]
            sql/sql_type.cc:300(VDec_op::VDec_op(Item_func_hybrid_field_type*))[0x5620c81f6bf7]
            sql/sql_type.cc:5340(Type_handler_decimal_result::Item_func_hybrid_field_type_val_decimal(Item_func_hybrid_field_type*, my_decimal*) const)[0x5620c8204ebe]
            sql/item_func.h:924(Item_func_hybrid_field_type::val_decimal(my_decimal*))[0x5620c7f1d4a6]
            sql/sql_type.cc:293(VDec::VDec(Item*))[0x5620c81f6aeb]
            sql/item_cmpfunc.cc:915(Arg_comparator::compare_decimal())[0x5620c8377956]
            sql/item_cmpfunc.h:104(Arg_comparator::compare())[0x5620c83907e0]
            sql/item_cmpfunc.cc:1861(Item_func_ge::val_int())[0x5620c837ae06]
            sql/item.cc:6854(Item::save_int_in_field(Field*, bool))[0x5620c835c73c]
            sql/sql_type.cc:4335(Type_handler_int_result::Item_save_in_field(Item*, Field*, bool) const)[0x5620c820273c]
            sql/item.cc:6864(Item::save_in_field(Field*, bool))[0x5620c835c7f1]
            sql/item.h:3474(Item_result_field::save_in_result_field(bool))[0x5620c7de0be4]
            sql/sql_select.cc:28924(copy_funcs(Item**, THD const*))[0x5620c7fee2a9]
            sql/sql_select.cc:25047(end_write(JOIN*, st_join_table*, bool))[0x5620c7fe44c3]
            sql/sql_select.cc:32343(AGGR_OP::put_record(bool))[0x5620c7ff89bc]
            sql/sql_select.h:1184(AGGR_OP::put_record())[0x5620c80010f3]
            sql/sql_select.cc:23201(sub_select_postjoin_aggr(JOIN*, st_join_table*, bool))[0x5620c7fdfaf3]
            sql/sql_select.cc:23744(evaluate_join_record(JOIN*, st_join_table*, int))[0x5620c7fe0aef]
            sql/sql_select.cc:23511(sub_select(JOIN*, st_join_table*, bool))[0x5620c7fe02b8]
            sql/sql_select.cc:23028(do_select(JOIN*, Procedure*))[0x5620c7fdf3fc]
            sql/sql_select.cc:4943(JOIN::exec_inner())[0x5620c7fac228]
            sql/sql_select.cc:4720(JOIN::exec())[0x5620c7fab221]
            sql/item_subselect.cc:4159(subselect_single_select_engine::exec())[0x5620c8442b61]
            sql/item_subselect.cc:812(Item_subselect::exec())[0x5620c84350e9]
            sql/item_subselect.cc:1525(Item_singlerow_subselect::val_decimal(my_decimal*))[0x5620c8437817]
            sql/sql_type.cc:286(VDec::set(Item*))[0x5620c81f6a02]
            sql/sql_type.h:545(VDec2_lazy::VDec2_lazy(Item*, Item*))[0x5620c83cdb76]
            sql/item_func.cc:1414(Item_func_mul::decimal_op(my_decimal*))[0x5620c83b66f0]
            sql/sql_type.cc:300(VDec_op::VDec_op(Item_func_hybrid_field_type*))[0x5620c81f6bf7]
            sql/sql_type.cc:5340(Type_handler_decimal_result::Item_func_hybrid_field_type_val_decimal(Item_func_hybrid_field_type*, my_decimal*) const)[0x5620c8204ebe]
            sql/item_func.h:924(Item_func_hybrid_field_type::val_decimal(my_decimal*))[0x5620c7f1d4a6]
            sql/sql_type.cc:293(VDec::VDec(Item*))[0x5620c81f6aeb]
            sql/item_cmpfunc.cc:915(Arg_comparator::compare_decimal())[0x5620c8377956]
            sql/item_cmpfunc.h:104(Arg_comparator::compare())[0x5620c83907e0]
            sql/item_cmpfunc.cc:1876(Item_func_le::val_int())[0x5620c837af6e]
            sql/sql_type.cc:5075(Type_handler_int_result::Item_val_bool(Item*) const)[0x5620c8203f93]
            sql/item.h:1705(Item::val_bool())[0x5620c7da8588]
            sql/item_cmpfunc.cc:5604(Item_cond_and::val_int())[0x5620c8387c0e]
            sql/sql_type.cc:5075(Type_handler_int_result::Item_val_bool(Item*) const)[0x5620c8203f93]
            sql/item.h:1705(Item::val_bool())[0x5620c7da8588]
            sql/item_cmpfunc.cc:3068(Item_func_case_searched::find_item())[0x5620c837f80e]
            sql/item_cmpfunc.cc:3101(Item_func_case::str_op(String*))[0x5620c837fa33]
            sql/item_func.h:848(Item_func_hybrid_field_type::str_op_with_null_check(String*))[0x5620c821ac3e]
            sql/item_func.cc:968(Item_func_hybrid_field_type::val_decimal_from_str_op(my_decimal*))[0x5620c83b4d7b]
            sql/sql_type.cc:5621(Type_handler_string_result::Item_func_hybrid_field_type_val_decimal(Item_func_hybrid_field_type*, my_decimal*) const)[0x5620c82056ed]
            sql/item_func.h:924(Item_func_hybrid_field_type::val_decimal(my_decimal*))[0x5620c7f1d4a6]
            sql/sql_type.cc:293(VDec::VDec(Item*))[0x5620c81f6aeb]
            sql/item_cmpfunc.cc:2350(Item_func_between::val_int_cmp_decimal())[0x5620c837d1b7]
            sql/sql_type.cc:5707(Type_handler_decimal_result::Item_func_between_val_int(Item_func_between*) const)[0x5620c8205a8c]
            sql/item_cmpfunc.h:997(Item_func_between::val_int())[0x5620c7de2699]
            sql/sql_select.cc:23612(evaluate_join_record(JOIN*, st_join_table*, int))[0x5620c7fe0746]
            sql/sql_select.cc:23511(sub_select(JOIN*, st_join_table*, bool))[0x5620c7fe02b8]
            sql/sql_select.cc:23028(do_select(JOIN*, Procedure*))[0x5620c7fdf3fc]
            sql/sql_select.cc:4943(JOIN::exec_inner())[0x5620c7fac228]
            sql/sql_select.cc:4720(JOIN::exec())[0x5620c7fab221]
            sql/item_subselect.cc:4159(subselect_single_select_engine::exec())[0x5620c8442b61]
            sql/item_subselect.cc:812(Item_subselect::exec())[0x5620c84350e9]
            sql/item_subselect.cc:1525(Item_singlerow_subselect::val_decimal(my_decimal*))[0x5620c8437817]
            sql/sql_type.cc:293(VDec::VDec(Item*))[0x5620c81f6aeb]
            sql/item_cmpfunc.cc:2352(Item_func_between::val_int_cmp_decimal())[0x5620c837d20d]
            sql/sql_type.cc:5707(Type_handler_decimal_result::Item_func_between_val_int(Item_func_between*) const)[0x5620c8205a8c]
            sql/item_cmpfunc.h:997(Item_func_between::val_int())[0x5620c7de2699]
            sql/sql_select.cc:4836(JOIN::exec_inner())[0x5620c7fabb8c]
            sql/sql_select.cc:4720(JOIN::exec())[0x5620c7fab221]
            sql/sql_select.cc:33502(Sql_cmd_dml::execute_inner(THD*))[0x5620c7ffb1cb]
            sql/sql_update.cc:3076(Sql_cmd_update::execute_inner(THD*))[0x5620c80a47e7]
            sql/sql_select.cc:33439(Sql_cmd_dml::execute(THD*))[0x5620c7ffaf45]
            sql/sql_parse.cc:4405(mysql_execute_command(THD*, bool))[0x5620c7f3af16]
            sql/sql_parse.cc:7782(mysql_parse(THD*, char*, unsigned int, Parser_state*))[0x5620c7f463a8]
            sql/sql_parse.cc:1894(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool))[0x5620c7f33747]
            sql/sql_parse.cc:1405(do_command(THD*, bool))[0x5620c7f320fb]
            sql/sql_connect.cc:1416(do_handle_one_connection(CONNECT*, bool))[0x5620c811e31d]
            sql/sql_connect.cc:1320(handle_one_connection)[0x5620c811e079]
            perfschema/pfs.cc:2203(pfs_spawn_thread)[0x5620c863dd51]
            nptl/pthread_create.c:478(start_thread)[0x7f7f852a4609]
             
            Query (0x7f7f50015600): UPDATE x SET x = 1 WHERE ( x BETWEEN ( SELECT x FROM x AS x WHERE CASE WHEN x * ( SELECT x * ( SELECT x FROM ( SELECT x FROM x GROUP BY ( SELECT 1 ORDER BY x , x DESC , x , x IN ( SELECT DISTINCT x FROM x WHERE - 'x' >= x IS NOT NULL = ( 1 < x AND x < 'x' ) ) LIMIT 1 OFFSET 1 ) ) AS x ORDER BY x , x DESC , x , x LIMIT 1 OFFSET 1 ) FROM x GROUP BY 'x' , ( SELECT x ) + ( SELECT ( SELECT x ) AS x FROM x WINDOW x AS ( PARTITION BY x ORDER BY x DESC ) ORDER BY ( SELECT 1 FROM x WHERE x = x ) , ( x AND x IS NULL AND x IN ( 1 , 1 , 1 , 1 , 1 ) ) BETWEEN 1 AND CASE WHEN x = 1 THEN 'x' ELSE x END DESC , x , x ) >= 1 WINDOW x AS ( PARTITION BY FALSE ORDER BY x DESC ) ) <= 1 AND x = x THEN 'x' END BETWEEN 1 AND 1 GROUP BY x ) AND x ) AND x = 1 AND ( x = 1 OR x = 1 ) ORDER BY x + x , x
            
            

            alice Alice Sherepa added a comment - - edited Thanks! Repeatable on 11.1-11.2, earier - ERROR 23000: Column 'x' in group statement is ambiguous Version: '11.1.3-MariaDB-debug-log' 231107 17:58:34 [ERROR] mysqld got signal 11 ;   Server version: 11.1.3-MariaDB-debug-log source revision: 5d3e14d780a227d87ea2831481958ac4d5bbd905   sigaction.c:0(__restore_rt)[0x7f7f852b0420] sql/my_decimal.h:132(my_decimal::operator=(my_decimal const&))[0x5620c8212b88] sql/my_decimal.h:354(my_decimal2decimal(my_decimal const*, my_decimal*))[0x5620c8212d79] sql/my_decimal.cc:207(my_decimal::to_binary(unsigned char*, int, unsigned short, unsigned int) const)[0x5620c84d8134] sql/filesort.cc:1381(Type_handler_decimal_result::make_sort_key_part(unsigned char*, Item*, SORT_FIELD_ATTR const*, String*) const)[0x5620c831c932] sql/filesort.cc:2959(make_sortkey(Sort_param*, unsigned char*))[0x5620c8320def] sql/filesort.cc:1412(make_sortkey(Sort_param*, unsigned char*, unsigned char*, bool))[0x5620c831ca65] sql/filesort.cc:1030(find_all_keys(THD*, Sort_param*, SQL_SELECT*, SORT_INFO*, st_io_cache*, st_io_cache*, Bounded_queue<unsigned char, unsigned char>*, unsigned long long*))[0x5620c831b678] sql/filesort.cc:408(filesort(THD*, TABLE*, Filesort*, Filesort_tracker*, JOIN*, unsigned long long))[0x5620c83193d6] sql/sql_select.cc:26914(create_sort_index(THD*, JOIN*, st_join_table*, Filesort*))[0x5620c7fe8d4b] sql/sql_select.cc:24553(st_join_table::sort_table())[0x5620c7fe2bea] sql/sql_select.cc:24473(join_init_read_record(st_join_table*))[0x5620c7fe2787] sql/sql_select.cc:23508(sub_select(JOIN*, st_join_table*, bool))[0x5620c7fe0243] sql/sql_select.cc:23028(do_select(JOIN*, Procedure*))[0x5620c7fdf3fc] sql/sql_select.cc:4943(JOIN::exec_inner())[0x5620c7fac228] sql/sql_select.cc:4720(JOIN::exec())[0x5620c7fab221] sql/item_subselect.cc:4159(subselect_single_select_engine::exec())[0x5620c8442b61] sql/item_subselect.cc:812(Item_subselect::exec())[0x5620c84350e9] sql/item_subselect.cc:1525(Item_singlerow_subselect::val_decimal(my_decimal*))[0x5620c8437817] sql/sql_type.cc:286(VDec::set(Item*))[0x5620c81f6a02] sql/sql_type.h:545(VDec2_lazy::VDec2_lazy(Item*, Item*))[0x5620c83cdb76] sql/item_func.cc:1206(Item_func_plus::decimal_op(my_decimal*))[0x5620c83b58e2] sql/sql_type.cc:300(VDec_op::VDec_op(Item_func_hybrid_field_type*))[0x5620c81f6bf7] sql/sql_type.cc:5340(Type_handler_decimal_result::Item_func_hybrid_field_type_val_decimal(Item_func_hybrid_field_type*, my_decimal*) const)[0x5620c8204ebe] sql/item_func.h:924(Item_func_hybrid_field_type::val_decimal(my_decimal*))[0x5620c7f1d4a6] sql/sql_type.cc:293(VDec::VDec(Item*))[0x5620c81f6aeb] sql/item_cmpfunc.cc:915(Arg_comparator::compare_decimal())[0x5620c8377956] sql/item_cmpfunc.h:104(Arg_comparator::compare())[0x5620c83907e0] sql/item_cmpfunc.cc:1861(Item_func_ge::val_int())[0x5620c837ae06] sql/item.cc:6854(Item::save_int_in_field(Field*, bool))[0x5620c835c73c] sql/sql_type.cc:4335(Type_handler_int_result::Item_save_in_field(Item*, Field*, bool) const)[0x5620c820273c] sql/item.cc:6864(Item::save_in_field(Field*, bool))[0x5620c835c7f1] sql/item.h:3474(Item_result_field::save_in_result_field(bool))[0x5620c7de0be4] sql/sql_select.cc:28924(copy_funcs(Item**, THD const*))[0x5620c7fee2a9] sql/sql_select.cc:25047(end_write(JOIN*, st_join_table*, bool))[0x5620c7fe44c3] sql/sql_select.cc:32343(AGGR_OP::put_record(bool))[0x5620c7ff89bc] sql/sql_select.h:1184(AGGR_OP::put_record())[0x5620c80010f3] sql/sql_select.cc:23201(sub_select_postjoin_aggr(JOIN*, st_join_table*, bool))[0x5620c7fdfaf3] sql/sql_select.cc:23744(evaluate_join_record(JOIN*, st_join_table*, int))[0x5620c7fe0aef] sql/sql_select.cc:23511(sub_select(JOIN*, st_join_table*, bool))[0x5620c7fe02b8] sql/sql_select.cc:23028(do_select(JOIN*, Procedure*))[0x5620c7fdf3fc] sql/sql_select.cc:4943(JOIN::exec_inner())[0x5620c7fac228] sql/sql_select.cc:4720(JOIN::exec())[0x5620c7fab221] sql/item_subselect.cc:4159(subselect_single_select_engine::exec())[0x5620c8442b61] sql/item_subselect.cc:812(Item_subselect::exec())[0x5620c84350e9] sql/item_subselect.cc:1525(Item_singlerow_subselect::val_decimal(my_decimal*))[0x5620c8437817] sql/sql_type.cc:286(VDec::set(Item*))[0x5620c81f6a02] sql/sql_type.h:545(VDec2_lazy::VDec2_lazy(Item*, Item*))[0x5620c83cdb76] sql/item_func.cc:1414(Item_func_mul::decimal_op(my_decimal*))[0x5620c83b66f0] sql/sql_type.cc:300(VDec_op::VDec_op(Item_func_hybrid_field_type*))[0x5620c81f6bf7] sql/sql_type.cc:5340(Type_handler_decimal_result::Item_func_hybrid_field_type_val_decimal(Item_func_hybrid_field_type*, my_decimal*) const)[0x5620c8204ebe] sql/item_func.h:924(Item_func_hybrid_field_type::val_decimal(my_decimal*))[0x5620c7f1d4a6] sql/sql_type.cc:293(VDec::VDec(Item*))[0x5620c81f6aeb] sql/item_cmpfunc.cc:915(Arg_comparator::compare_decimal())[0x5620c8377956] sql/item_cmpfunc.h:104(Arg_comparator::compare())[0x5620c83907e0] sql/item_cmpfunc.cc:1876(Item_func_le::val_int())[0x5620c837af6e] sql/sql_type.cc:5075(Type_handler_int_result::Item_val_bool(Item*) const)[0x5620c8203f93] sql/item.h:1705(Item::val_bool())[0x5620c7da8588] sql/item_cmpfunc.cc:5604(Item_cond_and::val_int())[0x5620c8387c0e] sql/sql_type.cc:5075(Type_handler_int_result::Item_val_bool(Item*) const)[0x5620c8203f93] sql/item.h:1705(Item::val_bool())[0x5620c7da8588] sql/item_cmpfunc.cc:3068(Item_func_case_searched::find_item())[0x5620c837f80e] sql/item_cmpfunc.cc:3101(Item_func_case::str_op(String*))[0x5620c837fa33] sql/item_func.h:848(Item_func_hybrid_field_type::str_op_with_null_check(String*))[0x5620c821ac3e] sql/item_func.cc:968(Item_func_hybrid_field_type::val_decimal_from_str_op(my_decimal*))[0x5620c83b4d7b] sql/sql_type.cc:5621(Type_handler_string_result::Item_func_hybrid_field_type_val_decimal(Item_func_hybrid_field_type*, my_decimal*) const)[0x5620c82056ed] sql/item_func.h:924(Item_func_hybrid_field_type::val_decimal(my_decimal*))[0x5620c7f1d4a6] sql/sql_type.cc:293(VDec::VDec(Item*))[0x5620c81f6aeb] sql/item_cmpfunc.cc:2350(Item_func_between::val_int_cmp_decimal())[0x5620c837d1b7] sql/sql_type.cc:5707(Type_handler_decimal_result::Item_func_between_val_int(Item_func_between*) const)[0x5620c8205a8c] sql/item_cmpfunc.h:997(Item_func_between::val_int())[0x5620c7de2699] sql/sql_select.cc:23612(evaluate_join_record(JOIN*, st_join_table*, int))[0x5620c7fe0746] sql/sql_select.cc:23511(sub_select(JOIN*, st_join_table*, bool))[0x5620c7fe02b8] sql/sql_select.cc:23028(do_select(JOIN*, Procedure*))[0x5620c7fdf3fc] sql/sql_select.cc:4943(JOIN::exec_inner())[0x5620c7fac228] sql/sql_select.cc:4720(JOIN::exec())[0x5620c7fab221] sql/item_subselect.cc:4159(subselect_single_select_engine::exec())[0x5620c8442b61] sql/item_subselect.cc:812(Item_subselect::exec())[0x5620c84350e9] sql/item_subselect.cc:1525(Item_singlerow_subselect::val_decimal(my_decimal*))[0x5620c8437817] sql/sql_type.cc:293(VDec::VDec(Item*))[0x5620c81f6aeb] sql/item_cmpfunc.cc:2352(Item_func_between::val_int_cmp_decimal())[0x5620c837d20d] sql/sql_type.cc:5707(Type_handler_decimal_result::Item_func_between_val_int(Item_func_between*) const)[0x5620c8205a8c] sql/item_cmpfunc.h:997(Item_func_between::val_int())[0x5620c7de2699] sql/sql_select.cc:4836(JOIN::exec_inner())[0x5620c7fabb8c] sql/sql_select.cc:4720(JOIN::exec())[0x5620c7fab221] sql/sql_select.cc:33502(Sql_cmd_dml::execute_inner(THD*))[0x5620c7ffb1cb] sql/sql_update.cc:3076(Sql_cmd_update::execute_inner(THD*))[0x5620c80a47e7] sql/sql_select.cc:33439(Sql_cmd_dml::execute(THD*))[0x5620c7ffaf45] sql/sql_parse.cc:4405(mysql_execute_command(THD*, bool))[0x5620c7f3af16] sql/sql_parse.cc:7782(mysql_parse(THD*, char*, unsigned int, Parser_state*))[0x5620c7f463a8] sql/sql_parse.cc:1894(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool))[0x5620c7f33747] sql/sql_parse.cc:1405(do_command(THD*, bool))[0x5620c7f320fb] sql/sql_connect.cc:1416(do_handle_one_connection(CONNECT*, bool))[0x5620c811e31d] sql/sql_connect.cc:1320(handle_one_connection)[0x5620c811e079] perfschema/pfs.cc:2203(pfs_spawn_thread)[0x5620c863dd51] nptl/pthread_create.c:478(start_thread)[0x7f7f852a4609]   Query (0x7f7f50015600): UPDATE x SET x = 1 WHERE ( x BETWEEN ( SELECT x FROM x AS x WHERE CASE WHEN x * ( SELECT x * ( SELECT x FROM ( SELECT x FROM x GROUP BY ( SELECT 1 ORDER BY x , x DESC , x , x IN ( SELECT DISTINCT x FROM x WHERE - 'x' >= x IS NOT NULL = ( 1 < x AND x < 'x' ) ) LIMIT 1 OFFSET 1 ) ) AS x ORDER BY x , x DESC , x , x LIMIT 1 OFFSET 1 ) FROM x GROUP BY 'x' , ( SELECT x ) + ( SELECT ( SELECT x ) AS x FROM x WINDOW x AS ( PARTITION BY x ORDER BY x DESC ) ORDER BY ( SELECT 1 FROM x WHERE x = x ) , ( x AND x IS NULL AND x IN ( 1 , 1 , 1 , 1 , 1 ) ) BETWEEN 1 AND CASE WHEN x = 1 THEN 'x' ELSE x END DESC , x , x ) >= 1 WINDOW x AS ( PARTITION BY FALSE ORDER BY x DESC ) ) <= 1 AND x = x THEN 'x' END BETWEEN 1 AND 1 GROUP BY x ) AND x ) AND x = 1 AND ( x = 1 OR x = 1 ) ORDER BY x + x , x
            alice Alice Sherepa made changes -
            Assignee Alice Sherepa [ alice ]
            Wangdada HeShan made changes -

            from MDEV-32989

            CREATE TABLE x ( x DEC PRIMARY KEY ) ;
            INSERT INTO x ( x ) VALUES ( 1 ) ;
            UPDATE x SET x = 1 WHERE ( x BETWEEN 
                ( SELECT x FROM x  WHERE  
                    ( SELECT ( SELECT x ) AS x FROM x ORDER BY  x BETWEEN 1 AND CASE WHEN x = 1 THEN 'x' ELSE x END , x  )   
                )AND x );
            

            serg Sergei Golubchik added a comment - from MDEV-32989 CREATE TABLE x ( x DEC PRIMARY KEY ) ; INSERT INTO x ( x ) VALUES ( 1 ) ; UPDATE x SET x = 1 WHERE ( x BETWEEN ( SELECT x FROM x WHERE ( SELECT ( SELECT x ) AS x FROM x ORDER BY x BETWEEN 1 AND CASE WHEN x = 1 THEN 'x' ELSE x END , x ) ) AND x );
            alice Alice Sherepa made changes -
            Fix Version/s 11.1 [ 28549 ]
            Fix Version/s 11.2 [ 28603 ]
            Fix Version/s 11.3 [ 28565 ]
            Fix Version/s 11.4 [ 29301 ]
            alice Alice Sherepa made changes -
            Affects Version/s 11.3 [ 28565 ]
            Affects Version/s 11.4 [ 29301 ]
            alice Alice Sherepa made changes -
            Assignee Alice Sherepa [ alice ] Sergei Petrunia [ psergey ]
            alice Alice Sherepa made changes -
            Status Open [ 1 ] Confirmed [ 10101 ]
            alice Alice Sherepa made changes -
            julien.fritsch Julien Fritsch made changes -
            Fix Version/s 11.3 [ 28565 ]
            alice Alice Sherepa added a comment -

            simplified version crashes 10.5-11.5:

            Version: '10.5.26-MariaDB-debug-log'
            240805 15:01:38 [ERROR] mysqld got signal 11 ;
             
            Server version: 10.5.26-MariaDB-debug-log source revision: 8b51d34462370b96af420587fdc07934abcea8ba
             
            sql/signal_handler.cc:238(handle_fatal_signal)[0x55f87342b9a8]
            sigaction.c:0(__restore_rt)[0x7fc972781420]
            sql/my_decimal.h:128(my_decimal::operator=(my_decimal const&))[0x55f87320166d]
            sql/my_decimal.h:342(my_decimal2decimal(my_decimal const*, my_decimal*))[0x55f8732018f3]
            sql/my_decimal.cc:206(my_decimal::to_binary(unsigned char*, int, int, unsigned int) const)[0x55f87381f5ba]
            sql/filesort.cc:1317(Type_handler_decimal_result::make_sort_key_part(unsigned char*, Item*, SORT_FIELD_ATTR const*, String*) const)[0x55f87341abdf]
            sql/filesort.cc:3033(make_sortkey(Sort_param*, unsigned char*))[0x55f873426813]
            sql/filesort.cc:1348(make_sortkey(Sort_param*, unsigned char*, unsigned char*, bool))[0x55f87341aead]
            sql/filesort.cc:966(find_all_keys(THD*, Sort_param*, SQL_SELECT*, SORT_INFO*, st_io_cache*, st_io_cache*, Bounded_queue<unsigned char, unsigned char>*, unsigned long long*))[0x55f87341813c]
            sql/filesort.cc:352(filesort(THD*, TABLE*, Filesort*, Filesort_tracker*, JOIN*, unsigned long long))[0x55f8734134f7]
            sql/sql_select.cc:24675(create_sort_index(THD*, JOIN*, st_join_table*, Filesort*))[0x55f872d36572]
            sql/sql_select.cc:22280(st_join_table::sort_table())[0x55f872d2491d]
            sql/sql_select.cc:22219(join_init_read_record(st_join_table*))[0x55f872d23e1f]
            sql/sql_select.cc:21273(sub_select(JOIN*, st_join_table*, bool))[0x55f872d1d43b]
            sql/sql_select.cc:20793(do_select(JOIN*, Procedure*))[0x55f872d1b31a]
            sql/sql_select.cc:4657(JOIN::exec_inner())[0x55f872ca5118]
            sql/sql_select.cc:4438(JOIN::exec())[0x55f872ca2726]
            sql/item_subselect.cc:4101(subselect_single_select_engine::exec())[0x55f87369d5cc]
            sql/item_subselect.cc:799(Item_subselect::exec())[0x55f873677b54]
            sql/item_subselect.cc:1441(Item_singlerow_subselect::val_int())[0x55f87367dae7]
            sql/sql_select.cc:4552(JOIN::exec_inner())[0x55f872ca403c]
            sql/sql_select.cc:4438(JOIN::exec())[0x55f872ca2726]
            sql/item_subselect.cc:4101(subselect_single_select_engine::exec())[0x55f87369d5cc]
            sql/item_subselect.cc:799(Item_subselect::exec())[0x55f873677b54]
            sql/item_subselect.cc:1504(Item_singlerow_subselect::val_decimal(my_decimal*))[0x55f87367ea5d]
            sql/sql_type.cc:302(VDec::VDec(Item*))[0x55f8731c641c]
            sql/item_cmpfunc.cc:2343(Item_func_between::val_int_cmp_decimal())[0x55f87351aa1a]
            sql/sql_type.cc:5792(Type_handler_decimal_result::Item_func_between_val_int(Item_func_between*) const)[0x55f8731e543a]
            sql/item_cmpfunc.h:943(Item_func_between::val_int())[0x55f87389b7bb]
            sql/sql_select.cc:21374(evaluate_join_record(JOIN*, st_join_table*, int))[0x55f872d1e32d]
            sql/sql_select.cc:21276(sub_select(JOIN*, st_join_table*, bool))[0x55f872d1d5f7]
            sql/sql_select.cc:20793(do_select(JOIN*, Procedure*))[0x55f872d1b31a]
            sql/sql_select.cc:4657(JOIN::exec_inner())[0x55f872ca5118]
            sql/sql_select.cc:4438(JOIN::exec())[0x55f872ca2726]
            sql/sql_select.cc:4916(mysql_select(THD*, TABLE_LIST*, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*))[0x55f872ca6b67]
            sql/sql_update.cc:1970(mysql_multi_update(THD*, TABLE_LIST*, List<Item>*, List<Item>*, Item*, unsigned long long, enum_duplicates, bool, st_select_lex_unit*, st_select_lex*, multi_update**))[0x55f872ef18cb]
            sql/sql_parse.cc:4575(mysql_execute_command(THD*))[0x55f872bcbfee]
            sql/sql_parse.cc:8229(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x55f872be55db]
            sql/sql_parse.cc:1895(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x55f872bba7db]
            sql/sql_parse.cc:1376(do_command(THD*))[0x55f872bb7143]
            sql/sql_connect.cc:1417(do_handle_one_connection(CONNECT*, bool))[0x55f87301e8e6]
            sql/sql_connect.cc:1321(handle_one_connection)[0x55f87301e24a]
            perfschema/pfs.cc:2203(pfs_spawn_thread)[0x55f873ca9078]
            nptl/pthread_create.c:478(start_thread)[0x7fc972775609]
             
            Query (0x62b0000852a8): UPDATE x SET x = 1 WHERE ( x BETWEEN 
            ( SELECT x FROM x  WHERE  
            ( SELECT ( SELECT x ) AS x FROM x ORDER BY  x BETWEEN 1 AND CASE WHEN x = 1 THEN 'x' ELSE x END , x  )   
            )AND x )
            

            alice Alice Sherepa added a comment - simplified version crashes 10.5-11.5: Version: '10.5.26-MariaDB-debug-log' 240805 15:01:38 [ERROR] mysqld got signal 11 ;   Server version: 10.5.26-MariaDB-debug-log source revision: 8b51d34462370b96af420587fdc07934abcea8ba   sql/signal_handler.cc:238(handle_fatal_signal)[0x55f87342b9a8] sigaction.c:0(__restore_rt)[0x7fc972781420] sql/my_decimal.h:128(my_decimal::operator=(my_decimal const&))[0x55f87320166d] sql/my_decimal.h:342(my_decimal2decimal(my_decimal const*, my_decimal*))[0x55f8732018f3] sql/my_decimal.cc:206(my_decimal::to_binary(unsigned char*, int, int, unsigned int) const)[0x55f87381f5ba] sql/filesort.cc:1317(Type_handler_decimal_result::make_sort_key_part(unsigned char*, Item*, SORT_FIELD_ATTR const*, String*) const)[0x55f87341abdf] sql/filesort.cc:3033(make_sortkey(Sort_param*, unsigned char*))[0x55f873426813] sql/filesort.cc:1348(make_sortkey(Sort_param*, unsigned char*, unsigned char*, bool))[0x55f87341aead] sql/filesort.cc:966(find_all_keys(THD*, Sort_param*, SQL_SELECT*, SORT_INFO*, st_io_cache*, st_io_cache*, Bounded_queue<unsigned char, unsigned char>*, unsigned long long*))[0x55f87341813c] sql/filesort.cc:352(filesort(THD*, TABLE*, Filesort*, Filesort_tracker*, JOIN*, unsigned long long))[0x55f8734134f7] sql/sql_select.cc:24675(create_sort_index(THD*, JOIN*, st_join_table*, Filesort*))[0x55f872d36572] sql/sql_select.cc:22280(st_join_table::sort_table())[0x55f872d2491d] sql/sql_select.cc:22219(join_init_read_record(st_join_table*))[0x55f872d23e1f] sql/sql_select.cc:21273(sub_select(JOIN*, st_join_table*, bool))[0x55f872d1d43b] sql/sql_select.cc:20793(do_select(JOIN*, Procedure*))[0x55f872d1b31a] sql/sql_select.cc:4657(JOIN::exec_inner())[0x55f872ca5118] sql/sql_select.cc:4438(JOIN::exec())[0x55f872ca2726] sql/item_subselect.cc:4101(subselect_single_select_engine::exec())[0x55f87369d5cc] sql/item_subselect.cc:799(Item_subselect::exec())[0x55f873677b54] sql/item_subselect.cc:1441(Item_singlerow_subselect::val_int())[0x55f87367dae7] sql/sql_select.cc:4552(JOIN::exec_inner())[0x55f872ca403c] sql/sql_select.cc:4438(JOIN::exec())[0x55f872ca2726] sql/item_subselect.cc:4101(subselect_single_select_engine::exec())[0x55f87369d5cc] sql/item_subselect.cc:799(Item_subselect::exec())[0x55f873677b54] sql/item_subselect.cc:1504(Item_singlerow_subselect::val_decimal(my_decimal*))[0x55f87367ea5d] sql/sql_type.cc:302(VDec::VDec(Item*))[0x55f8731c641c] sql/item_cmpfunc.cc:2343(Item_func_between::val_int_cmp_decimal())[0x55f87351aa1a] sql/sql_type.cc:5792(Type_handler_decimal_result::Item_func_between_val_int(Item_func_between*) const)[0x55f8731e543a] sql/item_cmpfunc.h:943(Item_func_between::val_int())[0x55f87389b7bb] sql/sql_select.cc:21374(evaluate_join_record(JOIN*, st_join_table*, int))[0x55f872d1e32d] sql/sql_select.cc:21276(sub_select(JOIN*, st_join_table*, bool))[0x55f872d1d5f7] sql/sql_select.cc:20793(do_select(JOIN*, Procedure*))[0x55f872d1b31a] sql/sql_select.cc:4657(JOIN::exec_inner())[0x55f872ca5118] sql/sql_select.cc:4438(JOIN::exec())[0x55f872ca2726] sql/sql_select.cc:4916(mysql_select(THD*, TABLE_LIST*, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*))[0x55f872ca6b67] sql/sql_update.cc:1970(mysql_multi_update(THD*, TABLE_LIST*, List<Item>*, List<Item>*, Item*, unsigned long long, enum_duplicates, bool, st_select_lex_unit*, st_select_lex*, multi_update**))[0x55f872ef18cb] sql/sql_parse.cc:4575(mysql_execute_command(THD*))[0x55f872bcbfee] sql/sql_parse.cc:8229(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x55f872be55db] sql/sql_parse.cc:1895(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x55f872bba7db] sql/sql_parse.cc:1376(do_command(THD*))[0x55f872bb7143] sql/sql_connect.cc:1417(do_handle_one_connection(CONNECT*, bool))[0x55f87301e8e6] sql/sql_connect.cc:1321(handle_one_connection)[0x55f87301e24a] perfschema/pfs.cc:2203(pfs_spawn_thread)[0x55f873ca9078] nptl/pthread_create.c:478(start_thread)[0x7fc972775609]   Query (0x62b0000852a8): UPDATE x SET x = 1 WHERE ( x BETWEEN ( SELECT x FROM x WHERE ( SELECT ( SELECT x ) AS x FROM x ORDER BY x BETWEEN 1 AND CASE WHEN x = 1 THEN 'x' ELSE x END , x ) )AND x )
            alice Alice Sherepa made changes -
            Fix Version/s 10.5 [ 23123 ]
            Fix Version/s 10.6 [ 24028 ]
            Fix Version/s 10.11 [ 27614 ]
            Fix Version/s 11.0 [ 28320 ]
            Fix Version/s 11.5 [ 29506 ]
            Fix Version/s 11.1 [ 28549 ]
            alice Alice Sherepa made changes -
            Affects Version/s 10.5 [ 23123 ]
            Affects Version/s 10.6 [ 24028 ]
            Affects Version/s 10.11 [ 27614 ]
            julien.fritsch Julien Fritsch made changes -
            Fix Version/s 11.0 [ 28320 ]
            julien.fritsch Julien Fritsch made changes -
            Fix Version/s 11.5 [ 29506 ]
            julien.fritsch Julien Fritsch made changes -
            Fix Version/s 11.2(EOL) [ 28603 ]

            People

              psergei Sergei Petrunia
              Xin Wen Xin Wen
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.