~drizzle-trunk/drizzle/development

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
CREATE SCHEMA A REPLICATE = TRUE;
SHOW CREATE SCHEMA A;

USE A;

CREATE TABLE A (A SERIAL);
SHOW CREATE TABLE A;

CREATE TABLE B (A SERIAL) REPLICATE = FALSE;
SHOW CREATE TABLE B;

SELECT SCHEMA_NAME, IS_REPLICATED FROM DATA_DICTIONARY.SCHEMAS WHERE SCHEMA_NAME="A";
--sorted_result
SELECT TABLE_NAME, IS_REPLICATED FROM DATA_DICTIONARY.TABLES WHERE TABLE_SCHEMA="A";

DROP SCHEMA A;

# Now we need to see if the table is inheriting the replication behavior
# from the parent.
CREATE SCHEMA A REPLICATE = FALSE;
SHOW CREATE SCHEMA A;

USE A;

CREATE TABLE A (A SERIAL);
SHOW CREATE TABLE A;

CREATE TABLE B (A SERIAL) REPLICATE = TRUE;
SHOW CREATE TABLE B;

SELECT SCHEMA_NAME, IS_REPLICATED FROM DATA_DICTIONARY.SCHEMAS WHERE SCHEMA_NAME="A";
--sorted_result
SELECT TABLE_NAME, IS_REPLICATED FROM DATA_DICTIONARY.TABLES WHERE TABLE_SCHEMA="A";

DROP SCHEMA A;