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

LP:672497 - sql_join_cache.cc:2770: virtual bool JOIN_CACHE_HASHED::put_record(): Assertion `last_key_entry >= end_pos' failed in maria-5.3-mwl128

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • None
    • None
    • None

    Description

      The following query:

      SELECT MAX( table1 . `col_int` ) AS field1 FROM M AS table1 LEFT JOIN Y AS table2 LEFT JOIN K AS table3 ON table2 . `col_int_key` = table3 . `pk` ON table1 . `col_varchar_1024_utf8_key` = table3 . `col_varchar_10_latin1_key` LEFT OUTER JOIN Y AS table4 RIGHT JOIN E AS table5 ON table4 . `col_varchar_1024_latin1_key` = table5 . `col_varchar_10_latin1_key` LEFT JOIN Z AS table6 ON table5 . `col_int_key` = table6 . `col_int_key` ON table3 . `col_varchar_10_latin1_key` = table6 . `col_varchar_1024_latin1_key` LEFT OUTER JOIN F AS table7 RIGHT JOIN CC AS table8 RIGHT JOIN I AS table9 ON table8 . `col_varchar_10_utf8_key` = table9 . `col_varchar_1024_utf8` ON table7 . `col_int_key` = table9 . `pk` ON table4 . `pk` = table7 . `col_int_key` LEFT JOIN DD AS table10 LEFT OUTER JOIN EE AS table11 LEFT OUTER JOIN L AS table12 LEFT JOIN T AS table13 ON table12 . `col_int_key` = table13 . `pk` LEFT JOIN N AS table14 LEFT JOIN I AS table15 ON table14

      caused the following assertion:

      mysqld: sql_join_cache.cc:2770: virtual bool JOIN_CACHE_HASHED::put_record(): Assertion `last_key_entry >= end_pos' failed.

      backtrace

      1. 2010-11-08T13:08:11 #8 0x00a72d98 in __assert_fail () from /lib/libc.so.6
      2. 2010-11-08T13:08:11 #9 0x082df328 in JOIN_CACHE_HASHED::put_record (this=0xb601850) at sql_join_cache.cc:2770
      3. 2010-11-08T13:08:11 #10 0x08325e7f in sub_select_cache (join=0xb843f10, join_tab=0xb87dd70, end_of_records=false) at sql_select.cc:13226
      4. 2010-11-08T13:08:11 #11 0x08326804 in evaluate_join_record (join=0xb843f10, join_tab=0xb87db98, error=0) at sql_select.cc:13620
      5. 2010-11-08T13:08:11 #12 0x08326190 in sub_select (join=0xb843f10, join_tab=0xb87db98, end_of_records=false) at sql_select.cc:13425
      6. 2010-11-08T13:08:11 #13 0x083255b5 in do_select (join=0xb843f10, fields=0xb848cdc, table=0x0, procedure=0x0) at sql_select.cc:12969
      7. 2010-11-08T13:08:11 #14 0x0830b049 in JOIN::exec (this=0xb843f10) at sql_select.cc:2384
      8. 2010-11-08T13:08:11 #15 0x0830b7af in mysql_select (thd=0xb6a6520, rref_pointer_array=0xb6a7fd8, tables=0xb7586a8, wild_num=0, fields=..., conds=0xb8b5b90, og_num=0, order=0x0,
      9. 2010-11-08T13:08:11 group=0x0, having=0x0, proc_param=0x0, select_options=2147764736, result=0xb8b5e40, unit=0xb6a7c0c, select_lex=0xb6a7eb0) at sql_select.cc:2594
      10. 2010-11-08T13:08:11 #16 0x08303dcd in handle_select (thd=0xb6a6520, lex=0xb6a7bac, result=0xb8b5e40, setup_tables_done_option=0) at sql_select.cc:286
      11. 2010-11-08T13:08:11 #17 0x0829fbd3 in execute_sqlcom_select (thd=0xb6a6520, all_tables=0xb7586a8) at sql_parse.cc:5102
      12. 2010-11-08T13:08:11 #18 0x082966d3 in mysql_execute_command (thd=0xb6a6520) at sql_parse.cc:2281
      13. 2010-11-08T13:08:11 #19 0x082a2144 in mysql_parse (thd=0xb6a6520,
      14. 2010-11-08T13:08:11 rawbuf=0xb7166a0 "SELECT MAX( table1 . `col_int` ) AS field1 FROM M AS table1 LEFT JOIN Y AS table2 LEFT JOIN K AS table3 ON table2 . `col_int_key` = table3 . `pk` ON table1 . `col_varchar_1024_utf8_key` = table3 . `col_varchar_10_latin1_key` LEFT OUTER JOIN Y AS table4 RIGHT JOIN E AS table5 ON table4 . `col_varchar_1024_latin1_key` = table5 . `col_varchar_10_latin1_key` LEFT JOIN Z AS table6 ON table5 . `col_int_key` = table6 . `col_int_key` ON table3 . `col_varchar_10_latin1_key` = table6 . `col_varchar_1024_latin1_key` LEFT OUTER JOIN F AS table7 RIGHT JOIN CC AS table8 RIGHT JOIN I AS table9 ON table8 . `col_varchar_10_utf8_key` = table9 . `col_varchar_1024_utf8` ON table7 . `col_int_key` = table9 . `pk` ON table4 . `pk` = table7 . `col_int_key` LEFT JOIN DD AS table10 LEFT OUTER JOIN EE AS table11 LEFT OUTER JOIN L AS table12 LEFT JOIN T AS table13 ON table12 . `col_int_key` = table13 . `pk` LEFT JOIN N AS table14 LEFT JOIN I AS table15 ON table14 . `col_int_key` = table15 . `col_int_key` ON table13 . `col_int_key` = table15 . `col_int_key` LEFT JOIN L AS table16 ON table13 . `col_varchar_1024_utf8_key` = table16 . `col_varchar_10_utf8_key` ON table11 . `pk` = table13 . `pk` ON table10 . `col_int` = table13 . `pk` ON table5 . `col_int` = table16 . `pk` WHERE ( ( ( table11 . `col_int` < table13 . `col_int` AND table2 . `col_int_key` IN (2, 7, 4) ) OR table2 . `col_int_key` <> 8 ) AND table6 . `col_int` IS NOT NULL )", length=1517,
      15. 2010-11-08T13:08:11 found_semicolon=0xa74c1228) at sql_parse.cc:6109
      16. 2010-11-08T13:08:11 #20 0x08294240 in dispatch_command (command=COM_QUERY, thd=0xb6a6520, packet=0xb6a88e1 "", packet_length=1523) at sql_parse.cc:1209
      17. 2010-11-08T13:08:11 #21 0x082936f2 in do_command (thd=0xb6a6520) at sql_parse.cc:902
      18. 2010-11-08T13:08:11 #22 0x082906a8 in handle_one_connection (arg=0xb6a6520) at sql_connect.cc:1154
      19. 2010-11-08T13:08:11 #23 0x00bea919 in start_thread () from /lib/libpthread.so.0
      20. 2010-11-08T13:08:11 #24 0x00b2ccbe in clone () from /lib/libc.so.6

      Attachments

        Activity

          People

            igor Igor Babaev (Inactive)
            philipstoev Philip Stoev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 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.