"Fossies" - the Fresh Open Source Software Archive

Member "drizzle-7.1.36-stable/tests/suite/regression/r/654219.result" (6 May 2012, 1990 Bytes) of package /linux/misc/old/drizzle-7.1.36-stable.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 CREATE TABLE `prim_key` (
    2 `id` INT NOT NULL,
    3 `val` VARCHAR(20) COLLATE utf8_general_ci DEFAULT NULL,
    4 PRIMARY KEY (`id`)
    5 );
    6 CREATE TABLE `fore_key0` (
    7 `id` INT NOT NULL,
    8 `id_ref0` INT DEFAULT NULL,
    9 PRIMARY KEY (`id`),
   10 KEY `id_ref0` (`id_ref0`),
   11 CONSTRAINT `fore_key0_ibfk_1` FOREIGN KEY (`id_ref0`) REFERENCES
   12 `prim_key` (`id`)
   13 );
   14 CREATE TABLE `fore_key1` (
   15 `id` INT NOT NULL,
   16 `id_ref1` INT DEFAULT NULL,
   17 PRIMARY KEY (`id`),
   18 KEY `id_ref1` (`id_ref1`),
   19 CONSTRAINT `fore_key1_ibfk_1` FOREIGN KEY (`id_ref1`) REFERENCES
   20 `prim_key` (`id`) ON UPDATE CASCADE
   21 );
   22 SELECT CONSTRAINT_NAME,TABLE_NAME,COLUMN_NAME,ORDINAL_POSITION FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE;
   23 CONSTRAINT_NAME	TABLE_NAME	COLUMN_NAME	ORDINAL_POSITION
   24 PRIMARY	SYS_REPLICATION_LOG	ID	1
   25 PRIMARY	SYS_REPLICATION_LOG	SEGID	2
   26 PRIMARY	fore_key0	id	1
   27 PRIMARY	fore_key1	id	1
   28 PRIMARY	prim_key	id	1
   29 fore_key0_ibfk_1	fore_key0	id_ref0	1
   30 fore_key1_ibfk_1	fore_key1	id_ref1	1
   31 DROP TABLE fore_key1;
   32 DROP TABLE fore_key0;
   33 DROP TABLE prim_key;
   34 CREATE TABLE t1
   35 (
   36 s1 INT,
   37 s2 INT,
   38 s3 INT,
   39 PRIMARY KEY(s3)
   40 );
   41 CREATE TABLE t3
   42 (
   43 s1 INT,
   44 s2 INT,
   45 s3 INT,
   46 KEY(s1),
   47 CONSTRAINT CO FOREIGN KEY (s2)
   48 REFERENCES t1(s3)
   49 );
   50 SELECT CONSTRAINT_NAME,TABLE_NAME,COLUMN_NAME,ORDINAL_POSITION FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE;
   51 CONSTRAINT_NAME	TABLE_NAME	COLUMN_NAME	ORDINAL_POSITION
   52 CO	t3	s2	1
   53 PRIMARY	SYS_REPLICATION_LOG	ID	1
   54 PRIMARY	SYS_REPLICATION_LOG	SEGID	2
   55 PRIMARY	t1	s3	1
   56 DROP TABLE t3;
   57 DROP TABLE t1;
   58 CREATE TABLE t1 (c1 INT NOT NULL, c2 INT NOT NULL, c3 CHAR(5), c4 INT, c5 INT, constraint pk_t1 PRIMARY KEY (c5,c4));
   59 CREATE TABLE T2 (tc1 INT NOT NULL, c1 INT NOT NULL, c2 INT NOT NULL, c5 CHAR(5), constraint fk_t2 FOREIGN KEY (c1,c2) REFERENCES t1 (c5,c4));
   60 SELECT CONSTRAINT_NAME, TABLE_NAME, COLUMN_NAME, ORDINAL_POSITION FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE WHERE TABLE_NAME IN ('t1', 't2');
   61 CONSTRAINT_NAME	TABLE_NAME	COLUMN_NAME	ORDINAL_POSITION
   62 PRIMARY	t1	c4	2
   63 PRIMARY	t1	c5	1
   64 fk_t2	T2	c1	1
   65 fk_t2	T2	c2	2
   66 DROP TABLE t2;
   67 DROP TABLE t1;