Commit c4b2cf2d authored by Dmitry Lenev's avatar Dmitry Lenev

Follow-up for patch that addresses bug #53976 "ALTER TABLE

RENAME is allowed on views (not documented, broken)".

Adjusted test cases in funcs_1 suite after removing support
of ALTER TABLE RENAME for views.
parent d99aeb19
...@@ -3521,6 +3521,7 @@ RENAME TABLE v1 TO v2; ...@@ -3521,6 +3521,7 @@ RENAME TABLE v1 TO v2;
RENAME VIEW v2 TO v1; RENAME VIEW v2 TO v1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VIEW v2 TO v1' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VIEW v2 TO v1' at line 1
ALTER TABLE v2 RENAME AS v1; ALTER TABLE v2 RENAME AS v1;
ERROR HY000: 'test.v2' is not BASE TABLE
ALTER VIEW v1 RENAME AS v2; ALTER VIEW v1 RENAME AS v2;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'RENAME AS v2' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'RENAME AS v2' at line 1
DROP TABLE IF EXISTS t1, t2 ; DROP TABLE IF EXISTS t1, t2 ;
......
...@@ -3522,6 +3522,7 @@ RENAME TABLE v1 TO v2; ...@@ -3522,6 +3522,7 @@ RENAME TABLE v1 TO v2;
RENAME VIEW v2 TO v1; RENAME VIEW v2 TO v1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VIEW v2 TO v1' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VIEW v2 TO v1' at line 1
ALTER TABLE v2 RENAME AS v1; ALTER TABLE v2 RENAME AS v1;
ERROR HY000: 'test.v2' is not BASE TABLE
ALTER VIEW v1 RENAME AS v2; ALTER VIEW v1 RENAME AS v2;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'RENAME AS v2' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'RENAME AS v2' at line 1
DROP TABLE IF EXISTS t1, t2 ; DROP TABLE IF EXISTS t1, t2 ;
......
No preview for this file type
...@@ -3521,6 +3521,7 @@ RENAME TABLE v1 TO v2; ...@@ -3521,6 +3521,7 @@ RENAME TABLE v1 TO v2;
RENAME VIEW v2 TO v1; RENAME VIEW v2 TO v1;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VIEW v2 TO v1' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'VIEW v2 TO v1' at line 1
ALTER TABLE v2 RENAME AS v1; ALTER TABLE v2 RENAME AS v1;
ERROR HY000: 'test.v2' is not BASE TABLE
ALTER VIEW v1 RENAME AS v2; ALTER VIEW v1 RENAME AS v2;
ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'RENAME AS v2' at line 1 ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'RENAME AS v2' at line 1
DROP TABLE IF EXISTS t1, t2 ; DROP TABLE IF EXISTS t1, t2 ;
......
...@@ -298,7 +298,7 @@ RENAME TABLE v1 TO v2; ...@@ -298,7 +298,7 @@ RENAME TABLE v1 TO v2;
# RENAME VIEW is not available even when we try it via rename table. # RENAME VIEW is not available even when we try it via rename table.
--error ER_PARSE_ERROR --error ER_PARSE_ERROR
RENAME VIEW v2 TO v1; RENAME VIEW v2 TO v1;
#--error ER_WRONG_OBJECT --error ER_WRONG_OBJECT
ALTER TABLE v2 RENAME AS v1; ALTER TABLE v2 RENAME AS v1;
--error ER_PARSE_ERROR --error ER_PARSE_ERROR
ALTER VIEW v1 RENAME AS v2; ALTER VIEW v1 RENAME AS v2;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment