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

PREPARE doesn't work as expected & throws errors but MySQL is working fine

    Details

      Description

      In some cases (see attached files for two simple examples) an SQL query with PREPARE gives me an error message instead of a result set. I think this queries should work and if I execute the exact same queries on MySQL 5.7.18 (subselect example) or MySQL 8.0.2 (subselect and CTE examples) it is working fine and as excepted. So I think there may be an Bug with MariaDB?

      This occurs only with PREPARE. If I'm running this directly (without PREPARE) it is working fine too with MariaDB.
      If I change the "max(1)" to "ceil(1)" in my subselect example it is working fine altogether (PREPARE and MariaDB).

      The error messages are included in the examples.
      It would be nice if you can double check my examples and maybe fix it in a future version?

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                sanja Oleksandr Byelkin
                Reporter:
                ralfnie Ralf Niedermayer
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: