"Fossies" - the Fresh Open Source Software Archive

Member "drizzle-7.1.36-stable/tests/suite/regression/t/622465.test" (6 May 2012, 269 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 # Make sure that foreign keys transfer with CREATE TABLE LIKE
    2 CREATE TABLE t1 (id INT PRIMARY KEY);
    3 
    4 CREATE TABLE `t2` LIKE `t1`;
    5 ALTER TABLE `t2` ADD FOREIGN KEY (`id`) REFERENCES `t1`(`id`);
    6 
    7 CREATE TABLE `t3` LIKE `t2`;
    8 SHOW CREATE TABLE t3;
    9 
   10 DROP TABLE t2, t3, t1;