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

mysql_stmt_prepare() fails with "unknown column" error

Details

    Description

      mysql_stmt_prepare() fails with the following query (which works from the CLI):

      "SELECT foo.bar FROM (SELECT ? AS bar) AS foo;"
      Unknown column 'foo.bar' in 'field list'

      wrapping the argument in an extra SELECT makes it work:
      "SELECT foo.bar FROM (SELECT (SELECT ?) AS bar) AS foo;"

      Attachments

        Activity

          The problem was fixed by a merge of this commit from upstream:

          commit 8bb95e9a974b5eee44764698fafc56279f8b7691
          Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com>
          Date:   Wed Aug 3 09:58:36 2016 +0530
           
              Bug #24380263: INCORRECT BEHAVIOR WITH PARAMETER AND
                             DERIVED TABLE IN JOIN
          

          The fix is in 5.5.52, 10.1.18, 10.2.2, and will be in 10.0.28 when it's released.

          elenst Elena Stepanova added a comment - The problem was fixed by a merge of this commit from upstream: commit 8bb95e9a974b5eee44764698fafc56279f8b7691 Author: Sreeharsha Ramanavarapu <sreeharsha.ramanavarapu@oracle.com> Date: Wed Aug 3 09:58:36 2016 +0530   Bug #24380263: INCORRECT BEHAVIOR WITH PARAMETER AND DERIVED TABLE IN JOIN The fix is in 5.5.52, 10.1.18, 10.2.2, and will be in 10.0.28 when it's released.

          People

            Unassigned Unassigned
            tg-x tg(x)
            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.