[MDEV-7886] CREATE VIEW IF NOT EXISTS produces a wrong warning Created: 2015-03-31  Updated: 2015-04-13  Resolved: 2015-04-13

Status: Closed
Project: MariaDB Server
Component/s: Views
Affects Version/s: 10.1.3
Fix Version/s: 10.1.4

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Alexander Barkov
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-5359 CREATE OR REPLACE, CREATE IF NOT EXIS... Closed

 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)


Generated at Thu Feb 08 07:23:01 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.