diff options
author | Chaithra Gopalareddy <chaithra.gopalareddy@oracle.com> | 2012-03-14 06:27:03 +0530 |
---|---|---|
committer | Chaithra Gopalareddy <chaithra.gopalareddy@oracle.com> | 2012-03-14 06:27:03 +0530 |
commit | d93559f9ffc6796fdc78b4cebde316465ad66676 (patch) | |
tree | 60434e05b2bd9923b505fb4e69dc07b6361fea64 /mysql-test/t/view.test | |
parent | 080060559a32e6d62649f1895e7bfa6f496e2546 (diff) | |
download | mariadb-git-d93559f9ffc6796fdc78b4cebde316465ad66676.tar.gz |
Bug#12626844 : WE ARE NOT CHECKING VIEW TABLE NAMES
ENOUGH - CONCAT() HACKS. ALSO WRONG
ERROR MESSAGE WHILE TRYING TO CREATE
A VIEW ON A NON EXISTING DATABASE
PROBLEM:
The first part of the problem is concluded as not a
bug, as 'concat' is not a reserved word and it is
completely valid to create a view with the name
'concat'.
The second issue is, while trying to create a view on
a non existing database, we are not giving a proper error
message.
FIX:
We have added a check for the database existence while
trying to create a view. This check would give an error
as 'unknown database' when the database does not exist.
This patch is a backport of the patch for Bug#13601606
Diffstat (limited to 'mysql-test/t/view.test')
-rw-r--r-- | mysql-test/t/view.test | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/mysql-test/t/view.test b/mysql-test/t/view.test index 39985bec339..603b3e5cdb9 100644 --- a/mysql-test/t/view.test +++ b/mysql-test/t/view.test @@ -4136,6 +4136,17 @@ disconnect con2; disconnect con3; +--echo # +--echo # Bug#12626844: WRONG ERROR MESSAGE WHILE CREATING A VIEW ON A +--echo # NON EXISTING DATABASE +--echo # + +--disable_warnings +DROP DATABASE IF EXISTS nodb; +--enable_warnings +--error ER_BAD_DB_ERROR +CREATE VIEW nodb.a AS SELECT 1; + # Check that all connections opened by test cases in this file are really # gone so execution of other tests won't be affected by their presence. --source include/wait_until_count_sessions.inc |