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

Conversion of Big IN Predicates Into Subqueries returns wrong result

    XMLWordPrintable

    Details

      Description

      As we updated to MariaDB Version 10.6.7 we encounter a problems with `WHERE IN (?)` statements starting at 1000 parameters return zero rows (default value for in_predicate_conversion_threshold).

      After some research it seems to be caused by https://github.com/MariaDB/server/commit/a65d01a4cf04c744f9355bec186430540ce6ba08

      My suspect here that MDEV-23182 triggers another bug in `Item_func_in::in_predicate_to_in_subs_transformer`:
      https://github.com/MariaDB/server/blob/a65d01a4cf04c744f9355bec186430540ce6ba08/sql/sql_tvc.cc#L962

      As the function description of `create_value_list_for_tvc` implies it tries to convert but return true if not successful.
      So `in_predicate_to_in_subs_transformer` should not treat that as an error, instead return `this` because conversion failed and let the underlaying function execute the non converted query.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              MarioF Mario Fritschen
              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.