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

Test case from opt_tvc.test fails with statement memory protection

Details

    Description

      The following test case from opt_tvc.test fails if the server is built with-DWITH_PROTECT_STATEMENT_MEMROOT:BOOL=ON

      create table t1 (a int, b int);
      insert into t1
      values (1,2), (4,6), (9,7), (1,1), (2,5), (7,8);
      set @@in_predicate_conversion_threshold= 2;
      prepare stmt from "select * from t1 where a in (1,2)";
      execute stmt;
      execute stmt;
      

      The test case fails with the assertion abort that points to statement memory allocation at the second execution in this code of table_value_constr::prepare()

        Type_holder *holders;
        ...
        if (!(holders= new (thd->stmt_arena->mem_root) Type_holder[cnt]) ||
            join_type_handlers_for_tvc(thd, li, holders, cnt) ||
            get_type_attributes_for_tvc(thd, li, holders,
                                                        lists_of_values.elements, cnt))
       

      Attachments

        Issue Links

          Activity

            igor Igor Babaev (Inactive) created issue -
            igor Igor Babaev (Inactive) made changes -
            Field Original Value New Value
            Priority Major [ 3 ] Critical [ 2 ]
            igor Igor Babaev (Inactive) made changes -
            Assignee Igor Babaev [ igor ]
            igor Igor Babaev (Inactive) made changes -
            Status Open [ 1 ] In Progress [ 3 ]
            igor Igor Babaev (Inactive) made changes -
            Assignee Igor Babaev [ igor ] Oleksandr Byelkin [ sanja ]
            Status In Progress [ 3 ] In Review [ 10002 ]
            sanja Oleksandr Byelkin made changes -
            Assignee Oleksandr Byelkin [ sanja ] Igor Babaev [ igor ]
            Status In Review [ 10002 ] Stalled [ 10000 ]
            igor Igor Babaev (Inactive) made changes -
            Fix Version/s 10.4.32 [ 29300 ]
            Fix Version/s 10.5.23 [ 29012 ]
            Fix Version/s 10.6.16 [ 29014 ]
            Fix Version/s 10.10.7 [ 29018 ]
            Fix Version/s 10.11.6 [ 29020 ]
            Fix Version/s 11.0.4 [ 29021 ]
            Fix Version/s 11.1.3 [ 29023 ]
            Fix Version/s 11.2.2 [ 29035 ]
            Fix Version/s 10.4 [ 22408 ]
            Resolution Fixed [ 1 ]
            Status Stalled [ 10000 ] Closed [ 6 ]
            julien.fritsch Julien Fritsch made changes -
            Fix Version/s 11.2.2 [ 29035 ]
            alice Alice Sherepa made changes -
            alice Alice Sherepa made changes -

            People

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