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

Assertion `!item->null_value' failed upon VEC_TOTEXT call

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • N/A
    • 11.7.1
    • Vector search
    • None

    Description

      Notes:
      The test case uses vector(80) for a more valid scenario, but the issue is not specific to the vector type, the failure happens with blob as well. VEC_ToText call on the right table's column appears to be important.
      We have open bugs for a similar assertion failure with at least UUID function (MDEV-26992, MDEV-34922), so maybe it is a generic issue not related to the vector development at all. If so, please feel free to demote it, although it's still unfortunate that it gets extended onto new functions.

      --source include/have_sequence.inc
       
      CREATE TABLE t (v VECTOR(80));
      INSERT INTO t SELECT VEC_FROMTEXT(CONCAT('[', GROUP_CONCAT(ROUND(RAND(1))), ']')) AS v FROM seq_1_to_80 s1, seq_1_to_900 s2 GROUP BY s2.seq;
      SELECT VEC_TOTEXT(tb2.v) FROM t tb1 LEFT JOIN t tb2 ON (tb1.v > tb2.v);
       
      # Cleanup
      DROP TABLE t;
      

      bb-11.6-MDEV-32887-vector c29016301f7095ccc482fdfec1887f61e5adbed1

      mariadbd: /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-ubsan/sql/sql_type.cc:7637: bool Type_handler::Item_send_str(Item*, Protocol*, st_value*) const: Assertion `!item->null_value' failed.
      241021 15:25:07 [ERROR] mysqld got signal 6 ;
       
      #10 0x00007fd4eb253e32 in __GI___assert_fail (assertion=0x5594fd2661cc "!item->null_value", file=0x5594fd266318 "/data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-ubsan/sql/sql_type.cc", line=7637, function=0x5594fd269ca8 "bool Type_handler::Item_send_str(Item*, Protocol*, st_value*) const") at ./assert/assert.c:101
      #11 0x00005594fb5e1070 in Type_handler::Item_send_str (this=this@entry=0x5594ffebb4d0 <type_handler_varchar>, item=item@entry=0x7fd4c8017208, protocol=protocol@entry=0x7fd4c8001370, buf=buf@entry=0x7fd4d74facc0) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-ubsan/sql/sql_type.cc:7637
      #12 0x00005594fb28cce9 in Type_handler_string_result::Item_send (this=0x5594ffebb4d0 <type_handler_varchar>, item=0x7fd4c8017208, protocol=0x7fd4c8001370, buf=0x7fd4d74facc0) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-ubsan/sql/sql_type.h:5723
      #13 0x00005594fa90ecbf in Item::send (this=0x7fd4c8017208, protocol=0x7fd4c8001370, buffer=0x7fd4d74facc0) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-ubsan/sql/item.h:1250
      #14 0x00005594faa043b3 in Protocol::send_result_set_row (this=this@entry=0x7fd4c8001370, row_items=row_items@entry=0x7fd4c8016e90) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-ubsan/sql/protocol.cc:1353
      #15 0x00005594fabd4e6b in select_send::send_data (this=0x7fd4c80197e0, items=...) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-ubsan/sql/sql_class.cc:3275
      #16 0x00005594fafe0cc8 in select_result_sink::send_data_with_check (this=this@entry=0x7fd4c80197e0, items=..., u=u@entry=0x7fd4c8005250, sent=sent@entry=361814) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-ubsan/sql/sql_class.h:6190
      #17 0x00005594faf1cb4c in end_send (join=0x7fd4c8019808, join_tab=0x7fd4c8084fd8, end_of_records=<optimized out>) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-ubsan/sql/sql_select.cc:24984
      #18 0x00005594fb3e8bcd in JOIN_CACHE::generate_full_extensions (this=this@entry=0x7fd4c8085ce8, rec_ptr=rec_ptr@entry=0x7fd4c8b0c9d0 "\001\376@\001") at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-ubsan/sql/sql_join_cache.cc:2537
      #19 0x00005594fb3ea5e1 in JOIN_CACHE::join_matching_records (this=0x7fd4c8085ce8, skip_last=false) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-ubsan/sql/sql_join_cache.cc:2429
      #20 0x00005594fb3e71f3 in JOIN_CACHE::join_records (this=this@entry=0x7fd4c8085ce8, skip_last=skip_last@entry=false) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-ubsan/sql/sql_join_cache.cc:2179
      #21 0x00005594faee672b in sub_select_cache (join=0x7fd4c8019808, join_tab=0x7fd4c8084b68, end_of_records=<optimized out>) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-ubsan/sql/sql_select.cc:23397
      #22 0x00005594faee5566 in sub_select (join=0x7fd4c8019808, join_tab=0x7fd4c80846f8, end_of_records=true) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-ubsan/sql/sql_select.cc:23587
      #23 0x00005594faf4d211 in do_select (join=join@entry=0x7fd4c8019808, procedure=<optimized out>) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-ubsan/sql/sql_select.cc:23167
      #24 0x00005594fafcdb22 in JOIN::exec_inner (this=this@entry=0x7fd4c8019808) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-ubsan/sql/sql_select.cc:5026
      #25 0x00005594fafcdfac in JOIN::exec (this=this@entry=0x7fd4c8019808) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-ubsan/sql/sql_select.cc:4809
      #26 0x00005594fafc7ea5 in mysql_select (thd=thd@entry=0x7fd4c8000d58, tables=0x7fd4c8017370, fields=..., conds=conds@entry=0x0, og_num=og_num@entry=0, order=order@entry=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=<optimized out>, result=0x7fd4c80197e0, unit=0x7fd4c8005250, select_lex=0x7fd4c8016bd8) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-ubsan/sql/sql_select.cc:5342
      #27 0x00005594fafc89ca in handle_select (thd=thd@entry=0x7fd4c8000d58, lex=lex@entry=0x7fd4c8005170, result=result@entry=0x7fd4c80197e0, setup_tables_done_option=setup_tables_done_option@entry=0) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-ubsan/sql/sql_select.cc:624
      #28 0x00005594fad9ec74 in execute_sqlcom_select (thd=thd@entry=0x7fd4c8000d58, all_tables=0x7fd4c8017370) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-ubsan/sql/sql_parse.cc:6151
      #29 0x00005594fadc7862 in mysql_execute_command (thd=thd@entry=0x7fd4c8000d58, is_called_from_prepared_stmt=is_called_from_prepared_stmt@entry=false) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-ubsan/sql/sql_parse.cc:3953
      #30 0x00005594faddc828 in mysql_parse (thd=thd@entry=0x7fd4c8000d58, rawbuf=<optimized out>, length=<optimized out>, parser_state=parser_state@entry=0x7fd4d74fc440) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-ubsan/sql/sql_parse.cc:7873
      #31 0x00005594fade31fc in dispatch_command (command=command@entry=COM_QUERY, thd=thd@entry=0x7fd4c8000d58, packet=packet@entry=0x7fd4c800b3c9 "1,1,1,0,0,1,1,0,0,1,0,1,0,0,1,0,0,0,1,0,1,1]\242", packet_length=packet_length@entry=70, blocking=blocking@entry=true) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-ubsan/sql/sql_parse.cc:1892
      #32 0x00005594fadeb9ed in do_command (thd=0x7fd4c8000d58, blocking=blocking@entry=true) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-ubsan/sql/sql_parse.cc:1405
      #33 0x00005594fb2e67b0 in do_handle_one_connection (connect=<optimized out>, connect@entry=0x5595017312d8, put_in_cache=put_in_cache@entry=true) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-ubsan/sql/sql_connect.cc:1448
      #34 0x00005594fb2e7666 in handle_one_connection (arg=0x5595017312d8) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-ubsan/sql/sql_connect.cc:1350
      #35 0x00005594fc4b54db in pfs_spawn_thread (arg=0x5595016c2f48) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-ubsan/storage/perfschema/pfs.cc:2198
      #36 0x00007fd4eb2a8044 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #37 0x00007fd4eb32861c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      Attachments

        Issue Links

          Activity

            The attached test case mdev35220a.test fails on a different assertion. For now I assume it to be the same problem

            bb-11.6-MDEV-32887-vector c29016301f7095ccc482fdfec1887f61e5adbed1

            mariadbd: /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/sql_type.cc:358: VDec::VDec(Item*): Assertion `(m_ptr == __null) == item->null_value' failed.
            241022 16:09:31 [ERROR] mysqld got signal 6 ;
             
            #9  0x00007f00cfe53e32 in __GI___assert_fail (assertion=0x55eee9c1dfc0 "(m_ptr == __null) == item->null_value", file=0x55eee9c1de50 "/data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/sql_type.cc", line=358, function=0x55eee9c1dfe6 "VDec::VDec(Item*)") at ./assert/assert.c:101
            #10 0x000055eee8f0aeb9 in VDec::VDec (this=0x7f00c1958a50, item=0x7f009801ab90) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/sql_type.cc:358
            #11 0x000055eee909aae4 in Arg_comparator::compare_decimal (this=0x7f009801ada0) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/item_cmpfunc.cc:949
            #12 0x000055eee90b3fc0 in Arg_comparator::compare (this=0x7f009801ada0) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/item_cmpfunc.h:114
            #13 0x000055eee909df95 in Item_func_eq::val_int (this=0x7f009801ace8) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/item_cmpfunc.cc:1887
            #14 0x000055eee8f18ba3 in Type_handler_int_result::Item_val_bool (this=0x55eeeaa087e0 <type_handler_bool>, item=0x7f009801ace8) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/sql_type.cc:5220
            #15 0x000055eee8a70f82 in Item::val_bool (this=0x7f009801ace8) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/item.h:1718
            #16 0x000055eee90ab4a2 in Item_cond_or::val_int (this=0x7f0098b793b8) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/item_cmpfunc.cc:5694
            #17 0x000055eee8cdeeee in Item_func_trig_cond::val_int (this=0x7f0098b796c8) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/item_cmpfunc.h:706
            #18 0x000055eee8f18ba3 in Type_handler_int_result::Item_val_bool (this=0x55eeeaa087e0 <type_handler_bool>, item=0x7f0098b796c8) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/sql_type.cc:5220
            #19 0x000055eee8a70f82 in Item::val_bool (this=0x7f0098b796c8) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/item.h:1718
            #20 0x000055eee90ab344 in Item_cond_and::val_int (this=0x7f0098c24078) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/item_cmpfunc.cc:5676
            #21 0x000055eee8babb1d in SQL_SELECT::skip_record (this=0x7f0098b794b0, thd=0x7f0098000dc8) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/opt_range.h:1922
            #22 0x000055eee8e7cfd3 in JOIN_CACHE::check_match (this=0x7f0098c23bb0, rec_ptr=0x7f0098b7990a "\001\200\001\322V\a>\371@\251\275\322\217i=\a-\226=&\"\026\276\323\b\350=o\024\253=;\367\206=\272\275\355\275+\223S\275\300\312C\2757\002\247=i\201R>\326\327\230\275\215\373\016\274\030\a@<\324t\314\274\177;\020\275\276\277L>\004\027\356=\032\270\273\275L\2332>\bQ\307\274x\\\335\275\311&G9\032\177\237<\3673r\274\265\"c=,\235\231\275Z\231\337=\342\222\266\275\276\247E>D\026-=\177N\315=\177\217q\274\254\217\210\275a\f\255\276C\027\371\274d\222\333\275\243L\272\274\373I\302=\317\261\231=W\321\263<6a\336\275o(?>8\260\242<\a|$=\241KG<\215\303\346<1"...) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/sql_join_cache.cc:2618
            #23 0x000055eee8e7867c in JOIN_CACHE::generate_full_extensions (this=0x7f0098c23bb0, rec_ptr=0x7f0098b7990a "\001\200\001\322V\a>\371@\251\275\322\217i=\a-\226=&\"\026\276\323\b\350=o\024\253=;\367\206=\272\275\355\275+\223S\275\300\312C\2757\002\247=i\201R>\326\327\230\275\215\373\016\274\030\a@<\324t\314\274\177;\020\275\276\277L>\004\027\356=\032\270\273\275L\2332>\bQ\307\274x\\\335\275\311&G9\032\177\237<\3673r\274\265\"c=,\235\231\275Z\231\337=\342\222\266\275\276\247E>D\026-=\177N\315=\177\217q\274\254\217\210\275a\f\255\276C\027\371\274d\222\333\275\243L\272\274\373I\302=\317\261\231=W\321\263<6a\336\275o(?>8\260\242<\a|$=\241KG<\215\303\346<1"...) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/sql_join_cache.cc:2529
            #24 0x000055eee8e783fb in JOIN_CACHE::join_matching_records (this=0x7f0098c23bb0, skip_last=false) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/sql_join_cache.cc:2429
            #25 0x000055eee8e77b6f in JOIN_CACHE::join_records (this=0x7f0098c23bb0, skip_last=false) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/sql_join_cache.cc:2179
            #26 0x000055eee8cbf1f6 in sub_select_cache (join=0x7f0098b758f8, join_tab=0x7f0098c22850, end_of_records=true) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/sql_select.cc:23397
            #27 0x000055eee8cbf4c7 in sub_select (join=0x7f0098b758f8, join_tab=0x7f0098c223e0, end_of_records=true) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/sql_select.cc:23587
            #28 0x000055eee8cbe9f6 in do_select (join=0x7f0098b758f8, procedure=0x0) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/sql_select.cc:23167
            #29 0x000055eee8c8a4f5 in JOIN::exec_inner (this=0x7f0098b758f8) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/sql_select.cc:5026
            #30 0x000055eee8c894d5 in JOIN::exec (this=0x7f0098b758f8) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/sql_select.cc:4809
            #31 0x000055eee8c8af90 in mysql_select (thd=0x7f0098000dc8, tables=0x7f0098018698, fields=..., conds=0x7f009801b368, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2164525824, result=0x7f0098b758d0, unit=0x7f00980052c0, select_lex=0x7f0098018030) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/sql_select.cc:5342
            #32 0x000055eee8c78f51 in handle_select (thd=0x7f0098000dc8, lex=0x7f00980051e0, result=0x7f0098b758d0, setup_tables_done_option=0) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/sql_select.cc:624
            #33 0x000055eee8c1b6b3 in execute_sqlcom_select (thd=0x7f0098000dc8, all_tables=0x7f0098018698) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/sql_parse.cc:6151
            #34 0x000055eee8c13309 in mysql_execute_command (thd=0x7f0098000dc8, is_called_from_prepared_stmt=false) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/sql_parse.cc:3953
            #35 0x000055eee8c20674 in mysql_parse (thd=0x7f0098000dc8, rawbuf=0x7f0098017d80 "SELECT tb1.pk FROM t3_3962609 tb1 RIGHT JOIN t_data_100K tb2 ON (tb1.veccol < @veccol_val AND tb2.veccol > VEC_FROMTEXT('[7.051,5.806,16.052,-4.610,9.754,-1.609,18.112,23.166,12.512,16.680,7.798,9.095"..., length=293, parser_state=0x7f00c195a2f0) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/sql_parse.cc:7873
            #36 0x000055eee8c0cad0 in dispatch_command (command=COM_QUERY, thd=0x7f0098000dc8, packet=0x7f009800be39 "", packet_length=293, blocking=true) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/sql_parse.cc:1892
            #37 0x000055eee8c0b429 in do_command (thd=0x7f0098000dc8, blocking=true) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/sql_parse.cc:1405
            #38 0x000055eee8e13c87 in do_handle_one_connection (connect=0x55eeedac9f78, put_in_cache=true) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/sql_connect.cc:1448
            #39 0x000055eee8e139fc in handle_one_connection (arg=0x55eeedac9e98) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/sql_connect.cc:1350
            #40 0x000055eee938a68a in pfs_spawn_thread (arg=0x55eeedad9d78) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/storage/perfschema/pfs.cc:2198
            #41 0x00007f00cfea8044 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
            #42 0x00007f00cff2861c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
             
            Query (0x7f0098017d80): SELECT tb1.pk FROM t3_3962609 tb1 RIGHT JOIN t_data_100K tb2 ON (tb1.veccol < @veccol_val AND tb2.veccol > VEC_FROMTEXT('[7.051,5.806,16.052,-4.610,9.754,-1.609,18.112,23.166,12.512,16.680,7.798,9.095,-4.322,2.994,13.358]')) WHERE VEC_TOTEXT(tb1.veccol) = -3265280 OR tb2.veccol >= @veccol_val
            

            On some reason, it fails non-deterministically, even though I don't see anything non-deterministic left in its logic, so I didn't clean it up, I'll just re-check it when/if this issue is fixed.

            elenst Elena Stepanova added a comment - The attached test case mdev35220a.test fails on a different assertion. For now I assume it to be the same problem bb-11.6-MDEV-32887-vector c29016301f7095ccc482fdfec1887f61e5adbed1 mariadbd: /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/sql_type.cc:358: VDec::VDec(Item*): Assertion `(m_ptr == __null) == item->null_value' failed. 241022 16:09:31 [ERROR] mysqld got signal 6 ;   #9 0x00007f00cfe53e32 in __GI___assert_fail (assertion=0x55eee9c1dfc0 "(m_ptr == __null) == item->null_value", file=0x55eee9c1de50 "/data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/sql_type.cc", line=358, function=0x55eee9c1dfe6 "VDec::VDec(Item*)") at ./assert/assert.c:101 #10 0x000055eee8f0aeb9 in VDec::VDec (this=0x7f00c1958a50, item=0x7f009801ab90) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/sql_type.cc:358 #11 0x000055eee909aae4 in Arg_comparator::compare_decimal (this=0x7f009801ada0) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/item_cmpfunc.cc:949 #12 0x000055eee90b3fc0 in Arg_comparator::compare (this=0x7f009801ada0) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/item_cmpfunc.h:114 #13 0x000055eee909df95 in Item_func_eq::val_int (this=0x7f009801ace8) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/item_cmpfunc.cc:1887 #14 0x000055eee8f18ba3 in Type_handler_int_result::Item_val_bool (this=0x55eeeaa087e0 <type_handler_bool>, item=0x7f009801ace8) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/sql_type.cc:5220 #15 0x000055eee8a70f82 in Item::val_bool (this=0x7f009801ace8) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/item.h:1718 #16 0x000055eee90ab4a2 in Item_cond_or::val_int (this=0x7f0098b793b8) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/item_cmpfunc.cc:5694 #17 0x000055eee8cdeeee in Item_func_trig_cond::val_int (this=0x7f0098b796c8) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/item_cmpfunc.h:706 #18 0x000055eee8f18ba3 in Type_handler_int_result::Item_val_bool (this=0x55eeeaa087e0 <type_handler_bool>, item=0x7f0098b796c8) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/sql_type.cc:5220 #19 0x000055eee8a70f82 in Item::val_bool (this=0x7f0098b796c8) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/item.h:1718 #20 0x000055eee90ab344 in Item_cond_and::val_int (this=0x7f0098c24078) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/item_cmpfunc.cc:5676 #21 0x000055eee8babb1d in SQL_SELECT::skip_record (this=0x7f0098b794b0, thd=0x7f0098000dc8) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/opt_range.h:1922 #22 0x000055eee8e7cfd3 in JOIN_CACHE::check_match (this=0x7f0098c23bb0, rec_ptr=0x7f0098b7990a "\001\200\001\322V\a>\371@\251\275\322\217i=\a-\226=&\"\026\276\323\b\350=o\024\253=;\367\206=\272\275\355\275+\223S\275\300\312C\2757\002\247=i\201R>\326\327\230\275\215\373\016\274\030\a@<\324t\314\274\177;\020\275\276\277L>\004\027\356=\032\270\273\275L\2332>\bQ\307\274x\\\335\275\311&G9\032\177\237<\3673r\274\265\"c=,\235\231\275Z\231\337=\342\222\266\275\276\247E>D\026-=\177N\315=\177\217q\274\254\217\210\275a\f\255\276C\027\371\274d\222\333\275\243L\272\274\373I\302=\317\261\231=W\321\263<6a\336\275o(?>8\260\242<\a|$=\241KG<\215\303\346<1"...) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/sql_join_cache.cc:2618 #23 0x000055eee8e7867c in JOIN_CACHE::generate_full_extensions (this=0x7f0098c23bb0, rec_ptr=0x7f0098b7990a "\001\200\001\322V\a>\371@\251\275\322\217i=\a-\226=&\"\026\276\323\b\350=o\024\253=;\367\206=\272\275\355\275+\223S\275\300\312C\2757\002\247=i\201R>\326\327\230\275\215\373\016\274\030\a@<\324t\314\274\177;\020\275\276\277L>\004\027\356=\032\270\273\275L\2332>\bQ\307\274x\\\335\275\311&G9\032\177\237<\3673r\274\265\"c=,\235\231\275Z\231\337=\342\222\266\275\276\247E>D\026-=\177N\315=\177\217q\274\254\217\210\275a\f\255\276C\027\371\274d\222\333\275\243L\272\274\373I\302=\317\261\231=W\321\263<6a\336\275o(?>8\260\242<\a|$=\241KG<\215\303\346<1"...) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/sql_join_cache.cc:2529 #24 0x000055eee8e783fb in JOIN_CACHE::join_matching_records (this=0x7f0098c23bb0, skip_last=false) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/sql_join_cache.cc:2429 #25 0x000055eee8e77b6f in JOIN_CACHE::join_records (this=0x7f0098c23bb0, skip_last=false) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/sql_join_cache.cc:2179 #26 0x000055eee8cbf1f6 in sub_select_cache (join=0x7f0098b758f8, join_tab=0x7f0098c22850, end_of_records=true) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/sql_select.cc:23397 #27 0x000055eee8cbf4c7 in sub_select (join=0x7f0098b758f8, join_tab=0x7f0098c223e0, end_of_records=true) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/sql_select.cc:23587 #28 0x000055eee8cbe9f6 in do_select (join=0x7f0098b758f8, procedure=0x0) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/sql_select.cc:23167 #29 0x000055eee8c8a4f5 in JOIN::exec_inner (this=0x7f0098b758f8) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/sql_select.cc:5026 #30 0x000055eee8c894d5 in JOIN::exec (this=0x7f0098b758f8) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/sql_select.cc:4809 #31 0x000055eee8c8af90 in mysql_select (thd=0x7f0098000dc8, tables=0x7f0098018698, fields=..., conds=0x7f009801b368, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2164525824, result=0x7f0098b758d0, unit=0x7f00980052c0, select_lex=0x7f0098018030) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/sql_select.cc:5342 #32 0x000055eee8c78f51 in handle_select (thd=0x7f0098000dc8, lex=0x7f00980051e0, result=0x7f0098b758d0, setup_tables_done_option=0) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/sql_select.cc:624 #33 0x000055eee8c1b6b3 in execute_sqlcom_select (thd=0x7f0098000dc8, all_tables=0x7f0098018698) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/sql_parse.cc:6151 #34 0x000055eee8c13309 in mysql_execute_command (thd=0x7f0098000dc8, is_called_from_prepared_stmt=false) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/sql_parse.cc:3953 #35 0x000055eee8c20674 in mysql_parse (thd=0x7f0098000dc8, rawbuf=0x7f0098017d80 "SELECT tb1.pk FROM t3_3962609 tb1 RIGHT JOIN t_data_100K tb2 ON (tb1.veccol < @veccol_val AND tb2.veccol > VEC_FROMTEXT('[7.051,5.806,16.052,-4.610,9.754,-1.609,18.112,23.166,12.512,16.680,7.798,9.095"..., length=293, parser_state=0x7f00c195a2f0) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/sql_parse.cc:7873 #36 0x000055eee8c0cad0 in dispatch_command (command=COM_QUERY, thd=0x7f0098000dc8, packet=0x7f009800be39 "", packet_length=293, blocking=true) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/sql_parse.cc:1892 #37 0x000055eee8c0b429 in do_command (thd=0x7f0098000dc8, blocking=true) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/sql_parse.cc:1405 #38 0x000055eee8e13c87 in do_handle_one_connection (connect=0x55eeedac9f78, put_in_cache=true) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/sql_connect.cc:1448 #39 0x000055eee8e139fc in handle_one_connection (arg=0x55eeedac9e98) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/sql/sql_connect.cc:1350 #40 0x000055eee938a68a in pfs_spawn_thread (arg=0x55eeedad9d78) at /data/bld/preview-11.7-bb-11.6-MDEV-32887-vector-debug/storage/perfschema/pfs.cc:2198 #41 0x00007f00cfea8044 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442 #42 0x00007f00cff2861c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81   Query (0x7f0098017d80): SELECT tb1.pk FROM t3_3962609 tb1 RIGHT JOIN t_data_100K tb2 ON (tb1.veccol < @veccol_val AND tb2.veccol > VEC_FROMTEXT('[7.051,5.806,16.052,-4.610,9.754,-1.609,18.112,23.166,12.512,16.680,7.798,9.095,-4.322,2.994,13.358]')) WHERE VEC_TOTEXT(tb1.veccol) = -3265280 OR tb2.veccol >= @veccol_val On some reason, it fails non-deterministically, even though I don't see anything non-deterministic left in its logic, so I didn't clean it up, I'll just re-check it when/if this issue is fixed.

            Simpler test case:

            select vec_totext(`null`) from (values (null),(0x00000000)) x;
            

            serg Sergei Golubchik added a comment - Simpler test case: select vec_totext(` null `) from ( values ( null ),(0x00000000)) x;

            People

              serg Sergei Golubchik
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              3 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.