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

Mysqld crashes with COMPRESSED data types, when using partitions

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • N/A
    • 10.3.1
    • Server
    • None
    •  
      tree/bb-10.3-svoj

    Description

      When using tables with compressed data types and partitions, server crashes on select/update/delete statements, if where clause contains "=", with partitions by key and by range, both with InnoDB and MyISAM engines,

      CREATE TABLE t1 (a VARCHAR(1000) COMPRESSED)
      	PARTITION BY RANGE COLUMNS (a)  (
          PARTITION p0 VALUES LESS THAN (MAXVALUE));
       
      INSERT INTO t1 VALUES (REPEAT('a', 100)), (REPEAT('v', 200)), (REPEAT('z', 300)), (REPEAT('k', 500));
       
      SELECT * FROM t1 where a="a";
      

      stack trace with 10.3.1-MariaDB-debug, commit 9c85ad8d105e74baae0b6aba0db01b4d6aac7ba6

      Thread 1 (Thread 0x7f6b2627a700 (LWP 31720)):
      #0  __pthread_kill (threadid=<optimized out>, signo=6) at ../sysdeps/unix/sysv/linux/pthread_kill.c:62
      #1  0x000055f8cb348ea6 in my_write_core (sig=6) at /home/alice/git/10.3.sv/mysys/stacktrace.c:477
      #2  0x000055f8cabd3ca5 in handle_fatal_signal (sig=6) at /home/alice/git/10.3.sv/sql/signal_handler.cc:299
      #3  <signal handler called>
      #4  0x00007f6b2bfbf428 in __GI_raise (sig=sig@entry=6) at ../sysdeps/unix/sysv/linux/raise.c:54
      #5  0x00007f6b2bfc102a in __GI_abort () at abort.c:89
      #6  0x00007f6b2bfb7bd7 in __assert_fail_base (fmt=<optimized out>, assertion=assertion@entry=0x55f8cb505028 "0", file=file@entry=0x55f8cb504fe0 "/home/alice/git/10.3.sv/sql/field.h", line=line@entry=3213, function=function@entry=0x55f8cb50a840 <Field_varstring_compressed::get_key_image(unsigned char*, unsigned int, Field::imagetype)::__PRETTY_FUNCTION__> "virtual uint Field_varstring_compressed::get_key_image(uchar*, uint, Field::imagetype)") at assert.c:92
      #7  0x00007f6b2bfb7c82 in __GI___assert_fail (assertion=0x55f8cb505028 "0", file=0x55f8cb504fe0 "/home/alice/git/10.3.sv/sql/field.h", line=3213, function=0x55f8cb50a840 <Field_varstring_compressed::get_key_image(unsigned char*, unsigned int, Field::imagetype)::__PRETTY_FUNCTION__> "virtual uint Field_varstring_compressed::get_key_image(uchar*, uint, Field::imagetype)") at assert.c:101
      #8  0x000055f8cabc7aa9 in Field_varstring_compressed::get_key_image (this=0x7f6b1403b398, buff=0x7f6b14044ab1 '\245' <repeats 200 times>..., length=1000, type_arg=Field::itRAW) at /home/alice/git/10.3.sv/sql/field.h:3213
      #9  0x000055f8cad2cdac in Item_bool_func::get_mm_leaf (this=0x7f6b14015c00, param=0x7f6b26277b90, field=0x7f6b1403b398, key_part=0x7f6b14044218, type=Item_func::EQ_FUNC, value=0x7f6b140151f0) at /home/alice/git/10.3.sv/sql/opt_range.cc:8123
      #10 0x000055f8cad2bdfc in Item_bool_func::get_mm_parts (this=0x7f6b14015c00, param=0x7f6b26277b90, field=0x7f6b1403b398, type=Item_func::EQ_FUNC, value=0x7f6b140151f0) at /home/alice/git/10.3.sv/sql/opt_range.cc:7841
      #11 0x000055f8cad2bb4d in Item_equal::get_mm_tree (this=0x7f6b14015c00, param=0x7f6b26277b90, cond_ptr=0x7f6b26277ae8) at /home/alice/git/10.3.sv/sql/opt_range.cc:7796
      #12 0x000055f8cad212be in prune_partitions (thd=0x7f6b14000b00, table=0x7f6b1403c310, pprune_cond=0x7f6b14015c00) at /home/alice/git/10.3.sv/sql/opt_range.cc:3483
      #13 0x000055f8ca96fe0a in JOIN::optimize_inner (this=0x7f6b140154d0) at /home/alice/git/10.3.sv/sql/sql_select.cc:1403
      #14 0x000055f8ca96eb5e in JOIN::optimize (this=0x7f6b140154d0) at /home/alice/git/10.3.sv/sql/sql_select.cc:1084
      #15 0x000055f8ca9778c8 in mysql_select (thd=0x7f6b14000b00, tables=0x7f6b14014ac8, wild_num=1, fields=..., conds=0x7f6b14015280, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748608, result=0x7f6b140154b0, unit=0x7f6b140046b8, select_lex=0x7f6b14004df0) at /home/alice/git/10.3.sv/sql/sql_select.cc:3651
      #16 0x000055f8ca96c483 in handle_select (thd=0x7f6b14000b00, lex=0x7f6b140045f0, result=0x7f6b140154b0, setup_tables_done_option=0) at /home/alice/git/10.3.sv/sql/sql_select.cc:373
      #17 0x000055f8ca9388e8 in execute_sqlcom_select (thd=0x7f6b14000b00, all_tables=0x7f6b14014ac8) at /home/alice/git/10.3.sv/sql/sql_parse.cc:6450
      #18 0x000055f8ca92e9bc in mysql_execute_command (thd=0x7f6b14000b00) at /home/alice/git/10.3.sv/sql/sql_parse.cc:3574
      #19 0x000055f8ca93c290 in mysql_parse (thd=0x7f6b14000b00, rawbuf=0x7f6b140148d8 "SELECT * FROM t1 where a=\"a\"", length=28, parser_state=0x7f6b26279210, is_com_multi=false, is_next_command=false) at /home/alice/git/10.3.sv/sql/sql_parse.cc:7897
      #20 0x000055f8ca929d41 in dispatch_command (command=COM_QUERY, thd=0x7f6b14000b00, packet=0x7f6b14165d01 "SELECT * FROM t1 where a=\"a\"", packet_length=28, is_com_multi=false, is_next_command=false) at /home/alice/git/10.3.sv/sql/sql_parse.cc:1814
      #21 0x000055f8ca9286de in do_command (thd=0x7f6b14000b00) at /home/alice/git/10.3.sv/sql/sql_parse.cc:1377
      #22 0x000055f8caa740e2 in do_handle_one_connection (connect=0x55f8ce0828a0) at /home/alice/git/10.3.sv/sql/sql_connect.cc:1354
      #23 0x000055f8caa73e62 in handle_one_connection (arg=0x55f8ce0828a0) at /home/alice/git/10.3.sv/sql/sql_connect.cc:1260
      #24 0x000055f8cae0ba52 in pfs_spawn_thread (arg=0x55f8ce08ac70) at /home/alice/git/10.3.sv/storage/perfschema/pfs.cc:1862
      #25 0x00007f6b2cbfc6ba in start_thread (arg=0x7f6b2627a700) at pthread_create.c:333
      #26 0x00007f6b2c0913dd in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:109
      

      Bug is created to track whether it will be fixed or disabled. If fixed, then test case will be added in MTR later.

      Attachments

        Issue Links

          Activity

            People

              svoj Sergey Vojtovich
              alice Alice Sherepa
              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.