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

Assertion `0' failed in Field_blob_compressed::get_key_image with optimizer_use_condition_selectivity>2

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.3
    • 10.3.10
    • N/A
    • None

    Description

      set optimizer_use_condition_selectivity=3;
       
      create table t5 (col_blob blob COMPRESSED);
      INSERT INTO `t5` VALUES ('ufhjdtv'),('jdt'),('d'),(NULL),('az'),('hf'),(NULL),(NULL),(NULL),(NULL),('r'),(''),('t'),('');
       
      SELECT ROW_COUNT() FROM t5 WHERE 'x' > col_blob;
      

       10.3 ac24289e6600403155127b1a36788ad8b4ead500
      Thread 1 (Thread 0x7f4469369700 (LWP 8983)):
      #0  __pthread_kill (threadid=<optimized out>, signo=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:62
      #1  0x000055fa4dc69e22 in my_write_core (sig=6) at /10.3/mysys/stacktrace.c:481
      #2  0x000055fa4d3e9cdd in handle_fatal_signal (sig=6) at /10.3/sql/signal_handler.cc:305
      #3  <signal handler called>
      #4  0x00007f4472cc5428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
      #5  0x00007f4472cc702a in __GI_abort () at abort.c:89
      #6  0x00007f4472cbdbd7 in __assert_fail_base (fmt=<optimized out>, assertion=assertion@entry=0x55fa4de8c650 "0", file=file@entry=0x55fa4de8c5e8 "/10.3/sql/field.h", line=line@entry=3820, function=function@entry=0x55fa4de92020 <Field_blob_compressed::get_key_image(unsigned char*, unsigned int, Field::imagetype)::__PRETTY_FUNCTION__> "virtual uint Field_blob_compressed::get_key_image(uchar*, uint, Field::imagetype)") at assert.c:92
      #7  0x00007f4472cbdc82 in __GI___assert_fail (assertion=0x55fa4de8c650 "0", file=0x55fa4de8c5e8 "/10.3/sql/field.h", line=3820, function=0x55fa4de92020 <Field_blob_compressed::get_key_image(unsigned char*, unsigned int, Field::imagetype)::__PRETTY_FUNCTION__> "virtual uint Field_blob_compressed::get_key_image(uchar*, uint, Field::imagetype)") at assert.c:101
      #8  0x000055fa4d3dd1ba in Field_blob_compressed::get_key_image (this=0x7f441c00a7c8, buff=0x7f441c075481 '\245' <repeats 200 times>..., length=1000, type_arg=Field::itRAW) at /10.3/sql/field.h:3820
      #9  0x000055fa4d558d29 in Item_bool_func::get_mm_leaf (this=0x7f441c015730, param=0x7f4469366be0, field=0x7f441c00a7c8, key_part=0x7f441c074c78, type=Item_func::LT_FUNC, value=0x7f441c015580) at /10.3/sql/opt_range.cc:8150
      #10 0x000055fa4d557cc4 in Item_bool_func::get_mm_parts (this=0x7f441c015730, param=0x7f4469366be0, field=0x7f441c00a7c8, type=Item_func::LT_FUNC, value=0x7f441c015580) at /10.3/sql/opt_range.cc:7858
      #11 0x000055fa4d07ea3d in Item_bool_func2_with_rev::get_func_mm_tree (this=0x7f441c015730, param=0x7f4469366be0, field=0x7f441c00a7c8, value=0x7f441c015580) at /10.3/sql/item_cmpfunc.h:460
      #12 0x000055fa4d556b97 in Item_bool_func::get_full_func_mm_tree (this=0x7f441c015730, param=0x7f4469366be0, field_item=0x7f441c015620, value=0x7f441c015580) at /10.3/sql/opt_range.cc:7537
      #13 0x000055fa4d07e73e in Item_bool_func::get_full_func_mm_tree_for_args (this=0x7f441c015730, param=0x7f4469366be0, item=0x7f441c015620, value=0x7f441c015580) at /10.3/sql/item_cmpfunc.h:201
      #14 0x000055fa4d07ec0b in Item_bool_func2_with_rev::get_mm_tree (this=0x7f441c015730, param=0x7f4469366be0, cond_ptr=0x7f441c015d90) at /10.3/sql/item_cmpfunc.h:488
      #15 0x000055fa4d54c555 in calculate_cond_selectivity_for_table (thd=0x7f441c000b00, table=0x7f441c00dbb0, cond=0x7f441c015d90) at /10.3/sql/opt_range.cc:3057
      #16 0x000055fa4d14b53b in make_join_statistics (join=0x7f441c015988, tables_list=..., keyuse_array=0x7f441c015c78) at /10.3/sql/sql_select.cc:4918
      #17 0x000055fa4d140aaa in JOIN::optimize_inner (this=0x7f441c015988) at /10.3/sql/sql_select.cc:1895
      #18 0x000055fa4d13f0e3 in JOIN::optimize (this=0x7f441c015988) at /10.3/sql/sql_select.cc:1448
      #19 0x000055fa4d148c3a in mysql_select (thd=0x7f441c000b00, tables=0x7f441c014f18, wild_num=0, fields=..., conds=0x7f441c015730, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f441c015960, unit=0x7f441c0049b0, select_lex=0x7f441c005120) at /10.3/sql/sql_select.cc:4220
      #20 0x000055fa4d13ac30 in handle_select (thd=0x7f441c000b00, lex=0x7f441c0048e8, result=0x7f441c015960, setup_tables_done_option=0) at /10.3/sql/sql_select.cc:382
      #21 0x000055fa4d10550c in execute_sqlcom_select (thd=0x7f441c000b00, all_tables=0x7f441c014f18) at /10.3/sql/sql_parse.cc:6547
      #22 0x000055fa4d0fb963 in mysql_execute_command (thd=0x7f441c000b00) at /10.3/sql/sql_parse.cc:3769
      #23 0x000055fa4d109491 in mysql_parse (thd=0x7f441c000b00, rawbuf=0x7f441c014d18 "SELECT ROW_COUNT() FROM t5 WHERE 'x' > col_blob", length=47, parser_state=0x7f4469368470, is_com_multi=false, is_next_command=false) at /10.3/sql/sql_parse.cc:8089
      #24 0x000055fa4d0f6436 in dispatch_command (command=COM_QUERY, thd=0x7f441c000b00, packet=0x7f441c1671f1 "SELECT ROW_COUNT() FROM t5 WHERE 'x' > col_blob", packet_length=47, is_com_multi=false, is_next_command=false) at /10.3/sql/sql_parse.cc:1850
      #25 0x000055fa4d0f4e53 in do_command (thd=0x7f441c000b00) at /10.3/sql/sql_parse.cc:1395
      #26 0x000055fa4d25b8d9 in do_handle_one_connection (connect=0x55fa4fe15d20) at /10.3/sql/sql_connect.cc:1402
      #27 0x000055fa4d25b62a in handle_one_connection (arg=0x55fa4fe15d20) at /10.3/sql/sql_connect.cc:1308
      #28 0x000055fa4dbfa302 in pfs_spawn_thread (arg=0x55fa4fe1e090) at /10.3/storage/perfschema/pfs.cc:1862
      #29 0x00007f44739026ba in start_thread (arg=0x7f4469369700) at pthread_create.c:333
      #30 0x00007f4472d9741d in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
      
      

      Attachments

        Activity

          People

            svoj Sergey Vojtovich
            alice Alice Sherepa
            Votes:
            0 Vote for this issue
            Watchers:
            1 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.