Merge lp:~linuxjedi/drizzle/drizzle-global-buffer-limits into lp:drizzle/7.0
- drizzle-global-buffer-limits
- Merge into 7.0
Proposed by
Andrew Hutchings
Status: | Merged |
---|---|
Approved by: | Lee Bieber |
Approved revision: | 1823 |
Merged at revision: | 1907 |
Proposed branch: | lp:~linuxjedi/drizzle/drizzle-global-buffer-limits |
Merge into: | lp:drizzle/7.0 |
Diff against target: |
855 lines (+442/-12) 28 files modified
client/errname.cc (+4/-1) docs/options.rst (+21/-1) drizzled/drizzled.cc (+70/-0) drizzled/drizzled.h (+7/-1) drizzled/enum.h (+5/-1) drizzled/error.cc (+4/-0) drizzled/filesort.cc (+17/-1) drizzled/global_buffer.h (+69/-0) drizzled/include.am (+1/-0) drizzled/internal/mf_iocache.cc (+15/-0) drizzled/join_cache.cc (+9/-0) drizzled/records.cc (+8/-0) drizzled/sql_select.cc (+5/-0) tests/include/setup-global-constraints.inc (+32/-0) tests/r/global_read_constraints.result (+32/-0) tests/r/global_read_rnd_constraints.result (+1/-0) tests/r/global_sort_join_constraints.result (+30/-0) tests/t/global_read_constraints-master.opt (+1/-0) tests/t/global_read_constraints.test (+9/-0) tests/t/global_read_rnd_constraints-master.opt (+1/-0) tests/t/global_read_rnd_constraints.test (+19/-0) tests/t/global_sort_join_constraints-master.opt (+1/-0) tests/t/global_sort_join_constraints.test (+13/-0) unittests/atomics_test.cc (+2/-2) unittests/global_buffer_test.cc (+60/-0) unittests/include.am (+1/-0) unittests/pthread_atomics_test.cc (+2/-2) unittests/utf8_test.cc (+3/-3) |
To merge this branch: | bzr merge lp:~linuxjedi/drizzle/drizzle-global-buffer-limits |
Related bugs: | |
Related blueprints: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Brian Aker | Needs Fixing | ||
Review via email: mp+39793@code.launchpad.net |
Commit message
Description of the change
Adds global buffer constraints (see blueprint)
Also fixes a GCC 4.5 bug in some unittests and a minor docs change
To post a comment you must log in.
Revision history for this message
Andrew Hutchings (linuxjedi) wrote : | # |
Doh! Silly mistake which broke 32bit, fixed now
Revision history for this message
Andrew Hutchings (linuxjedi) wrote : | # |
2 test failures too:
http://
Revision history for this message
Andrew Hutchings (linuxjedi) wrote : | # |
bug#670496 is a show stopper for the test cases
Revision history for this message
Andrew Hutchings (linuxjedi) wrote : | # |
OK, test cases should now work
Revision history for this message
Lee Bieber (kalebral-deactivatedaccount) wrote : | # |
Tests are still failing on OSX, Centos, FreedBSD and OpenSUSE
Revision history for this message
Andrew Hutchings (linuxjedi) wrote : | # |
OK, fixed a problem found with join buffer constraint accounting.
Had to disable 2 tests as drizzleslap now gives unpredictable results if a query errors (which is the condition we are trying to test here).
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'client/errname.cc' | |||
2 | --- client/errname.cc 2010-09-08 22:31:17 +0000 | |||
3 | +++ client/errname.cc 2010-11-05 13:28:56 +0000 | |||
4 | @@ -735,7 +735,10 @@ | |||
5 | 735 | { "ER_UNKNOWN_SCHEMA_OPTION", 1699}, | 735 | { "ER_UNKNOWN_SCHEMA_OPTION", 1699}, |
6 | 736 | { "ER_EVENT_OBSERVER_PLUGIN", 1700}, | 736 | { "ER_EVENT_OBSERVER_PLUGIN", 1700}, |
7 | 737 | { "ER_CORRUPT_SCHEMA_DEFINITION", 1701}, | 737 | { "ER_CORRUPT_SCHEMA_DEFINITION", 1701}, |
9 | 738 | { "ER_UNUSED1702", 1702}, | 738 | { "ER_OUT_OF_GLOBAL_SORTMEMORY", 1702}, |
10 | 739 | { "ER_OUT_OF_GLOBAL_JOINMEMORY", 1703}, | ||
11 | 740 | { "ER_OUT_OF_GLOBAL_READRNDMEMORY", 1704}, | ||
12 | 741 | { "ER_OUT_OF_GLOBAL_READMEMORY", 1705}, | ||
13 | 739 | { 0, 0 } | 742 | { 0, 0 } |
14 | 740 | }; | 743 | }; |
15 | 741 | 744 | ||
16 | 742 | 745 | ||
17 | === modified file 'docs/options.rst' | |||
18 | --- docs/options.rst 2010-09-30 16:54:59 +0000 | |||
19 | +++ docs/options.rst 2010-11-05 13:28:56 +0000 | |||
20 | @@ -178,8 +178,13 @@ | |||
21 | 178 | 178 | ||
22 | 179 | The size of the buffer that is used for full joins. | 179 | The size of the buffer that is used for full joins. |
23 | 180 | 180 | ||
24 | 181 | .. option:: --join-buffer-constraint arg (=0) | ||
25 | 182 | |||
26 | 183 | A global constraint for join-buffer-size for all clients, cannot be set lower | ||
27 | 184 | than --join-buffer-size. Setting to 0 means unlimited. | ||
28 | 185 | |||
29 | 181 | .. Why is this a core arg? | 186 | .. Why is this a core arg? |
31 | 182 | .. option:: --max-allowed-packet arg (=1M) | 187 | .. option:: --max-allowed-packet arg (=64M) |
32 | 183 | 188 | ||
33 | 184 | Max packetlength to send/receive from to server. | 189 | Max packetlength to send/receive from to server. |
34 | 185 | 190 | ||
35 | @@ -259,12 +264,22 @@ | |||
36 | 259 | each table it scans. If you do many sequential scans, you may want to | 264 | each table it scans. If you do many sequential scans, you may want to |
37 | 260 | increase this value. | 265 | increase this value. |
38 | 261 | 266 | ||
39 | 267 | .. option:: --read-buffer-constraint arg (=0) | ||
40 | 268 | |||
41 | 269 | A global constraint for read-buffer-size for all clients, cannot be set lower | ||
42 | 270 | than --read-buffer-size. Setting to 0 means unlimited. | ||
43 | 271 | |||
44 | 262 | .. option:: --read-rnd-buffer-size arg (=262144) | 272 | .. option:: --read-rnd-buffer-size arg (=262144) |
45 | 263 | 273 | ||
46 | 264 | When reading rows in sorted order after a sort, the rows are read through | 274 | When reading rows in sorted order after a sort, the rows are read through |
47 | 265 | this buffer to avoid a disk seeks. If not set, then it's set to the value of | 275 | this buffer to avoid a disk seeks. If not set, then it's set to the value of |
48 | 266 | record_buffer. | 276 | record_buffer. |
49 | 267 | 277 | ||
50 | 278 | .. option:: --read-rnd-constraint arg (=0) | ||
51 | 279 | |||
52 | 280 | A global constraint for read-rnd-buffer-size for all clients, cannot be set | ||
53 | 281 | lower than --read-rnd-buffer-size. Setting to 0 means unlimited. | ||
54 | 282 | |||
55 | 268 | .. option:: --scheduler arg (=multi-thread) | 283 | .. option:: --scheduler arg (=multi-thread) |
56 | 269 | 284 | ||
57 | 270 | Select scheduler to be used. | 285 | Select scheduler to be used. |
58 | @@ -273,6 +288,11 @@ | |||
59 | 273 | 288 | ||
60 | 274 | Each thread that needs to do a sort allocates a buffer of this size. | 289 | Each thread that needs to do a sort allocates a buffer of this size. |
61 | 275 | 290 | ||
62 | 291 | .. option:: --sort-buffer-constraint arg (=0) | ||
63 | 292 | |||
64 | 293 | A global constraint for sort-buffer-size for all clients, cannot be set lower | ||
65 | 294 | than --sort-buffer-size. Setting to 0 means unlimited. | ||
66 | 295 | |||
67 | 276 | .. option:: --table-definition-cache arg (=128) | 296 | .. option:: --table-definition-cache arg (=128) |
68 | 277 | 297 | ||
69 | 278 | The number of cached table definitions. | 298 | The number of cached table definitions. |
70 | 279 | 299 | ||
71 | === modified file 'drizzled/drizzled.cc' | |||
72 | --- drizzled/drizzled.cc 2010-10-28 05:22:47 +0000 | |||
73 | +++ drizzled/drizzled.cc 2010-11-05 13:28:56 +0000 | |||
74 | @@ -66,6 +66,7 @@ | |||
75 | 66 | #include "drizzled/drizzled.h" | 66 | #include "drizzled/drizzled.h" |
76 | 67 | #include "drizzled/module/registry.h" | 67 | #include "drizzled/module/registry.h" |
77 | 68 | #include "drizzled/module/load_list.h" | 68 | #include "drizzled/module/load_list.h" |
78 | 69 | #include "drizzled/global_buffer.h" | ||
79 | 69 | 70 | ||
80 | 70 | #include "drizzled/plugin/event_observer.h" | 71 | #include "drizzled/plugin/event_observer.h" |
81 | 71 | 72 | ||
82 | @@ -352,6 +353,11 @@ | |||
83 | 352 | 353 | ||
84 | 353 | atomic<uint32_t> connection_count; | 354 | atomic<uint32_t> connection_count; |
85 | 354 | 355 | ||
86 | 356 | global_buffer_constraint<uint64_t> global_sort_buffer(0); | ||
87 | 357 | global_buffer_constraint<uint64_t> global_join_buffer(0); | ||
88 | 358 | global_buffer_constraint<uint64_t> global_read_rnd_buffer(0); | ||
89 | 359 | global_buffer_constraint<uint64_t> global_read_buffer(0); | ||
90 | 360 | |||
91 | 355 | /** | 361 | /** |
92 | 356 | Refresh value. We use to test this to find out if a refresh even has happened recently. | 362 | Refresh value. We use to test this to find out if a refresh even has happened recently. |
93 | 357 | */ | 363 | */ |
94 | @@ -1300,6 +1306,9 @@ | |||
95 | 1300 | N_("The maximum length of the result of function group_concat.")) | 1306 | N_("The maximum length of the result of function group_concat.")) |
96 | 1301 | ("join-buffer-size", po::value<uint64_t>(&global_system_variables.join_buff_size)->default_value(128*1024L)->notifier(&check_limits_join_buffer_size), | 1307 | ("join-buffer-size", po::value<uint64_t>(&global_system_variables.join_buff_size)->default_value(128*1024L)->notifier(&check_limits_join_buffer_size), |
97 | 1302 | N_("The size of the buffer that is used for full joins.")) | 1308 | N_("The size of the buffer that is used for full joins.")) |
98 | 1309 | ("join-heap-threshold", | ||
99 | 1310 | po::value<uint64_t>()->default_value(0), | ||
100 | 1311 | N_("A global cap on the amount of memory that can be allocated by session join buffers (0 means unlimited)")) | ||
101 | 1303 | ("max-allowed-packet", po::value<uint32_t>(&global_system_variables.max_allowed_packet)->default_value(64*1024*1024L)->notifier(&check_limits_map), | 1312 | ("max-allowed-packet", po::value<uint32_t>(&global_system_variables.max_allowed_packet)->default_value(64*1024*1024L)->notifier(&check_limits_map), |
102 | 1304 | N_("Max packetlength to send/receive from to server.")) | 1313 | N_("Max packetlength to send/receive from to server.")) |
103 | 1305 | ("max-connect-errors", po::value<uint64_t>(&max_connect_errors)->default_value(MAX_CONNECT_ERRORS)->notifier(&check_limits_mce), | 1314 | ("max-connect-errors", po::value<uint64_t>(&max_connect_errors)->default_value(MAX_CONNECT_ERRORS)->notifier(&check_limits_mce), |
104 | @@ -1353,16 +1362,25 @@ | |||
105 | 1353 | N_("Each thread that does a sequential scan allocates a buffer of this " | 1362 | N_("Each thread that does a sequential scan allocates a buffer of this " |
106 | 1354 | "size for each table it scans. If you do many sequential scans, you may " | 1363 | "size for each table it scans. If you do many sequential scans, you may " |
107 | 1355 | "want to increase this value.")) | 1364 | "want to increase this value.")) |
108 | 1365 | ("read-buffer-threshold", | ||
109 | 1366 | po::value<uint64_t>()->default_value(0), | ||
110 | 1367 | N_("A global cap on the size of read-buffer-size (0 means unlimited)")) | ||
111 | 1356 | ("read-rnd-buffer-size", | 1368 | ("read-rnd-buffer-size", |
112 | 1357 | po::value<uint32_t>(&global_system_variables.read_rnd_buff_size)->default_value(256*1024L)->notifier(&check_limits_read_rnd_buffer_size), | 1369 | po::value<uint32_t>(&global_system_variables.read_rnd_buff_size)->default_value(256*1024L)->notifier(&check_limits_read_rnd_buffer_size), |
113 | 1358 | N_("When reading rows in sorted order after a sort, the rows are read " | 1370 | N_("When reading rows in sorted order after a sort, the rows are read " |
114 | 1359 | "through this buffer to avoid a disk seeks. If not set, then it's set " | 1371 | "through this buffer to avoid a disk seeks. If not set, then it's set " |
115 | 1360 | "to the value of record_buffer.")) | 1372 | "to the value of record_buffer.")) |
116 | 1373 | ("read-rnd-threshold", | ||
117 | 1374 | po::value<uint64_t>()->default_value(0), | ||
118 | 1375 | N_("A global cap on the size of read-rnd-buffer-size (0 means unlimited)")) | ||
119 | 1361 | ("scheduler", po::value<string>(), | 1376 | ("scheduler", po::value<string>(), |
120 | 1362 | N_("Select scheduler to be used (by default multi-thread).")) | 1377 | N_("Select scheduler to be used (by default multi-thread).")) |
121 | 1363 | ("sort-buffer-size", | 1378 | ("sort-buffer-size", |
122 | 1364 | po::value<size_t>(&global_system_variables.sortbuff_size)->default_value(MAX_SORT_MEMORY)->notifier(&check_limits_sort_buffer_size), | 1379 | po::value<size_t>(&global_system_variables.sortbuff_size)->default_value(MAX_SORT_MEMORY)->notifier(&check_limits_sort_buffer_size), |
123 | 1365 | N_("Each thread that needs to do a sort allocates a buffer of this size.")) | 1380 | N_("Each thread that needs to do a sort allocates a buffer of this size.")) |
124 | 1381 | ("sort-heap-threshold", | ||
125 | 1382 | po::value<uint64_t>()->default_value(0), | ||
126 | 1383 | N_("A global cap on the amount of memory that can be allocated by session sort buffers (0 means unlimited)")) | ||
127 | 1366 | ("table-definition-cache", po::value<size_t>(&table_def_size)->default_value(128)->notifier(&check_limits_tdc), | 1384 | ("table-definition-cache", po::value<size_t>(&table_def_size)->default_value(128)->notifier(&check_limits_tdc), |
128 | 1367 | N_("The number of cached table definitions.")) | 1385 | N_("The number of cached table definitions.")) |
129 | 1368 | ("table-open-cache", po::value<uint64_t>(&table_cache_size)->default_value(TABLE_OPEN_CACHE_DEFAULT)->notifier(&check_limits_toc), | 1386 | ("table-open-cache", po::value<uint64_t>(&table_cache_size)->default_value(TABLE_OPEN_CACHE_DEFAULT)->notifier(&check_limits_toc), |
130 | @@ -2256,6 +2274,58 @@ | |||
131 | 2256 | exit(0); | 2274 | exit(0); |
132 | 2257 | } | 2275 | } |
133 | 2258 | 2276 | ||
134 | 2277 | if (vm.count("sort-heap-threshold")) | ||
135 | 2278 | { | ||
136 | 2279 | if ((vm["sort-heap-threshold"].as<uint64_t>() > 0) and | ||
137 | 2280 | (vm["sort-heap-threshold"].as<uint64_t>() < | ||
138 | 2281 | global_system_variables.sortbuff_size)) | ||
139 | 2282 | { | ||
140 | 2283 | cout << N_("Error: sort-heap-threshold cannot be less than sort-buffer-size") << endl; | ||
141 | 2284 | exit(-1); | ||
142 | 2285 | } | ||
143 | 2286 | |||
144 | 2287 | global_sort_buffer.setMaxSize(vm["sort-heap-threshold"].as<uint64_t>()); | ||
145 | 2288 | } | ||
146 | 2289 | |||
147 | 2290 | if (vm.count("join-heap-threshold")) | ||
148 | 2291 | { | ||
149 | 2292 | if ((vm["join-heap-threshold"].as<uint64_t>() > 0) and | ||
150 | 2293 | (vm["join-heap-threshold"].as<uint64_t>() < | ||
151 | 2294 | global_system_variables.join_buff_size)) | ||
152 | 2295 | { | ||
153 | 2296 | cout << N_("Error: join-heap-threshold cannot be less than join-buffer-size") << endl; | ||
154 | 2297 | exit(-1); | ||
155 | 2298 | } | ||
156 | 2299 | |||
157 | 2300 | global_join_buffer.setMaxSize(vm["join-heap-threshold"].as<uint64_t>()); | ||
158 | 2301 | } | ||
159 | 2302 | |||
160 | 2303 | if (vm.count("read-rnd-threshold")) | ||
161 | 2304 | { | ||
162 | 2305 | if ((vm["read-rnd-threshold"].as<uint64_t>() > 0) and | ||
163 | 2306 | (vm["read-rnd-threshold"].as<uint64_t>() < | ||
164 | 2307 | global_system_variables.read_rnd_buff_size)) | ||
165 | 2308 | { | ||
166 | 2309 | cout << N_("Error: read-rnd-threshold cannot be less than read-rnd-buffer-size") << endl; | ||
167 | 2310 | exit(-1); | ||
168 | 2311 | } | ||
169 | 2312 | |||
170 | 2313 | global_read_rnd_buffer.setMaxSize(vm["read-rnd-threshold"].as<uint64_t>()); | ||
171 | 2314 | } | ||
172 | 2315 | |||
173 | 2316 | if (vm.count("read-buffer-threshold")) | ||
174 | 2317 | { | ||
175 | 2318 | if ((vm["read-buffer-threshold"].as<uint64_t>() > 0) and | ||
176 | 2319 | (vm["read-buffer-threshold"].as<uint64_t>() < | ||
177 | 2320 | global_system_variables.read_buff_size)) | ||
178 | 2321 | { | ||
179 | 2322 | cout << N_("Error: read-buffer-threshold cannot be less than read-buffer-size") << endl; | ||
180 | 2323 | exit(-1); | ||
181 | 2324 | } | ||
182 | 2325 | |||
183 | 2326 | global_read_buffer.setMaxSize(vm["read-buffer-threshold"].as<uint64_t>()); | ||
184 | 2327 | } | ||
185 | 2328 | |||
186 | 2259 | if (vm.count("exit-info")) | 2329 | if (vm.count("exit-info")) |
187 | 2260 | { | 2330 | { |
188 | 2261 | if (vm["exit-info"].as<long>()) | 2331 | if (vm["exit-info"].as<long>()) |
189 | 2262 | 2332 | ||
190 | === modified file 'drizzled/drizzled.h' | |||
191 | --- drizzled/drizzled.h 2010-09-27 07:06:04 +0000 | |||
192 | +++ drizzled/drizzled.h 2010-11-05 13:28:56 +0000 | |||
193 | @@ -25,7 +25,8 @@ | |||
194 | 25 | #include <boost/program_options.hpp> | 25 | #include <boost/program_options.hpp> |
195 | 26 | 26 | ||
196 | 27 | #include "drizzled/atomics.h" | 27 | #include "drizzled/atomics.h" |
198 | 28 | 28 | #include "drizzled/global_buffer.h" | |
199 | 29 | #include "drizzled/definitions.h" | ||
200 | 29 | struct passwd; | 30 | struct passwd; |
201 | 30 | 31 | ||
202 | 31 | namespace drizzled | 32 | namespace drizzled |
203 | @@ -47,6 +48,11 @@ | |||
204 | 47 | extern passwd *user_info; | 48 | extern passwd *user_info; |
205 | 48 | extern char *drizzled_user; | 49 | extern char *drizzled_user; |
206 | 49 | 50 | ||
207 | 51 | extern global_buffer_constraint<uint64_t> global_sort_buffer; | ||
208 | 52 | extern global_buffer_constraint<uint64_t> global_join_buffer; | ||
209 | 53 | extern global_buffer_constraint<uint64_t> global_read_rnd_buffer; | ||
210 | 54 | extern global_buffer_constraint<uint64_t> global_read_buffer; | ||
211 | 55 | |||
212 | 50 | extern const char * const DRIZZLE_CONFIG_NAME; | 56 | extern const char * const DRIZZLE_CONFIG_NAME; |
213 | 51 | 57 | ||
214 | 52 | boost::program_options::variables_map &getVariablesMap(); | 58 | boost::program_options::variables_map &getVariablesMap(); |
215 | 53 | 59 | ||
216 | === modified file 'drizzled/enum.h' | |||
217 | --- drizzled/enum.h 2010-09-08 22:31:17 +0000 | |||
218 | +++ drizzled/enum.h 2010-11-05 13:28:56 +0000 | |||
219 | @@ -1044,7 +1044,11 @@ | |||
220 | 1044 | ER_UNKNOWN_SCHEMA_OPTION, | 1044 | ER_UNKNOWN_SCHEMA_OPTION, |
221 | 1045 | ER_EVENT_OBSERVER_PLUGIN, | 1045 | ER_EVENT_OBSERVER_PLUGIN, |
222 | 1046 | ER_CORRUPT_SCHEMA_DEFINITION, | 1046 | ER_CORRUPT_SCHEMA_DEFINITION, |
224 | 1047 | ER_ERROR_LAST= ER_CORRUPT_SCHEMA_DEFINITION | 1047 | ER_OUT_OF_GLOBAL_SORTMEMORY, |
225 | 1048 | ER_OUT_OF_GLOBAL_JOINMEMORY, | ||
226 | 1049 | ER_OUT_OF_GLOBAL_READRNDMEMORY, | ||
227 | 1050 | ER_OUT_OF_GLOBAL_READMEMORY, | ||
228 | 1051 | ER_ERROR_LAST= ER_OUT_OF_GLOBAL_READMEMORY | ||
229 | 1048 | }; | 1052 | }; |
230 | 1049 | 1053 | ||
231 | 1050 | enum drizzle_exit_codes { | 1054 | enum drizzle_exit_codes { |
232 | 1051 | 1055 | ||
233 | === modified file 'drizzled/error.cc' | |||
234 | --- drizzled/error.cc 2010-10-14 18:58:48 +0000 | |||
235 | +++ drizzled/error.cc 2010-11-05 13:28:56 +0000 | |||
236 | @@ -235,6 +235,10 @@ | |||
237 | 235 | add(ER_OPEN_AS_READONLY, N_("Table '%-.192s' is read only")); | 235 | add(ER_OPEN_AS_READONLY, N_("Table '%-.192s' is read only")); |
238 | 236 | add(ER_OUTOFMEMORY, N_("Out of memory; restart server and try again (needed %lu bytes)")); | 236 | add(ER_OUTOFMEMORY, N_("Out of memory; restart server and try again (needed %lu bytes)")); |
239 | 237 | add(ER_OUT_OF_SORTMEMORY, N_("Out of sort memory; increase server sort buffer size")); | 237 | add(ER_OUT_OF_SORTMEMORY, N_("Out of sort memory; increase server sort buffer size")); |
240 | 238 | add(ER_OUT_OF_GLOBAL_SORTMEMORY, N_("Global sort memory constraint hit; increase sort-heap-threshold")); | ||
241 | 239 | add(ER_OUT_OF_GLOBAL_JOINMEMORY, N_("Global join memory constraint hit; increase join-heap-threshold")); | ||
242 | 240 | add(ER_OUT_OF_GLOBAL_READRNDMEMORY, N_("Global read_rnd memory constraint hit; increase read-rnd-heap-threshold")); | ||
243 | 241 | add(ER_OUT_OF_GLOBAL_READMEMORY, N_("Global read memory constraint hit; increase read-buffer-threshold")); | ||
244 | 238 | add(ER_UNEXPECTED_EOF, N_("Unexpected EOF found when reading file '%-.192s' (errno: %d)")); | 242 | add(ER_UNEXPECTED_EOF, N_("Unexpected EOF found when reading file '%-.192s' (errno: %d)")); |
245 | 239 | add(ER_CON_COUNT_ERROR, N_("Too many connections")); | 243 | add(ER_CON_COUNT_ERROR, N_("Too many connections")); |
246 | 240 | add(ER_OUT_OF_RESOURCES, N_("Out of memory; check if drizzled or some other process uses all available memory; if not, you may have to use 'ulimit' to allow drizzled to use more memory or you can add more swap space")); | 244 | add(ER_OUT_OF_RESOURCES, N_("Out of memory; check if drizzled or some other process uses all available memory; if not, you may have to use 'ulimit' to allow drizzled to use more memory or you can add more swap space")); |
247 | 241 | 245 | ||
248 | === modified file 'drizzled/filesort.cc' | |||
249 | --- drizzled/filesort.cc 2010-10-30 01:19:00 +0000 | |||
250 | +++ drizzled/filesort.cc 2010-11-05 13:28:56 +0000 | |||
251 | @@ -29,6 +29,7 @@ | |||
252 | 29 | #include <queue> | 29 | #include <queue> |
253 | 30 | #include <algorithm> | 30 | #include <algorithm> |
254 | 31 | 31 | ||
255 | 32 | #include "drizzled/drizzled.h" | ||
256 | 32 | #include "drizzled/sql_sort.h" | 33 | #include "drizzled/sql_sort.h" |
257 | 33 | #include "drizzled/error.h" | 34 | #include "drizzled/error.h" |
258 | 34 | #include "drizzled/probes.h" | 35 | #include "drizzled/probes.h" |
259 | @@ -41,6 +42,8 @@ | |||
260 | 41 | #include "drizzled/internal/my_sys.h" | 42 | #include "drizzled/internal/my_sys.h" |
261 | 42 | #include "plugin/myisam/myisam.h" | 43 | #include "plugin/myisam/myisam.h" |
262 | 43 | #include "drizzled/plugin/transactional_storage_engine.h" | 44 | #include "drizzled/plugin/transactional_storage_engine.h" |
263 | 45 | #include "drizzled/atomics.h" | ||
264 | 46 | #include "drizzled/global_buffer.h" | ||
265 | 44 | 47 | ||
266 | 45 | using namespace std; | 48 | using namespace std; |
267 | 46 | 49 | ||
268 | @@ -136,8 +139,9 @@ | |||
269 | 136 | bool sort_positions, ha_rows *examined_rows) | 139 | bool sort_positions, ha_rows *examined_rows) |
270 | 137 | { | 140 | { |
271 | 138 | int error; | 141 | int error; |
273 | 139 | uint32_t memavl, min_sort_memory; | 142 | uint32_t memavl= 0, min_sort_memory; |
274 | 140 | uint32_t maxbuffer; | 143 | uint32_t maxbuffer; |
275 | 144 | size_t allocated_sort_memory= 0; | ||
276 | 141 | buffpek *buffpek_inst; | 145 | buffpek *buffpek_inst; |
277 | 142 | ha_rows records= HA_POS_ERROR; | 146 | ha_rows records= HA_POS_ERROR; |
278 | 143 | unsigned char **sort_keys= 0; | 147 | unsigned char **sort_keys= 0; |
279 | @@ -247,10 +251,20 @@ | |||
280 | 247 | uint32_t old_memavl; | 251 | uint32_t old_memavl; |
281 | 248 | uint32_t keys= memavl/(param.rec_length+sizeof(char*)); | 252 | uint32_t keys= memavl/(param.rec_length+sizeof(char*)); |
282 | 249 | param.keys= (uint32_t) min(records+1, (ha_rows)keys); | 253 | param.keys= (uint32_t) min(records+1, (ha_rows)keys); |
283 | 254 | |||
284 | 255 | allocated_sort_memory= param.keys * param.rec_length; | ||
285 | 256 | if (not global_sort_buffer.add(allocated_sort_memory)) | ||
286 | 257 | { | ||
287 | 258 | my_error(ER_OUT_OF_GLOBAL_SORTMEMORY, MYF(ME_ERROR+ME_WAITTANG)); | ||
288 | 259 | goto err; | ||
289 | 260 | } | ||
290 | 261 | |||
291 | 250 | if ((table_sort.sort_keys= | 262 | if ((table_sort.sort_keys= |
292 | 251 | (unsigned char **) make_char_array((char **) table_sort.sort_keys, | 263 | (unsigned char **) make_char_array((char **) table_sort.sort_keys, |
293 | 252 | param.keys, param.rec_length))) | 264 | param.keys, param.rec_length))) |
294 | 253 | break; | 265 | break; |
295 | 266 | |||
296 | 267 | global_sort_buffer.sub(allocated_sort_memory); | ||
297 | 254 | old_memavl= memavl; | 268 | old_memavl= memavl; |
298 | 255 | if ((memavl= memavl/4*3) < min_sort_memory && old_memavl > min_sort_memory) | 269 | if ((memavl= memavl/4*3) < min_sort_memory && old_memavl > min_sort_memory) |
299 | 256 | memavl= min_sort_memory; | 270 | memavl= min_sort_memory; |
300 | @@ -261,6 +275,7 @@ | |||
301 | 261 | my_error(ER_OUT_OF_SORTMEMORY,MYF(ME_ERROR+ME_WAITTANG)); | 275 | my_error(ER_OUT_OF_SORTMEMORY,MYF(ME_ERROR+ME_WAITTANG)); |
302 | 262 | goto err; | 276 | goto err; |
303 | 263 | } | 277 | } |
304 | 278 | |||
305 | 264 | if (open_cached_file(&buffpek_pointers,drizzle_tmpdir.c_str(),TEMP_PREFIX, | 279 | if (open_cached_file(&buffpek_pointers,drizzle_tmpdir.c_str(),TEMP_PREFIX, |
306 | 265 | DISK_BUFFER_SIZE, MYF(MY_WME))) | 280 | DISK_BUFFER_SIZE, MYF(MY_WME))) |
307 | 266 | goto err; | 281 | goto err; |
308 | @@ -357,6 +372,7 @@ | |||
309 | 357 | session->status_var.filesort_rows+= (uint32_t) records; | 372 | session->status_var.filesort_rows+= (uint32_t) records; |
310 | 358 | } | 373 | } |
311 | 359 | *examined_rows= param.examined_rows; | 374 | *examined_rows= param.examined_rows; |
312 | 375 | global_sort_buffer.sub(allocated_sort_memory); | ||
313 | 360 | memcpy(&table->sort, &table_sort, sizeof(filesort_info)); | 376 | memcpy(&table->sort, &table_sort, sizeof(filesort_info)); |
314 | 361 | DRIZZLE_FILESORT_DONE(error, records); | 377 | DRIZZLE_FILESORT_DONE(error, records); |
315 | 362 | return (error ? HA_POS_ERROR : records); | 378 | return (error ? HA_POS_ERROR : records); |
316 | 363 | 379 | ||
317 | === added file 'drizzled/global_buffer.h' | |||
318 | --- drizzled/global_buffer.h 1970-01-01 00:00:00 +0000 | |||
319 | +++ drizzled/global_buffer.h 2010-11-05 13:28:56 +0000 | |||
320 | @@ -0,0 +1,69 @@ | |||
321 | 1 | /* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*- | ||
322 | 2 | * vim:expandtab:shiftwidth=2:tabstop=2:smarttab: | ||
323 | 3 | * | ||
324 | 4 | * Copyright (C) 2010 Andrew Hutchings | ||
325 | 5 | * | ||
326 | 6 | * This program is free software; you can redistribute it and/or modify | ||
327 | 7 | * it under the terms of the GNU General Public License as published by | ||
328 | 8 | * the Free Software Foundation; version 2 of the License. | ||
329 | 9 | * | ||
330 | 10 | * This program is distributed in the hope that it will be useful, | ||
331 | 11 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
332 | 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
333 | 13 | * GNU General Public License for more details. | ||
334 | 14 | * | ||
335 | 15 | * You should have received a copy of the GNU General Public License | ||
336 | 16 | * along with this program; if not, write to the Free Software | ||
337 | 17 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
338 | 18 | */ | ||
339 | 19 | |||
340 | 20 | #ifndef DRIZZLED_GLOBAL_BUFFER_H | ||
341 | 21 | #define DRIZZLED_GLOBAL_BUFFER_H | ||
342 | 22 | |||
343 | 23 | #include <drizzled/atomics.h> | ||
344 | 24 | |||
345 | 25 | namespace drizzled | ||
346 | 26 | { | ||
347 | 27 | template <class T> | ||
348 | 28 | class global_buffer_constraint | ||
349 | 29 | { | ||
350 | 30 | public: | ||
351 | 31 | global_buffer_constraint(T max) | ||
352 | 32 | { | ||
353 | 33 | setMaxSize(max); | ||
354 | 34 | } | ||
355 | 35 | |||
356 | 36 | T getMaxSize() const { return max_size; } | ||
357 | 37 | void setMaxSize(T new_size) | ||
358 | 38 | { | ||
359 | 39 | if (new_size == 0) new_size = std::numeric_limits<T>::max(); | ||
360 | 40 | max_size= new_size; | ||
361 | 41 | } | ||
362 | 42 | |||
363 | 43 | bool add(T addition) | ||
364 | 44 | { | ||
365 | 45 | if (current_size.add_and_fetch(addition) > max_size) | ||
366 | 46 | { | ||
367 | 47 | current_size.add_and_fetch(T(0) - addition); | ||
368 | 48 | return false; | ||
369 | 49 | } | ||
370 | 50 | return true; | ||
371 | 51 | } | ||
372 | 52 | |||
373 | 53 | bool sub(T subtract) | ||
374 | 54 | { | ||
375 | 55 | if (current_size < subtract) | ||
376 | 56 | return false; | ||
377 | 57 | else | ||
378 | 58 | current_size.add_and_fetch(T(0) - subtract); | ||
379 | 59 | |||
380 | 60 | return true; | ||
381 | 61 | } | ||
382 | 62 | |||
383 | 63 | private: | ||
384 | 64 | atomic<T> current_size; | ||
385 | 65 | T max_size; | ||
386 | 66 | }; | ||
387 | 67 | |||
388 | 68 | } | ||
389 | 69 | #endif /* DRIZZLED_GLOBAL_BUFFER_H */ | ||
390 | 0 | 70 | ||
391 | === modified file 'drizzled/include.am' | |||
392 | --- drizzled/include.am 2010-10-28 05:22:47 +0000 | |||
393 | +++ drizzled/include.am 2010-11-05 13:28:56 +0000 | |||
394 | @@ -190,6 +190,7 @@ | |||
395 | 190 | drizzled/generator/session.h \ | 190 | drizzled/generator/session.h \ |
396 | 191 | drizzled/generator/table.h \ | 191 | drizzled/generator/table.h \ |
397 | 192 | drizzled/gettext.h \ | 192 | drizzled/gettext.h \ |
398 | 193 | drizzled/global_buffer.h \ | ||
399 | 193 | drizzled/global_charset_info.h \ | 194 | drizzled/global_charset_info.h \ |
400 | 194 | drizzled/ha_statistics.h \ | 195 | drizzled/ha_statistics.h \ |
401 | 195 | drizzled/handler_structs.h \ | 196 | drizzled/handler_structs.h \ |
402 | 196 | 197 | ||
403 | === modified file 'drizzled/internal/mf_iocache.cc' | |||
404 | --- drizzled/internal/mf_iocache.cc 2010-10-10 08:28:30 +0000 | |||
405 | +++ drizzled/internal/mf_iocache.cc 2010-11-05 13:28:56 +0000 | |||
406 | @@ -51,6 +51,7 @@ | |||
407 | 51 | 51 | ||
408 | 52 | #include "drizzled/internal/my_sys.h" | 52 | #include "drizzled/internal/my_sys.h" |
409 | 53 | #include "drizzled/internal/m_string.h" | 53 | #include "drizzled/internal/m_string.h" |
410 | 54 | #include "drizzled/drizzled.h" | ||
411 | 54 | #ifdef HAVE_AIOWAIT | 55 | #ifdef HAVE_AIOWAIT |
412 | 55 | #include "drizzled/error.h" | 56 | #include "drizzled/error.h" |
413 | 56 | #include "drizzled/internal/aio_result.h" | 57 | #include "drizzled/internal/aio_result.h" |
414 | @@ -247,6 +248,12 @@ | |||
415 | 247 | if (cachesize < min_cache) | 248 | if (cachesize < min_cache) |
416 | 248 | cachesize = min_cache; | 249 | cachesize = min_cache; |
417 | 249 | buffer_block= cachesize; | 250 | buffer_block= cachesize; |
418 | 251 | if ((type == READ_CACHE) and (not global_read_buffer.add(buffer_block))) | ||
419 | 252 | { | ||
420 | 253 | my_error(ER_OUT_OF_GLOBAL_READMEMORY, MYF(ME_ERROR+ME_WAITTANG)); | ||
421 | 254 | return 2; | ||
422 | 255 | } | ||
423 | 256 | |||
424 | 250 | if ((info->buffer= | 257 | if ((info->buffer= |
425 | 251 | (unsigned char*) malloc(buffer_block)) != 0) | 258 | (unsigned char*) malloc(buffer_block)) != 0) |
426 | 252 | { | 259 | { |
427 | @@ -255,8 +262,14 @@ | |||
428 | 255 | break; /* Enough memory found */ | 262 | break; /* Enough memory found */ |
429 | 256 | } | 263 | } |
430 | 257 | if (cachesize == min_cache) | 264 | if (cachesize == min_cache) |
431 | 265 | { | ||
432 | 266 | if (type == READ_CACHE) | ||
433 | 267 | global_read_buffer.sub(buffer_block); | ||
434 | 258 | return(2); /* Can't alloc cache */ | 268 | return(2); /* Can't alloc cache */ |
435 | 269 | } | ||
436 | 259 | /* Try with less memory */ | 270 | /* Try with less memory */ |
437 | 271 | if (type == READ_CACHE) | ||
438 | 272 | global_read_buffer.sub(buffer_block); | ||
439 | 260 | cachesize= (cachesize*3/4 & ~(min_cache-1)); | 273 | cachesize= (cachesize*3/4 & ~(min_cache-1)); |
440 | 261 | } | 274 | } |
441 | 262 | } | 275 | } |
442 | @@ -928,6 +941,8 @@ | |||
443 | 928 | } | 941 | } |
444 | 929 | if (info->alloced_buffer) | 942 | if (info->alloced_buffer) |
445 | 930 | { | 943 | { |
446 | 944 | if (info->type == READ_CACHE) | ||
447 | 945 | global_read_buffer.sub(info->buffer_length); | ||
448 | 931 | info->alloced_buffer=0; | 946 | info->alloced_buffer=0; |
449 | 932 | if (info->file != -1) /* File doesn't exist */ | 947 | if (info->file != -1) /* File doesn't exist */ |
450 | 933 | error= my_b_flush_io_cache(info,1); | 948 | error= my_b_flush_io_cache(info,1); |
451 | 934 | 949 | ||
452 | === modified file 'drizzled/join_cache.cc' | |||
453 | --- drizzled/join_cache.cc 2010-07-30 20:31:19 +0000 | |||
454 | +++ drizzled/join_cache.cc 2010-11-05 13:28:56 +0000 | |||
455 | @@ -30,6 +30,8 @@ | |||
456 | 30 | #include "config.h" | 30 | #include "config.h" |
457 | 31 | #include "drizzled/sql_select.h" /* include join.h */ | 31 | #include "drizzled/sql_select.h" /* include join.h */ |
458 | 32 | #include "drizzled/field/blob.h" | 32 | #include "drizzled/field/blob.h" |
459 | 33 | #include "drizzled/drizzled.h" | ||
460 | 34 | #include "drizzled/internal/my_sys.h" | ||
461 | 33 | 35 | ||
462 | 34 | #include <algorithm> | 36 | #include <algorithm> |
463 | 35 | 37 | ||
464 | @@ -87,6 +89,8 @@ | |||
465 | 87 | if (!(cache->field=(CacheField*) | 89 | if (!(cache->field=(CacheField*) |
466 | 88 | memory::sql_alloc(sizeof(CacheField)*(cache->fields+table_count*2)+(blobs+1)* sizeof(CacheField*)))) | 90 | memory::sql_alloc(sizeof(CacheField)*(cache->fields+table_count*2)+(blobs+1)* sizeof(CacheField*)))) |
467 | 89 | { | 91 | { |
468 | 92 | size= cache->end - cache->buff; | ||
469 | 93 | global_join_buffer.sub(size); | ||
470 | 90 | free((unsigned char*) cache->buff); | 94 | free((unsigned char*) cache->buff); |
471 | 91 | cache->buff=0; | 95 | cache->buff=0; |
472 | 92 | return(1); | 96 | return(1); |
473 | @@ -162,6 +166,11 @@ | |||
474 | 162 | cache->blobs= blobs; | 166 | cache->blobs= blobs; |
475 | 163 | *blob_ptr= NULL; /* End sequentel */ | 167 | *blob_ptr= NULL; /* End sequentel */ |
476 | 164 | size= max((size_t) session->variables.join_buff_size, (size_t)cache->length); | 168 | size= max((size_t) session->variables.join_buff_size, (size_t)cache->length); |
477 | 169 | if (not global_join_buffer.add(size)) | ||
478 | 170 | { | ||
479 | 171 | my_error(ER_OUT_OF_GLOBAL_JOINMEMORY, MYF(ME_ERROR+ME_WAITTANG)); | ||
480 | 172 | return 1; | ||
481 | 173 | } | ||
482 | 165 | if (!(cache->buff= (unsigned char*) malloc(size))) | 174 | if (!(cache->buff= (unsigned char*) malloc(size))) |
483 | 166 | return 1; | 175 | return 1; |
484 | 167 | cache->end= cache->buff+size; | 176 | cache->end= cache->buff+size; |
485 | 168 | 177 | ||
486 | === modified file 'drizzled/records.cc' | |||
487 | --- drizzled/records.cc 2010-10-20 20:25:52 +0000 | |||
488 | +++ drizzled/records.cc 2010-11-05 13:28:56 +0000 | |||
489 | @@ -27,6 +27,7 @@ | |||
490 | 27 | #include "drizzled/optimizer/range.h" | 27 | #include "drizzled/optimizer/range.h" |
491 | 28 | #include "drizzled/internal/my_sys.h" | 28 | #include "drizzled/internal/my_sys.h" |
492 | 29 | #include "drizzled/internal/iocache.h" | 29 | #include "drizzled/internal/iocache.h" |
493 | 30 | #include "drizzled/drizzled.h" | ||
494 | 30 | 31 | ||
495 | 31 | namespace drizzled | 32 | namespace drizzled |
496 | 32 | { | 33 | { |
497 | @@ -172,6 +173,7 @@ | |||
498 | 172 | { /* free cache if used */ | 173 | { /* free cache if used */ |
499 | 173 | if (cache) | 174 | if (cache) |
500 | 174 | { | 175 | { |
501 | 176 | global_read_rnd_buffer.sub(session->variables.read_rnd_buff_size); | ||
502 | 175 | free((char*) cache); | 177 | free((char*) cache); |
503 | 176 | cache= NULL; | 178 | cache= NULL; |
504 | 177 | } | 179 | } |
505 | @@ -402,6 +404,12 @@ | |||
506 | 402 | local_rec_cache_size= cache_records * reclength; | 404 | local_rec_cache_size= cache_records * reclength; |
507 | 403 | rec_cache_size= cache_records * ref_length; | 405 | rec_cache_size= cache_records * ref_length; |
508 | 404 | 406 | ||
509 | 407 | if (not global_read_rnd_buffer.add(session->variables.read_rnd_buff_size)) | ||
510 | 408 | { | ||
511 | 409 | my_error(ER_OUT_OF_GLOBAL_READRNDMEMORY, MYF(ME_ERROR+ME_WAITTANG)); | ||
512 | 410 | return false; | ||
513 | 411 | } | ||
514 | 412 | |||
515 | 405 | // We have to allocate one more byte to use uint3korr (see comments for it) | 413 | // We have to allocate one more byte to use uint3korr (see comments for it) |
516 | 406 | if (cache_records <= 2 || | 414 | if (cache_records <= 2 || |
517 | 407 | !(cache=(unsigned char*) malloc(local_rec_cache_size + cache_records * struct_length + 1))) | 415 | !(cache=(unsigned char*) malloc(local_rec_cache_size + cache_records * struct_length + 1))) |
518 | 408 | 416 | ||
519 | === modified file 'drizzled/sql_select.cc' | |||
520 | --- drizzled/sql_select.cc 2010-11-02 17:38:03 +0000 | |||
521 | +++ drizzled/sql_select.cc 2010-11-05 13:28:56 +0000 | |||
522 | @@ -51,6 +51,7 @@ | |||
523 | 51 | #include "drizzled/index_hint.h" | 51 | #include "drizzled/index_hint.h" |
524 | 52 | #include "drizzled/records.h" | 52 | #include "drizzled/records.h" |
525 | 53 | #include "drizzled/internal/iocache.h" | 53 | #include "drizzled/internal/iocache.h" |
526 | 54 | #include "drizzled/drizzled.h" | ||
527 | 54 | 55 | ||
528 | 55 | #include "drizzled/sql_union.h" | 56 | #include "drizzled/sql_union.h" |
529 | 56 | #include "drizzled/optimizer/key_field.h" | 57 | #include "drizzled/optimizer/key_field.h" |
530 | @@ -1216,7 +1217,11 @@ | |||
531 | 1216 | delete quick; | 1217 | delete quick; |
532 | 1217 | quick= 0; | 1218 | quick= 0; |
533 | 1218 | if (cache.buff) | 1219 | if (cache.buff) |
534 | 1220 | { | ||
535 | 1221 | size_t size= cache.end - cache.buff; | ||
536 | 1222 | global_join_buffer.sub(size); | ||
537 | 1219 | free(cache.buff); | 1223 | free(cache.buff); |
538 | 1224 | } | ||
539 | 1220 | cache.buff= 0; | 1225 | cache.buff= 0; |
540 | 1221 | limit= 0; | 1226 | limit= 0; |
541 | 1222 | if (table) | 1227 | if (table) |
542 | 1223 | 1228 | ||
543 | === added file 'tests/include/setup-global-constraints.inc' | |||
544 | --- tests/include/setup-global-constraints.inc 1970-01-01 00:00:00 +0000 | |||
545 | +++ tests/include/setup-global-constraints.inc 2010-11-05 13:28:56 +0000 | |||
546 | @@ -0,0 +1,32 @@ | |||
547 | 1 | --disable_warnings | ||
548 | 2 | DROP TABLE IF EXISTS t1; | ||
549 | 3 | DROP TABLE IF EXISTS t2; | ||
550 | 4 | --enable_warnings | ||
551 | 5 | |||
552 | 6 | CREATE TABLE `t1` ( | ||
553 | 7 | `charcol1` VARCHAR(36) COLLATE utf8_general_ci DEFAULT NULL, | ||
554 | 8 | `charcol2` VARCHAR(36) COLLATE utf8_general_ci DEFAULT NULL | ||
555 | 9 | ) ENGINE=InnoDB COLLATE = utf8_general_ci; | ||
556 | 10 | |||
557 | 11 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
558 | 12 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
559 | 13 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
560 | 14 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
561 | 15 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
562 | 16 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
563 | 17 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
564 | 18 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
565 | 19 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
566 | 20 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
567 | 21 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
568 | 22 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
569 | 23 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
570 | 24 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
571 | 25 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
572 | 26 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
573 | 27 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
574 | 28 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
575 | 29 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
576 | 30 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
577 | 31 | |||
578 | 32 | CREATE TABLE t2 SELECT * FROM t1; | ||
579 | 0 | 33 | ||
580 | === added file 'tests/r/global_read_constraints.result' | |||
581 | --- tests/r/global_read_constraints.result 1970-01-01 00:00:00 +0000 | |||
582 | +++ tests/r/global_read_constraints.result 2010-11-05 13:28:56 +0000 | |||
583 | @@ -0,0 +1,32 @@ | |||
584 | 1 | USE test; | ||
585 | 2 | DROP TABLE IF EXISTS t1; | ||
586 | 3 | DROP TABLE IF EXISTS t2; | ||
587 | 4 | CREATE TABLE `t1` ( | ||
588 | 5 | `charcol1` VARCHAR(36) COLLATE utf8_general_ci DEFAULT NULL, | ||
589 | 6 | `charcol2` VARCHAR(36) COLLATE utf8_general_ci DEFAULT NULL | ||
590 | 7 | ) ENGINE=InnoDB COLLATE = utf8_general_ci; | ||
591 | 8 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
592 | 9 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
593 | 10 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
594 | 11 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
595 | 12 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
596 | 13 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
597 | 14 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
598 | 15 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
599 | 16 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
600 | 17 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
601 | 18 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
602 | 19 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
603 | 20 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
604 | 21 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
605 | 22 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
606 | 23 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
607 | 24 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
608 | 25 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
609 | 26 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
610 | 27 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
611 | 28 | CREATE TABLE t2 SELECT * FROM t1; | ||
612 | 29 | create temporary table t3 (a varchar(255), b varchar(255)) engine=myisam; | ||
613 | 30 | insert into t3 select * from t1; | ||
614 | 31 | select SQL_BIG_RESULT * from t3, (select * from t1) as t4; | ||
615 | 32 | ERROR HY000: Global read memory constraint hit; increase read-buffer-threshold | ||
616 | 0 | 33 | ||
617 | === added file 'tests/r/global_read_rnd_constraints.result' | |||
618 | --- tests/r/global_read_rnd_constraints.result 1970-01-01 00:00:00 +0000 | |||
619 | +++ tests/r/global_read_rnd_constraints.result 2010-11-05 13:28:56 +0000 | |||
620 | @@ -0,0 +1,1 @@ | |||
621 | 1 | USE test; | ||
622 | 0 | 2 | ||
623 | === added file 'tests/r/global_sort_join_constraints.result' | |||
624 | --- tests/r/global_sort_join_constraints.result 1970-01-01 00:00:00 +0000 | |||
625 | +++ tests/r/global_sort_join_constraints.result 2010-11-05 13:28:56 +0000 | |||
626 | @@ -0,0 +1,30 @@ | |||
627 | 1 | USE test; | ||
628 | 2 | DROP TABLE IF EXISTS t1; | ||
629 | 3 | DROP TABLE IF EXISTS t2; | ||
630 | 4 | CREATE TABLE `t1` ( | ||
631 | 5 | `charcol1` VARCHAR(36) COLLATE utf8_general_ci DEFAULT NULL, | ||
632 | 6 | `charcol2` VARCHAR(36) COLLATE utf8_general_ci DEFAULT NULL | ||
633 | 7 | ) ENGINE=InnoDB COLLATE = utf8_general_ci; | ||
634 | 8 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
635 | 9 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
636 | 10 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
637 | 11 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
638 | 12 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
639 | 13 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
640 | 14 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
641 | 15 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
642 | 16 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
643 | 17 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
644 | 18 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
645 | 19 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
646 | 20 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
647 | 21 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
648 | 22 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
649 | 23 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
650 | 24 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
651 | 25 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
652 | 26 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
653 | 27 | INSERT INTO t1 VALUES (UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()),(UUID(), UUID()); | ||
654 | 28 | CREATE TABLE t2 SELECT * FROM t1; | ||
655 | 29 | select SQL_BIG_RESULT * from t1 join t2 on (t1.charcol1 = t2.charcol2) join t2 as t3 on (t1.charcol1 = t3.charcol2); | ||
656 | 30 | ERROR HY000: Global join memory constraint hit; increase join-heap-threshold | ||
657 | 0 | 31 | ||
658 | === added file 'tests/t/global_read_constraints-master.opt' | |||
659 | --- tests/t/global_read_constraints-master.opt 1970-01-01 00:00:00 +0000 | |||
660 | +++ tests/t/global_read_constraints-master.opt 2010-11-05 13:28:56 +0000 | |||
661 | @@ -0,0 +1,1 @@ | |||
662 | 1 | --read-buffer-threshold=128k | ||
663 | 0 | 2 | ||
664 | === added file 'tests/t/global_read_constraints.test' | |||
665 | --- tests/t/global_read_constraints.test 1970-01-01 00:00:00 +0000 | |||
666 | +++ tests/t/global_read_constraints.test 2010-11-05 13:28:56 +0000 | |||
667 | @@ -0,0 +1,9 @@ | |||
668 | 1 | # Setup table for tests | ||
669 | 2 | USE test; | ||
670 | 3 | |||
671 | 4 | --source include/setup-global-constraints.inc | ||
672 | 5 | |||
673 | 6 | create temporary table t3 (a varchar(255), b varchar(255)) engine=myisam; | ||
674 | 7 | insert into t3 select * from t1; | ||
675 | 8 | --error 1705 | ||
676 | 9 | select SQL_BIG_RESULT * from t3, (select * from t1) as t4; | ||
677 | 0 | 10 | ||
678 | === added file 'tests/t/global_read_rnd_constraints-master.opt' | |||
679 | --- tests/t/global_read_rnd_constraints-master.opt 1970-01-01 00:00:00 +0000 | |||
680 | +++ tests/t/global_read_rnd_constraints-master.opt 2010-11-05 13:28:56 +0000 | |||
681 | @@ -0,0 +1,1 @@ | |||
682 | 1 | --read-rnd-threshold=262144 | ||
683 | 0 | 2 | ||
684 | === added file 'tests/t/global_read_rnd_constraints.test' | |||
685 | --- tests/t/global_read_rnd_constraints.test 1970-01-01 00:00:00 +0000 | |||
686 | +++ tests/t/global_read_rnd_constraints.test 2010-11-05 13:28:56 +0000 | |||
687 | @@ -0,0 +1,19 @@ | |||
688 | 1 | # Test is disabled because drizzleslap error code is now different on different platforms | ||
689 | 2 | |||
690 | 3 | # Setup table for tests | ||
691 | 4 | USE test; | ||
692 | 5 | |||
693 | 6 | #--source include/setup-global-constraints.inc | ||
694 | 7 | |||
695 | 8 | # We appear to need to beef up the table to use the read_rnd buffer at all | ||
696 | 9 | #alter table t1 modify charcol1 varchar(255); | ||
697 | 10 | #alter table t1 modify charcol2 varchar(255); | ||
698 | 11 | #insert into t1 select SQL_BIG_RESULT * from t1; | ||
699 | 12 | #insert into t1 select SQL_BIG_RESULT * from t1; | ||
700 | 13 | #insert into t1 select SQL_BIG_RESULT * from t1; | ||
701 | 14 | #insert into t1 select SQL_BIG_RESULT * from t1; | ||
702 | 15 | #insert into t1 select SQL_BIG_RESULT * from t1; | ||
703 | 16 | |||
704 | 17 | # Test for read_rnd buffer constraint | ||
705 | 18 | #--error 134 | ||
706 | 19 | #--exec $DRIZZLE_SLAP -q "SELECT SQL_BIG_RESULT * FROM t1 ORDER BY 1" -c100 --iterations=1 --number-of-queries=1000 --create-schema=test | ||
707 | 0 | 20 | ||
708 | === added file 'tests/t/global_sort_join_constraints-master.opt' | |||
709 | --- tests/t/global_sort_join_constraints-master.opt 1970-01-01 00:00:00 +0000 | |||
710 | +++ tests/t/global_sort_join_constraints-master.opt 2010-11-05 13:28:56 +0000 | |||
711 | @@ -0,0 +1,1 @@ | |||
712 | 1 | --join-heap-threshold=131072 --sort-heap-threshold=2097144 | ||
713 | 0 | 2 | ||
714 | === added file 'tests/t/global_sort_join_constraints.test' | |||
715 | --- tests/t/global_sort_join_constraints.test 1970-01-01 00:00:00 +0000 | |||
716 | +++ tests/t/global_sort_join_constraints.test 2010-11-05 13:28:56 +0000 | |||
717 | @@ -0,0 +1,13 @@ | |||
718 | 1 | # Setup table for tests | ||
719 | 2 | USE test; | ||
720 | 3 | |||
721 | 4 | --source include/setup-global-constraints.inc | ||
722 | 5 | |||
723 | 6 | # Test for sort buffer constraint | ||
724 | 7 | # Test disabled, needs two parallel filesorts to trigger error. Drizzleslap's error handling currently unpredictable | ||
725 | 8 | #--error 134 | ||
726 | 9 | #--exec $DRIZZLE_SLAP -q "SELECT * FROM t1 ORDER BY 1" -c100 --iterations=1 --number-of-queries=1000 --create-schema=test | ||
727 | 10 | |||
728 | 11 | # Test for join buffer constraint | ||
729 | 12 | --error 1703 | ||
730 | 13 | select SQL_BIG_RESULT * from t1 join t2 on (t1.charcol1 = t2.charcol2) join t2 as t3 on (t1.charcol1 = t3.charcol2); | ||
731 | 0 | 14 | ||
732 | === modified file 'unittests/atomics_test.cc' | |||
733 | --- unittests/atomics_test.cc 2010-06-02 22:35:45 +0000 | |||
734 | +++ unittests/atomics_test.cc 2010-11-05 13:28:56 +0000 | |||
735 | @@ -78,8 +78,8 @@ | |||
736 | 78 | 78 | ||
737 | 79 | u235.fetch_and_store(100); | 79 | u235.fetch_and_store(100); |
738 | 80 | 80 | ||
741 | 81 | EXPECT_EQ(false, u235.compare_and_swap(42, 200)); | 81 | ASSERT_FALSE(u235.compare_and_swap(42, 200)); |
742 | 82 | EXPECT_EQ(true, u235.compare_and_swap(200, 100)); | 82 | ASSERT_TRUE(u235.compare_and_swap(200, 100)); |
743 | 83 | EXPECT_EQ(200, u235); | 83 | EXPECT_EQ(200, u235); |
744 | 84 | } | 84 | } |
745 | 85 | 85 | ||
746 | 86 | 86 | ||
747 | === added file 'unittests/global_buffer_test.cc' | |||
748 | --- unittests/global_buffer_test.cc 1970-01-01 00:00:00 +0000 | |||
749 | +++ unittests/global_buffer_test.cc 2010-11-05 13:28:56 +0000 | |||
750 | @@ -0,0 +1,60 @@ | |||
751 | 1 | /* -*- mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*- | ||
752 | 2 | * vim:expandtab:shiftwidth=2:tabstop=2:smarttab: | ||
753 | 3 | * | ||
754 | 4 | * Copyright (C) 2010 Andrew Hutchings | ||
755 | 5 | * | ||
756 | 6 | * This program is free software; you can redistribute it and/or modify | ||
757 | 7 | * it under the terms of the GNU General Public License as published by | ||
758 | 8 | * the Free Software Foundation; either version 2 of the License, or | ||
759 | 9 | * (at your option) any later version. | ||
760 | 10 | * | ||
761 | 11 | * This program is distributed in the hope that it will be useful, | ||
762 | 12 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
763 | 13 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
764 | 14 | * GNU General Public License for more details. | ||
765 | 15 | * | ||
766 | 16 | * You should have received a copy of the GNU General Public License | ||
767 | 17 | * along with this program; if not, write to the Free Software | ||
768 | 18 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA | ||
769 | 19 | */ | ||
770 | 20 | |||
771 | 21 | #include "config.h" | ||
772 | 22 | |||
773 | 23 | #include <gtest/gtest.h> | ||
774 | 24 | #include "drizzled/global_buffer.h" | ||
775 | 25 | |||
776 | 26 | TEST(global_buffer, overflow) | ||
777 | 27 | { | ||
778 | 28 | drizzled::global_buffer_constraint<uint64_t> test_buffer(1024); | ||
779 | 29 | |||
780 | 30 | ASSERT_TRUE(test_buffer.add(512)); | ||
781 | 31 | ASSERT_TRUE(test_buffer.add(512)); | ||
782 | 32 | ASSERT_FALSE(test_buffer.add(1)); | ||
783 | 33 | } | ||
784 | 34 | |||
785 | 35 | TEST(global_buffer, subtract) | ||
786 | 36 | { | ||
787 | 37 | drizzled::global_buffer_constraint<uint64_t> test_buffer(1024); | ||
788 | 38 | |||
789 | 39 | ASSERT_TRUE(test_buffer.add(1024)); | ||
790 | 40 | ASSERT_TRUE(test_buffer.sub(512)); | ||
791 | 41 | ASSERT_TRUE(test_buffer.add(512)); | ||
792 | 42 | ASSERT_FALSE(test_buffer.add(1)); | ||
793 | 43 | } | ||
794 | 44 | |||
795 | 45 | TEST(global_buffer, underflow) | ||
796 | 46 | { | ||
797 | 47 | drizzled::global_buffer_constraint<uint64_t> test_buffer(1024); | ||
798 | 48 | |||
799 | 49 | ASSERT_TRUE(test_buffer.add(10)); | ||
800 | 50 | ASSERT_FALSE(test_buffer.sub(11)); | ||
801 | 51 | } | ||
802 | 52 | |||
803 | 53 | TEST(global_buffer, change_max) | ||
804 | 54 | { | ||
805 | 55 | drizzled::global_buffer_constraint<uint64_t> test_buffer(1024); | ||
806 | 56 | |||
807 | 57 | test_buffer.setMaxSize(512); | ||
808 | 58 | |||
809 | 59 | ASSERT_FALSE(test_buffer.add(513)); | ||
810 | 60 | } | ||
811 | 0 | 61 | ||
812 | === modified file 'unittests/include.am' | |||
813 | --- unittests/include.am 2010-09-14 07:47:50 +0000 | |||
814 | +++ unittests/include.am 2010-11-05 13:28:56 +0000 | |||
815 | @@ -28,6 +28,7 @@ | |||
816 | 28 | unittests/date_test.cc \ | 28 | unittests/date_test.cc \ |
817 | 29 | unittests/date_time_test.cc \ | 29 | unittests/date_time_test.cc \ |
818 | 30 | unittests/generators.cc \ | 30 | unittests/generators.cc \ |
819 | 31 | unittests/global_buffer_test.cc \ | ||
820 | 31 | unittests/libdrizzle_test.cc \ | 32 | unittests/libdrizzle_test.cc \ |
821 | 32 | unittests/main.cc \ | 33 | unittests/main.cc \ |
822 | 33 | unittests/micro_timestamp_test.cc \ | 34 | unittests/micro_timestamp_test.cc \ |
823 | 34 | 35 | ||
824 | === modified file 'unittests/pthread_atomics_test.cc' | |||
825 | --- unittests/pthread_atomics_test.cc 2010-06-02 22:35:45 +0000 | |||
826 | +++ unittests/pthread_atomics_test.cc 2010-11-05 13:28:56 +0000 | |||
827 | @@ -106,8 +106,8 @@ | |||
828 | 106 | 106 | ||
829 | 107 | u235.fetch_and_store(100); | 107 | u235.fetch_and_store(100); |
830 | 108 | 108 | ||
833 | 109 | EXPECT_EQ(false, u235.compare_and_swap(42, 200)); | 109 | ASSERT_FALSE(u235.compare_and_swap(42, 200)); |
834 | 110 | EXPECT_EQ(true, u235.compare_and_swap(200, 100)); | 110 | ASSERT_TRUE(u235.compare_and_swap(200, 100)); |
835 | 111 | EXPECT_EQ(200, u235); | 111 | EXPECT_EQ(200, u235); |
836 | 112 | } | 112 | } |
837 | 113 | 113 | ||
838 | 114 | 114 | ||
839 | === modified file 'unittests/utf8_test.cc' | |||
840 | --- unittests/utf8_test.cc 2010-06-03 20:42:25 +0000 | |||
841 | +++ unittests/utf8_test.cc 2010-11-05 13:28:56 +0000 | |||
842 | @@ -29,10 +29,10 @@ | |||
843 | 29 | 29 | ||
844 | 30 | TEST(utf8, is_single) | 30 | TEST(utf8, is_single) |
845 | 31 | { | 31 | { |
847 | 32 | EXPECT_EQ(true, utf8::is_single('a')); | 32 | ASSERT_TRUE(utf8::is_single('a')); |
848 | 33 | const char *multi_byte= "ç"; | 33 | const char *multi_byte= "ç"; |
851 | 34 | EXPECT_EQ(false, utf8::is_single(*multi_byte)); | 34 | ASSERT_FALSE(utf8::is_single(*multi_byte)); |
852 | 35 | EXPECT_EQ(false, utf8::is_single(*(multi_byte + 1))); | 35 | ASSERT_FALSE(utf8::is_single(*(multi_byte + 1))); |
853 | 36 | } | 36 | } |
854 | 37 | 37 | ||
855 | 38 | TEST(utf8, codepoint_length) | 38 | TEST(utf8, codepoint_length) |
http:// hudson. drizzle. org/view/ Drizzle- build/job/ drizzle- build-ubuntu10. 04-32bit- 2/792/console