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

Support expressions in LIMIT clause

Details

    Description

      Feature Request

      Support expressions in the LIMIT clause, not just integers,
      such as SELECT * FROM tbl LIMIT (1 * :param)

      Both SQLite and Postgres allow similar. And it would be kind of helpful for PHP users, to eschew the emulated prepared statement driver situation there.
      (Bound parameters are interpolated as strings per default, and MariaDB doesn't permit `LIMIT '20'` clauses of course.)

      It's entirely sufficient to support scalar expressions of course. There's no need for incorporating column references etc.

      Attachments

        Activity

          milki mario created issue -
          milki mario made changes -
          Field Original Value New Value
          Description -Feature Request-

          Support expressions in the LIMIT clause, not just integers,
          such as SELECT * FROM tbl LIMIT (1 * :param)

          Both SQLite and Postgres allow similar. And it would be kind of helpful for PHP users, to eschew the emulated prepared statement driver situation there.
          (Bound parameters are interpolated as strings per default, and MariaDB doesn't permit `LIMIT '20'` clauses of course.)

          It's entirely sufficient to support scalar expressions of course. There's no need for incorporating column references etc.
          _Feature Request_

          Support expressions in the LIMIT clause, not just integers,
          such as SELECT * FROM tbl LIMIT (1 * :param)

          Both SQLite and Postgres allow similar. And it would be kind of helpful for PHP users, to eschew the emulated prepared statement driver situation there.
          (Bound parameters are interpolated as strings per default, and MariaDB doesn't permit `LIMIT '20'` clauses of course.)

          It's entirely sufficient to support scalar expressions of course. There's no need for incorporating column references etc.
          ratzpo Rasmus Johansson (Inactive) made changes -
          Workflow MariaDB v2 [ 59231 ] MariaDB v3 [ 62942 ]
          serg Sergei Golubchik made changes -
          Workflow MariaDB v3 [ 62942 ] MariaDB v4 [ 130303 ]

          People

            Unassigned Unassigned
            milki mario
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.