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

Server crashed in Cached_item_str::cmp / sortcmp or Assertion `item->null_value' failed in Type_handler_temporal_result::make_sort_key upon SELECT with NULLIF and ROLLUP

Details

    Description

      CREATE TABLE t1 (i INT);
      INSERT INTO t1 VALUES (1),(2);
      SELECT NULLIF( CAST( 'foo' AS DATE ), NULL & 'bar' ) AS f FROM t1 GROUP BY f WITH ROLLUP;
      

      10.3 debug d8da97b09ab

      mysqld: /data/src/10.3/sql/filesort.cc:1086: virtual void Type_handler_temporal_result::make_sort_key(uchar*, Item*, const SORT_FIELD_ATTR*, Sort_param*) const: Assertion `item->null_value' failed.
       
      #7  0x00007fb7ba6c9ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
      #8  0x0000562aca3ba7d2 in Type_handler_temporal_result::make_sort_key (this=0x562acb8483c8 <type_handler_newdate>, to=0x7fb7a4079460 '\245' <repeats 192 times>, "h4z\025\217\217\217\217"..., item=0x7fb7a4017760, sort_field=0x7fb7a40185f8, param=0x7fb7b486e550) at /data/src/10.3/sql/filesort.cc:1086
      #9  0x0000562aca3babc3 in make_sortkey (param=0x7fb7b486e550, to=0x7fb7a4079460 '\245' <repeats 192 times>, "h4z\025\217\217\217\217"..., ref_pos=0x7fb7b486e3d0 "") at /data/src/10.3/sql/filesort.cc:1190
      #10 0x0000562aca3b9d5b in find_all_keys (thd=0x7fb7a4000b00, param=0x7fb7b486e550, select=0x7fb7a40179f0, fs_info=0x7fb7a40951f0, buffpek_pointers=0x7fb7b486e750, tempfile=0x7fb7b486e5e0, pq=0x0, found_rows=0x7fb7a40953d0) at /data/src/10.3/sql/filesort.cc:863
      #11 0x0000562aca3b7f68 in filesort (thd=0x7fb7a4000b00, table=0x7fb7a400dbf0, filesort=0x7fb7a4017d78, tracker=0x7fb7a4018578, join=0x7fb7a4015d28, first_table_bit=1) at /data/src/10.3/sql/filesort.cc:278
      #12 0x0000562aca1543fc in create_sort_index (thd=0x7fb7a4000b00, join=0x7fb7a4015d28, tab=0x7fb7a4016fe0, fsort=0x7fb7a4017d78) at /data/src/10.3/sql/sql_select.cc:22365
      #13 0x0000562aca14ed0a in st_join_table::sort_table (this=0x7fb7a4016fe0) at /data/src/10.3/sql/sql_select.cc:20200
      #14 0x0000562aca14e91e in join_init_read_record (tab=0x7fb7a4016fe0) at /data/src/10.3/sql/sql_select.cc:20141
      #15 0x0000562aca14c8a8 in sub_select (join=0x7fb7a4015d28, join_tab=0x7fb7a4016fe0, end_of_records=false) at /data/src/10.3/sql/sql_select.cc:19235
      #16 0x0000562aca14be73 in do_select (join=0x7fb7a4015d28, procedure=0x0) at /data/src/10.3/sql/sql_select.cc:18778
      #17 0x0000562aca124e78 in JOIN::exec_inner (this=0x7fb7a4015d28) at /data/src/10.3/sql/sql_select.cc:3989
      #18 0x0000562aca124310 in JOIN::exec (this=0x7fb7a4015d28) at /data/src/10.3/sql/sql_select.cc:3783
      #19 0x0000562aca125551 in mysql_select (thd=0x7fb7a4000b00, tables=0x7fb7a4015460, wild_num=0, fields=..., conds=0x0, og_num=1, order=0x0, group=0x7fb7a4015be0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7fb7a4015d08, unit=0x7fb7a4004948, select_lex=0x7fb7a40050c0) at /data/src/10.3/sql/sql_select.cc:4188
      #20 0x0000562aca1177f5 in handle_select (thd=0x7fb7a4000b00, lex=0x7fb7a4004880, result=0x7fb7a4015d08, setup_tables_done_option=0) at /data/src/10.3/sql/sql_select.cc:382
      #21 0x0000562aca0e2991 in execute_sqlcom_select (thd=0x7fb7a4000b00, all_tables=0x7fb7a4015460) at /data/src/10.3/sql/sql_parse.cc:6556
      #22 0x0000562aca0d900e in mysql_execute_command (thd=0x7fb7a4000b00) at /data/src/10.3/sql/sql_parse.cc:3770
      #23 0x0000562aca0e639c in mysql_parse (thd=0x7fb7a4000b00, rawbuf=0x7fb7a4014d58 "SELECT NULLIF( CAST( 'foo' AS DATE ), NULL & 'bar' ) AS f FROM t1 GROUP BY f WITH ROLLUP", length=88, parser_state=0x7fb7b48705d0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:8013
      #24 0x0000562aca0d3a4f in dispatch_command (command=COM_QUERY, thd=0x7fb7a4000b00, packet=0x7fb7a40904f1 "", packet_length=88, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1842
      #25 0x0000562aca0d248e in do_command (thd=0x7fb7a4000b00) at /data/src/10.3/sql/sql_parse.cc:1387
      #26 0x0000562aca236e77 in do_handle_one_connection (connect=0x562acdc56c90) at /data/src/10.3/sql/sql_connect.cc:1402
      #27 0x0000562aca236c04 in handle_one_connection (arg=0x562acdc56c90) at /data/src/10.3/sql/sql_connect.cc:1308
      #28 0x0000562aca6be61d in pfs_spawn_thread (arg=0x562acdc6a520) at /data/src/10.3/storage/perfschema/pfs.cc:1862
      #29 0x00007fb7bc3a0494 in start_thread (arg=0x7fb7b4871700) at pthread_create.c:333
      #30 0x00007fb7ba78693f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      10.3 non-debug 209375fdd0

      #2  <signal handler called>
      #3  sortcmp (s=0x7f83980143e8, t=0x0, cs=0x56026f6f77c0 <my_charset_latin1>) at /data/src/10.3/sql/sql_string.cc:830
      #4  0x000056026e9207cb in Cached_item_str::cmp (this=0x7f83980143c8) at /data/src/10.3/sql/item_buff.cc:95
      #5  0x000056026e76bb85 in test_if_group_changed (list=...) at /data/src/10.3/sql/sql_select.cc:23588
      #6  0x000056026e772948 in end_send_group (join=0x7f8398012630, join_tab=<optimized out>, end_of_records=<optimized out>) at /data/src/10.3/sql/sql_select.cc:20597
      #7  0x000056026e74ec0b in evaluate_join_record (join=join@entry=0x7f8398012630, join_tab=join_tab@entry=0x7f83980138e8, error=<optimized out>) at /data/src/10.3/sql/sql_select.cc:19452
      #8  0x000056026e75b21b in sub_select (join=0x7f8398012630, join_tab=0x7f83980138e8, end_of_records=<optimized out>) at /data/src/10.3/sql/sql_select.cc:19232
      #9  0x000056026e77c2ec in do_select (procedure=<optimized out>, join=0x7f8398012630) at /data/src/10.3/sql/sql_select.cc:18772
      #10 JOIN::exec_inner (this=this@entry=0x7f8398012630) at /data/src/10.3/sql/sql_select.cc:3987
      #11 0x000056026e77c4d9 in JOIN::exec (this=this@entry=0x7f8398012630) at /data/src/10.3/sql/sql_select.cc:3781
      #12 0x000056026e77c61b in mysql_select (thd=thd@entry=0x7f83980009a8, tables=0x7f8398011d68, wild_num=0, fields=..., conds=0x0, og_num=1, order=0x0, group=0x7f83980124e8, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f8398012610, unit=0x7f8398004618, select_lex=0x7f8398004d90) at /data/src/10.3/sql/sql_select.cc:4186
      #13 0x000056026e77d017 in handle_select (thd=thd@entry=0x7f83980009a8, lex=lex@entry=0x7f8398004550, result=result@entry=0x7f8398012610, setup_tables_done_option=setup_tables_done_option@entry=0) at /data/src/10.3/sql/sql_select.cc:382
      #14 0x000056026e646ad5 in execute_sqlcom_select (thd=0x7f83980009a8, all_tables=0x7f8398011d68) at /data/src/10.3/sql/sql_parse.cc:6556
      #15 0x000056026e72a31b in mysql_execute_command (thd=0x7f83980009a8) at /data/src/10.3/sql/sql_parse.cc:3770
      #16 0x000056026e72cc5a in mysql_parse (thd=0x7f83980009a8, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /data/src/10.3/sql/sql_parse.cc:8013
      #17 0x000056026e730559 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7f83980009a8, packet=packet@entry=0x7f83980092f9 "", packet_length=packet_length@entry=88, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/src/10.3/sql/sql_parse.cc:1842
      #18 0x000056026e730b2f in do_command (thd=0x7f83980009a8) at /data/src/10.3/sql/sql_parse.cc:1387
      #19 0x000056026e7ff894 in do_handle_one_connection (connect=connect@entry=0x5602710b4758) at /data/src/10.3/sql/sql_connect.cc:1402
      #20 0x000056026e7ffa34 in handle_one_connection (arg=arg@entry=0x5602710b4758) at /data/src/10.3/sql/sql_connect.cc:1308
      #21 0x000056026eae17a4 in pfs_spawn_thread (arg=0x5602710c06b8) at /data/src/10.3/storage/perfschema/pfs.cc:1862
      #22 0x00007f83bb5cf494 in start_thread (arg=0x7f83b429f700) at pthread_create.c:333
      #23 0x00007f83b99b593f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      The problem appeared in bb-10.2-ext and later in 10.3 with this commit:

      commit 95d075a0e5b9b4276c53f888c8090113a8adfbf4
      Author: Alexander Barkov <bar@mariadb.org>
      Date:   Tue Feb 13 20:37:31 2018 +0400
       
          MDEV-15293 CAST(AS TIME) returns bad results for LAST_VALUE(),NAME_CONST(),SP variable
      

      Attachments

        Issue Links

          Activity

            elenst Elena Stepanova created issue -
            elenst Elena Stepanova made changes -
            Field Original Value New Value
            elenst Elena Stepanova made changes -
            Component/s Optimizer [ 10200 ]
            Fix Version/s 10.3 [ 22126 ]
            Description https://api.travis-ci.org/v3/job/353483310/log.txt
            {noformat:title=10.3 d5099814980aca9}
            mysqld: /home/travis/src/sql/filesort.cc:1086: virtual void Type_handler_temporal_result::make_sort_key(uchar*, Item*, const SORT_FIELD_ATTR*, Sort_param*) const: Assertion `item->null_value' failed.
            180315 7:54:49 [ERROR] mysqld got signal 6 ;

            Query (0x7ff924013b50): CREATE TEMPORARY TABLE `ps` AS SELECT DISTINCT NULLIF( '00:35:29.024300', `col_datetime_key` ) AS field1, VAR_POP( ( CRC32( ( ( CAST( ( MASTER_POS_WAIT( 'log', 1830158336, 0.01 ) ) AS UNSIGNED ) ) ^ ( CONVERT( `col_int_nokey`, DECIMAL(45,24) ) ) ) ) ) ) AS field2 FROM `E` WHERE ( ( UUID_SHORT() ) <> `col_datetime_nokey` ) & '2001-06-15' GROUP BY DEFAULT( `pk` ), CONVERT( ( UUID() ), TIME ) WITH ROLLUP
            Connection ID (thread ID): 19
            Status: NOT_KILLED
            {noformat}
            {noformat}
            #7 0x00007ff9d4f89ec2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
            #8 0x0000000000ab7ca0 in Type_handler_temporal_result::make_sort_key (this=0x1f4ac80, to=0x7ff9240f6427 "\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245"..., item=0x7ff9240175a0, sort_field=0x7ff924019148, param=0x7ff945720600) at /home/travis/src/sql/filesort.cc:1086
            #9 0x0000000000ab804a in make_sortkey (param=0x7ff945720600, to=0x7ff9240f6427 "\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245\245"..., ref_pos=0x7ff8fc0af078 "") at /home/travis/src/sql/filesort.cc:1190
            #10 0x0000000000ab723a in find_all_keys (thd=0x7ff924000c70, param=0x7ff945720600, select=0x7ff924017960, fs_info=0x7ff9240fdec0, buffpek_pointers=0x7ff945720900, tempfile=0x7ff945720790, pq=0x0, found_rows=0x7ff9240fe0a0) at /home/travis/src/sql/filesort.cc:863
            #11 0x0000000000ab545a in filesort (thd=0x7ff924000c70, table=0x7ff8fc0aa560, filesort=0x7ff924017eb0, tracker=0x7ff924019090, join=0x7ff924013ea8, first_table_bit=1) at /home/travis/src/sql/filesort.cc:278
            #12 0x000000000084a001 in create_sort_index (thd=0x7ff924000c70, join=0x7ff924013ea8, tab=0x7ff924016960, fsort=0x7ff924017eb0) at /home/travis/src/sql/sql_select.cc:22359
            #13 0x0000000000844994 in st_join_table::sort_table (this=0x7ff924016960) at /home/travis/src/sql/sql_select.cc:20194
            #14 0x000000000084459a in join_init_read_record (tab=0x7ff924016960) at /home/travis/src/sql/sql_select.cc:20135
            #15 0x00000000008424a7 in sub_select (join=0x7ff924013ea8, join_tab=0x7ff924016960, end_of_records=false) at /home/travis/src/sql/sql_select.cc:19229
            #16 0x0000000000841a6b in do_select (join=0x7ff924013ea8, procedure=0x0) at /home/travis/src/sql/sql_select.cc:18772
            #17 0x000000000081bc8d in JOIN::exec_inner (this=0x7ff924013ea8) at /home/travis/src/sql/sql_select.cc:3987
            #18 0x000000000081b122 in JOIN::exec (this=0x7ff924013ea8) at /home/travis/src/sql/sql_select.cc:3781
            #19 0x000000000081c398 in mysql_select (thd=0x7ff924000c70, tables=0x7ff9240cbc00, wild_num=0, fields=..., conds=0x7ff9240cc6a8, og_num=2, order=0x0, group=0x7ff9240cc990, having=0x0, proc_param=0x0, select_options=2416184065, result=0x7ff924013db8, unit=0x7ff9240c8b98, select_lex=0x7ff9240c9310) at /home/travis/src/sql/sql_select.cc:4186
            #20 0x000000000080e7b1 in handle_select (thd=0x7ff924000c70, lex=0x7ff9240c8ad0, result=0x7ff924013db8, setup_tables_done_option=0) at /home/travis/src/sql/sql_select.cc:382
            #21 0x00000000007d11ba in mysql_execute_command (thd=0x7ff924000c70) at /home/travis/src/sql/sql_parse.cc:4233
            #22 0x00000000007faf89 in Prepared_statement::execute (this=0x7ff9240fdaf0, expanded_query=0x7ff945722220, open_cursor=false) at /home/travis/src/sql/sql_prepare.cc:4739
            #23 0x00000000007f942a in Prepared_statement::execute_loop (this=0x7ff9240fdaf0, expanded_query=0x7ff945722220, open_cursor=false, packet=0x0, packet_end=0x0) at /home/travis/src/sql/sql_prepare.cc:4170
            #24 0x00000000007f70ea in mysql_sql_stmt_execute (thd=0x7ff924000c70) at /home/travis/src/sql/sql_prepare.cc:3278
            #25 0x00000000007cfef8 in mysql_execute_command (thd=0x7ff924000c70) at /home/travis/src/sql/sql_parse.cc:3779
            #26 0x00000000007dd4b8 in mysql_parse (thd=0x7ff924000c70, rawbuf=0x7ff924013a88 "EXECUTE stmt /* QNO 30300 CON_ID 19 */", length=39, parser_state=0x7ff945723450, is_com_multi=false, is_next_command=false) at /home/travis/src/sql/sql_parse.cc:8009
            #27 0x00000000007ca8d4 in dispatch_command (command=COM_QUERY, thd=0x7ff924000c70, packet=0x7ff92400b2c1 " EXECUTE stmt /* QNO 30300 CON_ID 19 */ ", packet_length=41, is_com_multi=false, is_next_command=false) at /home/travis/src/sql/sql_parse.cc:1838
            #28 0x00000000007c9307 in do_command (thd=0x7ff924000c70) at /home/travis/src/sql/sql_parse.cc:1383
            #29 0x000000000092c2b7 in do_handle_one_connection (connect=0x40c4e50) at /home/travis/src/sql/sql_connect.cc:1402
            #30 0x000000000092c039 in handle_one_connection (arg=0x40c4e50) at /home/travis/src/sql/sql_connect.cc:1308
            #31 0x00007ff9d5b35e9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0
            #32 0x00007ff9d50512ed in clone () from /lib/x86_64-linux-gnu/libc.so.6
            {noformat}
            {noformat:title=experimental f6acdbc55e206cf67a3922536e65839f45bc7d7b}
            perl /home/travis/rqg/runall-new.pl --views --validators=TransformerNoComparator --mysqld=--max-statement-time=30 --seed=1521100252 --threads=6 --duration=350 --reporters=Backtrace,ErrorLog,Deadlock --transformers=ExecuteAsUnion,ExecuteAsView --redefine=conf/mariadb/federated.yy --mysqld=--default-storage-engine=MyISAM --mysqld=--query_cache_type=0 --mysqld=--query_cache_size=0 --mysqld=--key_buffer_size=2G --mysqld=--thread_stack=192 --mysqld=--thread_cache_size=8 --mysqld=--myisam_recover_options=BACKUP --mysqld=--character-set-server=utf8mb4 --mysqld=--collation-server=utf8mb4_general_ci --grammar=conf/mariadb/functions.yy --engine=MyISAM --basedir1=/home/travis/server --vardir=/home/travis/logs/vardir1_2
            {noformat}

            Can't reproduce, hitting MDEV-14041 instead.
            {code:sql}
            CREATE TABLE t1 (i INT);
            INSERT INTO t1 VALUES (1),(2);
            SELECT NULLIF( CAST( 'foo' AS DATE ), NULL & 'bar' ) AS f FROM t1 GROUP BY f WITH ROLLUP;
            {code}

            {noformat:title=10.3 debug d8da97b09ab}
            mysqld: /data/src/10.3/sql/filesort.cc:1086: virtual void Type_handler_temporal_result::make_sort_key(uchar*, Item*, const SORT_FIELD_ATTR*, Sort_param*) const: Assertion `item->null_value' failed.

            #7 0x00007fb7ba6c9ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
            #8 0x0000562aca3ba7d2 in Type_handler_temporal_result::make_sort_key (this=0x562acb8483c8 <type_handler_newdate>, to=0x7fb7a4079460 '\245' <repeats 192 times>, "h4z\025\217\217\217\217"..., item=0x7fb7a4017760, sort_field=0x7fb7a40185f8, param=0x7fb7b486e550) at /data/src/10.3/sql/filesort.cc:1086
            #9 0x0000562aca3babc3 in make_sortkey (param=0x7fb7b486e550, to=0x7fb7a4079460 '\245' <repeats 192 times>, "h4z\025\217\217\217\217"..., ref_pos=0x7fb7b486e3d0 "") at /data/src/10.3/sql/filesort.cc:1190
            #10 0x0000562aca3b9d5b in find_all_keys (thd=0x7fb7a4000b00, param=0x7fb7b486e550, select=0x7fb7a40179f0, fs_info=0x7fb7a40951f0, buffpek_pointers=0x7fb7b486e750, tempfile=0x7fb7b486e5e0, pq=0x0, found_rows=0x7fb7a40953d0) at /data/src/10.3/sql/filesort.cc:863
            #11 0x0000562aca3b7f68 in filesort (thd=0x7fb7a4000b00, table=0x7fb7a400dbf0, filesort=0x7fb7a4017d78, tracker=0x7fb7a4018578, join=0x7fb7a4015d28, first_table_bit=1) at /data/src/10.3/sql/filesort.cc:278
            #12 0x0000562aca1543fc in create_sort_index (thd=0x7fb7a4000b00, join=0x7fb7a4015d28, tab=0x7fb7a4016fe0, fsort=0x7fb7a4017d78) at /data/src/10.3/sql/sql_select.cc:22365
            #13 0x0000562aca14ed0a in st_join_table::sort_table (this=0x7fb7a4016fe0) at /data/src/10.3/sql/sql_select.cc:20200
            #14 0x0000562aca14e91e in join_init_read_record (tab=0x7fb7a4016fe0) at /data/src/10.3/sql/sql_select.cc:20141
            #15 0x0000562aca14c8a8 in sub_select (join=0x7fb7a4015d28, join_tab=0x7fb7a4016fe0, end_of_records=false) at /data/src/10.3/sql/sql_select.cc:19235
            #16 0x0000562aca14be73 in do_select (join=0x7fb7a4015d28, procedure=0x0) at /data/src/10.3/sql/sql_select.cc:18778
            #17 0x0000562aca124e78 in JOIN::exec_inner (this=0x7fb7a4015d28) at /data/src/10.3/sql/sql_select.cc:3989
            #18 0x0000562aca124310 in JOIN::exec (this=0x7fb7a4015d28) at /data/src/10.3/sql/sql_select.cc:3783
            #19 0x0000562aca125551 in mysql_select (thd=0x7fb7a4000b00, tables=0x7fb7a4015460, wild_num=0, fields=..., conds=0x0, og_num=1, order=0x0, group=0x7fb7a4015be0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7fb7a4015d08, unit=0x7fb7a4004948, select_lex=0x7fb7a40050c0) at /data/src/10.3/sql/sql_select.cc:4188
            #20 0x0000562aca1177f5 in handle_select (thd=0x7fb7a4000b00, lex=0x7fb7a4004880, result=0x7fb7a4015d08, setup_tables_done_option=0) at /data/src/10.3/sql/sql_select.cc:382
            #21 0x0000562aca0e2991 in execute_sqlcom_select (thd=0x7fb7a4000b00, all_tables=0x7fb7a4015460) at /data/src/10.3/sql/sql_parse.cc:6556
            #22 0x0000562aca0d900e in mysql_execute_command (thd=0x7fb7a4000b00) at /data/src/10.3/sql/sql_parse.cc:3770
            #23 0x0000562aca0e639c in mysql_parse (thd=0x7fb7a4000b00, rawbuf=0x7fb7a4014d58 "SELECT NULLIF( CAST( 'foo' AS DATE ), NULL & 'bar' ) AS f FROM t1 GROUP BY f WITH ROLLUP", length=88, parser_state=0x7fb7b48705d0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:8013
            #24 0x0000562aca0d3a4f in dispatch_command (command=COM_QUERY, thd=0x7fb7a4000b00, packet=0x7fb7a40904f1 "", packet_length=88, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1842
            #25 0x0000562aca0d248e in do_command (thd=0x7fb7a4000b00) at /data/src/10.3/sql/sql_parse.cc:1387
            #26 0x0000562aca236e77 in do_handle_one_connection (connect=0x562acdc56c90) at /data/src/10.3/sql/sql_connect.cc:1402
            #27 0x0000562aca236c04 in handle_one_connection (arg=0x562acdc56c90) at /data/src/10.3/sql/sql_connect.cc:1308
            #28 0x0000562aca6be61d in pfs_spawn_thread (arg=0x562acdc6a520) at /data/src/10.3/storage/perfschema/pfs.cc:1862
            #29 0x00007fb7bc3a0494 in start_thread (arg=0x7fb7b4871700) at pthread_create.c:333
            #30 0x00007fb7ba78693f in clone () from /lib/x86_64-linux-gnu/libc.so.6
            {noformat}

            {noformat:title=10.3 non-debug 209375fdd0}
            #2 <signal handler called>
            #3 sortcmp (s=0x7f83980143e8, t=0x0, cs=0x56026f6f77c0 <my_charset_latin1>) at /data/src/10.3/sql/sql_string.cc:830
            #4 0x000056026e9207cb in Cached_item_str::cmp (this=0x7f83980143c8) at /data/src/10.3/sql/item_buff.cc:95
            #5 0x000056026e76bb85 in test_if_group_changed (list=...) at /data/src/10.3/sql/sql_select.cc:23588
            #6 0x000056026e772948 in end_send_group (join=0x7f8398012630, join_tab=<optimized out>, end_of_records=<optimized out>) at /data/src/10.3/sql/sql_select.cc:20597
            #7 0x000056026e74ec0b in evaluate_join_record (join=join@entry=0x7f8398012630, join_tab=join_tab@entry=0x7f83980138e8, error=<optimized out>) at /data/src/10.3/sql/sql_select.cc:19452
            #8 0x000056026e75b21b in sub_select (join=0x7f8398012630, join_tab=0x7f83980138e8, end_of_records=<optimized out>) at /data/src/10.3/sql/sql_select.cc:19232
            #9 0x000056026e77c2ec in do_select (procedure=<optimized out>, join=0x7f8398012630) at /data/src/10.3/sql/sql_select.cc:18772
            #10 JOIN::exec_inner (this=this@entry=0x7f8398012630) at /data/src/10.3/sql/sql_select.cc:3987
            #11 0x000056026e77c4d9 in JOIN::exec (this=this@entry=0x7f8398012630) at /data/src/10.3/sql/sql_select.cc:3781
            #12 0x000056026e77c61b in mysql_select (thd=thd@entry=0x7f83980009a8, tables=0x7f8398011d68, wild_num=0, fields=..., conds=0x0, og_num=1, order=0x0, group=0x7f83980124e8, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f8398012610, unit=0x7f8398004618, select_lex=0x7f8398004d90) at /data/src/10.3/sql/sql_select.cc:4186
            #13 0x000056026e77d017 in handle_select (thd=thd@entry=0x7f83980009a8, lex=lex@entry=0x7f8398004550, result=result@entry=0x7f8398012610, setup_tables_done_option=setup_tables_done_option@entry=0) at /data/src/10.3/sql/sql_select.cc:382
            #14 0x000056026e646ad5 in execute_sqlcom_select (thd=0x7f83980009a8, all_tables=0x7f8398011d68) at /data/src/10.3/sql/sql_parse.cc:6556
            #15 0x000056026e72a31b in mysql_execute_command (thd=0x7f83980009a8) at /data/src/10.3/sql/sql_parse.cc:3770
            #16 0x000056026e72cc5a in mysql_parse (thd=0x7f83980009a8, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /data/src/10.3/sql/sql_parse.cc:8013
            #17 0x000056026e730559 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7f83980009a8, packet=packet@entry=0x7f83980092f9 "", packet_length=packet_length@entry=88, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/src/10.3/sql/sql_parse.cc:1842
            #18 0x000056026e730b2f in do_command (thd=0x7f83980009a8) at /data/src/10.3/sql/sql_parse.cc:1387
            #19 0x000056026e7ff894 in do_handle_one_connection (connect=connect@entry=0x5602710b4758) at /data/src/10.3/sql/sql_connect.cc:1402
            #20 0x000056026e7ffa34 in handle_one_connection (arg=arg@entry=0x5602710b4758) at /data/src/10.3/sql/sql_connect.cc:1308
            #21 0x000056026eae17a4 in pfs_spawn_thread (arg=0x5602710c06b8) at /data/src/10.3/storage/perfschema/pfs.cc:1862
            #22 0x00007f83bb5cf494 in start_thread (arg=0x7f83b429f700) at pthread_create.c:333
            #23 0x00007f83b99b593f in clone () from /lib/x86_64-linux-gnu/libc.so.6
            {noformat}
            Summary [Draft] Assertion `item->null_value' failed in Type_handler_temporal_result::make_sort_key Server crashed in Cached_item_str::cmp / sortcmp or Assertion `item->null_value' failed in Type_handler_temporal_result::make_sort_key upon SELECT with NULLIF and ROLLUP
            elenst Elena Stepanova made changes -
            elenst Elena Stepanova made changes -
            Attachment threads [ 45353 ]
            elenst Elena Stepanova made changes -
            Description {code:sql}
            CREATE TABLE t1 (i INT);
            INSERT INTO t1 VALUES (1),(2);
            SELECT NULLIF( CAST( 'foo' AS DATE ), NULL & 'bar' ) AS f FROM t1 GROUP BY f WITH ROLLUP;
            {code}

            {noformat:title=10.3 debug d8da97b09ab}
            mysqld: /data/src/10.3/sql/filesort.cc:1086: virtual void Type_handler_temporal_result::make_sort_key(uchar*, Item*, const SORT_FIELD_ATTR*, Sort_param*) const: Assertion `item->null_value' failed.

            #7 0x00007fb7ba6c9ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
            #8 0x0000562aca3ba7d2 in Type_handler_temporal_result::make_sort_key (this=0x562acb8483c8 <type_handler_newdate>, to=0x7fb7a4079460 '\245' <repeats 192 times>, "h4z\025\217\217\217\217"..., item=0x7fb7a4017760, sort_field=0x7fb7a40185f8, param=0x7fb7b486e550) at /data/src/10.3/sql/filesort.cc:1086
            #9 0x0000562aca3babc3 in make_sortkey (param=0x7fb7b486e550, to=0x7fb7a4079460 '\245' <repeats 192 times>, "h4z\025\217\217\217\217"..., ref_pos=0x7fb7b486e3d0 "") at /data/src/10.3/sql/filesort.cc:1190
            #10 0x0000562aca3b9d5b in find_all_keys (thd=0x7fb7a4000b00, param=0x7fb7b486e550, select=0x7fb7a40179f0, fs_info=0x7fb7a40951f0, buffpek_pointers=0x7fb7b486e750, tempfile=0x7fb7b486e5e0, pq=0x0, found_rows=0x7fb7a40953d0) at /data/src/10.3/sql/filesort.cc:863
            #11 0x0000562aca3b7f68 in filesort (thd=0x7fb7a4000b00, table=0x7fb7a400dbf0, filesort=0x7fb7a4017d78, tracker=0x7fb7a4018578, join=0x7fb7a4015d28, first_table_bit=1) at /data/src/10.3/sql/filesort.cc:278
            #12 0x0000562aca1543fc in create_sort_index (thd=0x7fb7a4000b00, join=0x7fb7a4015d28, tab=0x7fb7a4016fe0, fsort=0x7fb7a4017d78) at /data/src/10.3/sql/sql_select.cc:22365
            #13 0x0000562aca14ed0a in st_join_table::sort_table (this=0x7fb7a4016fe0) at /data/src/10.3/sql/sql_select.cc:20200
            #14 0x0000562aca14e91e in join_init_read_record (tab=0x7fb7a4016fe0) at /data/src/10.3/sql/sql_select.cc:20141
            #15 0x0000562aca14c8a8 in sub_select (join=0x7fb7a4015d28, join_tab=0x7fb7a4016fe0, end_of_records=false) at /data/src/10.3/sql/sql_select.cc:19235
            #16 0x0000562aca14be73 in do_select (join=0x7fb7a4015d28, procedure=0x0) at /data/src/10.3/sql/sql_select.cc:18778
            #17 0x0000562aca124e78 in JOIN::exec_inner (this=0x7fb7a4015d28) at /data/src/10.3/sql/sql_select.cc:3989
            #18 0x0000562aca124310 in JOIN::exec (this=0x7fb7a4015d28) at /data/src/10.3/sql/sql_select.cc:3783
            #19 0x0000562aca125551 in mysql_select (thd=0x7fb7a4000b00, tables=0x7fb7a4015460, wild_num=0, fields=..., conds=0x0, og_num=1, order=0x0, group=0x7fb7a4015be0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7fb7a4015d08, unit=0x7fb7a4004948, select_lex=0x7fb7a40050c0) at /data/src/10.3/sql/sql_select.cc:4188
            #20 0x0000562aca1177f5 in handle_select (thd=0x7fb7a4000b00, lex=0x7fb7a4004880, result=0x7fb7a4015d08, setup_tables_done_option=0) at /data/src/10.3/sql/sql_select.cc:382
            #21 0x0000562aca0e2991 in execute_sqlcom_select (thd=0x7fb7a4000b00, all_tables=0x7fb7a4015460) at /data/src/10.3/sql/sql_parse.cc:6556
            #22 0x0000562aca0d900e in mysql_execute_command (thd=0x7fb7a4000b00) at /data/src/10.3/sql/sql_parse.cc:3770
            #23 0x0000562aca0e639c in mysql_parse (thd=0x7fb7a4000b00, rawbuf=0x7fb7a4014d58 "SELECT NULLIF( CAST( 'foo' AS DATE ), NULL & 'bar' ) AS f FROM t1 GROUP BY f WITH ROLLUP", length=88, parser_state=0x7fb7b48705d0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:8013
            #24 0x0000562aca0d3a4f in dispatch_command (command=COM_QUERY, thd=0x7fb7a4000b00, packet=0x7fb7a40904f1 "", packet_length=88, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1842
            #25 0x0000562aca0d248e in do_command (thd=0x7fb7a4000b00) at /data/src/10.3/sql/sql_parse.cc:1387
            #26 0x0000562aca236e77 in do_handle_one_connection (connect=0x562acdc56c90) at /data/src/10.3/sql/sql_connect.cc:1402
            #27 0x0000562aca236c04 in handle_one_connection (arg=0x562acdc56c90) at /data/src/10.3/sql/sql_connect.cc:1308
            #28 0x0000562aca6be61d in pfs_spawn_thread (arg=0x562acdc6a520) at /data/src/10.3/storage/perfschema/pfs.cc:1862
            #29 0x00007fb7bc3a0494 in start_thread (arg=0x7fb7b4871700) at pthread_create.c:333
            #30 0x00007fb7ba78693f in clone () from /lib/x86_64-linux-gnu/libc.so.6
            {noformat}

            {noformat:title=10.3 non-debug 209375fdd0}
            #2 <signal handler called>
            #3 sortcmp (s=0x7f83980143e8, t=0x0, cs=0x56026f6f77c0 <my_charset_latin1>) at /data/src/10.3/sql/sql_string.cc:830
            #4 0x000056026e9207cb in Cached_item_str::cmp (this=0x7f83980143c8) at /data/src/10.3/sql/item_buff.cc:95
            #5 0x000056026e76bb85 in test_if_group_changed (list=...) at /data/src/10.3/sql/sql_select.cc:23588
            #6 0x000056026e772948 in end_send_group (join=0x7f8398012630, join_tab=<optimized out>, end_of_records=<optimized out>) at /data/src/10.3/sql/sql_select.cc:20597
            #7 0x000056026e74ec0b in evaluate_join_record (join=join@entry=0x7f8398012630, join_tab=join_tab@entry=0x7f83980138e8, error=<optimized out>) at /data/src/10.3/sql/sql_select.cc:19452
            #8 0x000056026e75b21b in sub_select (join=0x7f8398012630, join_tab=0x7f83980138e8, end_of_records=<optimized out>) at /data/src/10.3/sql/sql_select.cc:19232
            #9 0x000056026e77c2ec in do_select (procedure=<optimized out>, join=0x7f8398012630) at /data/src/10.3/sql/sql_select.cc:18772
            #10 JOIN::exec_inner (this=this@entry=0x7f8398012630) at /data/src/10.3/sql/sql_select.cc:3987
            #11 0x000056026e77c4d9 in JOIN::exec (this=this@entry=0x7f8398012630) at /data/src/10.3/sql/sql_select.cc:3781
            #12 0x000056026e77c61b in mysql_select (thd=thd@entry=0x7f83980009a8, tables=0x7f8398011d68, wild_num=0, fields=..., conds=0x0, og_num=1, order=0x0, group=0x7f83980124e8, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f8398012610, unit=0x7f8398004618, select_lex=0x7f8398004d90) at /data/src/10.3/sql/sql_select.cc:4186
            #13 0x000056026e77d017 in handle_select (thd=thd@entry=0x7f83980009a8, lex=lex@entry=0x7f8398004550, result=result@entry=0x7f8398012610, setup_tables_done_option=setup_tables_done_option@entry=0) at /data/src/10.3/sql/sql_select.cc:382
            #14 0x000056026e646ad5 in execute_sqlcom_select (thd=0x7f83980009a8, all_tables=0x7f8398011d68) at /data/src/10.3/sql/sql_parse.cc:6556
            #15 0x000056026e72a31b in mysql_execute_command (thd=0x7f83980009a8) at /data/src/10.3/sql/sql_parse.cc:3770
            #16 0x000056026e72cc5a in mysql_parse (thd=0x7f83980009a8, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /data/src/10.3/sql/sql_parse.cc:8013
            #17 0x000056026e730559 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7f83980009a8, packet=packet@entry=0x7f83980092f9 "", packet_length=packet_length@entry=88, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/src/10.3/sql/sql_parse.cc:1842
            #18 0x000056026e730b2f in do_command (thd=0x7f83980009a8) at /data/src/10.3/sql/sql_parse.cc:1387
            #19 0x000056026e7ff894 in do_handle_one_connection (connect=connect@entry=0x5602710b4758) at /data/src/10.3/sql/sql_connect.cc:1402
            #20 0x000056026e7ffa34 in handle_one_connection (arg=arg@entry=0x5602710b4758) at /data/src/10.3/sql/sql_connect.cc:1308
            #21 0x000056026eae17a4 in pfs_spawn_thread (arg=0x5602710c06b8) at /data/src/10.3/storage/perfschema/pfs.cc:1862
            #22 0x00007f83bb5cf494 in start_thread (arg=0x7f83b429f700) at pthread_create.c:333
            #23 0x00007f83b99b593f in clone () from /lib/x86_64-linux-gnu/libc.so.6
            {noformat}
            {code:sql}
            CREATE TABLE t1 (i INT);
            INSERT INTO t1 VALUES (1),(2);
            SELECT NULLIF( CAST( 'foo' AS DATE ), NULL & 'bar' ) AS f FROM t1 GROUP BY f WITH ROLLUP;
            {code}

            {noformat:title=10.3 debug d8da97b09ab}
            mysqld: /data/src/10.3/sql/filesort.cc:1086: virtual void Type_handler_temporal_result::make_sort_key(uchar*, Item*, const SORT_FIELD_ATTR*, Sort_param*) const: Assertion `item->null_value' failed.

            #7 0x00007fb7ba6c9ee2 in __assert_fail () from /lib/x86_64-linux-gnu/libc.so.6
            #8 0x0000562aca3ba7d2 in Type_handler_temporal_result::make_sort_key (this=0x562acb8483c8 <type_handler_newdate>, to=0x7fb7a4079460 '\245' <repeats 192 times>, "h4z\025\217\217\217\217"..., item=0x7fb7a4017760, sort_field=0x7fb7a40185f8, param=0x7fb7b486e550) at /data/src/10.3/sql/filesort.cc:1086
            #9 0x0000562aca3babc3 in make_sortkey (param=0x7fb7b486e550, to=0x7fb7a4079460 '\245' <repeats 192 times>, "h4z\025\217\217\217\217"..., ref_pos=0x7fb7b486e3d0 "") at /data/src/10.3/sql/filesort.cc:1190
            #10 0x0000562aca3b9d5b in find_all_keys (thd=0x7fb7a4000b00, param=0x7fb7b486e550, select=0x7fb7a40179f0, fs_info=0x7fb7a40951f0, buffpek_pointers=0x7fb7b486e750, tempfile=0x7fb7b486e5e0, pq=0x0, found_rows=0x7fb7a40953d0) at /data/src/10.3/sql/filesort.cc:863
            #11 0x0000562aca3b7f68 in filesort (thd=0x7fb7a4000b00, table=0x7fb7a400dbf0, filesort=0x7fb7a4017d78, tracker=0x7fb7a4018578, join=0x7fb7a4015d28, first_table_bit=1) at /data/src/10.3/sql/filesort.cc:278
            #12 0x0000562aca1543fc in create_sort_index (thd=0x7fb7a4000b00, join=0x7fb7a4015d28, tab=0x7fb7a4016fe0, fsort=0x7fb7a4017d78) at /data/src/10.3/sql/sql_select.cc:22365
            #13 0x0000562aca14ed0a in st_join_table::sort_table (this=0x7fb7a4016fe0) at /data/src/10.3/sql/sql_select.cc:20200
            #14 0x0000562aca14e91e in join_init_read_record (tab=0x7fb7a4016fe0) at /data/src/10.3/sql/sql_select.cc:20141
            #15 0x0000562aca14c8a8 in sub_select (join=0x7fb7a4015d28, join_tab=0x7fb7a4016fe0, end_of_records=false) at /data/src/10.3/sql/sql_select.cc:19235
            #16 0x0000562aca14be73 in do_select (join=0x7fb7a4015d28, procedure=0x0) at /data/src/10.3/sql/sql_select.cc:18778
            #17 0x0000562aca124e78 in JOIN::exec_inner (this=0x7fb7a4015d28) at /data/src/10.3/sql/sql_select.cc:3989
            #18 0x0000562aca124310 in JOIN::exec (this=0x7fb7a4015d28) at /data/src/10.3/sql/sql_select.cc:3783
            #19 0x0000562aca125551 in mysql_select (thd=0x7fb7a4000b00, tables=0x7fb7a4015460, wild_num=0, fields=..., conds=0x0, og_num=1, order=0x0, group=0x7fb7a4015be0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7fb7a4015d08, unit=0x7fb7a4004948, select_lex=0x7fb7a40050c0) at /data/src/10.3/sql/sql_select.cc:4188
            #20 0x0000562aca1177f5 in handle_select (thd=0x7fb7a4000b00, lex=0x7fb7a4004880, result=0x7fb7a4015d08, setup_tables_done_option=0) at /data/src/10.3/sql/sql_select.cc:382
            #21 0x0000562aca0e2991 in execute_sqlcom_select (thd=0x7fb7a4000b00, all_tables=0x7fb7a4015460) at /data/src/10.3/sql/sql_parse.cc:6556
            #22 0x0000562aca0d900e in mysql_execute_command (thd=0x7fb7a4000b00) at /data/src/10.3/sql/sql_parse.cc:3770
            #23 0x0000562aca0e639c in mysql_parse (thd=0x7fb7a4000b00, rawbuf=0x7fb7a4014d58 "SELECT NULLIF( CAST( 'foo' AS DATE ), NULL & 'bar' ) AS f FROM t1 GROUP BY f WITH ROLLUP", length=88, parser_state=0x7fb7b48705d0, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:8013
            #24 0x0000562aca0d3a4f in dispatch_command (command=COM_QUERY, thd=0x7fb7a4000b00, packet=0x7fb7a40904f1 "", packet_length=88, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1842
            #25 0x0000562aca0d248e in do_command (thd=0x7fb7a4000b00) at /data/src/10.3/sql/sql_parse.cc:1387
            #26 0x0000562aca236e77 in do_handle_one_connection (connect=0x562acdc56c90) at /data/src/10.3/sql/sql_connect.cc:1402
            #27 0x0000562aca236c04 in handle_one_connection (arg=0x562acdc56c90) at /data/src/10.3/sql/sql_connect.cc:1308
            #28 0x0000562aca6be61d in pfs_spawn_thread (arg=0x562acdc6a520) at /data/src/10.3/storage/perfschema/pfs.cc:1862
            #29 0x00007fb7bc3a0494 in start_thread (arg=0x7fb7b4871700) at pthread_create.c:333
            #30 0x00007fb7ba78693f in clone () from /lib/x86_64-linux-gnu/libc.so.6
            {noformat}

            {noformat:title=10.3 non-debug 209375fdd0}
            #2 <signal handler called>
            #3 sortcmp (s=0x7f83980143e8, t=0x0, cs=0x56026f6f77c0 <my_charset_latin1>) at /data/src/10.3/sql/sql_string.cc:830
            #4 0x000056026e9207cb in Cached_item_str::cmp (this=0x7f83980143c8) at /data/src/10.3/sql/item_buff.cc:95
            #5 0x000056026e76bb85 in test_if_group_changed (list=...) at /data/src/10.3/sql/sql_select.cc:23588
            #6 0x000056026e772948 in end_send_group (join=0x7f8398012630, join_tab=<optimized out>, end_of_records=<optimized out>) at /data/src/10.3/sql/sql_select.cc:20597
            #7 0x000056026e74ec0b in evaluate_join_record (join=join@entry=0x7f8398012630, join_tab=join_tab@entry=0x7f83980138e8, error=<optimized out>) at /data/src/10.3/sql/sql_select.cc:19452
            #8 0x000056026e75b21b in sub_select (join=0x7f8398012630, join_tab=0x7f83980138e8, end_of_records=<optimized out>) at /data/src/10.3/sql/sql_select.cc:19232
            #9 0x000056026e77c2ec in do_select (procedure=<optimized out>, join=0x7f8398012630) at /data/src/10.3/sql/sql_select.cc:18772
            #10 JOIN::exec_inner (this=this@entry=0x7f8398012630) at /data/src/10.3/sql/sql_select.cc:3987
            #11 0x000056026e77c4d9 in JOIN::exec (this=this@entry=0x7f8398012630) at /data/src/10.3/sql/sql_select.cc:3781
            #12 0x000056026e77c61b in mysql_select (thd=thd@entry=0x7f83980009a8, tables=0x7f8398011d68, wild_num=0, fields=..., conds=0x0, og_num=1, order=0x0, group=0x7f83980124e8, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f8398012610, unit=0x7f8398004618, select_lex=0x7f8398004d90) at /data/src/10.3/sql/sql_select.cc:4186
            #13 0x000056026e77d017 in handle_select (thd=thd@entry=0x7f83980009a8, lex=lex@entry=0x7f8398004550, result=result@entry=0x7f8398012610, setup_tables_done_option=setup_tables_done_option@entry=0) at /data/src/10.3/sql/sql_select.cc:382
            #14 0x000056026e646ad5 in execute_sqlcom_select (thd=0x7f83980009a8, all_tables=0x7f8398011d68) at /data/src/10.3/sql/sql_parse.cc:6556
            #15 0x000056026e72a31b in mysql_execute_command (thd=0x7f83980009a8) at /data/src/10.3/sql/sql_parse.cc:3770
            #16 0x000056026e72cc5a in mysql_parse (thd=0x7f83980009a8, rawbuf=<optimized out>, length=<optimized out>, parser_state=<optimized out>, is_com_multi=<optimized out>, is_next_command=<optimized out>) at /data/src/10.3/sql/sql_parse.cc:8013
            #17 0x000056026e730559 in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7f83980009a8, packet=packet@entry=0x7f83980092f9 "", packet_length=packet_length@entry=88, is_com_multi=is_com_multi@entry=false, is_next_command=is_next_command@entry=false) at /data/src/10.3/sql/sql_parse.cc:1842
            #18 0x000056026e730b2f in do_command (thd=0x7f83980009a8) at /data/src/10.3/sql/sql_parse.cc:1387
            #19 0x000056026e7ff894 in do_handle_one_connection (connect=connect@entry=0x5602710b4758) at /data/src/10.3/sql/sql_connect.cc:1402
            #20 0x000056026e7ffa34 in handle_one_connection (arg=arg@entry=0x5602710b4758) at /data/src/10.3/sql/sql_connect.cc:1308
            #21 0x000056026eae17a4 in pfs_spawn_thread (arg=0x5602710c06b8) at /data/src/10.3/storage/perfschema/pfs.cc:1862
            #22 0x00007f83bb5cf494 in start_thread (arg=0x7f83b429f700) at pthread_create.c:333
            #23 0x00007f83b99b593f in clone () from /lib/x86_64-linux-gnu/libc.so.6
            {noformat}

            The problem appeared in bb-10.2-ext and later in 10.3 with this commit:
            {noformat}
            commit 95d075a0e5b9b4276c53f888c8090113a8adfbf4
            Author: Alexander Barkov <bar@mariadb.org>
            Date: Tue Feb 13 20:37:31 2018 +0400

                MDEV-15293 CAST(AS TIME) returns bad results for LAST_VALUE(),NAME_CONST(),SP variable
            {noformat}
            elenst Elena Stepanova made changes -
            Labels 10.3-ga regression
            elenst Elena Stepanova made changes -
            Assignee Elena Stepanova [ elenst ] Alexander Barkov [ bar ]
            serg Sergei Golubchik made changes -
            Priority Major [ 3 ] Critical [ 2 ]
            sanja Oleksandr Byelkin made changes -
            Assignee Alexander Barkov [ bar ] Oleksandr Byelkin [ sanja ]
            sanja Oleksandr Byelkin made changes -
            Status Open [ 1 ] In Progress [ 3 ]

            revision-id: eae5844ca04c89823cc9ee88095cf89aa45cdb69 (mariadb-10.3.6-127-geae5844ca04)
            parent(s): 4513de3127df61fa2030690110bb34b7e1c40849
            author: Oleksandr Byelkin
            committer: Oleksandr Byelkin
            timestamp: 2018-05-09 13:39:13 +0200
            message:

            MDEV-15576: Server crashed in Cached_item_str::cmp / sortcmp or Assertion `item->null_value' failed in Type_handler_temporal_result::make_sort_key upon SELECT with NULLIF and ROLLUP

            Fix Item_func_rollup_const::get_date to process correctly NULL value.

            —

            sanja Oleksandr Byelkin added a comment - revision-id: eae5844ca04c89823cc9ee88095cf89aa45cdb69 (mariadb-10.3.6-127-geae5844ca04) parent(s): 4513de3127df61fa2030690110bb34b7e1c40849 author: Oleksandr Byelkin committer: Oleksandr Byelkin timestamp: 2018-05-09 13:39:13 +0200 message: MDEV-15576 : Server crashed in Cached_item_str::cmp / sortcmp or Assertion `item->null_value' failed in Type_handler_temporal_result::make_sort_key upon SELECT with NULLIF and ROLLUP Fix Item_func_rollup_const::get_date to process correctly NULL value. —
            sanja Oleksandr Byelkin made changes -
            Assignee Oleksandr Byelkin [ sanja ] Alexander Barkov [ bar ]
            Status In Progress [ 3 ] In Review [ 10002 ]

            1. Make all types symetric
            2. is_null() (execution) call on fix_fields is a pathway to many crashes and errors (proof)

            sanja Oleksandr Byelkin added a comment - 1. Make all types symetric 2. is_null() (execution) call on fix_fields is a pathway to many crashes and errors (proof)
            sanja Oleksandr Byelkin made changes -
            Assignee Alexander Barkov [ bar ] Oleksandr Byelkin [ sanja ]
            sanja Oleksandr Byelkin made changes -
            Status In Review [ 10002 ] Stalled [ 10000 ]
            sanja Oleksandr Byelkin made changes -
            Status Stalled [ 10000 ] In Progress [ 3 ]

            revision-id: 7bc5acf68e4908b2817c1decea8ee6210c01d91b (mariadb-10.3.6-175-g7bc5acf68e4)
            parent(s): 4a5e23e257e229b548599133dbed5162af9df6d9
            author: Oleksandr Byelkin
            committer: Oleksandr Byelkin
            timestamp: 2018-05-14 13:29:20 +0200
            message:

            MDEV-15576: Server crashed in Cached_item_str::cmp / sortcmp or Assertion `item->null_value' failed in Type_handler_temporal_result::make_sort_key upon SELECT with NULLIF and ROLLUP

            Fixed null_value processing and is_null() usage.

            —

            sanja Oleksandr Byelkin added a comment - revision-id: 7bc5acf68e4908b2817c1decea8ee6210c01d91b (mariadb-10.3.6-175-g7bc5acf68e4) parent(s): 4a5e23e257e229b548599133dbed5162af9df6d9 author: Oleksandr Byelkin committer: Oleksandr Byelkin timestamp: 2018-05-14 13:29:20 +0200 message: MDEV-15576 : Server crashed in Cached_item_str::cmp / sortcmp or Assertion `item->null_value' failed in Type_handler_temporal_result::make_sort_key upon SELECT with NULLIF and ROLLUP Fixed null_value processing and is_null() usage. —
            sanja Oleksandr Byelkin made changes -
            Assignee Oleksandr Byelkin [ sanja ] Alexander Barkov [ bar ]
            Status In Progress [ 3 ] In Review [ 10002 ]
            sanja Oleksandr Byelkin made changes -
            Assignee Alexander Barkov [ bar ] Oleksandr Byelkin [ sanja ]
            sanja Oleksandr Byelkin made changes -
            Status In Review [ 10002 ] Stalled [ 10000 ]
            sanja Oleksandr Byelkin made changes -
            Fix Version/s 10.3.7 [ 23005 ]
            Fix Version/s 10.3 [ 22126 ]
            Resolution Fixed [ 1 ]
            Status Stalled [ 10000 ] Closed [ 6 ]
            serg Sergei Golubchik made changes -
            Workflow MariaDB v3 [ 86053 ] MariaDB v4 [ 153965 ]

            People

              sanja Oleksandr Byelkin
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

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