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

Assertion `curr_tab - join_tab < dbug_join_tab_array_size' failed in JOIN::make_aggr_tables_info

    XMLWordPrintable

Details

    • Bug
    • Status: Open (View Workflow)
    • Minor
    • Resolution: Unresolved
    • 10.5, 10.6, 10.11, 11.1(EOL), 11.2, 11.4, 10.4(EOL), 11.0(EOL), 11.3(EOL)
    • 10.5, 10.6, 10.11, 11.2, 11.4
    • Optimizer
    • None

    Description

      Set to "minor" as it's a debug assertion failure on a remarkably meaningless query. If anyone encounters the same problem with a more realistic test case and/or discovers its non-debug counterpart, feel free to raise the priority.

      CREATE TABLE t (a DATE);
      INSERT INTO t VALUES ('2012-12-12'),('2000-01-01');
      SELECT DISTINCT a BETWEEN CHARSET(BIT_XOR(0)) AND '2001-01-01' FROM t;
       
      # Cleanup
      DROP TABLE t;
      

      10.4 c9b0c006e0491c9f7a1dae07090db3cdb87da446

      mysqld: /data/bld/10.4-asan/sql/sql_select.cc:3624: bool JOIN::make_aggr_tables_info(): Assertion `curr_tab - join_tab < dbug_join_tab_array_size' failed.
      240229 14:36:48 [ERROR] mysqld got signal 6 ;
       
      #9  0x00007f4c4ff74e32 in __GI___assert_fail (assertion=0x556dcfc05560 "curr_tab - join_tab < dbug_join_tab_array_size", file=0x556dcfc030c0 "/data/bld/10.4-asan/sql/sql_select.cc", line=3624, function=0x556dcfc054c0 "bool JOIN::make_aggr_tables_info()") at ./assert/assert.c:101
      #10 0x0000556dcdbdc113 in JOIN::make_aggr_tables_info (this=0x62b0000641c0) at /data/bld/10.4-asan/sql/sql_select.cc:3624
      #11 0x0000556dcdbd649f in JOIN::optimize_stage2 (this=0x62b0000641c0) at /data/bld/10.4-asan/sql/sql_select.cc:3132
      #12 0x0000556dcdbcec69 in JOIN::optimize_inner (this=0x62b0000641c0) at /data/bld/10.4-asan/sql/sql_select.cc:2418
      #13 0x0000556dcdbc772b in JOIN::optimize (this=0x62b0000641c0) at /data/bld/10.4-asan/sql/sql_select.cc:1731
      #14 0x0000556dcdbe8849 in mysql_select (thd=0x62b00005b208, tables=0x62b000063120, wild_num=0, fields=..., conds=0x0, og_num=0, order=0x0, group=0x0, having=0x0, proc_param=0x0, select_options=2147748609, result=0x62b000064190, unit=0x62b00005f130, select_lex=0x62b000062320) at /data/bld/10.4-asan/sql/sql_select.cc:4836
      #15 0x0000556dcdbb90cb in handle_select (thd=0x62b00005b208, lex=0x62b00005f070, result=0x62b000064190, setup_tables_done_option=0) at /data/bld/10.4-asan/sql/sql_select.cc:442
      #16 0x0000556dcdb23985 in execute_sqlcom_select (thd=0x62b00005b208, all_tables=0x62b000063120) at /data/bld/10.4-asan/sql/sql_parse.cc:6549
      #17 0x0000556dcdb10910 in mysql_execute_command (thd=0x62b00005b208) at /data/bld/10.4-asan/sql/sql_parse.cc:3980
      #18 0x0000556dcdb2cc75 in mysql_parse (thd=0x62b00005b208, rawbuf=0x62b000062228 "SELECT DISTINCT a BETWEEN CHARSET(BIT_XOR(0)) AND '2001-01-01' FROM t", length=69, parser_state=0x7f4c46eb1c60, is_com_multi=false, is_next_command=false) at /data/bld/10.4-asan/sql/sql_parse.cc:8088
      #19 0x0000556dcdb02894 in dispatch_command (command=COM_QUERY, thd=0x62b00005b208, packet=0x62900021c209 "SELECT DISTINCT a BETWEEN CHARSET(BIT_XOR(0)) AND '2001-01-01' FROM t", packet_length=69, is_com_multi=false, is_next_command=false) at /data/bld/10.4-asan/sql/sql_parse.cc:1857
      #20 0x0000556dcdaff403 in do_command (thd=0x62b00005b208) at /data/bld/10.4-asan/sql/sql_parse.cc:1378
      #21 0x0000556dcdf0691d in do_handle_one_connection (connect=0x6080000009a8) at /data/bld/10.4-asan/sql/sql_connect.cc:1419
      #22 0x0000556dcdf06234 in handle_one_connection (arg=0x6080000009a8) at /data/bld/10.4-asan/sql/sql_connect.cc:1323
      #23 0x0000556dceb6c776 in pfs_spawn_thread (arg=0x615000003508) at /data/bld/10.4-asan/storage/perfschema/pfs.cc:1869
      #24 0x00007f4c4ffc9044 in start_thread (arg=<optimized out>) at ./nptl/pthread_create.c:442
      #25 0x00007f4c5004961c in clone3 () at ../sysdeps/unix/sysv/linux/x86_64/clone3.S:81
      

      No visible problem on a non-debug build, the query produces a result with a warning, which seems to be reasonable:

      SELECT DISTINCT a BETWEEN CHARSET(BIT_XOR(0)) AND '2001-01-01' FROM t;
      a BETWEEN CHARSET(BIT_XOR(0)) AND '2001-01-01'
      0
      1
      Warnings:
      Warning	1292	Truncated incorrect datetime value: 'binary'
      

      Attachments

        Activity

          People

            psergei Sergei Petrunia
            elenst Elena Stepanova
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.