1
by brian
clean slate |
1 |
-- source include/have_innodb.inc
|
2 |
||
3 |
#
|
|
4 |
# test of big query with a lot of IN subqueries. |
|
5 |
#
|
|
6 |
||
7 |
--disable_warnings
|
|
8 |
drop table if exists t1, t2, t3, t4; |
|
9 |
--enable_warnings
|
|
10 |
||
11 |
CREATE TABLE t1 |
|
12 |
(
|
|
1217
by Brian Aker
Removed bits of charset support from the parser. |
13 |
DOCID VARCHAR(32) NOT NULL |
1996.2.1
by Brian Aker
uuid type code. |
14 |
, UUID_t VARCHAR(32) NOT NULL DEFAULT "" |
1217
by Brian Aker
Removed bits of charset support from the parser. |
15 |
, MIMETYPE VARCHAR(80) |
1
by brian
clean slate |
16 |
, CONTENTDATA LONGBLOB |
17 |
, CONTENTSIZE INTEGER |
|
18 |
, VERSIONID INTEGER |
|
1217
by Brian Aker
Removed bits of charset support from the parser. |
19 |
, REPID VARCHAR(32) |
1
by brian
clean slate |
20 |
, MODIFIED TIMESTAMP |
1217
by Brian Aker
Removed bits of charset support from the parser. |
21 |
, MODIFIER VARCHAR(255) |
1
by brian
clean slate |
22 |
, ORIGINATOR INTEGER |
23 |
||
24 |
, PRIMARY KEY ( DOCID ) |
|
25 |
) ENGINE=InnoDB |
|
26 |
;
|
|
27 |
||
28 |
INSERT INTO t1 (DOCID) VALUES ("1"), ("2"); |
|
29 |
||
30 |
CREATE TABLE t2 |
|
31 |
(
|
|
1217
by Brian Aker
Removed bits of charset support from the parser. |
32 |
DOCID VARCHAR(32) NOT NULL |
33 |
, DOCNAME VARCHAR(255) NOT NULL |
|
34 |
, DOCTYPEID VARCHAR(32) NOT NULL |
|
35 |
, FOLDERID VARCHAR(32) NOT NULL |
|
36 |
, AUTHOR VARCHAR(255) |
|
1
by brian
clean slate |
37 |
, CREATED TIMESTAMP NOT NULL |
1217
by Brian Aker
Removed bits of charset support from the parser. |
38 |
, TITLE VARCHAR(255) |
39 |
, SUBTITLE VARCHAR(255) |
|
1
by brian
clean slate |
40 |
, DOCABSTRACT LONGBLOB |
41 |
, PUBLISHDATE TIMESTAMP |
|
42 |
, EXPIRATIONDATE TIMESTAMP |
|
1217
by Brian Aker
Removed bits of charset support from the parser. |
43 |
, LOCKEDBY VARCHAR(80) |
44 |
, STATUS VARCHAR(80) |
|
45 |
, PARENTDOCID VARCHAR(32) |
|
46 |
, REPID VARCHAR(32) |
|
907.1.7
by Jay Pipes
Merged in remove-timezone work |
47 |
, MODIFIED TIMESTAMP |
1217
by Brian Aker
Removed bits of charset support from the parser. |
48 |
, MODIFIER VARCHAR(255) NOT NULL |
1
by brian
clean slate |
49 |
, PUBLISHSTATUS INTEGER |
50 |
, ORIGINATOR INTEGER |
|
51 |
||
52 |
, PRIMARY KEY ( DOCID ) |
|
53 |
) ENGINE=InnoDB |
|
54 |
;
|
|
55 |
CREATE INDEX DDOCTYPEID_IDX ON t2 (DOCTYPEID); |
|
56 |
CREATE INDEX DFOLDERID_IDX ON t2 (FOLDERID); |
|
57 |
CREATE TABLE t3 |
|
58 |
(
|
|
1217
by Brian Aker
Removed bits of charset support from the parser. |
59 |
FOLDERID VARCHAR(32) NOT NULL |
60 |
, FOLDERNAME VARCHAR(255) NOT NULL |
|
61 |
, CREATOR VARCHAR(255) |
|
1
by brian
clean slate |
62 |
, CREATED TIMESTAMP NOT NULL |
1217
by Brian Aker
Removed bits of charset support from the parser. |
63 |
, DESCRIPTION VARCHAR(255) |
1
by brian
clean slate |
64 |
, FOLDERTYPE INTEGER NOT NULL |
65 |
, MODIFIED TIMESTAMP |
|
1217
by Brian Aker
Removed bits of charset support from the parser. |
66 |
, MODIFIER VARCHAR(255) |
1
by brian
clean slate |
67 |
, FOLDERSIZE INTEGER NOT NULL |
1217
by Brian Aker
Removed bits of charset support from the parser. |
68 |
, PARENTID VARCHAR(32) |
69 |
, REPID VARCHAR(32) |
|
1
by brian
clean slate |
70 |
, ORIGINATOR INTEGER |
71 |
, PRIMARY KEY ( FOLDERID ) |
|
72 |
) ENGINE=InnoDB; |
|
73 |
||
74 |
CREATE INDEX FFOLDERID_IDX ON t3 (FOLDERID); |
|
75 |
CREATE INDEX CMFLDRPARNT_IDX ON t3 (PARENTID); |
|
76 |
||
77 |
CREATE TABLE t4 |
|
78 |
(
|
|
1217
by Brian Aker
Removed bits of charset support from the parser. |
79 |
DOCTYPEID VARCHAR(32) NOT NULL |
80 |
, DOCTYPENAME VARCHAR(80) NOT NULL |
|
81 |
, DESCRIPTION VARCHAR(255) |
|
1
by brian
clean slate |
82 |
, EXTNDATA LONGBLOB |
83 |
, MODIFIED TIMESTAMP |
|
1217
by Brian Aker
Removed bits of charset support from the parser. |
84 |
, MODIFIER VARCHAR(255) |
1
by brian
clean slate |
85 |
, ORIGINATOR INTEGER |
86 |
||
87 |
, PRIMARY KEY ( DOCTYPEID ) |
|
88 |
) ENGINE=InnoDB; |
|
89 |
||
90 |
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); |
|
91 |
||
92 |
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); |
|
93 |
||
94 |
||
95 |
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); |
|
96 |
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); |
|
97 |
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); |
|
98 |
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); |
|
99 |
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); |
|
100 |
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); |
|
101 |
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); |
|
102 |
||
103 |
||
104 |
||
105 |
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"); |
|
106 |
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"); |
|
107 |
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); |
|
108 |
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); |
|
109 |
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); |
|
110 |
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); |
|
111 |
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); |
|
112 |
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); |
|
113 |
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); |
|
114 |
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); |
|
115 |
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); |
|
116 |
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); |
|
117 |
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); |
|
118 |
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); |
|
119 |
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); |
|
120 |
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); |
|
642.1.80
by Lee
merge with latest from the trunk |
121 |
|
122 |
#This insertion died due to error 1366. Changed Cafe <with accent symbol> to Caf. |
|
123 |
INSERT INTO t3 VALUES("c373e9f5ad0791dbaac4444553544200", "Special Caf 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); |
|
124 |
||
1
by brian
clean slate |
125 |
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); |
126 |
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); |
|
127 |
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); |
|
128 |
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); |
|
129 |
||
130 |
||
131 |
INSERT INTO t4 VALUES("340d243c45f111d497b00010a4ef934d", "Document Layout", "The system Document Layouts Document Type", NULL, "2003-06-05 16:30:00", "System", "1"); |
|
132 |
INSERT INTO t4 VALUES("340d243d45f111d497b00010a4ef934d", "Default", "The default system Document Type", NULL, "2003-06-05 16:30:00", "System", "1"); |
|
133 |
INSERT INTO t4 VALUES("4d09dd60850711d4998a204c4f4f5020", "__SystemResourceType", "The type for all the uploaded resources", NULL, "2003-06-05 16:30:00", "System", "1"); |
|
134 |
INSERT INTO t4 VALUES("91d4d595478211d497b40010a4ef934d", "__PmcSystemDefaultType", "The type for all the default available fields", NULL, "2003-06-05 16:30:00", "System", "1"); |
|
135 |
INSERT INTO t4 VALUES("c373e9f59cf15a59b08a444553544200", "NoFieldDocType", "plain doc type", NULL, "2003-06-06 07:48:40", "admin", NULL); |
|
136 |
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); |
|
642.1.80
by Lee
merge with latest from the trunk |
137 |
|
138 |
# This insertion died due to error 1366, special char in "xxxe". Changed to "xxx" |
|
139 |
#INSERT INTO t4 VALUES("c373e9f59cf15a6116a5444553544200", "Special DocÃu20A4u20A4u0113ééøÉu016BType", "test special chars xxx in doc type", NULL, "2003-06-06 07:48:41", "admin", NULL); |
|
140 |
||
1
by brian
clean slate |
141 |
INSERT INTO t4 VALUES("c373e9f59cf15a695d47444553544200", "Movie", NULL, NULL, "2003-06-06 07:48:41", "admin", NULL); |
142 |
INSERT INTO t4 VALUES("c373e9f5ad079174ff17444553544200", "Discussion", NULL, NULL, "2003-06-09 10:51:25", "admin", NULL); |
|
143 |
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); |
|
144 |
||
145 |
ALTER TABLE t2 ADD FOREIGN KEY FK_DCMNTS_DCTYPES ( DOCTYPEID) |
|
146 |
REFERENCES t4 (DOCTYPEID ); |
|
147 |
ALTER TABLE t2 ADD FOREIGN KEY FK_DCMNTS_FLDRS ( FOLDERID) |
|
148 |
REFERENCES t3 (FOLDERID ); |
|
149 |
ALTER TABLE t3 ADD FOREIGN KEY FK_FLDRS_PRNTID ( PARENTID) |
|
150 |
REFERENCES t3 (FOLDERID ); |
|
151 |
||
152 |
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'; |
|
153 |
||
154 |
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'; |
|
155 |
||
156 |
drop table t1, t2, t3, t4; |
|
157 |
# End of 4.1 tests |
|
158 |
||
159 |
#
|
|
160 |
# Bug #20792: Incorrect results from aggregate subquery |
|
161 |
#
|
|
642.1.80
by Lee
merge with latest from the trunk |
162 |
# This died due to int(10). Changed syntax to int. |
163 |
CREATE TABLE t1 (a int, PRIMARY KEY (a)) Engine=InnoDB; |
|
1
by brian
clean slate |
164 |
INSERT INTO t1 VALUES (1),(2); |
165 |
||
642.1.80
by Lee
merge with latest from the trunk |
166 |
#This died due to int(10). Changed syntax to int. |
167 |
CREATE TABLE t2 (a int, PRIMARY KEY (a)) Engine=InnoDB; |
|
1
by brian
clean slate |
168 |
INSERT INTO t2 VALUES (1); |
169 |
||
642.1.80
by Lee
merge with latest from the trunk |
170 |
# This died due to int(10). Changed syntax to int. |
171 |
CREATE TABLE t3 (a int, b int, c int, |
|
1
by brian
clean slate |
172 |
PRIMARY KEY (a)) Engine=InnoDB; |
173 |
INSERT INTO t3 VALUES (1,2,1); |
|
174 |
||
175 |
SELECT t1.* FROM t1 WHERE (SELECT COUNT(*) FROM t3,t2 WHERE t3.c=t2.a |
|
176 |
and t2.a='1' AND t1.a=t3.b) > 0; |
|
177 |
||
178 |
DROP TABLE t1,t2,t3; |