mariadb/mysql-test/t/subselect2.test
unknown 80ec807976 WorkLog#1323
Deprecate the use of TYPE=... Preferred syntax is ENGINE=


include/mysqld_error.h:
  New warning for deprecated syntax
sql/lex.h:
  Introduce ENGINE keyword
  Sort order of symbols
sql/share/czech/errmsg.txt:
  New warning for deprecated syntax
sql/share/danish/errmsg.txt:
  New warning for deprecated syntax
sql/share/dutch/errmsg.txt:
  New warning for deprecated syntax
sql/share/english/errmsg.txt:
  New warning for deprecated syntax
sql/share/estonian/errmsg.txt:
  New warning for deprecated syntax
sql/share/french/errmsg.txt:
  New warning for deprecated syntax
sql/share/german/errmsg.txt:
  New warning for deprecated syntax
sql/share/greek/errmsg.txt:
  New warning for deprecated syntax
sql/share/hungarian/errmsg.txt:
  New warning for deprecated syntax
sql/share/italian/errmsg.txt:
  New warning for deprecated syntax
sql/share/japanese/errmsg.txt:
  New warning for deprecated syntax
sql/share/korean/errmsg.txt:
  New warning for deprecated syntax
sql/share/norwegian-ny/errmsg.txt:
  New warning for deprecated syntax
sql/share/norwegian/errmsg.txt:
  New warning for deprecated syntax
sql/share/polish/errmsg.txt:
  New warning for deprecated syntax
sql/share/portuguese/errmsg.txt:
  New warning for deprecated syntax
sql/share/romanian/errmsg.txt:
  New warning for deprecated syntax
sql/share/russian/errmsg.txt:
  New warning for deprecated syntax
sql/share/serbian/errmsg.txt:
  New warning for deprecated syntax
sql/share/slovak/errmsg.txt:
  New warning for deprecated syntax
sql/share/spanish/errmsg.txt:
  New warning for deprecated syntax
sql/share/swedish/errmsg.txt:
  New warning for deprecated syntax
sql/share/ukrainian/errmsg.txt:
  New warning for deprecated syntax
sql/sql_show.cc:
  Change TYPE= with ENGINE=
sql/sql_yacc.yy:
  Introduce ENGINE keyword,
  Deprecate TYPE= syntax,
  Introduce SHOW ENGINE syntax,
  Deprecate SHOW INNODB/BDB syntax.
mysql-test/r/alias.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/alter_table.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/auto_increment.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/bdb-alter-table-1.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/bdb-crash.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/bdb-deadlock.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/bdb.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/bdb_cache.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/case.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/cast.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/constraints.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/create.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/ctype_collate.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/ctype_latin1_de.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/ctype_many.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/ctype_mb.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/ctype_recoding.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/ctype_ucs.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/delete.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/distinct.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/fulltext.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/fulltext2.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/fulltext_distinct.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/fulltext_left_join.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/func_compress.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/func_date_add.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/func_group.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/func_if.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/func_str.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/func_system.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/func_test.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/func_time.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/gis-rtree.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/group_by.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/handler.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/heap.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/heap_auto_increment.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/heap_btree.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/heap_hash.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/help.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/innodb-deadlock.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/innodb.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/innodb_cache.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/innodb_handler.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/insert_select.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/isam.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/join.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/join_crash.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/join_outer.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/key.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/lock.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/lock_tables_lost_commit.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/merge.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/mix_innodb_myisam_binlog.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/multi_update.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/myisam.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/null.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/null_key.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/order_by.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/query_cache.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/range.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/repair_part1.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/replace.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/rollback.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/rpl000006.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/rpl_flush_tables.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/rpl_insert_id.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/rpl_relayrotate.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/select.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/select_found.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/show_check.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/sql_mode.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/status.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/subselect.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/subselect2.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/subselect_innodb.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/symlink.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/temp_table.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/type_blob.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/type_datetime.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/type_enum.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/type_nchar.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/type_set.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/union.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/update.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/r/warnings.result:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/alias.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/alter_table.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/auto_increment.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/bdb-alter-table-1.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/bdb-crash.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/bdb-deadlock.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/bdb.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/bdb_cache.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/create.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/ctype_ucs.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/delete.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/distinct.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/fulltext.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/fulltext2.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/fulltext_distinct.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/fulltext_left_join.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/func_compress.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/func_date_add.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/func_group.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/func_if.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/func_str.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/func_test.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/func_time.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/gis-rtree.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/group_by.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/handler.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/heap.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/heap_auto_increment.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/heap_btree.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/heap_hash.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/help.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/innodb-deadlock.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/innodb.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/innodb_cache.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/innodb_handler.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/insert_select.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/isam.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/join.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/join_crash.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/join_outer.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/key.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/lock.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/lock_tables_lost_commit.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/merge.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/mix_innodb_myisam_binlog.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/multi_update.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/myisam.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/null.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/null_key.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/order_by.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/outfile.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/query_cache.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/query_cache_merge.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/range.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/repair_part1.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/replace.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/rollback.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/rpl000006.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/rpl_flush_tables.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/rpl_insert_id.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/rpl_relayrotate.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/select.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/select_found.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/show_check.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/sql_mode.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/status.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/subselect.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/subselect2.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/subselect_innodb.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/symlink.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/temp_table.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/type_datetime.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/type_set.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/union.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/update.test:
  Change occurances of TYPE= to ENGINE=
