Merge lp:~eday/drizzle/eday-dev into lp:~drizzle-trunk/drizzle/development
- eday-dev
- Merge into development
Proposed by
Eric Day
Status: | Superseded | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Proposed branch: | lp:~eday/drizzle/eday-dev | ||||||||||||||||
Merge into: | lp:~drizzle-trunk/drizzle/development | ||||||||||||||||
Diff against target: |
443 lines (+112/-32) 9 files modified
client/drizzle.cc (+7/-8) client/drizzledump.cc (+6/-0) client/drizzleimport.cc (+5/-6) client/drizzleslap.cc (+6/-6) client/drizzletest.cc (+8/-0) plugin/mysql_protocol/oldlibdrizzle.cc (+1/-1) tests/r/mysql_protocol.result (+31/-0) tests/t/mysql_protocol.test (+13/-0) tests/test-run.pl (+35/-11) |
||||||||||||||||
To merge this branch: | bzr merge lp:~eday/drizzle/eday-dev | ||||||||||||||||
Related bugs: |
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Brian Aker | Needs Fixing | ||
Jay Pipes (community) | Approve | ||
Review via email: mp+17181@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
Eric Day (eday) wrote : | # |
Revision history for this message
Brian Aker (brianaker) wrote : | # |
Test cases needed, even if just to verify flag/behavior.
review:
Needs Fixing
lp:~eday/drizzle/eday-dev
updated
Unmerged revisions
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'client/drizzle.cc' |
2 | --- client/drizzle.cc 2009-12-25 09:18:10 +0000 |
3 | +++ client/drizzle.cc 2010-01-13 08:03:15 +0000 |
4 | @@ -186,13 +186,13 @@ |
5 | default_charset_used= false, opt_secure_auth= false, |
6 | default_pager_set= false, opt_sigint_ignore= false, |
7 | auto_vertical_output= false, |
8 | - show_warnings= false, executing_query= false, interrupted_query= false; |
9 | + show_warnings= false, executing_query= false, interrupted_query= false, |
10 | + opt_mysql= false; |
11 | static uint32_t show_progress_size= 0; |
12 | static bool column_types_flag; |
13 | static bool preserve_comments= false; |
14 | static uint32_t opt_max_input_line, opt_drizzle_port= 0; |
15 | static int verbose= 0, opt_silent= 0, opt_local_infile= 0; |
16 | -static char * opt_drizzle_unix_port= NULL; |
17 | static drizzle_capabilities_t connect_flag= DRIZZLE_CAPABILITIES_NONE; |
18 | static char *current_host, *current_db, *current_user= NULL, |
19 | *opt_password= NULL, *delimiter_str= NULL, *current_prompt= NULL; |
20 | @@ -1349,7 +1349,6 @@ |
21 | if (processed_prompt) |
22 | delete processed_prompt; |
23 | free(opt_password); |
24 | - free(opt_drizzle_unix_port); |
25 | free(histfile); |
26 | free(histfile_tmp); |
27 | free(current_db); |
28 | @@ -1385,7 +1384,7 @@ |
29 | |
30 | if (drizzle_con_add_tcp(&drizzle, &kill_drizzle, current_host, |
31 | opt_drizzle_port, current_user, opt_password, NULL, |
32 | - DRIZZLE_CON_NONE) == NULL) |
33 | + opt_mysql ? DRIZZLE_CON_MYSQL : DRIZZLE_CON_NONE) == NULL) |
34 | { |
35 | goto err; |
36 | } |
37 | @@ -1526,9 +1525,6 @@ |
38 | (char**) &opt_shutdown, (char**) &opt_shutdown, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, |
39 | {"silent", 's', N_("Be more silent. Print results with a tab as separator, each row on new line."), 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, |
40 | 0, 0}, |
41 | - {"socket", 'S', N_("Socket file to use for connection."), |
42 | - (char**) &opt_drizzle_unix_port, (char**) &opt_drizzle_unix_port, 0, GET_STR_ALLOC, |
43 | - REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, |
44 | {"table", 't', N_("Output in table format."), (char**) &output_tables, |
45 | (char**) &output_tables, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, |
46 | {"tee", OPT_TEE, |
47 | @@ -1580,6 +1576,9 @@ |
48 | 0, 0, 0, 0, 0, 0}, |
49 | {"ping", OPT_PING, N_("Ping the server to check if it's alive."), |
50 | (char**) &opt_ping, (char**) &opt_ping, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, |
51 | + {"mysql", 'm', N_("Use MySQL Protocol."), |
52 | + (char**) &opt_mysql, (char**) &opt_mysql, 0, GET_BOOL, NO_ARG, 0, 0, 0, |
53 | + 0, 0, 0}, |
54 | { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0} |
55 | }; |
56 | |
57 | @@ -3881,7 +3880,7 @@ |
58 | } |
59 | drizzle_create(&drizzle); |
60 | if (drizzle_con_add_tcp(&drizzle, &con, host, opt_drizzle_port, user, |
61 | - password, database, DRIZZLE_CON_NONE) == NULL) |
62 | + password, database, opt_mysql ? DRIZZLE_CON_MYSQL : DRIZZLE_CON_NONE) == NULL) |
63 | { |
64 | (void) put_error(&con, NULL); |
65 | (void) fflush(stdout); |
66 | |
67 | === modified file 'client/drizzledump.cc' |
68 | --- client/drizzledump.cc 2009-12-25 08:50:15 +0000 |
69 | +++ client/drizzledump.cc 2010-01-13 08:03:15 +0000 |
70 | @@ -81,6 +81,7 @@ |
71 | static bool verbose= false; |
72 | static bool opt_no_create_info= false; |
73 | static bool opt_no_data= false; |
74 | +static bool opt_mysql= false; |
75 | static bool quick= true; |
76 | static bool extended_insert= true; |
77 | static bool ignore_errors= false; |
78 | @@ -257,6 +258,9 @@ |
79 | "dump. Automatically turns --single-transaction and --lock-tables off.", |
80 | (char**) &opt_lock_all_tables, (char**) &opt_lock_all_tables, 0, GET_BOOL, NO_ARG, |
81 | 0, 0, 0, 0, 0, 0}, |
82 | + {"mysql", 'm', N_("Use MySQL Protocol."), |
83 | + (char**) &opt_mysql, (char**) &opt_mysql, 0, GET_BOOL, NO_ARG, 0, 0, 0, |
84 | + 0, 0, 0}, |
85 | {"no-autocommit", OPT_AUTOCOMMIT, |
86 | "Wrap tables with autocommit/commit statements.", |
87 | (char**) &opt_autocommit, (char**) &opt_autocommit, 0, GET_BOOL, NO_ARG, |
88 | @@ -913,6 +917,8 @@ |
89 | drizzle_con_create(&drizzle, &dcon); |
90 | drizzle_con_set_tcp(&dcon, host, opt_drizzle_port); |
91 | drizzle_con_set_auth(&dcon, user, passwd); |
92 | + if (opt_mysql) |
93 | + drizzle_con_add_options(&dcon, DRIZZLE_CON_MYSQL); |
94 | ret= drizzle_con_connect(&dcon); |
95 | if (ret != DRIZZLE_RETURN_OK) |
96 | { |
97 | |
98 | === modified file 'client/drizzleimport.cc' |
99 | --- client/drizzleimport.cc 2009-12-11 21:54:18 +0000 |
100 | +++ client/drizzleimport.cc 2010-01-13 08:03:15 +0000 |
101 | @@ -60,7 +60,7 @@ |
102 | static bool verbose= false, lock_tables= false, ignore_errors= false, |
103 | opt_delete= false, opt_replace= false, silent= false, |
104 | ignore_unique= false, opt_low_priority= false, |
105 | - tty_password= false; |
106 | + tty_password= false, opt_mysql= false; |
107 | |
108 | static uint32_t opt_use_threads= 0, opt_local_file= 0; |
109 | static char *opt_password= NULL, *current_user= NULL, |
110 | @@ -68,7 +68,6 @@ |
111 | *lines_terminated= NULL, *enclosed= NULL, *opt_enclosed= NULL, |
112 | *escaped= NULL, *opt_columns= NULL; |
113 | static uint32_t opt_drizzle_port= 0; |
114 | -static char * opt_drizzle_unix_port= 0; |
115 | static int64_t opt_ignore_lines= -1; |
116 | |
117 | static struct my_option my_long_options[] = |
118 | @@ -116,6 +115,9 @@ |
119 | {"low-priority", OPT_LOW_PRIORITY, |
120 | "Use LOW_PRIORITY when updating the table.", (char**) &opt_low_priority, |
121 | (char**) &opt_low_priority, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, |
122 | + {"mysql", 'm', N_("Use MySQL Protocol."), |
123 | + (char**) &opt_mysql, (char**) &opt_mysql, 0, GET_BOOL, NO_ARG, 0, 0, 0, |
124 | + 0, 0, 0}, |
125 | {"password", 'P', |
126 | "Password to use when connecting to server. If password is not given it's asked from the tty.", |
127 | 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, |
128 | @@ -129,9 +131,6 @@ |
129 | (char**) &opt_replace, (char**) &opt_replace, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, |
130 | {"silent", 's', "Be more silent.", (char**) &silent, (char**) &silent, 0, |
131 | GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, |
132 | - {"socket", 'S', "Socket file to use for connection.", |
133 | - (char**) &opt_drizzle_unix_port, (char**) &opt_drizzle_unix_port, 0, GET_STR, |
134 | - REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, |
135 | {"use-threads", OPT_USE_THREADS, |
136 | "Load files in parallel. The argument is the number " |
137 | "of threads to use for loading data.", |
138 | @@ -406,7 +405,7 @@ |
139 | if (!(drizzle= drizzle_create(NULL))) |
140 | return 0; |
141 | if (!(con= drizzle_con_add_tcp(drizzle,NULL,host,opt_drizzle_port,user,passwd, |
142 | - database, DRIZZLE_CON_NONE))) |
143 | + database, opt_mysql ? DRIZZLE_CON_MYSQL : DRIZZLE_CON_NONE))) |
144 | { |
145 | return 0; |
146 | } |
147 | |
148 | === modified file 'client/drizzleslap.cc' |
149 | --- client/drizzleslap.cc 2009-12-23 08:42:15 +0000 |
150 | +++ client/drizzleslap.cc 2010-01-13 08:03:15 +0000 |
151 | @@ -130,13 +130,13 @@ |
152 | *user_supplied_post_statements= NULL, |
153 | *default_engine= NULL, |
154 | *pre_system= NULL, |
155 | - *post_system= NULL, |
156 | - *opt_drizzle_unix_port= NULL; |
157 | + *post_system= NULL; |
158 | |
159 | const char *delimiter= "\n"; |
160 | |
161 | const char *create_schema_string= "drizzleslap"; |
162 | |
163 | +static bool opt_mysql= false; |
164 | static bool opt_preserve= true; |
165 | static bool opt_only_print= false; |
166 | static bool opt_burnin= false; |
167 | @@ -630,6 +630,9 @@ |
168 | {"label", OPT_SLAP_LABEL, "Label to use for print and csv output.", |
169 | (char**) &opt_label, (char**) &opt_label, 0, |
170 | GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, |
171 | + {"mysql", 'm', N_("Use MySQL Protocol."), |
172 | + (char**) &opt_mysql, (char**) &opt_mysql, 0, GET_BOOL, NO_ARG, 0, 0, 0, |
173 | + 0, 0, 0}, |
174 | {"number-blob-cols", OPT_SLAP_BLOB_COL, |
175 | "Number of BLOB columns to create table with if specifying --auto-generate-sql. Example --number-blob-cols=3:1024/2048 would give you 3 blobs with a random size between 1024 and 2048. ", |
176 | (char**) &num_blob_cols_opt, (char**) &num_blob_cols_opt, 0, GET_STR, REQUIRED_ARG, |
177 | @@ -690,9 +693,6 @@ |
178 | {"silent", 's', "Run program in silent mode - no output.", |
179 | (char**) &opt_silent, (char**) &opt_silent, 0, GET_BOOL, NO_ARG, |
180 | 0, 0, 0, 0, 0, 0}, |
181 | - {"socket", 'S', "Socket file to use for connection.", |
182 | - (char**) &opt_drizzle_unix_port, (char**) &opt_drizzle_unix_port, 0, GET_STR, |
183 | - REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, |
184 | {"timer-length", OPT_SLAP_TIMER_LENGTH, |
185 | "Require drizzleslap to run each specific test a certain amount of time in seconds.", |
186 | (char**) &opt_timer_length, (char**) &opt_timer_length, 0, GET_UINT, |
187 | @@ -2698,7 +2698,7 @@ |
188 | drizzle_con_add_tcp(drizzle, con, host, opt_drizzle_port, user, |
189 | opt_password, |
190 | connect_to_schema ? create_schema_string : NULL, |
191 | - DRIZZLE_CON_NONE) == NULL) |
192 | + opt_mysql ? DRIZZLE_CON_MYSQL : DRIZZLE_CON_NONE) == NULL) |
193 | { |
194 | fprintf(stderr,"%s: Error creating drizzle object\n", my_progname); |
195 | exit(1); |
196 | |
197 | === modified file 'client/drizzletest.cc' |
198 | --- client/drizzletest.cc 2009-12-23 08:01:21 +0000 |
199 | +++ client/drizzletest.cc 2010-01-13 08:03:15 +0000 |
200 | @@ -115,6 +115,7 @@ |
201 | static bool abort_on_error= true; |
202 | static bool server_initialized= false; |
203 | static bool is_windows= false; |
204 | +static bool opt_mysql= false; |
205 | static char **default_argv; |
206 | static const char *load_default_groups[]= { "drizzletest", "client", 0 }; |
207 | static char line_buffer[MAX_DELIMITER_LENGTH], *line_buffer_pos= line_buffer; |
208 | @@ -3930,6 +3931,8 @@ |
209 | die("Failed on drizzle_create()"); |
210 | if (!drizzle_con_create(con_slot->drizzle, &con_slot->con)) |
211 | die("Failed on drizzle_con_create()"); |
212 | + if (opt_mysql) |
213 | + drizzle_con_add_options(&con_slot->con, DRIZZLE_CON_MYSQL); |
214 | |
215 | /* Use default db name */ |
216 | if (ds_database.length() == 0) |
217 | @@ -4603,6 +4606,9 @@ |
218 | "Max number of connection attempts when connecting to server", |
219 | (char**) &opt_max_connect_retries, (char**) &opt_max_connect_retries, 0, |
220 | GET_INT, REQUIRED_ARG, 500, 1, 10000, 0, 0, 0}, |
221 | + {"mysql", 'm', N_("Use MySQL Protocol."), |
222 | + (char**) &opt_mysql, (char**) &opt_mysql, 0, GET_BOOL, NO_ARG, 0, 0, 0, |
223 | + 0, 0, 0}, |
224 | {"password", 'P', "Password to use when connecting to server.", |
225 | 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0}, |
226 | {"port", 'p', "Port number to use for connection or 0 for default to, in " |
227 | @@ -5612,6 +5618,8 @@ |
228 | die("Failed in drizzle_create()"); |
229 | if (!( drizzle_con_create(cur_con->drizzle, &cur_con->con))) |
230 | die("Failed in drizzle_con_create()"); |
231 | + if (opt_mysql) |
232 | + drizzle_con_add_options(&cur_con->con, DRIZZLE_CON_MYSQL); |
233 | |
234 | if (!(cur_con->name = strdup("default"))) |
235 | die("Out of memory"); |
236 | |
237 | === modified file 'plugin/mysql_protocol/oldlibdrizzle.cc' |
238 | --- plugin/mysql_protocol/oldlibdrizzle.cc 2009-12-23 21:16:15 +0000 |
239 | +++ plugin/mysql_protocol/oldlibdrizzle.cc 2010-01-13 08:03:15 +0000 |
240 | @@ -222,7 +222,7 @@ |
241 | break; |
242 | |
243 | case 14: /* PING */ |
244 | - (*l_packet)[0]= (unsigned char) COM_SHUTDOWN; |
245 | + (*l_packet)[0]= (unsigned char) COM_PING; |
246 | break; |
247 | |
248 | |
249 | |
250 | === added file 'tests/r/mysql_protocol.result' |
251 | --- tests/r/mysql_protocol.result 1970-01-01 00:00:00 +0000 |
252 | +++ tests/r/mysql_protocol.result 2010-01-13 08:03:15 +0000 |
253 | @@ -0,0 +1,31 @@ |
254 | +DROP TABLE IF EXISTS t1; |
255 | +CREATE TABLE t1(a int, key (a)); |
256 | +INSERT INTO t1 VALUES (1), (2); |
257 | +SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; |
258 | +SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; |
259 | +DROP TABLE IF EXISTS `t1`; |
260 | +CREATE TABLE `t1` ( |
261 | + `a` int DEFAULT NULL, |
262 | + KEY `a` (`a`) |
263 | +) ENGINE=InnoDB; |
264 | + |
265 | +ALTER TABLE `t1` DISABLE KEYS; |
266 | +INSERT INTO `t1` VALUES (1),(2); |
267 | +ALTER TABLE `t1` ENABLE KEYS; |
268 | +SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS; |
269 | +SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS; |
270 | +DROP TABLE t1; |
271 | +drizzled is alive |
272 | +Benchmark |
273 | + Load: mixed |
274 | + Average Time took to generate schema and initial data: 0.000 seconds |
275 | + Average number of seconds to run all queries: 0.000 seconds |
276 | + Minimum number of seconds to run all queries: 0.000 seconds |
277 | + Maximum number of seconds to run all queries: 0.000 seconds |
278 | + Total time for tests: 0.000 seconds |
279 | + Standard Deviation: 0.000 |
280 | + Number of queries in create queries: 0 |
281 | + Number of clients running queries: 1/0 |
282 | + Number of times test was run: 1 |
283 | + Average number of queries per client: 0 |
284 | + |
285 | |
286 | === added file 'tests/t/mysql_protocol.test' |
287 | --- tests/t/mysql_protocol.test 1970-01-01 00:00:00 +0000 |
288 | +++ tests/t/mysql_protocol.test 2010-01-13 08:03:15 +0000 |
289 | @@ -0,0 +1,13 @@ |
290 | + |
291 | +--disable_warnings |
292 | +DROP TABLE IF EXISTS t1; |
293 | +--enable_warnings |
294 | + |
295 | +CREATE TABLE t1(a int, key (a)); |
296 | +INSERT INTO t1 VALUES (1), (2); |
297 | +--exec $DRIZZLE_DUMP_MYSQL --skip-create --skip-comments test t1 |
298 | +DROP TABLE t1; |
299 | + |
300 | +--exec $DRIZZLE_MYSQL --ping |
301 | + |
302 | +--exec $DRIZZLE_SLAP_MYSQL |
303 | |
304 | === modified file 'tests/test-run.pl' |
305 | --- tests/test-run.pl 2009-12-21 05:34:07 +0000 |
306 | +++ tests/test-run.pl 2010-01-13 08:03:15 +0000 |
307 | @@ -271,6 +271,7 @@ |
308 | |
309 | our $opt_max_save_core= 5; |
310 | my $num_saved_cores= 0; # Number of core files saved in vardir/log/ so far. |
311 | +our $mysql_port_offset= 50; |
312 | |
313 | ###################################################################### |
314 | # |
315 | @@ -930,6 +931,7 @@ |
316 | path_pid => "$opt_vardir/run/master.pid", |
317 | path_sock => "$sockdir/master.sock", |
318 | port => $opt_master_myport, |
319 | + mysql_port => $opt_master_myport + $mysql_port_offset, |
320 | start_timeout => 400, # enough time create innodb tables |
321 | cluster => 0, # index in clusters list |
322 | start_opts => [], |
323 | @@ -945,6 +947,7 @@ |
324 | path_pid => "$opt_vardir/run/master1.pid", |
325 | path_sock => "$sockdir/master1.sock", |
326 | port => $opt_master_myport + 1, |
327 | + mysql_port => $opt_master_myport + 1 + $mysql_port_offset, |
328 | start_timeout => 400, # enough time create innodb tables |
329 | cluster => 0, # index in clusters list |
330 | start_opts => [], |
331 | @@ -957,9 +960,10 @@ |
332 | idx => 0, |
333 | path_myddir => "$opt_vardir/slave-data", |
334 | path_myerr => "$opt_vardir/log/slave.err", |
335 | - path_pid => "$opt_vardir/run/slave.pid", |
336 | - path_sock => "$sockdir/slave.sock", |
337 | - port => $opt_slave_myport, |
338 | + path_pid => "$opt_vardir/run/slave.pid", |
339 | + path_sock => "$sockdir/slave.sock", |
340 | + port => $opt_slave_myport, |
341 | + mysql_port => $opt_slave_myport + $mysql_port_offset, |
342 | start_timeout => 400, |
343 | |
344 | cluster => 1, # index in clusters list |
345 | @@ -973,9 +977,10 @@ |
346 | idx => 1, |
347 | path_myddir => "$opt_vardir/slave1-data", |
348 | path_myerr => "$opt_vardir/log/slave1.err", |
349 | - path_pid => "$opt_vardir/run/slave1.pid", |
350 | - path_sock => "$sockdir/slave1.sock", |
351 | - port => $opt_slave_myport + 1, |
352 | + path_pid => "$opt_vardir/run/slave1.pid", |
353 | + path_sock => "$sockdir/slave1.sock", |
354 | + port => $opt_slave_myport + 1, |
355 | + mysql_port => $opt_slave_myport + 1 + $mysql_port_offset, |
356 | start_timeout => 300, |
357 | cluster => -1, # index in clusters list |
358 | start_opts => [], |
359 | @@ -988,9 +993,10 @@ |
360 | idx => 2, |
361 | path_myddir => "$opt_vardir/slave2-data", |
362 | path_myerr => "$opt_vardir/log/slave2.err", |
363 | - path_pid => "$opt_vardir/run/slave2.pid", |
364 | - path_sock => "$sockdir/slave2.sock", |
365 | - port => $opt_slave_myport + 2, |
366 | + path_pid => "$opt_vardir/run/slave2.pid", |
367 | + path_sock => "$sockdir/slave2.sock", |
368 | + port => $opt_slave_myport + 2, |
369 | + mysql_port => $opt_slave_myport + 2 + $mysql_port_offset, |
370 | start_timeout => 300, |
371 | cluster => -1, # index in clusters list |
372 | start_opts => [], |
373 | @@ -1434,6 +1440,9 @@ |
374 | # ---------------------------------------------------- |
375 | my $cmdline_mysqldump= generate_cmdline_mysqldump($master->[0]); |
376 | my $cmdline_mysqldumpslave= generate_cmdline_mysqldump($slave->[0]); |
377 | + my $cmdline_mysqldumpmysql= mtr_native_path($exe_drizzledump) . |
378 | + " --no-defaults -uroot " . |
379 | + "--mysql --port=$master->[0]->{'mysql_port'} "; |
380 | |
381 | if ( $opt_debug ) |
382 | { |
383 | @@ -1441,9 +1450,12 @@ |
384 | " --debug=d:t:A,$path_vardir_trace/log/mysqldump-master.trace"; |
385 | $cmdline_mysqldumpslave .= |
386 | " --debug=d:t:A,$path_vardir_trace/log/mysqldump-slave.trace"; |
387 | + $cmdline_mysqldumpmysql .= |
388 | + " --debug=d:t:A,$path_vardir_trace/log/mysqldump-mysql.trace"; |
389 | } |
390 | $ENV{'DRIZZLE_DUMP'}= $cmdline_mysqldump; |
391 | $ENV{'DRIZZLE_DUMP_SLAVE'}= $cmdline_mysqldumpslave; |
392 | + $ENV{'DRIZZLE_DUMP_MYSQL'}= $cmdline_mysqldumpmysql; |
393 | |
394 | # ---------------------------------------------------- |
395 | # Setup env so childs can execute mysqlslap |
396 | @@ -1454,13 +1466,20 @@ |
397 | mtr_native_path($exe_drizzleslap) . |
398 | " -uroot " . |
399 | "--port=$master->[0]->{'port'} "; |
400 | + my $cmdline_drizzleslapmysql= |
401 | + mtr_native_path($exe_drizzleslap) . |
402 | + " -uroot " . |
403 | + "--mysql --port=$master->[0]->{'mysql_port'} "; |
404 | |
405 | if ( $opt_debug ) |
406 | { |
407 | $cmdline_drizzleslap .= |
408 | " --debug=d:t:A,$path_vardir_trace/log/drizzleslap.trace"; |
409 | + $cmdline_drizzleslapmysql .= |
410 | + " --debug=d:t:A,$path_vardir_trace/log/drizzleslap.trace"; |
411 | } |
412 | $ENV{'DRIZZLE_SLAP'}= $cmdline_drizzleslap; |
413 | + $ENV{'DRIZZLE_SLAP_MYSQL'}= $cmdline_drizzleslapmysql; |
414 | } |
415 | |
416 | |
417 | @@ -1488,8 +1507,13 @@ |
418 | mtr_native_path($exe_drizzle) . |
419 | " --no-defaults --host=localhost --user=root --password= " . |
420 | "--port=$master->[0]->{'port'} "; |
421 | + my $cmdline_drizzlemysql= |
422 | + mtr_native_path($exe_drizzle) . |
423 | + " --no-defaults --host=localhost --user=root --password= " . |
424 | + "--mysql --port=$master->[0]->{'mysql_port'} "; |
425 | |
426 | $ENV{'MYSQL'}= $cmdline_mysql; |
427 | + $ENV{'DRIZZLE_MYSQL'}= $cmdline_drizzlemysql; |
428 | |
429 | # ---------------------------------------------------- |
430 | # Setup env so childs can execute bug25714 |
431 | @@ -2470,10 +2494,10 @@ |
432 | $mysqld->{'path_pid'}); |
433 | |
434 | mtr_add_arg($args, "%s--drizzle-protocol-port=%d", $prefix, |
435 | - $mysqld->{'port'}); |
436 | + $mysqld->{'port'}); |
437 | |
438 | mtr_add_arg($args, "%s--mysql-protocol-port=%d", $prefix, |
439 | - $mysqld->{'port'} + 50); |
440 | + $mysqld->{'mysql_port'}); |
441 | |
442 | mtr_add_arg($args, "%s--datadir=%s", $prefix, |
443 | $mysqld->{'path_myddir'}); |
This adds the --mysql option to tools, which can be used to run the test suite using the MySQL protocol (just pass --mysql option to all client tools in test_run.pl). I'm not modifying the test suite now since other work is being done there. I'd like to create a make test-mysql or something which would set this flag to be passed through and test on the different port/protocol.