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

CREATE VIEW IF NOT EXISTS produces a wrong warning

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 10.1.3
    • Fix Version/s: 10.1.4
    • Component/s: Views
    • Labels:
      None

      Description

      The warning text contains the database name instead of the view name.

      MariaDB [(none)]> create database db;
      Query OK, 1 row affected (0.00 sec)
       
      MariaDB [(none)]> use db;
      Database changed
      MariaDB [db]> create view v1 as select 1;
      Query OK, 0 rows affected (0.10 sec)
       
      MariaDB [db]> create view if not exists v1 as select 1;
      Query OK, 0 rows affected, 1 warning (0.00 sec)
       
      MariaDB [db]> show warnings;
      +-------+------+---------------------------+
      | Level | Code | Message                   |
      +-------+------+---------------------------+
      | Note  | 1050 | Table 'db' already exists |
      +-------+------+---------------------------+
      1 row in set (0.00 sec)

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              bar Alexander Barkov
              Reporter:
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: