Merge lp:~eday/drizzle/eday-dev into lp:~drizzle-trunk/drizzle/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
Reviewer Review Type Date Requested Status
Brian Aker Needs Fixing
Jay Pipes (community) Approve
Review via email: mp+17181@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Eric Day (eday) wrote :

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.

Revision history for this message
Jay Pipes (jaypipes) wrote :

Looks good!

review: Approve
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
1065. By Eric Day

Added test cases for --mysql flag.

Unmerged revisions

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'client/drizzle.cc'
--- client/drizzle.cc 2009-12-25 09:18:10 +0000
+++ client/drizzle.cc 2010-01-13 08:03:15 +0000
@@ -186,13 +186,13 @@
186 default_charset_used= false, opt_secure_auth= false,186 default_charset_used= false, opt_secure_auth= false,
187 default_pager_set= false, opt_sigint_ignore= false,187 default_pager_set= false, opt_sigint_ignore= false,
188 auto_vertical_output= false,188 auto_vertical_output= false,
189 show_warnings= false, executing_query= false, interrupted_query= false;189 show_warnings= false, executing_query= false, interrupted_query= false,
190 opt_mysql= false;
190static uint32_t show_progress_size= 0;191static uint32_t show_progress_size= 0;
191static bool column_types_flag;192static bool column_types_flag;
192static bool preserve_comments= false;193static bool preserve_comments= false;
193static uint32_t opt_max_input_line, opt_drizzle_port= 0;194static uint32_t opt_max_input_line, opt_drizzle_port= 0;
194static int verbose= 0, opt_silent= 0, opt_local_infile= 0;195static int verbose= 0, opt_silent= 0, opt_local_infile= 0;
195static char * opt_drizzle_unix_port= NULL;
196static drizzle_capabilities_t connect_flag= DRIZZLE_CAPABILITIES_NONE;196static drizzle_capabilities_t connect_flag= DRIZZLE_CAPABILITIES_NONE;
197static char *current_host, *current_db, *current_user= NULL,197static char *current_host, *current_db, *current_user= NULL,
198 *opt_password= NULL, *delimiter_str= NULL, *current_prompt= NULL;198 *opt_password= NULL, *delimiter_str= NULL, *current_prompt= NULL;
@@ -1349,7 +1349,6 @@
1349 if (processed_prompt)1349 if (processed_prompt)
1350 delete processed_prompt;1350 delete processed_prompt;
1351 free(opt_password);1351 free(opt_password);
1352 free(opt_drizzle_unix_port);
1353 free(histfile);1352 free(histfile);
1354 free(histfile_tmp);1353 free(histfile_tmp);
1355 free(current_db);1354 free(current_db);
@@ -1385,7 +1384,7 @@
13851384
1386 if (drizzle_con_add_tcp(&drizzle, &kill_drizzle, current_host,1385 if (drizzle_con_add_tcp(&drizzle, &kill_drizzle, current_host,
1387 opt_drizzle_port, current_user, opt_password, NULL,1386 opt_drizzle_port, current_user, opt_password, NULL,
1388 DRIZZLE_CON_NONE) == NULL)1387 opt_mysql ? DRIZZLE_CON_MYSQL : DRIZZLE_CON_NONE) == NULL)
1389 {1388 {
1390 goto err;1389 goto err;
1391 }1390 }
@@ -1526,9 +1525,6 @@
1526 (char**) &opt_shutdown, (char**) &opt_shutdown, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},1525 (char**) &opt_shutdown, (char**) &opt_shutdown, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
1527 {"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,1526 {"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,
1528 0, 0},1527 0, 0},
1529 {"socket", 'S', N_("Socket file to use for connection."),
1530 (char**) &opt_drizzle_unix_port, (char**) &opt_drizzle_unix_port, 0, GET_STR_ALLOC,
1531 REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
1532 {"table", 't', N_("Output in table format."), (char**) &output_tables,1528 {"table", 't', N_("Output in table format."), (char**) &output_tables,
1533 (char**) &output_tables, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},1529 (char**) &output_tables, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
1534 {"tee", OPT_TEE,1530 {"tee", OPT_TEE,
@@ -1580,6 +1576,9 @@
1580 0, 0, 0, 0, 0, 0},1576 0, 0, 0, 0, 0, 0},
1581 {"ping", OPT_PING, N_("Ping the server to check if it's alive."),1577 {"ping", OPT_PING, N_("Ping the server to check if it's alive."),
1582 (char**) &opt_ping, (char**) &opt_ping, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},1578 (char**) &opt_ping, (char**) &opt_ping, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
1579 {"mysql", 'm', N_("Use MySQL Protocol."),
1580 (char**) &opt_mysql, (char**) &opt_mysql, 0, GET_BOOL, NO_ARG, 0, 0, 0,
1581 0, 0, 0},
1583 { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}1582 { 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
1584};1583};
15851584
@@ -3881,7 +3880,7 @@
3881 }3880 }
3882 drizzle_create(&drizzle);3881 drizzle_create(&drizzle);
3883 if (drizzle_con_add_tcp(&drizzle, &con, host, opt_drizzle_port, user,3882 if (drizzle_con_add_tcp(&drizzle, &con, host, opt_drizzle_port, user,
3884 password, database, DRIZZLE_CON_NONE) == NULL)3883 password, database, opt_mysql ? DRIZZLE_CON_MYSQL : DRIZZLE_CON_NONE) == NULL)
3885 {3884 {
3886 (void) put_error(&con, NULL);3885 (void) put_error(&con, NULL);
3887 (void) fflush(stdout);3886 (void) fflush(stdout);
38883887
=== modified file 'client/drizzledump.cc'
--- client/drizzledump.cc 2009-12-25 08:50:15 +0000
+++ client/drizzledump.cc 2010-01-13 08:03:15 +0000
@@ -81,6 +81,7 @@
81static bool verbose= false;81static bool verbose= false;
82static bool opt_no_create_info= false;82static bool opt_no_create_info= false;
83static bool opt_no_data= false;83static bool opt_no_data= false;
84static bool opt_mysql= false;
84static bool quick= true;85static bool quick= true;
85static bool extended_insert= true;86static bool extended_insert= true;
86static bool ignore_errors= false;87static bool ignore_errors= false;
@@ -257,6 +258,9 @@
257 "dump. Automatically turns --single-transaction and --lock-tables off.",258 "dump. Automatically turns --single-transaction and --lock-tables off.",
258 (char**) &opt_lock_all_tables, (char**) &opt_lock_all_tables, 0, GET_BOOL, NO_ARG,259 (char**) &opt_lock_all_tables, (char**) &opt_lock_all_tables, 0, GET_BOOL, NO_ARG,
259 0, 0, 0, 0, 0, 0},260 0, 0, 0, 0, 0, 0},
261 {"mysql", 'm', N_("Use MySQL Protocol."),
262 (char**) &opt_mysql, (char**) &opt_mysql, 0, GET_BOOL, NO_ARG, 0, 0, 0,
263 0, 0, 0},
260 {"no-autocommit", OPT_AUTOCOMMIT,264 {"no-autocommit", OPT_AUTOCOMMIT,
261 "Wrap tables with autocommit/commit statements.",265 "Wrap tables with autocommit/commit statements.",
262 (char**) &opt_autocommit, (char**) &opt_autocommit, 0, GET_BOOL, NO_ARG,266 (char**) &opt_autocommit, (char**) &opt_autocommit, 0, GET_BOOL, NO_ARG,
@@ -913,6 +917,8 @@
913 drizzle_con_create(&drizzle, &dcon);917 drizzle_con_create(&drizzle, &dcon);
914 drizzle_con_set_tcp(&dcon, host, opt_drizzle_port);918 drizzle_con_set_tcp(&dcon, host, opt_drizzle_port);
915 drizzle_con_set_auth(&dcon, user, passwd);919 drizzle_con_set_auth(&dcon, user, passwd);
920 if (opt_mysql)
921 drizzle_con_add_options(&dcon, DRIZZLE_CON_MYSQL);
916 ret= drizzle_con_connect(&dcon);922 ret= drizzle_con_connect(&dcon);
917 if (ret != DRIZZLE_RETURN_OK)923 if (ret != DRIZZLE_RETURN_OK)
918 {924 {
919925
=== modified file 'client/drizzleimport.cc'
--- client/drizzleimport.cc 2009-12-11 21:54:18 +0000
+++ client/drizzleimport.cc 2010-01-13 08:03:15 +0000
@@ -60,7 +60,7 @@
60static bool verbose= false, lock_tables= false, ignore_errors= false,60static bool verbose= false, lock_tables= false, ignore_errors= false,
61 opt_delete= false, opt_replace= false, silent= false,61 opt_delete= false, opt_replace= false, silent= false,
62 ignore_unique= false, opt_low_priority= false,62 ignore_unique= false, opt_low_priority= false,
63 tty_password= false;63 tty_password= false, opt_mysql= false;
6464
65static uint32_t opt_use_threads= 0, opt_local_file= 0;65static uint32_t opt_use_threads= 0, opt_local_file= 0;
66static char *opt_password= NULL, *current_user= NULL,66static char *opt_password= NULL, *current_user= NULL,
@@ -68,7 +68,6 @@
68 *lines_terminated= NULL, *enclosed= NULL, *opt_enclosed= NULL,68 *lines_terminated= NULL, *enclosed= NULL, *opt_enclosed= NULL,
69 *escaped= NULL, *opt_columns= NULL;69 *escaped= NULL, *opt_columns= NULL;
70static uint32_t opt_drizzle_port= 0;70static uint32_t opt_drizzle_port= 0;
71static char * opt_drizzle_unix_port= 0;
72static int64_t opt_ignore_lines= -1;71static int64_t opt_ignore_lines= -1;
7372
74static struct my_option my_long_options[] =73static struct my_option my_long_options[] =
@@ -116,6 +115,9 @@
116 {"low-priority", OPT_LOW_PRIORITY,115 {"low-priority", OPT_LOW_PRIORITY,
117 "Use LOW_PRIORITY when updating the table.", (char**) &opt_low_priority,116 "Use LOW_PRIORITY when updating the table.", (char**) &opt_low_priority,
118 (char**) &opt_low_priority, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},117 (char**) &opt_low_priority, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
118 {"mysql", 'm', N_("Use MySQL Protocol."),
119 (char**) &opt_mysql, (char**) &opt_mysql, 0, GET_BOOL, NO_ARG, 0, 0, 0,
120 0, 0, 0},
119 {"password", 'P',121 {"password", 'P',
120 "Password to use when connecting to server. If password is not given it's asked from the tty.",122 "Password to use when connecting to server. If password is not given it's asked from the tty.",
121 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},123 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
@@ -129,9 +131,6 @@
129 (char**) &opt_replace, (char**) &opt_replace, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},131 (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,132 {"silent", 's', "Be more silent.", (char**) &silent, (char**) &silent, 0,
131 GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},133 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,134 {"use-threads", OPT_USE_THREADS,
136 "Load files in parallel. The argument is the number "135 "Load files in parallel. The argument is the number "
137 "of threads to use for loading data.",136 "of threads to use for loading data.",
@@ -406,7 +405,7 @@
406 if (!(drizzle= drizzle_create(NULL)))405 if (!(drizzle= drizzle_create(NULL)))
407 return 0;406 return 0;
408 if (!(con= drizzle_con_add_tcp(drizzle,NULL,host,opt_drizzle_port,user,passwd,407 if (!(con= drizzle_con_add_tcp(drizzle,NULL,host,opt_drizzle_port,user,passwd,
409 database, DRIZZLE_CON_NONE)))408 database, opt_mysql ? DRIZZLE_CON_MYSQL : DRIZZLE_CON_NONE)))
410 {409 {
411 return 0;410 return 0;
412 }411 }
413412
=== modified file 'client/drizzleslap.cc'
--- client/drizzleslap.cc 2009-12-23 08:42:15 +0000
+++ client/drizzleslap.cc 2010-01-13 08:03:15 +0000
@@ -130,13 +130,13 @@
130 *user_supplied_post_statements= NULL,130 *user_supplied_post_statements= NULL,
131 *default_engine= NULL,131 *default_engine= NULL,
132 *pre_system= NULL,132 *pre_system= NULL,
133 *post_system= NULL,133 *post_system= NULL;
134 *opt_drizzle_unix_port= NULL;
135134
136const char *delimiter= "\n";135const char *delimiter= "\n";
137136
138const char *create_schema_string= "drizzleslap";137const char *create_schema_string= "drizzleslap";
139138
139static bool opt_mysql= false;
140static bool opt_preserve= true;140static bool opt_preserve= true;
141static bool opt_only_print= false;141static bool opt_only_print= false;
142static bool opt_burnin= false;142static bool opt_burnin= false;
@@ -630,6 +630,9 @@
630 {"label", OPT_SLAP_LABEL, "Label to use for print and csv output.",630 {"label", OPT_SLAP_LABEL, "Label to use for print and csv output.",
631 (char**) &opt_label, (char**) &opt_label, 0,631 (char**) &opt_label, (char**) &opt_label, 0,
632 GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},632 GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
633 {"mysql", 'm', N_("Use MySQL Protocol."),
634 (char**) &opt_mysql, (char**) &opt_mysql, 0, GET_BOOL, NO_ARG, 0, 0, 0,
635 0, 0, 0},
633 {"number-blob-cols", OPT_SLAP_BLOB_COL,636 {"number-blob-cols", OPT_SLAP_BLOB_COL,
634 "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. ",637 "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. ",
635 (char**) &num_blob_cols_opt, (char**) &num_blob_cols_opt, 0, GET_STR, REQUIRED_ARG,638 (char**) &num_blob_cols_opt, (char**) &num_blob_cols_opt, 0, GET_STR, REQUIRED_ARG,
@@ -690,9 +693,6 @@
690 {"silent", 's', "Run program in silent mode - no output.",693 {"silent", 's', "Run program in silent mode - no output.",
691 (char**) &opt_silent, (char**) &opt_silent, 0, GET_BOOL, NO_ARG,694 (char**) &opt_silent, (char**) &opt_silent, 0, GET_BOOL, NO_ARG,
692 0, 0, 0, 0, 0, 0},695 0, 0, 0, 0, 0, 0},
693 {"socket", 'S', "Socket file to use for connection.",
694 (char**) &opt_drizzle_unix_port, (char**) &opt_drizzle_unix_port, 0, GET_STR,
695 REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
696 {"timer-length", OPT_SLAP_TIMER_LENGTH,696 {"timer-length", OPT_SLAP_TIMER_LENGTH,
697 "Require drizzleslap to run each specific test a certain amount of time in seconds.",697 "Require drizzleslap to run each specific test a certain amount of time in seconds.",
698 (char**) &opt_timer_length, (char**) &opt_timer_length, 0, GET_UINT,698 (char**) &opt_timer_length, (char**) &opt_timer_length, 0, GET_UINT,
@@ -2698,7 +2698,7 @@
2698 drizzle_con_add_tcp(drizzle, con, host, opt_drizzle_port, user,2698 drizzle_con_add_tcp(drizzle, con, host, opt_drizzle_port, user,
2699 opt_password,2699 opt_password,
2700 connect_to_schema ? create_schema_string : NULL,2700 connect_to_schema ? create_schema_string : NULL,
2701 DRIZZLE_CON_NONE) == NULL)2701 opt_mysql ? DRIZZLE_CON_MYSQL : DRIZZLE_CON_NONE) == NULL)
2702 {2702 {
2703 fprintf(stderr,"%s: Error creating drizzle object\n", my_progname);2703 fprintf(stderr,"%s: Error creating drizzle object\n", my_progname);
2704 exit(1);2704 exit(1);
27052705
=== modified file 'client/drizzletest.cc'
--- client/drizzletest.cc 2009-12-23 08:01:21 +0000
+++ client/drizzletest.cc 2010-01-13 08:03:15 +0000
@@ -115,6 +115,7 @@
115static bool abort_on_error= true;115static bool abort_on_error= true;
116static bool server_initialized= false;116static bool server_initialized= false;
117static bool is_windows= false;117static bool is_windows= false;
118static bool opt_mysql= false;
118static char **default_argv;119static char **default_argv;
119static const char *load_default_groups[]= { "drizzletest", "client", 0 };120static const char *load_default_groups[]= { "drizzletest", "client", 0 };
120static char line_buffer[MAX_DELIMITER_LENGTH], *line_buffer_pos= line_buffer;121static char line_buffer[MAX_DELIMITER_LENGTH], *line_buffer_pos= line_buffer;
@@ -3930,6 +3931,8 @@
3930 die("Failed on drizzle_create()");3931 die("Failed on drizzle_create()");
3931 if (!drizzle_con_create(con_slot->drizzle, &con_slot->con))3932 if (!drizzle_con_create(con_slot->drizzle, &con_slot->con))
3932 die("Failed on drizzle_con_create()");3933 die("Failed on drizzle_con_create()");
3934 if (opt_mysql)
3935 drizzle_con_add_options(&con_slot->con, DRIZZLE_CON_MYSQL);
39333936
3934 /* Use default db name */3937 /* Use default db name */
3935 if (ds_database.length() == 0)3938 if (ds_database.length() == 0)
@@ -4603,6 +4606,9 @@
4603 "Max number of connection attempts when connecting to server",4606 "Max number of connection attempts when connecting to server",
4604 (char**) &opt_max_connect_retries, (char**) &opt_max_connect_retries, 0,4607 (char**) &opt_max_connect_retries, (char**) &opt_max_connect_retries, 0,
4605 GET_INT, REQUIRED_ARG, 500, 1, 10000, 0, 0, 0},4608 GET_INT, REQUIRED_ARG, 500, 1, 10000, 0, 0, 0},
4609 {"mysql", 'm', N_("Use MySQL Protocol."),
4610 (char**) &opt_mysql, (char**) &opt_mysql, 0, GET_BOOL, NO_ARG, 0, 0, 0,
4611 0, 0, 0},
4606 {"password", 'P', "Password to use when connecting to server.",4612 {"password", 'P', "Password to use when connecting to server.",
4607 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},4613 0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
4608 {"port", 'p', "Port number to use for connection or 0 for default to, in "4614 {"port", 'p', "Port number to use for connection or 0 for default to, in "
@@ -5612,6 +5618,8 @@
5612 die("Failed in drizzle_create()");5618 die("Failed in drizzle_create()");
5613 if (!( drizzle_con_create(cur_con->drizzle, &cur_con->con)))5619 if (!( drizzle_con_create(cur_con->drizzle, &cur_con->con)))
5614 die("Failed in drizzle_con_create()");5620 die("Failed in drizzle_con_create()");
5621 if (opt_mysql)
5622 drizzle_con_add_options(&cur_con->con, DRIZZLE_CON_MYSQL);
56155623
5616 if (!(cur_con->name = strdup("default")))5624 if (!(cur_con->name = strdup("default")))
5617 die("Out of memory");5625 die("Out of memory");
56185626
=== modified file 'plugin/mysql_protocol/oldlibdrizzle.cc'
--- plugin/mysql_protocol/oldlibdrizzle.cc 2009-12-23 21:16:15 +0000
+++ plugin/mysql_protocol/oldlibdrizzle.cc 2010-01-13 08:03:15 +0000
@@ -222,7 +222,7 @@
222 break;222 break;
223223
224 case 14: /* PING */224 case 14: /* PING */
225 (*l_packet)[0]= (unsigned char) COM_SHUTDOWN;225 (*l_packet)[0]= (unsigned char) COM_PING;
226 break;226 break;
227227
228228
229229
=== added file 'tests/r/mysql_protocol.result'
--- tests/r/mysql_protocol.result 1970-01-01 00:00:00 +0000
+++ tests/r/mysql_protocol.result 2010-01-13 08:03:15 +0000
@@ -0,0 +1,31 @@
1DROP TABLE IF EXISTS t1;
2CREATE TABLE t1(a int, key (a));
3INSERT INTO t1 VALUES (1), (2);
4SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
5SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
6DROP TABLE IF EXISTS `t1`;
7CREATE TABLE `t1` (
8 `a` int DEFAULT NULL,
9 KEY `a` (`a`)
10) ENGINE=InnoDB;
11
12ALTER TABLE `t1` DISABLE KEYS;
13INSERT INTO `t1` VALUES (1),(2);
14ALTER TABLE `t1` ENABLE KEYS;
15SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
16SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;
17DROP TABLE t1;
18drizzled is alive
19Benchmark
20 Load: mixed
21 Average Time took to generate schema and initial data: 0.000 seconds
22 Average number of seconds to run all queries: 0.000 seconds
23 Minimum number of seconds to run all queries: 0.000 seconds
24 Maximum number of seconds to run all queries: 0.000 seconds
25 Total time for tests: 0.000 seconds
26 Standard Deviation: 0.000
27 Number of queries in create queries: 0
28 Number of clients running queries: 1/0
29 Number of times test was run: 1
30 Average number of queries per client: 0
31
032
=== added file 'tests/t/mysql_protocol.test'
--- tests/t/mysql_protocol.test 1970-01-01 00:00:00 +0000
+++ tests/t/mysql_protocol.test 2010-01-13 08:03:15 +0000
@@ -0,0 +1,13 @@
1
2--disable_warnings
3DROP TABLE IF EXISTS t1;
4--enable_warnings
5
6CREATE TABLE t1(a int, key (a));
7INSERT INTO t1 VALUES (1), (2);
8--exec $DRIZZLE_DUMP_MYSQL --skip-create --skip-comments test t1
9DROP TABLE t1;
10
11--exec $DRIZZLE_MYSQL --ping
12
13--exec $DRIZZLE_SLAP_MYSQL
014
=== modified file 'tests/test-run.pl'
--- tests/test-run.pl 2009-12-21 05:34:07 +0000
+++ tests/test-run.pl 2010-01-13 08:03:15 +0000
@@ -271,6 +271,7 @@
271271
272our $opt_max_save_core= 5;272our $opt_max_save_core= 5;
273my $num_saved_cores= 0; # Number of core files saved in vardir/log/ so far.273my $num_saved_cores= 0; # Number of core files saved in vardir/log/ so far.
274our $mysql_port_offset= 50;
274275
275######################################################################276######################################################################
276#277#
@@ -930,6 +931,7 @@
930 path_pid => "$opt_vardir/run/master.pid",931 path_pid => "$opt_vardir/run/master.pid",
931 path_sock => "$sockdir/master.sock",932 path_sock => "$sockdir/master.sock",
932 port => $opt_master_myport,933 port => $opt_master_myport,
934 mysql_port => $opt_master_myport + $mysql_port_offset,
933 start_timeout => 400, # enough time create innodb tables935 start_timeout => 400, # enough time create innodb tables
934 cluster => 0, # index in clusters list936 cluster => 0, # index in clusters list
935 start_opts => [],937 start_opts => [],
@@ -945,6 +947,7 @@
945 path_pid => "$opt_vardir/run/master1.pid",947 path_pid => "$opt_vardir/run/master1.pid",
946 path_sock => "$sockdir/master1.sock",948 path_sock => "$sockdir/master1.sock",
947 port => $opt_master_myport + 1,949 port => $opt_master_myport + 1,
950 mysql_port => $opt_master_myport + 1 + $mysql_port_offset,
948 start_timeout => 400, # enough time create innodb tables951 start_timeout => 400, # enough time create innodb tables
949 cluster => 0, # index in clusters list952 cluster => 0, # index in clusters list
950 start_opts => [],953 start_opts => [],
@@ -957,9 +960,10 @@
957 idx => 0,960 idx => 0,
958 path_myddir => "$opt_vardir/slave-data",961 path_myddir => "$opt_vardir/slave-data",
959 path_myerr => "$opt_vardir/log/slave.err",962 path_myerr => "$opt_vardir/log/slave.err",
960 path_pid => "$opt_vardir/run/slave.pid",963 path_pid => "$opt_vardir/run/slave.pid",
961 path_sock => "$sockdir/slave.sock",964 path_sock => "$sockdir/slave.sock",
962 port => $opt_slave_myport,965 port => $opt_slave_myport,
966 mysql_port => $opt_slave_myport + $mysql_port_offset,
963 start_timeout => 400,967 start_timeout => 400,
964968
965 cluster => 1, # index in clusters list969 cluster => 1, # index in clusters list
@@ -973,9 +977,10 @@
973 idx => 1,977 idx => 1,
974 path_myddir => "$opt_vardir/slave1-data",978 path_myddir => "$opt_vardir/slave1-data",
975 path_myerr => "$opt_vardir/log/slave1.err",979 path_myerr => "$opt_vardir/log/slave1.err",
976 path_pid => "$opt_vardir/run/slave1.pid",980 path_pid => "$opt_vardir/run/slave1.pid",
977 path_sock => "$sockdir/slave1.sock",981 path_sock => "$sockdir/slave1.sock",
978 port => $opt_slave_myport + 1,982 port => $opt_slave_myport + 1,
983 mysql_port => $opt_slave_myport + 1 + $mysql_port_offset,
979 start_timeout => 300,984 start_timeout => 300,
980 cluster => -1, # index in clusters list985 cluster => -1, # index in clusters list
981 start_opts => [],986 start_opts => [],
@@ -988,9 +993,10 @@
988 idx => 2,993 idx => 2,
989 path_myddir => "$opt_vardir/slave2-data",994 path_myddir => "$opt_vardir/slave2-data",
990 path_myerr => "$opt_vardir/log/slave2.err",995 path_myerr => "$opt_vardir/log/slave2.err",
991 path_pid => "$opt_vardir/run/slave2.pid",996 path_pid => "$opt_vardir/run/slave2.pid",
992 path_sock => "$sockdir/slave2.sock",997 path_sock => "$sockdir/slave2.sock",
993 port => $opt_slave_myport + 2,998 port => $opt_slave_myport + 2,
999 mysql_port => $opt_slave_myport + 2 + $mysql_port_offset,
994 start_timeout => 300,1000 start_timeout => 300,
995 cluster => -1, # index in clusters list1001 cluster => -1, # index in clusters list
996 start_opts => [],1002 start_opts => [],
@@ -1434,6 +1440,9 @@
1434 # ----------------------------------------------------1440 # ----------------------------------------------------
1435 my $cmdline_mysqldump= generate_cmdline_mysqldump($master->[0]);1441 my $cmdline_mysqldump= generate_cmdline_mysqldump($master->[0]);
1436 my $cmdline_mysqldumpslave= generate_cmdline_mysqldump($slave->[0]);1442 my $cmdline_mysqldumpslave= generate_cmdline_mysqldump($slave->[0]);
1443 my $cmdline_mysqldumpmysql= mtr_native_path($exe_drizzledump) .
1444 " --no-defaults -uroot " .
1445 "--mysql --port=$master->[0]->{'mysql_port'} ";
14371446
1438 if ( $opt_debug )1447 if ( $opt_debug )
1439 {1448 {
@@ -1441,9 +1450,12 @@
1441 " --debug=d:t:A,$path_vardir_trace/log/mysqldump-master.trace";1450 " --debug=d:t:A,$path_vardir_trace/log/mysqldump-master.trace";
1442 $cmdline_mysqldumpslave .=1451 $cmdline_mysqldumpslave .=
1443 " --debug=d:t:A,$path_vardir_trace/log/mysqldump-slave.trace";1452 " --debug=d:t:A,$path_vardir_trace/log/mysqldump-slave.trace";
1453 $cmdline_mysqldumpmysql .=
1454 " --debug=d:t:A,$path_vardir_trace/log/mysqldump-mysql.trace";
1444 }1455 }
1445 $ENV{'DRIZZLE_DUMP'}= $cmdline_mysqldump;1456 $ENV{'DRIZZLE_DUMP'}= $cmdline_mysqldump;
1446 $ENV{'DRIZZLE_DUMP_SLAVE'}= $cmdline_mysqldumpslave;1457 $ENV{'DRIZZLE_DUMP_SLAVE'}= $cmdline_mysqldumpslave;
1458 $ENV{'DRIZZLE_DUMP_MYSQL'}= $cmdline_mysqldumpmysql;
14471459
1448 # ----------------------------------------------------1460 # ----------------------------------------------------
1449 # Setup env so childs can execute mysqlslap1461 # Setup env so childs can execute mysqlslap
@@ -1454,13 +1466,20 @@
1454 mtr_native_path($exe_drizzleslap) .1466 mtr_native_path($exe_drizzleslap) .
1455 " -uroot " .1467 " -uroot " .
1456 "--port=$master->[0]->{'port'} ";1468 "--port=$master->[0]->{'port'} ";
1469 my $cmdline_drizzleslapmysql=
1470 mtr_native_path($exe_drizzleslap) .
1471 " -uroot " .
1472 "--mysql --port=$master->[0]->{'mysql_port'} ";
14571473
1458 if ( $opt_debug )1474 if ( $opt_debug )
1459 {1475 {
1460 $cmdline_drizzleslap .=1476 $cmdline_drizzleslap .=
1461 " --debug=d:t:A,$path_vardir_trace/log/drizzleslap.trace";1477 " --debug=d:t:A,$path_vardir_trace/log/drizzleslap.trace";
1478 $cmdline_drizzleslapmysql .=
1479 " --debug=d:t:A,$path_vardir_trace/log/drizzleslap.trace";
1462 }1480 }
1463 $ENV{'DRIZZLE_SLAP'}= $cmdline_drizzleslap;1481 $ENV{'DRIZZLE_SLAP'}= $cmdline_drizzleslap;
1482 $ENV{'DRIZZLE_SLAP_MYSQL'}= $cmdline_drizzleslapmysql;
1464 }1483 }
14651484
14661485
@@ -1488,8 +1507,13 @@
1488 mtr_native_path($exe_drizzle) .1507 mtr_native_path($exe_drizzle) .
1489 " --no-defaults --host=localhost --user=root --password= " .1508 " --no-defaults --host=localhost --user=root --password= " .
1490 "--port=$master->[0]->{'port'} ";1509 "--port=$master->[0]->{'port'} ";
1510 my $cmdline_drizzlemysql=
1511 mtr_native_path($exe_drizzle) .
1512 " --no-defaults --host=localhost --user=root --password= " .
1513 "--mysql --port=$master->[0]->{'mysql_port'} ";
14911514
1492 $ENV{'MYSQL'}= $cmdline_mysql;1515 $ENV{'MYSQL'}= $cmdline_mysql;
1516 $ENV{'DRIZZLE_MYSQL'}= $cmdline_drizzlemysql;
14931517
1494 # ----------------------------------------------------1518 # ----------------------------------------------------
1495 # Setup env so childs can execute bug257141519 # Setup env so childs can execute bug25714
@@ -2470,10 +2494,10 @@
2470 $mysqld->{'path_pid'});2494 $mysqld->{'path_pid'});
24712495
2472 mtr_add_arg($args, "%s--drizzle-protocol-port=%d", $prefix,2496 mtr_add_arg($args, "%s--drizzle-protocol-port=%d", $prefix,
2473 $mysqld->{'port'});2497 $mysqld->{'port'});
24742498
2475 mtr_add_arg($args, "%s--mysql-protocol-port=%d", $prefix,2499 mtr_add_arg($args, "%s--mysql-protocol-port=%d", $prefix,
2476 $mysqld->{'port'} + 50);2500 $mysqld->{'mysql_port'});
24772501
2478 mtr_add_arg($args, "%s--datadir=%s", $prefix,2502 mtr_add_arg($args, "%s--datadir=%s", $prefix,
2479 $mysqld->{'path_myddir'});2503 $mysqld->{'path_myddir'});