mysql-test/t/warnings.test:
  Change occurances of TYPE= to ENGINE=
  New test for deprecated syntax
2003-12-10 04:31:42 +00:00

149 lines
No EOL
14 KiB
Text
Raw Blame History

-- source include/have_innodb.inc
#
# test of big query with a lot of IN subqueries.
#
--disable_warnings
drop table if exists t1, t2, t3, t4;
--enable_warnings
CREATE TABLE t1
(
DOCID VARCHAR(32)BINARY NOT NULL
, UUID VARCHAR(32)BINARY NOT NULL
, MIMETYPE VARCHAR(80)BINARY
, CONTENTDATA LONGBLOB
, CONTENTSIZE INTEGER
, VERSIONID INTEGER
, REPID VARCHAR(32)BINARY
, MODIFIED TIMESTAMP
, MODIFIER VARCHAR(255)BINARY
, ORIGINATOR INTEGER
, PRIMARY KEY ( DOCID )
) ENGINE=InnoDB
;
CREATE TABLE t2
(
DOCID VARCHAR(32)BINARY NOT NULL
, DOCNAME VARCHAR(255)BINARY NOT NULL
, DOCTYPEID VARCHAR(32)BINARY NOT NULL
, FOLDERID VARCHAR(32)BINARY NOT NULL
, AUTHOR VARCHAR(255)BINARY
, CREATED TIMESTAMP NOT NULL
, TITLE VARCHAR(255)BINARY
, SUBTITLE VARCHAR(255)BINARY
, DOCABSTRACT LONGBLOB
, PUBLISHDATE TIMESTAMP
, EXPIRATIONDATE TIMESTAMP
, LOCKEDBY VARCHAR(80)BINARY
, STATUS VARCHAR(80)BINARY
, PARENTDOCID VARCHAR(32)BINARY
, REPID VARCHAR(32)BINARY
, MODIFIED TIMESTAMP NOT NULL
, MODIFIER VARCHAR(255)BINARY NOT NULL
, PUBLISHSTATUS INTEGER
, ORIGINATOR INTEGER
, PRIMARY KEY ( DOCID )
) ENGINE=InnoDB
;
CREATE INDEX DDOCTYPEID_IDX ON t2 (DOCTYPEID);
CREATE INDEX DFOLDERID_IDX ON t2 (FOLDERID);
CREATE TABLE t3
(
FOLDERID VARCHAR(32)BINARY NOT NULL
, FOLDERNAME VARCHAR(255)BINARY NOT NULL
, CREATOR VARCHAR(255)BINARY
, CREATED TIMESTAMP NOT NULL
, DESCRIPTION VARCHAR(255)BINARY
, FOLDERTYPE INTEGER NOT NULL
, MODIFIED TIMESTAMP
, MODIFIER VARCHAR(255)BINARY
, FOLDERSIZE INTEGER NOT NULL
, PARENTID VARCHAR(32)BINARY
, REPID VARCHAR(32)BINARY
, ORIGINATOR INTEGER
, PRIMARY KEY ( FOLDERID )
) ENGINE=InnoDB;
CREATE INDEX FFOLDERID_IDX ON t3 (FOLDERID);
CREATE INDEX CMFLDRPARNT_IDX ON t3 (PARENTID);
CREATE TABLE t4
(
DOCTYPEID VARCHAR(32)BINARY NOT NULL
, DOCTYPENAME VARCHAR(80)BINARY NOT NULL
, DESCRIPTION VARCHAR(255)BINARY
, EXTNDATA LONGBLOB
, MODIFIED TIMESTAMP
, MODIFIER VARCHAR(255)BINARY
, ORIGINATOR INTEGER
, PRIMARY KEY ( DOCTYPEID )
) ENGINE=InnoDB;
INSERT INTO t2 VALUES("c373e9f59cf15a6c3e57444553544200", "c373e9f59cf15a6c3e57444553544200", "340d243d45f111d497b00010a4ef934d", "2f6161e879db43c1a5b82c21ddc49089", NULL, "2003-06-06 07:48:42", NULL, NULL, NULL, "2003-06-06 07:48:42", "2003-06-06 07:48:42", NULL, NULL, NULL, "03eea05112b845949f3fd03278b5fe43", "2003-06-06 07:48:42", "admin", "0", NULL);
INSERT INTO t2 VALUES("c373e9f5a472f43ba45e444553544200", "c373e9f5a472f43ba45e444553544200", "340d243d45f111d497b00010a4ef934d", "2f6161e879db43c1a5b82c21ddc49089", NULL, "2003-06-07 18:50:12", NULL, NULL, NULL, "2003-06-07 18:50:12", "2003-06-07 18:50:12", NULL, NULL, NULL, "03eea05112b845949f3fd03278b5fe43", "2003-06-07 18:50:12", "admin", "0", NULL);
INSERT INTO t2 VALUES("c373e9f5a4a0f56014eb444553544200", "c373e9f5a4a0f56014eb444553544200", "340d243d45f111d497b00010a4ef934d", "2f6161e879db43c1a5b82c21ddc49089", NULL, "2003-06-07 19:39:26", NULL, NULL, NULL, "2003-06-07 19:39:26", "2003-06-07 19:39:26", NULL, NULL, NULL, "03eea05112b845949f3fd03278b5fe43", "2003-06-07 19:39:26", "admin", "0", NULL);
INSERT INTO t2 VALUES("c373e9f5a4a0f8fa4a86444553544200", "c373e9f5a4a0f8fa4a86444553544200", "340d243d45f111d497b00010a4ef934d", "2f6161e879db43c1a5b82c21ddc49089", NULL, "2003-06-07 19:43:05", NULL, NULL, NULL, "2003-06-07 19:43:05", "2003-06-07 19:43:05", NULL, NULL, NULL, "03eea05112b845949f3fd03278b5fe43", "2003-06-07 19:43:05", "admin", "0", NULL);
INSERT INTO t2 VALUES("c373e9f5ac7b537205ce444553544200", "c373e9f5ac7b537205ce444553544200", "340d243d45f111d497b00010a4ef934d", "2f6161e879db43c1a5b82c21ddc49089", NULL, "2003-06-09 08:15:24", NULL, NULL, NULL, "2003-06-09 08:15:24", "2003-06-09 08:15:24", NULL, NULL, NULL, "03eea05112b845949f3fd03278b5fe43", "2003-06-09 08:15:24", "admin", "0", NULL);
INSERT INTO t2 VALUES("c373e9f5ad0792012454444553544200", "c373e9f5ad0792012454444553544200", "340d243d45f111d497b00010a4ef934d", "2f6161e879db43c1a5b82c21ddc49089", NULL, "2003-06-09 10:51:44", NULL, NULL, NULL, "2003-06-09 10:51:44", "2003-06-09 10:51:44", NULL, NULL, NULL, "03eea05112b845949f3fd03278b5fe43", "2003-06-09 10:51:44", "admin", "0", NULL);
INSERT INTO t2 VALUES("c373e9f5ad079821ef34444553544200", "First Discussion", "c373e9f5ad079174ff17444553544200", "c373e9f5ad0796c0eca4444553544200", "Goldilocks", "2003-06-09 11:16:50", "Title: First Discussion", NULL, NULL, "2003-06-09 10:51:26", "2003-06-09 10:51:26", NULL, NULL, NULL, "03eea05112b845949f3fd03278b5fe43", "2003-06-09 11:16:50", "admin", "0", NULL);
INSERT INTO t2 VALUES("c373e9f5ad07993f3859444553544200", "Last Discussion", "c373e9f5ad079174ff17444553544200", "c373e9f5ad0796c0eca4444553544200", "Goldilocks", "2003-06-09 11:21:06", "Title: Last Discussion", NULL, "Setting new abstract and keeping doc checked out", "2003-06-09 10:51:26", "2003-06-09 10:51:26", NULL, NULL, NULL, "03eea05112b845949f3fd03278b5fe43", "2003-06-09 11:21:06", "admin", "0", NULL);
INSERT INTO t2 VALUES("c373e9f5ad079a3219c4444553544200", "testdoclayout", "340d243c45f111d497b00010a4ef934d", "c373e9f5ad0796c0eca4444553544200", "Goldilocks", "2003-06-09 11:25:31", "Title: Test doc layout", "Subtitle: test doc layout", NULL, "2003-06-09 10:51:27", "2003-06-09 10:51:27", NULL, NULL, NULL, "03eea05112b845949f3fd03278b5fe43", "2003-06-09 11:25:31", "admin", "0", NULL);
INSERT INTO t3 VALUES("0c9aab05b15048c59bc35c8461507deb", "System", "System", "2003-06-05 16:30:00", "The system content repository folder.", "3", "2003-06-05 16:30:00", "System", "0", NULL, "9c9aab05b15048c59bc35c8461507deb", "1");
INSERT INTO t3 VALUES("2f6161e879db43c1a5b82c21ddc49089", "Default", "System", "2003-06-09 10:52:02", "The default content repository folder.", "3", "2003-06-05 16:30:00", "System", "0", NULL, "03eea05112b845949f3fd03278b5fe43", "1");
INSERT INTO t3 VALUES("c373e9f5ad0791724315444553544200", "AddDocumentTest", "admin", "2003-06-09 10:51:25", "Movie Reviews", "0", "2003-06-09 10:51:25", "admin", "0", "2f6161e879db43c1a5b82c21ddc49089", "03eea05112b845949f3fd03278b5fe43", NULL);
INSERT INTO t3 VALUES("c373e9f5ad07919e1963444553544200", "NewDestDirectory", "admin", "2003-06-09 10:51:28", "Adding new directory", "128", "2003-06-09 10:51:28", "admin", "0", "2f6161e879db43c1a5b82c21ddc49089", "03eea05112b845949f3fd03278b5fe43", NULL);
INSERT INTO t3 VALUES("c373e9f5ad07919fe525444553544200", "SubDestDirectory", "admin", "2003-06-09 10:51:28", "Adding new directory", "128", "2003-06-09 10:51:28", "admin", "0", "c373e9f5ad07919e1963444553544200", "03eea05112b845949f3fd03278b5fe43", NULL);
INSERT INTO t3 VALUES("c373e9f5ad0791a0dab5444553544200", "Level1", "admin", "2003-06-09 10:51:29", NULL, "0", "2003-06-09 10:51:29", "admin", "0", "2f6161e879db43c1a5b82c21ddc49089", "03eea05112b845949f3fd03278b5fe43", NULL);
INSERT INTO t3 VALUES("c373e9f5ad0791a14669444553544200", "Level2", "admin", "2003-06-09 10:51:29", NULL, "0", "2003-06-09 10:51:29", "admin", "0", "c373e9f5ad0791a0dab5444553544200", "03eea05112b845949f3fd03278b5fe43", NULL);
INSERT INTO t3 VALUES("c373e9f5ad0791a23c0e444553544200", "Level3", "admin", "2003-06-09 10:51:29", NULL, "0", "2003-06-09 10:51:29", "admin", "0", "c373e9f5ad0791a14669444553544200", "03eea05112b845949f3fd03278b5fe43", NULL);
INSERT INTO t3 VALUES("c373e9f5ad0791a6b11f444553544200", "Dir1", "admin", "2003-06-09 10:51:30", NULL, "0", "2003-06-09 10:51:30", "admin", "0", "2f6161e879db43c1a5b82c21ddc49089", "03eea05112b845949f3fd03278b5fe43", NULL);
INSERT INTO t3 VALUES("c373e9f5ad0791a897d6444553544200", "Dir2", "admin", "2003-06-09 10:51:30", NULL, "0", "2003-06-09 10:51:30", "admin", "0", "c373e9f5ad0791a6b11f444553544200", "03eea05112b845949f3fd03278b5fe43", NULL);
INSERT INTO t3 VALUES("c373e9f5ad0791a9a063444553544200", "NewDestDirectory", "admin", "2003-06-09 10:51:31", NULL, "0", "2003-06-09 10:51:31", "admin", "0", "c373e9f5ad0791a897d6444553544200", "03eea05112b845949f3fd03278b5fe43", NULL);
INSERT INTO t3 VALUES("c373e9f5ad0791aa73e3444553544200", "LevelA", "admin", "2003-06-09 10:51:31", NULL, "0", "2003-06-09 10:51:31", "admin", "0", "c373e9f5ad0791a0dab5444553544200", "03eea05112b845949f3fd03278b5fe43", NULL);
INSERT INTO t3 VALUES("c373e9f5ad0791ab034b444553544200", "LevelB", "admin", "2003-06-09 10:51:31", NULL, "0", "2003-06-09 10:51:31", "admin", "0", "c373e9f5ad0791aa73e3444553544200", "03eea05112b845949f3fd03278b5fe43", NULL);
INSERT INTO t3 VALUES("c373e9f5ad0791ac7311444553544200", "LevelC", "admin", "2003-06-09 10:51:32", NULL, "0", "2003-06-09 10:51:32", "admin", "0", "c373e9f5ad0791ab034b444553544200", "03eea05112b845949f3fd03278b5fe43", NULL);
INSERT INTO t3 VALUES("c373e9f5ad0791ad66cf444553544200", "test2", "admin", "2003-06-09 10:51:32", NULL, "0", "2003-06-09 10:51:32", "admin", "0", "c373e9f5ad0791724315444553544200", "03eea05112b845949f3fd03278b5fe43", NULL);
INSERT INTO t3 VALUES("c373e9f5ad0791aebd87444553544200", "test3", "admin", "2003-06-09 10:51:33", NULL, "0", "2003-06-09 10:51:33", "admin", "0", "c373e9f5ad0791ad66cf444553544200", "03eea05112b845949f3fd03278b5fe43", NULL);
INSERT INTO t3 VALUES("c373e9f5ad0791dbaac4444553544200", "Special Caf<61> Folder", "admin", "2003-06-09 10:51:43", "test folder names with special chars", "0", "2003-06-09 10:51:43", "admin", "0", "2f6161e879db43c1a5b82c21ddc49089", "03eea05112b845949f3fd03278b5fe43", NULL);
INSERT INTO t3 VALUES("c373e9f5ad0796bf913f444553544200", "CopiedFolder", "admin", "2003-06-09 11:09:05", "Movie Reviews", "0", "2003-06-09 11:09:05", "admin", "0", "c373e9f5ad0791a23c0e444553544200", "03eea05112b845949f3fd03278b5fe43", NULL);
INSERT INTO t3 VALUES("c373e9f5ad0796c0eca4444553544200", "Movie Reviews", "admin", "2003-06-09 11:09:13", "Movie Reviews", "0", "2003-06-09 11:09:13", "admin", "33", "c373e9f5ad0796bf913f444553544200", "03eea05112b845949f3fd03278b5fe43", NULL);
INSERT INTO t3 VALUES("c373e9f5ad0796d9b895444553544200", "NewBookFolder", "admin", "2003-06-09 11:12:41", "NewBooks - folder", "0", "2003-06-09 11:12:41", "admin", "0", "c373e9f5ad0796c0eca4444553544200", "03eea05112b845949f3fd03278b5fe43", NULL);
INSERT INTO t3 VALUES("c373e9f5ad079b4c9355444553544200", "CopiedFolder", "admin", "2003-06-09 11:26:34", "Movie Reviews", "0", "2003-06-09 11:26:34", "admin", "0", "2f6161e879db43c1a5b82c21ddc49089", "03eea05112b845949f3fd03278b5fe43", NULL);
INSERT INTO t4 VALUES("340d243c45f111d497b00010a4ef934d", "Document Layout", "The system Document Layouts Document Type", NULL, "2003-06-05 16:30:00", "System", "1");
INSERT INTO t4 VALUES("340d243d45f111d497b00010a4ef934d", "Default", "The default system Document Type", NULL, "2003-06-05 16:30:00", "System", "1");
INSERT INTO t4 VALUES("4d09dd60850711d4998a204c4f4f5020", "__SystemResourceType", "The type for all the uploaded resources", NULL, "2003-06-05 16:30:00", "System", "1");
INSERT INTO t4 VALUES("91d4d595478211d497b40010a4ef934d", "__PmcSystemDefaultType", "The type for all the default available fields", NULL, "2003-06-05 16:30:00", "System", "1");
INSERT INTO t4 VALUES("c373e9f59cf15a59b08a444553544200", "NoFieldDocType", "plain doc type", NULL, "2003-06-06 07:48:40", "admin", NULL);
INSERT INTO t4 VALUES("c373e9f59cf15a5c6a99444553544200", "Movie Review", "This doc type is for movie reviews", "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<props autocheckin=\"false\" autopublish=\"false\" binary=\"choice\" categories=\"none\" cleanup=\"false\" folder=\"none\"><![CDATA[Doc type for cm tests]]></props>\r\n", "2003-06-06 07:48:40", "admin", NULL);
INSERT INTO t4 VALUES("c373e9f59cf15a6116a5444553544200", "Special Doc<6F>u20A4u20A4u0113<31><33><EFBFBD><EFBFBD>u016BType", "test special chars xxx<78> in doc type", NULL, "2003-06-06 07:48:41", "admin", NULL);
INSERT INTO t4 VALUES("c373e9f59cf15a695d47444553544200", "Movie", NULL, NULL, "2003-06-06 07:48:41", "admin", NULL);
INSERT INTO t4 VALUES("c373e9f5ad079174ff17444553544200", "Discussion", NULL, NULL, "2003-06-09 10:51:25", "admin", NULL);
INSERT INTO t4 VALUES("c373e9f5ad0791da7e2b444553544200", "Books", "list of recommended books", "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<props autocheckin=\"false\" autopublish=\"false\" binary=\"choice\" categories=\"none\" cleanup=\"false\" folder=\"none\"><![CDATA[Doc type for cm tests]]><![CDATA[Doc type for book tests]]></props>\r\n", "2003-06-09 10:51:40", "admin", NULL);
ALTER TABLE t2 ADD FOREIGN KEY FK_DCMNTS_DCTYPES ( DOCTYPEID)
REFERENCES t4 (DOCTYPEID );
ALTER TABLE t2 ADD FOREIGN KEY FK_DCMNTS_FLDRS ( FOLDERID)
REFERENCES t3 (FOLDERID );
ALTER TABLE t3 ADD FOREIGN KEY FK_FLDRS_PRNTID ( PARENTID)
REFERENCES t3 (FOLDERID );
SELECT t2.*, t4.DOCTYPENAME, t1.CONTENTSIZE,t1.MIMETYPE FROM t2 INNER JOIN t4 ON t2.DOCTYPEID = t4.DOCTYPEID LEFT OUTER JOIN t1 ON t2.DOCID = t1.DOCID WHERE t2.FOLDERID IN(SELECT t3.FOLDERID FROM t3 WHERE t3.PARENTID IN(SELECT t3.FOLDERID FROM t3 WHERE t3.PARENTID IN(SELECT t3.FOLDERID FROM t3 WHERE t3.PARENTID IN(SELECT t3.FOLDERID FROM t3 WHERE t3.PARENTID IN(SELECT t3.FOLDERID FROM t3 WHERE t3.PARENTID='2f6161e879db43c1a5b82c21ddc49089' AND t3.FOLDERNAME = 'Level1') AND t3.FOLDERNAME = 'Level2') AND t3.FOLDERNAME = 'Level3') AND t3.FOLDERNAME = 'CopiedFolder') AND t3.FOLDERNAME = 'Movie Reviews') AND t2.DOCNAME = 'Last Discussion';
EXPLAIN SELECT t2.*, t4.DOCTYPENAME, t1.CONTENTSIZE,t1.MIMETYPE FROM t2 INNER JOIN t4 ON t2.DOCTYPEID = t4.DOCTYPEID LEFT OUTER JOIN t1 ON t2.DOCID = t1.DOCID WHERE t2.FOLDERID IN(SELECT t3.FOLDERID FROM t3 WHERE t3.PARENTID IN(SELECT t3.FOLDERID FROM t3 WHERE t3.PARENTID IN(SELECT t3.FOLDERID FROM t3 WHERE t3.PARENTID IN(SELECT t3.FOLDERID FROM t3 WHERE t3.PARENTID IN(SELECT t3.FOLDERID FROM t3 WHERE t3.PARENTID='2f6161e879db43c1a5b82c21ddc49089' AND t3.FOLDERNAME = 'Level1') AND t3.FOLDERNAME = 'Level2') AND t3.FOLDERNAME = 'Level3') AND t3.FOLDERNAME = 'CopiedFolder') AND t3.FOLDERNAME = 'Movie Reviews') AND t2.DOCNAME = 'Last Discussion';
drop table t1, t2, t3, t4;