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

LP:674431 - mysqld: sql_join_cache.cc:2219: bool JOIN_CACHE::set_match_flag_if_none(JOIN_TAB*, uchar*): Assertion `cache' failed with --join_cache_level=7 , outer_join_with_cache=on

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:

      Description

      backtrace

      1. 2010-11-12T11:07:59 #8 0x00a72d98 in __assert_fail () from /lib/libc.so.6
      2. 2010-11-12T11:07:59 #9 0x082de75f in JOIN_CACHE::set_match_flag_if_none (this=0x91171098, first_inner=0x9115bfa0, rec_ptr=0x91171306 "\001") at sql_join_c$
      3. 2010-11-12T11:07:59 #10 0x082e1e95 in JOIN_CACHE::check_match (this=0x91171098, rec_ptr=0x91171306 "\001") at sql_join_cache.cc:2322
      4. 2010-11-12T11:07:59 #11 0x082de7cb in JOIN_CACHE::generate_full_extensions (this=0x91171098, rec_ptr=0x91171306 "\001") at sql_join_cache.cc:2257
      5. 2010-11-12T11:07:59 #12 0x082dea78 in JOIN_CACHE::join_null_complements (this=0x91171098, skip_last=false) at sql_join_cache.cc:2406
      6. 2010-11-12T11:07:59 #13 0x082de2d5 in JOIN_CACHE::join_records (this=0x91171098, skip_last=false) at sql_join_cache.cc:2001
      7. 2010-11-12T11:07:59 #14 0x08325fc3 in sub_select_cache (join=0x91156190, join_tab=0x9115c178, end_of_records=true) at sql_select.cc:13223
      8. 2010-11-12T11:07:59 #15 0x083261dc in sub_select (join=0x91156190, join_tab=0x9115bfa0, end_of_records=true) at sql_select.cc:13385
      9. 2010-11-12T11:07:59 #16 0x08325fef in sub_select_cache (join=0x91156190, join_tab=0x9115bfa0, end_of_records=true) at sql_select.cc:13225
      10. 2010-11-12T11:07:59 #17 0x083261dc in sub_select (join=0x91156190, join_tab=0x9115bdc8, end_of_records=true) at sql_select.cc:13385
      11. 2010-11-12T11:07:59 #18 0x083257f9 in do_select (join=0x91156190, fields=0x0, table=0x911918c0, procedure=0x0) at sql_select.cc:12981
      12. 2010-11-12T11:07:59 #19 0x083094a5 in JOIN::exec (this=0x91156190) at sql_select.cc:1962
      13. 2010-11-12T11:07:59 #20 0x0830b981 in mysql_select (thd=0xb0c0cb8, rref_pointer_array=0xb0c2770, tables=0xa72478f0, wild_num=0, fields=..., conds=0xa722288$
      14. 2010-11-12T11:07:59 order=0xa7222a48, group=0x0, having=0x0, proc_param=0x0, select_options=2147764736, result=0x91151388, unit=0xb0c23a4, select_lex=0$
      15. 2010-11-12T11:07:59 at sql_select.cc:2602
      16. 2010-11-12T11:07:59 #21 0x08303ed1 in handle_select (thd=0xb0c0cb8, lex=0xb0c2344, result=0x91151388, setup_tables_done_option=0) at sql_select.cc:286
      17. 2010-11-12T11:07:59 #22 0x0829fcd7 in execute_sqlcom_select (thd=0xb0c0cb8, all_tables=0xa72478f0) at sql_parse.cc:5102
      18. 2010-11-12T11:07:59 #23 0x082967d7 in mysql_execute_command (thd=0xb0c0cb8) at sql_parse.cc:2281
      19. 2010-11-12T11:07:59 #24 0x082a2248 in mysql_parse (thd=0xb0c0cb8,
      20. 2010-11-12T11:07:59 rawbuf=0xa728b828 "SELECT table2 . `pk` AS field1 FROM J AS table1 LEFT OUTER JOIN B AS table2 ON table1 . `col_varchar_10_l$
      21. 2010-11-12T11:07:59 #25 0x08294344 in dispatch_command (command=COM_QUERY, thd=0xb0c0cb8,
      22. 2010-11-12T11:07:59 packet=0xb0f3aa9 " SELECT table2 . `pk` AS field1 FROM J AS table1 LEFT OUTER JOIN B AS table2 ON table1 . `col_varchar_10_$
      23. 2010-11-12T11:07:59 #26 0x082937f6 in do_command (thd=0xb0c0cb8) at sql_parse.cc:902
      24. 2010-11-12T11:07:59 #27 0x082907ac in handle_one_connection (arg=0xb0c0cb8) at sql_connect.cc:1154
      25. 2010-11-12T11:07:59 #28 0x00bea919 in start_thread () from /lib/libpthread.so.0
      26. 2010-11-12T11:07:59 #29 0x00b2ccbe in clone () from /lib/libc.so.6
      27. 2010-11-12T11:07:59 #5 0x001c2424 in __kernel_vsyscall ()

        Gliffy Diagrams

          Attachments

            Activity

            Hide
            philipstoev Philip Stoev added a comment -

            Re: mysqld: sql_join_cache.cc:2219: bool JOIN_CACHE::set_match_flag_if_none(JOIN_TAB*, uchar*): Assertion `cache' failed with --join_cache_level=7 , outer_join_with_cache=on in maria-5.3-mwl128
            Test case:

            SET SESSION join_cache_level = 7;
            SET SESSION optimizer_switch = 'outer_join_with_cache=on';
            DROP TABLE IF EXISTS t2;
            CREATE TABLE t2 (
            f1 int,
            f2 varchar(32)) ;
            INSERT IGNORE INTO t2 VALUES ('5','h'),(NULL,'j');

            DROP TABLE IF EXISTS t1;
            CREATE TABLE t1 (
            f20 int,
            f30 varchar(32),
            f40 int) ;

            DROP TABLE IF EXISTS t3;
            CREATE TABLE t3 (
            f40 int,
            f10 int,
            KEY (f10)) ENGINE=Aria TRANSACTIONAL=0 ;

            SELECT table2.f40 AS field1
            FROM t1 AS table1
            LEFT OUTER JOIN t3 AS table2 ON table1.f30 = table2.f10
            RIGHT JOIN t2 AS table3 ON table1.f20 = table3.f2
            WHERE
            ( table2.f40 BETWEEN 3 AND 11 OR table3.f1 <= table1.f40);

            Show
            philipstoev Philip Stoev added a comment - Re: mysqld: sql_join_cache.cc:2219: bool JOIN_CACHE::set_match_flag_if_none(JOIN_TAB*, uchar*): Assertion `cache' failed with --join_cache_level=7 , outer_join_with_cache=on in maria-5.3-mwl128 Test case: SET SESSION join_cache_level = 7; SET SESSION optimizer_switch = 'outer_join_with_cache=on'; DROP TABLE IF EXISTS t2; CREATE TABLE t2 ( f1 int, f2 varchar(32)) ; INSERT IGNORE INTO t2 VALUES ('5','h'),(NULL,'j'); DROP TABLE IF EXISTS t1; CREATE TABLE t1 ( f20 int, f30 varchar(32), f40 int) ; DROP TABLE IF EXISTS t3; CREATE TABLE t3 ( f40 int, f10 int, KEY (f10)) ENGINE=Aria TRANSACTIONAL=0 ; SELECT table2.f40 AS field1 FROM t1 AS table1 LEFT OUTER JOIN t3 AS table2 ON table1.f30 = table2.f10 RIGHT JOIN t2 AS table3 ON table1.f20 = table3.f2 WHERE ( table2.f40 BETWEEN 3 AND 11 OR table3.f1 <= table1.f40);
            Hide
            philipstoev Philip Stoev added a comment -

            Re: mysqld: sql_join_cache.cc:2219: bool JOIN_CACHE::set_match_flag_if_none(JOIN_TAB*, uchar*): Assertion `cache' failed with --join_cache_level=7 , outer_join_with_cache=on
            Also reproducible on maria-5.3

            Show
            philipstoev Philip Stoev added a comment - Re: mysqld: sql_join_cache.cc:2219: bool JOIN_CACHE::set_match_flag_if_none(JOIN_TAB*, uchar*): Assertion `cache' failed with --join_cache_level=7 , outer_join_with_cache=on Also reproducible on maria-5.3
            Hide
            ratzpo Rasmus Johansson added a comment -

            Launchpad bug id: 674431

            Show
            ratzpo Rasmus Johansson added a comment - Launchpad bug id: 674431

              People

              • Assignee:
                igor Igor Babaev
                Reporter:
                philipstoev Philip Stoev
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: