subselect2.test
上传用户:romrleung
上传日期:2022-05-23
资源大小:18897k
文件大小:14k
源码类别:

MySQL数据库

开发平台:

Visual C++

  1. -- source include/have_innodb.inc
  2. #
  3. # test of big query with a lot of IN subqueries.
  4. #
  5. --disable_warnings
  6. drop table if exists t1, t2, t3, t4;
  7. --enable_warnings
  8. CREATE TABLE t1
  9. (
  10. DOCID VARCHAR(32)BINARY NOT NULL
  11. , UUID VARCHAR(32)BINARY NOT NULL
  12. , MIMETYPE VARCHAR(80)BINARY
  13. , CONTENTDATA LONGBLOB
  14. , CONTENTSIZE INTEGER
  15. , VERSIONID INTEGER
  16. , REPID VARCHAR(32)BINARY
  17. , MODIFIED TIMESTAMP
  18. , MODIFIER VARCHAR(255)BINARY
  19. , ORIGINATOR INTEGER
  20. , PRIMARY KEY ( DOCID )
  21. ) ENGINE=InnoDB
  22. ;
  23. INSERT INTO t1 (DOCID) VALUES ("1"), ("2");
  24. CREATE TABLE t2
  25. (
  26. DOCID VARCHAR(32)BINARY NOT NULL
  27. , DOCNAME VARCHAR(255)BINARY NOT NULL
  28. , DOCTYPEID VARCHAR(32)BINARY NOT NULL
  29. , FOLDERID VARCHAR(32)BINARY NOT NULL
  30. , AUTHOR VARCHAR(255)BINARY
  31. , CREATED TIMESTAMP NOT NULL
  32. , TITLE VARCHAR(255)BINARY
  33. , SUBTITLE VARCHAR(255)BINARY
  34. , DOCABSTRACT LONGBLOB
  35. , PUBLISHDATE TIMESTAMP
  36. , EXPIRATIONDATE TIMESTAMP
  37. , LOCKEDBY VARCHAR(80)BINARY
  38. , STATUS VARCHAR(80)BINARY
  39. , PARENTDOCID VARCHAR(32)BINARY
  40. , REPID VARCHAR(32)BINARY
  41. , MODIFIED TIMESTAMP NOT NULL
  42. , MODIFIER VARCHAR(255)BINARY NOT NULL
  43. , PUBLISHSTATUS INTEGER
  44. , ORIGINATOR INTEGER
  45. , PRIMARY KEY ( DOCID )
  46. ) ENGINE=InnoDB
  47. ;
  48. CREATE INDEX DDOCTYPEID_IDX ON t2 (DOCTYPEID);
  49. CREATE INDEX DFOLDERID_IDX ON t2 (FOLDERID);
  50. CREATE TABLE t3
  51. (
  52. FOLDERID VARCHAR(32)BINARY NOT NULL
  53. , FOLDERNAME VARCHAR(255)BINARY NOT NULL
  54. , CREATOR VARCHAR(255)BINARY
  55. , CREATED TIMESTAMP NOT NULL
  56. , DESCRIPTION VARCHAR(255)BINARY
  57. , FOLDERTYPE INTEGER NOT NULL
  58. , MODIFIED TIMESTAMP
  59. , MODIFIER VARCHAR(255)BINARY
  60. , FOLDERSIZE INTEGER NOT NULL
  61. , PARENTID VARCHAR(32)BINARY
  62. , REPID VARCHAR(32)BINARY
  63. , ORIGINATOR INTEGER
  64. , PRIMARY KEY ( FOLDERID )
  65. ) ENGINE=InnoDB;
  66. CREATE INDEX FFOLDERID_IDX ON t3 (FOLDERID);
  67. CREATE INDEX CMFLDRPARNT_IDX ON t3 (PARENTID);
  68. CREATE TABLE t4
  69. (
  70. DOCTYPEID VARCHAR(32)BINARY NOT NULL
  71. , DOCTYPENAME VARCHAR(80)BINARY NOT NULL
  72. , DESCRIPTION VARCHAR(255)BINARY
  73. , EXTNDATA LONGBLOB
  74. , MODIFIED TIMESTAMP
  75. , MODIFIER VARCHAR(255)BINARY
  76. , ORIGINATOR INTEGER
  77. , PRIMARY KEY ( DOCTYPEID )
  78. ) ENGINE=InnoDB;
  79. 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);
  80. 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);
  81. 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);
  82. 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);
  83. 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);
  84. 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);
  85. 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);
  86. 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);
  87. 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);
  88. 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");
  89. 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");
  90. 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);
  91. 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);
  92. 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);
  93. 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);
  94. 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);
  95. 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);
  96. 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);
  97. 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);
  98. 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);
  99. 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);
  100. 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);
  101. 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);
  102. 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);
  103. 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);
  104. INSERT INTO t3 VALUES("c373e9f5ad0791dbaac4444553544200", "Special Caf