summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorMonty <monty@mariadb.org>2017-03-26 22:30:43 +0300
committerAlexander Barkov <bar@mariadb.org>2017-04-07 18:22:06 +0400
commit470c3fd98d724fccbf96c049f2153bc1f5990915 (patch)
treee27efd43ad631df068472d72049cb99573cefd02 /mysql-test
parent17a87d606302b55d547104d7fe6c536c6c288a8b (diff)
downloadmariadb-git-470c3fd98d724fccbf96c049f2153bc1f5990915.tar.gz
Change error message when using DROP VIEW on a non existing view from
"Unknown table" to "Unknown view"
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/r/create_drop_binlog.result2
-rw-r--r--mysql-test/r/create_drop_view.result2
-rw-r--r--mysql-test/r/drop.result10
-rw-r--r--mysql-test/r/grant.result2
-rw-r--r--mysql-test/r/profiling.result2
-rw-r--r--mysql-test/r/sp-group.result2
-rw-r--r--mysql-test/r/sp.result2
-rw-r--r--mysql-test/r/view.result6
-rw-r--r--mysql-test/suite/funcs_1/r/innodb_views.result20
-rw-r--r--mysql-test/suite/funcs_1/r/memory_views.result20
-rw-r--r--mysql-test/suite/funcs_1/views/views_master.inc4
-rw-r--r--mysql-test/suite/rpl/r/rpl_create_drop_view.result4
-rw-r--r--mysql-test/suite/rpl/r/rpl_drop_view.result4
-rw-r--r--mysql-test/suite/rpl/t/rpl_create_drop_view.test2
-rw-r--r--mysql-test/suite/rpl/t/rpl_drop_view.test4
-rw-r--r--mysql-test/t/drop.test2
-rw-r--r--mysql-test/t/view.test4
17 files changed, 46 insertions, 46 deletions
diff --git a/mysql-test/r/create_drop_binlog.result b/mysql-test/r/create_drop_binlog.result
index 249f99475be..d22d8dd5d92 100644
--- a/mysql-test/r/create_drop_binlog.result
+++ b/mysql-test/r/create_drop_binlog.result
@@ -160,7 +160,7 @@ Note 1050 Table 'v1' already exists
DROP VIEW IF EXISTS v1;
DROP VIEW IF EXISTS v1;
Warnings:
-Note 1051 Unknown table 'test.v1'
+Note 4067 Unknown VIEW: 'test.v1'
SHOW BINLOG EVENTS;
Log_name Pos Event_type Server_id End_log_pos Info
# # Format_desc 1 # VER
diff --git a/mysql-test/r/create_drop_view.result b/mysql-test/r/create_drop_view.result
index 0ec337b9b25..fc9dca3ea2e 100644
--- a/mysql-test/r/create_drop_view.result
+++ b/mysql-test/r/create_drop_view.result
@@ -55,5 +55,5 @@ id
DROP VIEW IF EXISTS v1;
DROP VIEW IF EXISTS v1;
Warnings:
-Note 1051 Unknown table 'test.v1'
+Note 4067 Unknown VIEW: 'test.v1'
DROP TABLE t1;
diff --git a/mysql-test/r/drop.result b/mysql-test/r/drop.result
index 1a06380e66f..050e0b9cd2b 100644
--- a/mysql-test/r/drop.result
+++ b/mysql-test/r/drop.result
@@ -198,7 +198,7 @@ ERROR 42S02: Unknown table 'test.table1'
DROP TABLE table1,table2;
ERROR 42S02: Unknown table 'test.table1,test.table2'
DROP VIEW view1,view2,view3,view4;
-ERROR 42S02: Unknown table 'test.view1,test.view2,test.view3,test.view4'
+ERROR 42S02: Unknown VIEW: 'test.view1,test.view2,test.view3,test.view4'
DROP TABLE IF EXISTS table1;
Warnings:
@@ -209,10 +209,10 @@ Note 1051 Unknown table 'test.table1'
Note 1051 Unknown table 'test.table2'
DROP VIEW IF EXISTS view1,view2,view3,view4;
Warnings:
-Note 1051 Unknown table 'test.view1'
-Note 1051 Unknown table 'test.view2'
-Note 1051 Unknown table 'test.view3'
-Note 1051 Unknown table 'test.view4'
+Note 4067 Unknown VIEW: 'test.view1'
+Note 4067 Unknown VIEW: 'test.view2'
+Note 4067 Unknown VIEW: 'test.view3'
+Note 4067 Unknown VIEW: 'test.view4'
# Test error message when trigger does not find table
CREATE TABLE table1(a int);
diff --git a/mysql-test/r/grant.result b/mysql-test/r/grant.result
index b250137ebf8..593d998754a 100644
--- a/mysql-test/r/grant.result
+++ b/mysql-test/r/grant.result
@@ -1428,7 +1428,7 @@ Warnings:
Note 1305 FUNCTION test.test_function does not exist
drop view if exists v1;
Warnings:
-Note 1051 Unknown table 'test.v1'
+Note 4067 Unknown VIEW: 'test.v1'
create table test (col1 varchar(30));
create function test_function() returns varchar(30)
begin
diff --git a/mysql-test/r/profiling.result b/mysql-test/r/profiling.result
index 4c531a8a5f7..e87bfd49056 100644
--- a/mysql-test/r/profiling.result
+++ b/mysql-test/r/profiling.result
@@ -415,7 +415,7 @@ select @@profiling;
drop table if exists t1, t2, t3;
drop view if exists v1;
Warnings:
-Note 1051 Unknown table 'test.v1'
+Note 4067 Unknown VIEW: 'test.v1'
drop function if exists f1;
set session profiling = OFF;
set global profiling_history_size= @start_value;
diff --git a/mysql-test/r/sp-group.result b/mysql-test/r/sp-group.result
index 2e30b697103..db118496e9a 100644
--- a/mysql-test/r/sp-group.result
+++ b/mysql-test/r/sp-group.result
@@ -3,7 +3,7 @@ Warnings:
Note 1051 Unknown table 'test.t1'
drop view if exists view_t1;
Warnings:
-Note 1051 Unknown table 'test.view_t1'
+Note 4067 Unknown VIEW: 'test.view_t1'
SET sql_mode=ONLY_FULL_GROUP_BY;
CREATE TABLE t1 (
pk INT,
diff --git a/mysql-test/r/sp.result b/mysql-test/r/sp.result
index 4b571e526a2..3312a46dc88 100644
--- a/mysql-test/r/sp.result
+++ b/mysql-test/r/sp.result
@@ -3211,7 +3211,7 @@ drop procedure bug10961|
DROP PROCEDURE IF EXISTS bug6866|
DROP VIEW IF EXISTS tv|
Warnings:
-Note 1051 Unknown table 'test.tv'
+Note 4067 Unknown VIEW: 'test.tv'
DROP TABLE IF EXISTS tt1,tt2,tt3|
Warnings:
Note 1051 Unknown table 'test.tt1'
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result
index 20c9a1d2e80..9c0732a81b0 100644
--- a/mysql-test/r/view.result
+++ b/mysql-test/r/view.result
@@ -197,7 +197,7 @@ c d
2 5
3 10
drop view v100;
-ERROR 42S02: Unknown table 'test.v100'
+ERROR 42S02: Unknown VIEW: 'test.v100'
drop view t1;
ERROR HY000: 'test.t1' is not VIEW
drop table v1;
@@ -2894,7 +2894,7 @@ Tables_in_test
t1
v1
DROP VIEW v2,v1;
-ERROR 42S02: Unknown table 'test.v2'
+ERROR 42S02: Unknown VIEW: 'test.v2'
SHOW TABLES;
Tables_in_test
t1
@@ -5222,7 +5222,7 @@ CREATE TABLE t4 (i4 INT);
INSERT INTO t4 VALUES (1),(2);
DROP VIEW IF EXISTS v1;
Warnings:
-Note 1051 Unknown table 'test.v1'
+Note 4067 Unknown VIEW: 'test.v1'
CREATE VIEW v1 AS select coalesce(j1,i3) AS v1_field1 from t2 join t3 left join t1 on ( i1 = i2 );
CREATE VIEW v2 AS select v1_field1 from t4 join v1;
prepare my_stmt from "select v1_field1 from v2";
diff --git a/mysql-test/suite/funcs_1/r/innodb_views.result b/mysql-test/suite/funcs_1/r/innodb_views.result
index 0ce0130e727..294e0695226 100644
--- a/mysql-test/suite/funcs_1/r/innodb_views.result
+++ b/mysql-test/suite/funcs_1/r/innodb_views.result
@@ -4314,7 +4314,7 @@ CREATE VIEW v2 AS Select * from test.v1;
ERROR 42S02: Table 'test.v1' doesn't exist
DROP VIEW IF EXISTS v2;
Warnings:
-Note 1051 Unknown table 'test.v2'
+Note 4067 Unknown VIEW: 'test.v2'
Testcase 3.3.1.25
--------------------------------------------------------------------------------
@@ -7566,7 +7566,7 @@ Call sp1() ;
ERROR 42000: PROCEDURE test.sp1 does not exist
Drop view if exists test.v1 ;
Warnings:
-Note 1051 Unknown table 'test.v1'
+Note 4067 Unknown VIEW: 'test.v1'
Drop procedure sp1 ;
ERROR 42000: PROCEDURE test.sp1 does not exist
@@ -21307,12 +21307,12 @@ CREATE TABLE t1 ( f1 VARCHAR(1000) ) ENGINE = innodb ;
CREATE VIEW v1 AS SELECT f1 FROM t1;
DROP VIEW v1;
DROP VIEW v1;
-ERROR 42S02: Unknown table 'test.v1'
+ERROR 42S02: Unknown VIEW: 'test.v1'
CREATE VIEW v1 AS SELECT f1 FROM t1;
DROP VIEW IF EXISTS v1;
DROP VIEW IF EXISTS v1;
Warnings:
-Note 1051 Unknown table 'test.v1'
+Note 4067 Unknown VIEW: 'test.v1'
Testcase 3.3.1.68
--------------------------------------------------------------------------------
@@ -21324,31 +21324,31 @@ CREATE VIEW v1_base AS SELECT * FROM t1;
CREATE VIEW v1_top AS SELECT * FROM v1_base;
DROP VIEW v1_top ;
DROP VIEW v1_top;
-ERROR 42S02: Unknown table 'test.v1_top'
+ERROR 42S02: Unknown VIEW: 'test.v1_top'
CREATE VIEW v1_top AS SELECT * FROM v1_base;
DROP VIEW v1_base ;
DROP VIEW v1_base;
-ERROR 42S02: Unknown table 'test.v1_base'
+ERROR 42S02: Unknown VIEW: 'test.v1_base'
DROP VIEW v1_top;
CREATE VIEW v1_base AS SELECT * FROM t1;
CREATE VIEW v1_top AS SELECT * FROM v1_base;
DROP VIEW v1_top CASCADE ;
DROP VIEW v1_top;
-ERROR 42S02: Unknown table 'test.v1_top'
+ERROR 42S02: Unknown VIEW: 'test.v1_top'
CREATE VIEW v1_top AS SELECT * FROM v1_base;
DROP VIEW v1_base CASCADE ;
DROP VIEW v1_base;
-ERROR 42S02: Unknown table 'test.v1_base'
+ERROR 42S02: Unknown VIEW: 'test.v1_base'
DROP VIEW v1_top;
CREATE VIEW v1_base AS SELECT * FROM t1;
CREATE VIEW v1_top AS SELECT * FROM v1_base;
DROP VIEW v1_top RESTRICT ;
DROP VIEW v1_top;
-ERROR 42S02: Unknown table 'test.v1_top'
+ERROR 42S02: Unknown VIEW: 'test.v1_top'
CREATE VIEW v1_top AS SELECT * FROM v1_base;
DROP VIEW v1_base RESTRICT ;
DROP VIEW v1_base;
-ERROR 42S02: Unknown table 'test.v1_base'
+ERROR 42S02: Unknown VIEW: 'test.v1_base'
DROP VIEW v1_top;
Testcase 3.3.1.69, 3.3.1.70, 3.3.1.A5
diff --git a/mysql-test/suite/funcs_1/r/memory_views.result b/mysql-test/suite/funcs_1/r/memory_views.result
index 0ca6e8d94d8..87465035980 100644
--- a/mysql-test/suite/funcs_1/r/memory_views.result
+++ b/mysql-test/suite/funcs_1/r/memory_views.result
@@ -4315,7 +4315,7 @@ CREATE VIEW v2 AS Select * from test.v1;
ERROR 42S02: Table 'test.v1' doesn't exist
DROP VIEW IF EXISTS v2;
Warnings:
-Note 1051 Unknown table 'test.v2'
+Note 4067 Unknown VIEW: 'test.v2'
Testcase 3.3.1.25
--------------------------------------------------------------------------------
@@ -7567,7 +7567,7 @@ Call sp1() ;
ERROR 42000: PROCEDURE test.sp1 does not exist
Drop view if exists test.v1 ;
Warnings:
-Note 1051 Unknown table 'test.v1'
+Note 4067 Unknown VIEW: 'test.v1'
Drop procedure sp1 ;
ERROR 42000: PROCEDURE test.sp1 does not exist
@@ -21309,12 +21309,12 @@ CREATE TABLE t1 ( f1 VARCHAR(1000) ) ENGINE = memory ;
CREATE VIEW v1 AS SELECT f1 FROM t1;
DROP VIEW v1;
DROP VIEW v1;
-ERROR 42S02: Unknown table 'test.v1'
+ERROR 42S02: Unknown VIEW: 'test.v1'
CREATE VIEW v1 AS SELECT f1 FROM t1;
DROP VIEW IF EXISTS v1;
DROP VIEW IF EXISTS v1;
Warnings:
-Note 1051 Unknown table 'test.v1'
+Note 4067 Unknown VIEW: 'test.v1'
Testcase 3.3.1.68
--------------------------------------------------------------------------------
@@ -21326,31 +21326,31 @@ CREATE VIEW v1_base AS SELECT * FROM t1;
CREATE VIEW v1_top AS SELECT * FROM v1_base;
DROP VIEW v1_top ;
DROP VIEW v1_top;
-ERROR 42S02: Unknown table 'test.v1_top'
+ERROR 42S02: Unknown VIEW: 'test.v1_top'
CREATE VIEW v1_top AS SELECT * FROM v1_base;
DROP VIEW v1_base ;
DROP VIEW v1_base;
-ERROR 42S02: Unknown table 'test.v1_base'
+ERROR 42S02: Unknown VIEW: 'test.v1_base'
DROP VIEW v1_top;
CREATE VIEW v1_base AS SELECT * FROM t1;
CREATE VIEW v1_top AS SELECT * FROM v1_base;
DROP VIEW v1_top CASCADE ;
DROP VIEW v1_top;
-ERROR 42S02: Unknown table 'test.v1_top'
+ERROR 42S02: Unknown VIEW: 'test.v1_top'
CREATE VIEW v1_top AS SELECT * FROM v1_base;
DROP VIEW v1_base CASCADE ;
DROP VIEW v1_base;
-ERROR 42S02: Unknown table 'test.v1_base'
+ERROR 42S02: Unknown VIEW: 'test.v1_base'
DROP VIEW v1_top;
CREATE VIEW v1_base AS SELECT * FROM t1;
CREATE VIEW v1_top AS SELECT * FROM v1_base;
DROP VIEW v1_top RESTRICT ;
DROP VIEW v1_top;
-ERROR 42S02: Unknown table 'test.v1_top'
+ERROR 42S02: Unknown VIEW: 'test.v1_top'
CREATE VIEW v1_top AS SELECT * FROM v1_base;
DROP VIEW v1_base RESTRICT ;
DROP VIEW v1_base;
-ERROR 42S02: Unknown table 'test.v1_base'
+ERROR 42S02: Unknown VIEW: 'test.v1_base'
DROP VIEW v1_top;
Testcase 3.3.1.69, 3.3.1.70, 3.3.1.A5
diff --git a/mysql-test/suite/funcs_1/views/views_master.inc b/mysql-test/suite/funcs_1/views/views_master.inc
index 54e7f2af54b..17f5c1e5529 100644
--- a/mysql-test/suite/funcs_1/views/views_master.inc
+++ b/mysql-test/suite/funcs_1/views/views_master.inc
@@ -2745,7 +2745,7 @@ CREATE VIEW v1 AS SELECT f1 FROM t1;
# DROP VIEW
DROP VIEW v1;
---error ER_BAD_TABLE_ERROR
+--error ER_UNKNOWN_VIEW
DROP VIEW v1;
CREATE VIEW v1 AS SELECT f1 FROM t1;
@@ -2792,7 +2792,7 @@ while ($num1)
# DROP VIEW v1_top < |RESTRICD|CASCADE> must be successful.
eval $aux1 ;
# Check, that v1_top really no more exists + cleanup for the second sub test
- --error ER_BAD_TABLE_ERROR
+ --error ER_UNKNOWN_VIEW
DROP VIEW v1_top;
CREATE VIEW v1_top AS SELECT * FROM v1_base;
diff --git a/mysql-test/suite/rpl/r/rpl_create_drop_view.result b/mysql-test/suite/rpl/r/rpl_create_drop_view.result
index fef1edb2018..ea1e3354045 100644
--- a/mysql-test/suite/rpl/r/rpl_create_drop_view.result
+++ b/mysql-test/suite/rpl/r/rpl_create_drop_view.result
@@ -96,10 +96,10 @@ connection master;
DROP VIEW v1;
DROP TABLE t1;
DROP VIEW v1;
-ERROR 42S02: Unknown table 'test.v1'
+ERROR 42S02: Unknown VIEW: 'test.v1'
DROP VIEW IF EXISTS v2;
Warnings:
-Note 1051 Unknown table 'test.v2'
+Note 4067 Unknown VIEW: 'test.v2'
# Syncing slave with master
connection slave;
SELECT * FROM v1;
diff --git a/mysql-test/suite/rpl/r/rpl_drop_view.result b/mysql-test/suite/rpl/r/rpl_drop_view.result
index f6ced4eb41f..aa4df701609 100644
--- a/mysql-test/suite/rpl/r/rpl_drop_view.result
+++ b/mysql-test/suite/rpl/r/rpl_drop_view.result
@@ -9,9 +9,9 @@ create view v1 as select * from t1;
create view v2 as select * from t2;
create view v3 as select * from t3;
drop view not_exist_view;
-ERROR 42S02: Unknown table 'test.not_exist_view'
+ERROR 42S02: Unknown VIEW: 'test.not_exist_view'
drop view v1, not_exist_view;
-ERROR 42S02: Unknown table 'test.not_exist_view'
+ERROR 42S02: Unknown VIEW: 'test.not_exist_view'
select * from v1;
ERROR 42S02: Table 'test.v1' doesn't exist
drop view v2, v3;
diff --git a/mysql-test/suite/rpl/t/rpl_create_drop_view.test b/mysql-test/suite/rpl/t/rpl_create_drop_view.test
index 9280f35f638..c26243ab3c6 100644
--- a/mysql-test/suite/rpl/t/rpl_create_drop_view.test
+++ b/mysql-test/suite/rpl/t/rpl_create_drop_view.test
@@ -41,7 +41,7 @@ connection master;
DROP VIEW v1;
DROP TABLE t1;
---error ER_BAD_TABLE_ERROR
+--error ER_UNKNOWN_VIEW
DROP VIEW v1;
DROP VIEW IF EXISTS v2;
diff --git a/mysql-test/suite/rpl/t/rpl_drop_view.test b/mysql-test/suite/rpl/t/rpl_drop_view.test
index 55a0ea104d8..1893dd21926 100644
--- a/mysql-test/suite/rpl/t/rpl_drop_view.test
+++ b/mysql-test/suite/rpl/t/rpl_drop_view.test
@@ -13,9 +13,9 @@ create table t3 (c int);
create view v1 as select * from t1;
create view v2 as select * from t2;
create view v3 as select * from t3;
---error 1051
+--error ER_UNKNOWN_VIEW
drop view not_exist_view;
---error 1051
+--error ER_UNKNOWN_VIEW
drop view v1, not_exist_view;
--error 1146
select * from v1;
diff --git a/mysql-test/t/drop.test b/mysql-test/t/drop.test
index a3e96953bac..6f506dd7215 100644
--- a/mysql-test/t/drop.test
+++ b/mysql-test/t/drop.test
@@ -288,7 +288,7 @@ DROP TABLE t1;
DROP TABLE table1;
--error ER_BAD_TABLE_ERROR
DROP TABLE table1,table2;
---error ER_BAD_TABLE_ERROR
+--error ER_UNKNOWN_VIEW
DROP VIEW view1,view2,view3,view4;
--echo
DROP TABLE IF EXISTS table1;
diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test
index df5c7d3495d..137902c54f2 100644
--- a/mysql-test/t/view.test
+++ b/mysql-test/t/view.test
@@ -125,7 +125,7 @@ select * from v1;
select * from v2;
# try to drop nonexistent VIEW
--- error ER_BAD_TABLE_ERROR
+--error ER_UNKNOWN_VIEW
drop view v100;
# try to drop table with DROP VIEW
@@ -2782,7 +2782,7 @@ CREATE TABLE t1 (id INT);
CREATE VIEW v1 AS SELECT id FROM t1;
SHOW TABLES;
---error ER_BAD_TABLE_ERROR
+--error ER_UNKNOWN_VIEW
DROP VIEW v2,v1;
SHOW TABLES;