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

Server crashes in _ma_unique_hash / JOIN_CACHE::generate_full_extensions on INTERSECT

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Critical
    • Resolution: Fixed
    • 10.3(EOL)
    • 10.3.6
    • Optimizer
    • None
    • 10.1.31

    Description

      CREATE TABLE t1 (a varchar(32)) ENGINE=MyISAM;
      INSERT INTO t1 VALUES 
      ('Jakarta'),('Lisbon'),('Honolulu'),('Lusaka'),('Barcelona'),('Taipei'),
      ('Brussels'),('Orlando'),('Osaka'),('Quito'),('Lima'),('Tunis'),
      ('Unalaska'),('Rotterdam'),('Zagreb'),('Ufa'),('Ryazan'),('Xiamen'),
      ('London'),('Izmir'),('Samara'),('Bern'),('Zhengzhou'),('Vladivostok'),
      ('Yangon'),('Victoria'),('Warsaw'),('Luanda'),('Leon'),('Bangkok'),
      ('Wellington'),('Zibo'),('Qiqihar'),('Delhi'),('Hamburg'),('Ottawa'),
      ('Vaduz');
       
      CREATE TABLE t2 (b varchar(32)) ENGINE=MyISAM;
      INSERT INTO t2 VALUES 
      ('Gaza'),('Jeddah'),('Beirut'),('Incheon'),('Tbilisi'),('Izmir'),
      ('Quito'),('Riga'),('Freetown'),('Zagreb'),('Caracas'),('Orlando'),
      ('Kingston'),('Turin'),('Xinyang'),('Osaka'),('Albany'),('Geneva'),
      ('Omsk'),('Kazan'),('Quezon'),('Indore'),('Odessa'),('Xiamen'),
      ('Winnipeg'),('Yakutsk'),('Nairobi'),('Ufa'),('Helsinki'),('Vilnius'),
      ('Aden'),('Liverpool'),('Honolulu'),('Frankfurt'),('Glasgow'),
      ('Vienna'),('Jackson'),('Jakarta'),('Sydney'),('Oslo'),('Novgorod'),
      ('Norilsk'),('Izhevsk'),('Istanbul'),('Nice');
       
      CREATE TABLE t3 (c varchar(32)) ENGINE=MyISAM;
      INSERT INTO t3 VALUES 
      ('Nicosia'),('Istanbul'),('Richmond'),('Stockholm'),('Dublin'),
      ('Wichita'),('Warsaw'),('Glasgow'),('Winnipeg'),('Irkutsk'),('Quito'),
      ('Xiamen'),('Berlin'),('Rome'),('Denver'),('Dallas'),('Kabul'),
      ('Prague'),('Izhevsk'),('Tirana'),('Sofia'),('Detroit'),('Sorbonne');
       
      SELECT * FROM t1 LEFT OUTER JOIN t2 LEFT OUTER JOIN t3 ON b < c ON a > b
      INTERSECT
      SELECT * FROM t1 LEFT OUTER JOIN t2 LEFT OUTER JOIN t3 ON b < c ON a > b
      ;
      

      10.3 016c35a7f2f4a2

      #3  <signal handler called>
      #4  0x0000562c152d4efa in _ma_unique_hash (def=0x7f6a18067aa0, record=0x7f6a18043188 "\377\370\002") at /data/src/10.3/storage/maria/ma_unique.c:111
      #5  0x0000562c152e5678 in ha_maria::find_unique_row (this=0x7f6a180663f8, record=0x7f6a18043188 "\377\370\002", constrain_no=0) at /data/src/10.3/storage/maria/ha_maria.cc:3963
      #6  0x0000562c14ef0920 in select_unit::send_data (this=0x7f6a1801a780, values=...) at /data/src/10.3/sql/sql_union.cc:209
      #7  0x0000562c14e7de20 in end_send (join=0x7f6a1803dad0, join_tab=0x7f6a180f37b8, end_of_records=false) at /data/src/10.3/sql/sql_select.cc:20030
      #8  0x0000562c14f9fd7f in JOIN_CACHE::generate_full_extensions (this=0x7f6a180f3f30, rec_ptr=0x7f6a181cdd35 "\001\376") at /data/src/10.3/sql/sql_join_cache.cc:2401
      #9  0x0000562c14f9fa9a in JOIN_CACHE::join_matching_records (this=0x7f6a180f3f30, skip_last=false) at /data/src/10.3/sql/sql_join_cache.cc:2293
      #10 0x0000562c14f9f466 in JOIN_CACHE::join_records (this=0x7f6a180f3f30, skip_last=false) at /data/src/10.3/sql/sql_join_cache.cc:2088
      #11 0x0000562c14f9f4cc in JOIN_CACHE::join_records (this=0x7f6a180f3e00, skip_last=false) at /data/src/10.3/sql/sql_join_cache.cc:2102
      #12 0x0000562c14e7ad1d in sub_select_cache (join=0x7f6a1803dad0, join_tab=0x7f6a180f3058, end_of_records=true) at /data/src/10.3/sql/sql_select.cc:18646
      #13 0x0000562c14e7af2f in sub_select (join=0x7f6a1803dad0, join_tab=0x7f6a180f2ca8, end_of_records=true) at /data/src/10.3/sql/sql_select.cc:18818
      #14 0x0000562c14e7a715 in do_select (join=0x7f6a1803dad0, procedure=0x0) at /data/src/10.3/sql/sql_select.cc:18409
      #15 0x0000562c14e531b8 in JOIN::exec_inner (this=0x7f6a1803dad0) at /data/src/10.3/sql/sql_select.cc:3542
      #16 0x0000562c14e5263e in JOIN::exec (this=0x7f6a1803dad0) at /data/src/10.3/sql/sql_select.cc:3337
      #17 0x0000562c14ef4b47 in st_select_lex_unit::exec (this=0x7f6a180047c0) at /data/src/10.3/sql/sql_union.cc:1428
      #18 0x0000562c14ef0206 in mysql_union (thd=0x7f6a18000b00, lex=0x7f6a180046f8, result=0x7f6a1801a760, unit=0x7f6a180047c0, setup_tables_done_option=0) at /data/src/10.3/sql/sql_union.cc:41
      #19 0x0000562c14e47d02 in handle_select (thd=0x7f6a18000b00, lex=0x7f6a180046f8, result=0x7f6a1801a760, setup_tables_done_option=0) at /data/src/10.3/sql/sql_select.cc:356
      #20 0x0000562c14e1326e in execute_sqlcom_select (thd=0x7f6a18000b00, all_tables=0x7f6a18014d08) at /data/src/10.3/sql/sql_parse.cc:6466
      #21 0x0000562c14e097ef in mysql_execute_command (thd=0x7f6a18000b00) at /data/src/10.3/sql/sql_parse.cc:3731
      #22 0x0000562c14e16bd4 in mysql_parse (thd=0x7f6a18000b00, rawbuf=0x7f6a18014a08 "SELECT * FROM t1 LEFT OUTER JOIN t2 LEFT OUTER JOIN t3 ON b < c ON a > b\nINTERSECT\nSELECT * FROM t1 LEFT OUTER JOIN t2 LEFT OUTER JOIN t3 ON b < c ON a > b", length=155, parser_state=0x7f6a2a79b610, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:7921
      #23 0x0000562c14e0432e in dispatch_command (command=COM_QUERY, thd=0x7f6a18000b00, packet=0x7f6a18173121 "SELECT * FROM t1 LEFT OUTER JOIN t2 LEFT OUTER JOIN t3 ON b < c ON a > b\nINTERSECT\nSELECT * FROM t1 LEFT OUTER JOIN t2 LEFT OUTER JOIN t3 ON b < c ON a > b\n", packet_length=156, is_com_multi=false, is_next_command=false) at /data/src/10.3/sql/sql_parse.cc:1819
      #24 0x0000562c14e02d90 in do_command (thd=0x7f6a18000b00) at /data/src/10.3/sql/sql_parse.cc:1370
      #25 0x0000562c14f59646 in do_handle_one_connection (connect=0x562c187ef4f0) at /data/src/10.3/sql/sql_connect.cc:1418
      #26 0x0000562c14f593d3 in handle_one_connection (arg=0x562c187ef4f0) at /data/src/10.3/sql/sql_connect.cc:1324
      #27 0x0000562c153d11dc in pfs_spawn_thread (arg=0x562c1888fef0) at /data/src/10.3/storage/perfschema/pfs.cc:1862
      #28 0x00007f6a32449494 in start_thread (arg=0x7f6a2a79c700) at pthread_create.c:333
      #29 0x00007f6a305c193f in clone () from /lib/x86_64-linux-gnu/libc.so.6
      

      Attachments

        Issue Links

          Activity

            People

              sanja Oleksandr Byelkin
              elenst Elena Stepanova
              Votes:
              1 Vote for this issue
              Watchers:
              5 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.