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

Valgrind failure in innodb_ext_keys.test

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.0.8
    • 10.0.9
    • None
    • None
    • 10.0, 10.0-base trees

    Description

      The following part of innodb_extkey.test causes valgrind errors in buildbot:

      CREATE TABLE t1(a int, b int, KEY (a), PRIMARY KEY (b))  ENGINE=InnoDB;
       
      CREATE TABLE t2 (b int, PRIMARY KEY (b));
      INSERT INTO t2 VALUES (4),(9);
       
      SELECT STRAIGHT_JOIN t1.a FROM t1 RIGHT JOIN t2 ON t1.b = t2.b
        WHERE (t1.b NOT BETWEEN 1 AND 7 OR t1.a IS NULL AND t1.b = t2.b) AND t2.b = 4
      GROUP BY 1;
       
      DROP TABLE t1,t2;

      The errors look like this:

      ==29423== Invalid read of size 8
      ==29423==    at 0x66447E: test_if_order_by_key(st_order*, TABLE*, unsigned int, unsigned int*) (sql_select.cc:19549)
      ==29423==    by 0x665C93: test_if_cheaper_ordering(st_join_table const*, st_order*, TABLE*, Bitmap<64u>, int, unsigned long long, int*, int*, unsigned long long*, unsigned int*, unsigned int*) (sql_select.cc:24498)
      ==29423==    by 0x688966: test_if_skip_sort_order(st_join_table*, st_order*, unsigned long long, bool, Bitmap<64u> const*) (sql_select.cc:20011)
      ==29423==    by 0x698634: JOIN::optimize_inner() (sql_select.cc:1827)
      ==29423==    by 0x69897E: JOIN::optimize() (sql_select.cc:1018)
      ==29423==    by 0x69CCED: mysql_select(THD*, Item***, TABLE_LIST*, unsigned int, List<Item>&, Item*, unsigned int, st_order*, st_order*, Item*, st_order*, unsigned long long, select_result*, st_select_lex_unit*, st_select_lex*) (sql_select.cc:3282)
      ==29423==    by 0x6A0582: handle_select(THD*, LEX*, select_result*, unsigned long) (sql_select.cc:377)
      ==29423==    by 0x62E8BA: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:4974)
      ==29423==    by 0x630E20: mysql_execute_command(THD*) (sql_parse.cc:2331)
      ==29423==    by 0x6386D2: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:6100)
      ==29423==    by 0x63916A: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1112)
      ==29423==    by 0x63A904: do_command(THD*) (sql_parse.cc:819)
      ==29423==    by 0x747098: do_handle_one_connection(THD*) (sql_connect.cc:1266)
      ==29423==    by 0x747189: handle_one_connection (sql_connect.cc:1181)
      ==29423==    by 0x9DFEA3: pfs_spawn_thread (pfs.cc:1015)
      ==29423==    by 0x4E3506F: start_thread (in /lib64/libpthread-2.9.so)
      ==29423==  Address 0x10d987f0 is 0 bytes after a block of size 464 alloc'd
      ==29423==    at 0x4C25DD6: malloc (vg_replace_malloc.c:270)
      ==29423==    by 0xD3D5EA: my_malloc (my_malloc.c:100)
      ==29423==    by 0xD2E1D0: alloc_root (my_alloc.c:180)
      ==29423==    by 0x709222: open_table_from_share(THD*, TABLE_SHARE*, char const*, unsigned int, unsigned int, unsigned int, TABLE*, bool) (table.cc:2625)
      ==29423==    by 0x5D6D36: open_table(THD*, TABLE_LIST*, st_mem_root*, Open_table_context*) (sql_base.cc:3106)
      ==29423==    by 0x5D78F4: open_and_process_table(THD*, LEX*, TABLE_LIST*, unsigned int*, unsigned int, Prelocking_strategy*, bool, Open_table_context*, st_mem_root*) (sql_base.cc:4428)
      ==29423==    by 0x5D83FF: open_tables(THD*, TABLE_LIST**, unsigned int*, unsigned int, Prelocking_strategy*) (sql_base.cc:4962)
      ==29423==    by 0x5D8A25: open_and_lock_tables(THD*, TABLE_LIST*, bool, unsigned int, Prelocking_strategy*) (sql_base.cc:5567)
      ==29423==    by 0x5C55AB: open_and_lock_tables(THD*, TABLE_LIST*, bool, unsigned int) (sql_base.h:562)
      ==29423==    by 0x62E617: execute_sqlcom_select(THD*, TABLE_LIST*) (sql_parse.cc:4919)
      ==29423==    by 0x630E20: mysql_execute_command(THD*) (sql_parse.cc:2331)
      ==29423==    by 0x6386D2: mysql_parse(THD*, char*, unsigned int, Parser_state*) (sql_parse.cc:6100)
      ==29423==    by 0x63916A: dispatch_command(enum_server_command, THD*, char*, unsigned int) (sql_parse.cc:1112)
      ==29423==    by 0x63A904: do_command(THD*) (sql_parse.cc:819)
      ==29423==    by 0x747098: do_handle_one_connection(THD*) (sql_connect.cc:1266)
      ==29423==    by 0x747189: handle_one_connection (sql_connect.cc:1181)
      ^ Found warnings in /home/psergey/dev2/10.0-base/mysql-test/var/log/mysqld.1.err

      Attachments

        Activity

          People

            igor Igor Babaev
            psergei Sergei Petrunia
            Votes:
            0 Vote for this issue
            Watchers:
            2 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.