1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-7886 CREATE VIEW IF NOT EXISTS produces a wrong warning

This commit is contained in:
Alexander Barkov
2015-04-13 22:36:49 +04:00
parent ed34927065
commit 201c985be5
4 changed files with 4 additions and 4 deletions

View File

@ -156,7 +156,7 @@ DROP VIEW v1;
CREATE VIEW IF NOT EXISTS v1 AS SELECT 1;
CREATE VIEW IF NOT EXISTS v1 AS SELECT 1;
Warnings:
Note 1050 Table 'test' already exists
Note 1050 Table 'v1' already exists
DROP VIEW IF EXISTS v1;
DROP VIEW IF EXISTS v1;
Warnings:

View File

@ -19,7 +19,7 @@ VIEW_DEFINITION
select `test`.`t1`.`id` AS `id` from `test`.`t1` where (`test`.`t1`.`id` > 10)
CREATE VIEW IF NOT EXISTS v1 AS SELECT * FROM t1 WHERE id>12;
Warnings:
Note 1050 Table 'test' already exists
Note 1050 Table 'v1' already exists
SELECT VIEW_DEFINITION FROM INFORMATION_SCHEMA.VIEWS WHERE TABLE_NAME='v1';
VIEW_DEFINITION
select `test`.`t1`.`id` AS `id` from `test`.`t1` where (`test`.`t1`.`id` > 10)

View File

@ -30,7 +30,7 @@ CREATE VIEW v1 AS SELECT * FROM t1 WHERE id>10;
ERROR 42S01: Table 'v1' already exists
CREATE VIEW IF NOT EXISTS v1 AS SELECT * FROM t1 WHERE id>10;
Warnings:
Note 1050 Table 'test' already exists
Note 1050 Table 'v1' already exists
CREATE OR REPLACE VIEW IF NOT EXISTS v1 AS SELECT * FROM t1 WHERE id>10;
ERROR HY000: Incorrect usage of OR REPLACE and IF NOT EXISTS
# Syncing slave with master

View File

@ -930,7 +930,7 @@ loop_out:
{
push_warning_printf(thd, Sql_condition::WARN_LEVEL_NOTE,
ER_TABLE_EXISTS_ERROR, ER(ER_TABLE_EXISTS_ERROR),
view->db, view->table_name);
view->table_name);
DBUG_RETURN(0);
}
else if (mode == VIEW_CREATE_NEW)