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

Item_cache::is_null() returns incorrect result inside storage engine's cond_push()

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • Major
    • Resolution: Fixed
    • 10.0.14
    • 10.1.15
    • Optimizer
    • None

    Description

      Current implementation of Item_cache::is_null() in MariaDB comes from http://bazaar.launchpad.net/~maria-captains/maria/10.0/revision/2502.313.1 which was fixing incorrect query results. MySQL 5.6 apparently had similar problems with incorrect query results, but they fixed Item_cache::is_null() slightly differently: http://bazaar.launchpad.net/~mysql/mysql-server/5.6/revision/3690.1.115. And it turns out that MySQL's implementation is correct while MariaDB's is not.

      Unfortunately I don't know if it's possible to exhibit the problem using some SQL – the test from MySQL's patch passes on MariaDB. But the difference for us was in the custom storage engine inside the cond_push() function. Apparently by the time this function is called Item_cache doesn't have a cached value yet and thus is_null() always return true leading to incorrect behavior of the storage engine.

      Please incorporate MySQL's implementation of Item_cache::is_null() and if possible add a test for this specific problem.

      Attachments

        Activity

          People

            sanja Oleksandr Byelkin
            pivanof Pavel Ivanov
            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.