~ubuntu-branches/ubuntu/saucy/drizzle/saucy-proposed

« back to all changes in this revision

Viewing changes to plugin/schema_dictionary/tests/t/data_dictionary.test

  • Committer: Bazaar Package Importer
  • Author(s): Monty Taylor
  • Date: 2010-03-18 12:12:31 UTC
  • Revision ID: james.westby@ubuntu.com-20100318121231-k6g1xe6cshbwa0f8
Tags: upstream-2010.03.1347
ImportĀ upstreamĀ versionĀ 2010.03.1347

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Drizzle's data dictionary.
 
2
 
 
3
use data_dictionary;
 
4
 
 
5
--replace_column 1 #  6 # 7 # 8 # 9 # 10 #
 
6
SELECT count(*) FROM columns;
 
7
 
 
8
--replace_column 1 #  6 # 7 # 8 # 9 # 10 #
 
9
SELECT count(*) FROM indexes;
 
10
 
 
11
--replace_column 1 #  6 # 7 # 8 # 9 # 10 #
 
12
SELECT count(*) FROM index_parts;
 
13
 
 
14
--replace_column 1 #  6 # 7 # 8 # 9 # 10 #
 
15
SELECT SCHEMA_NAME  FROM schemas;
 
16
 
 
17
--replace_column 1 #  6 # 7 # 8 # 9 # 10 #
 
18
SELECT COLUMN_NAME  FROM columns;
 
19
 
 
20
--replace_column 1 #  6 # 7 # 8 # 9 # 10 #
 
21
SELECT count(*) FROM REFERENTIAL_CONSTRAINTS;
 
22
 
 
23
--replace_column 1 #  6 # 7 # 8 # 9 # 10 #
 
24
SELECT count(*) FROM TABLE_CONSTRAINTS;
 
25
 
 
26
# Make sure we don't change the names of the columns
 
27
 
 
28
show create table COLUMNS ;
 
29
show create table INDEXES ;
 
30
show create table INDEX_PARTS ;
 
31
show create table REFERENTIAL_CONSTRAINTS ;
 
32
show create table SCHEMAS ;
 
33
show create table SCHEMA_NAMES;
 
34
show create table TABLES ;
 
35
show create table TABLE_CONSTRAINTS ;
 
36
 
 
37
# Test that the data dictionary is not leaking its tables to other schema
 
38
CREATE SCHEMA A;
 
39
use A;
 
40
create table A (a int);
 
41
SELECT COUNT(*) FROM data_dictionary.tables WHERE TABLE_NAME = "A";
 
42
 
 
43
DROP SCHEMA A;