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

Assertion `(key_part->key_part_flag & 4) == 0' failed key_hashnr

    XMLWordPrintable

Details

    Description

      regression after 6cecf61a590c15680287ac9ea4967f07dd47c577

      SET join_cache_level=3;
       
      CREATE TABLE t1 ( a TIMESTAMP , b varchar(100), c varchar(10) , KEY b (b(66)), KEY a (a)) ;
      INSERT INTO `t1` VALUES ('0000-00-00 00:00:00','GHOBS','EMLCG'),('0000-00-00 00:00:00','t','p');
       
      CREATE TABLE t2 (a varchar(100), b varchar(100), c varchar(10) , KEY b (b(66)), KEY a (a)) ;
      INSERT INTO `t2` VALUES ('a','CLUSK','FMJIK'),('d','b','folk'),('YVTAH','MSRXN','NZHIW'),('LOKJB','RJZAB','admission'),('ICCMG','girlfriend','JICGI'),('EBZEZ','p','fjzhuwxgb'),('m','KKAXM','NGJWJ'),('FHWPN','v','k'),('KBNOR','ALWLV','PUAIZ'),('u','d','below'),('NJCXE','always','a'),('e','minister','i'),('b','c','jxhojyrze'),('j','l','o'),('i','p','kikirjxho'),('r','y','l'),('YPUJI','p','IREVK'),('YPAMT','defender','ersfjzhuw'),('FLNLS','x','horror'),('q','h','difficult'),('m','z','e'),('n','cut','y'),('u','PLPLJ','k');
       
      SELECT t1.a FROM t1  JOIN t2 ON t1.b = t2.b WHERE t1.b > 'e' OR t1.c != t2.c  GROUP BY t1.a;
       
      DROP TABLE t1, t2;
      

      Version: '10.5.26-MariaDB-debug-log'  
      mariadbd: 10.5/src/sql/key.cc:761: ulong key_hashnr(KEY*, uint, const uchar*): Assertion `(key_part->key_part_flag & 4) == 0' failed.
      240712 17:51:51 [ERROR] mysqld got signal 6 ;
       
      Server version: 10.5.26-MariaDB-debug-log source revision: 00d2c7f7f480c58c5e406c7c1a875f83bd3bb1fc
       
      /lib/x86_64-linux-gnu/libc.so.6(+0x33fd6)[0x7fedd9852fd6]
      sql/key.cc:762(key_hashnr(st_key*, unsigned int, unsigned char const*))[0x5577a67db701]
      sql/sql_join_cache.cc:3324(JOIN_CACHE_HASHED::get_hash_idx_complex(unsigned char*, unsigned int))[0x5577a61a0b30]
      sql/sql_join_cache.cc:3244(JOIN_CACHE_HASHED::key_search(unsigned char*, unsigned int, unsigned char**))[0x5577a6196613]
      sql/sql_join_cache.cc:3083(JOIN_CACHE_HASHED::put_record())[0x5577a6195d13]
      sql/sql_select.cc:21045(sub_select_cache(JOIN*, st_join_table*, bool))[0x5577a5dcb2db]
      sql/sql_select.cc:21503(evaluate_join_record(JOIN*, st_join_table*, int))[0x5577a5dcd8c6]
      sql/sql_select.cc:21273(sub_select(JOIN*, st_join_table*, bool))[0x5577a5dcc18b]
      sql/sql_select.cc:20790(do_select(JOIN*, Procedure*))[0x5577a5dc9eae]
      sql/sql_select.cc:4654(JOIN::exec_inner())[0x5577a5d53cac]
      sql/sql_select.cc:4435(JOIN::exec())[0x5577a5d512ba]
      sql/sql_select.cc:4913(mysql_select(THD*, TABLE_LIST*, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*))[0x5577a5d556fb]
      sql/sql_select.cc:449(handle_select(THD*, LEX*, select_result*, unsigned long))[0x5577a5d25aed]
      sql/sql_parse.cc:6425(execute_sqlcom_select(THD*, TABLE_LIST*))[0x5577a5c88bd6]
      sql/sql_parse.cc:4030(mysql_execute_command(THD*))[0x5577a5c772ee]
      sql/sql_parse.cc:8221(mysql_parse(THD*, char*, unsigned int, Parser_state*, bool, bool))[0x5577a5c941ad]
      sql/sql_parse.cc:1895(dispatch_command(enum_server_command, THD*, char*, unsigned int, bool, bool))[0x5577a5c69121]
      sql/sql_parse.cc:1376(do_command(THD*))[0x5577a5c65a89]
      sql/sql_connect.cc:1417(do_handle_one_connection(CONNECT*, bool))[0x5577a60cd4a6]
      sql/sql_connect.cc:1321(handle_one_connection)[0x5577a60cce0a]
      perfschema/pfs.cc:2203(pfs_spawn_thread)[0x5577a6d56644]
      nptl/pthread_create.c:478(start_thread)[0x7fedd9d6d609]
       
      Query (0x62b0000852a8): SELECT t1.a FROM t1  JOIN t2 ON t1.b = t2.b WHERE t1.b > 'e' OR t1.c != t2.c  GROUP BY t1.a
      

      Attachments

        Issue Links

          Activity

            People

              psergei Sergei Petrunia
              alice Alice Sherepa
              Votes:
              0 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.