~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

Viewing changes to mysql-test/suite/funcs_1/datadict/basics_mixed1.inc

  • Committer: Bazaar Package Importer
  • Author(s): Norbert Tretkowski
  • Date: 2010-03-17 14:56:02 UTC
  • Revision ID: james.westby@ubuntu.com-20100317145602-x7e30l1b2sb5s6w6
Tags: upstream-5.1.45
ImportĀ upstreamĀ versionĀ 5.1.45

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# suite/funcs_1/datadict/basics_mixed1.inc
 
2
#
 
3
# Auxiliary script to be sourced by suite/funcs_1/t/is_basics_mixed.test
 
4
#
 
5
# Author:
 
6
# 2008-01-23 mleich WL#4203 Reorganize and fix the data dictionary tests of
 
7
#                           testsuite funcs_1
 
8
#                   Create this script based on older scripts and new code.
 
9
#
 
10
 
 
11
# 1 Attempt to create tables and views when residing in information_schema
 
12
# 1.1 CREATE TABLE
 
13
USE information_schema;
 
14
let $message= root: create a table with a name of an IS table directly in IS;
 
15
let $dd_part1= CREATE TABLE;
 
16
let $dd_part2= ( c1 INT );
 
17
--source suite/funcs_1/datadict/basics_mixed2.inc
 
18
# FIXME 3.2.1.6: error message ER_UNKNOWN_TABLE is misleading
 
19
--error ER_UNKNOWN_TABLE
 
20
CREATE TABLE t1 (f1 INT, f2 INT, f3 INT);
 
21
#
 
22
# 1.2 CREATE VIEW
 
23
# 1.2.1 Hit on existing INFORMATION_SCHEMA table
 
24
--error ER_DBACCESS_DENIED_ERROR
 
25
CREATE VIEW tables AS SELECT 'garbage';
 
26
--error ER_DBACCESS_DENIED_ERROR
 
27
CREATE VIEW tables AS SELECT * FROM information_schema.tables;
 
28
# 1.2.2 New view
 
29
# ER_DBACCESS_DENIED_ERROR would be better.
 
30
--error ER_UNKNOWN_TABLE
 
31
CREATE VIEW v1 AS SELECT 'garbage';
 
32
 
 
33
# 2 Attempt to create tables and views when residing in information_schema
 
34
# 1.1 CREATE TABLE
 
35
USE test;
 
36
let $message= root: create a table with a name of an IS table from other db;
 
37
let $dd_part1= CREATE TABLE information_schema.;
 
38
let $dd_part2= ( c1 INT );
 
39
--source suite/funcs_1/datadict/basics_mixed2.inc
 
40
# FIXME 3.2.1.6: error message ER_UNKNOWN_TABLE is misleading
 
41
--error ER_UNKNOWN_TABLE
 
42
CREATE TABLE information_schema.t1 (f1 INT, f2 INT, f3 INT);
 
43
#
 
44
# Hit on existing INFORMATION_SCHEMA table
 
45
--error ER_DBACCESS_DENIED_ERROR
 
46
CREATE VIEW information_schema.tables AS SELECT 'garbage';
 
47
--error ER_DBACCESS_DENIED_ERROR
 
48
CREATE VIEW information_schema.tables AS
 
49
SELECT * FROM information_schema.tables;
 
50
# New table
 
51
# ER_DBACCESS_DENIED_ERROR would be better.
 
52
--error ER_UNKNOWN_TABLE
 
53
CREATE VIEW information_schema.v1 AS SELECT 'garbage';