Commit 68980477 authored by tsmith@ramayana.hindu.god's avatar tsmith@ramayana.hindu.god

Merge ramayana.hindu.god:/home/tsmith/m/bk/51

into  ramayana.hindu.god:/home/tsmith/m/bk/maint/51
parents bf95cf16 a0fbcc03
#!/bin/sh #!/bin/sh
#shift #shift
FROM=$USER@mysql.com if [ -n "$BK_USER" ]
then
COMMITTER=$BK_USER
else
COMMITTER=$USER
fi
FROM=$COMMITTER@mysql.com
COMMITS=commits@lists.mysql.com COMMITS=commits@lists.mysql.com
DOCS=docs-commit@mysql.com DOCS=docs-commit@mysql.com
LIMIT=10000 LIMIT=10000
...@@ -88,8 +94,8 @@ Subject: bk commit into $VERSION tree ($CHANGESET)$BS ...@@ -88,8 +94,8 @@ Subject: bk commit into $VERSION tree ($CHANGESET)$BS
X-CSetKey: <$CSETKEY> X-CSetKey: <$CSETKEY>
$BH $BH
Below is the list of changes that have just been committed into a local Below is the list of changes that have just been committed into a local
$VERSION repository of $USER. When $USER does a push these changes will $VERSION repository of $COMMITTER. When $COMMITTER does a push these changes
be propagated to the main repository and, within 24 hours after the will be propagated to the main repository and, within 24 hours after the
push, to the public repository. push, to the public repository.
For information on how to access the public repository For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
......
...@@ -60,7 +60,6 @@ enum options_client ...@@ -60,7 +60,6 @@ enum options_client
OPT_USE_THREADS, OPT_USE_THREADS,
OPT_IMPORT_USE_THREADS, OPT_IMPORT_USE_THREADS,
OPT_MYSQL_NUMBER_OF_QUERY, OPT_MYSQL_NUMBER_OF_QUERY,
OPT_MYSQL_PRESERVE_SCHEMA,
OPT_IGNORE_TABLE,OPT_INSERT_IGNORE,OPT_SHOW_WARNINGS,OPT_DROP_DATABASE, OPT_IGNORE_TABLE,OPT_INSERT_IGNORE,OPT_SHOW_WARNINGS,OPT_DROP_DATABASE,
OPT_TZ_UTC, OPT_AUTO_CLOSE, OPT_CREATE_SLAP_SCHEMA, OPT_TZ_UTC, OPT_AUTO_CLOSE, OPT_CREATE_SLAP_SCHEMA,
OPT_SLAP_CSV, OPT_SLAP_CREATE_STRING, OPT_SLAP_CSV, OPT_SLAP_CREATE_STRING,
......
...@@ -1290,9 +1290,7 @@ static bool add_line(String &buffer,char *line,char *in_string, ...@@ -1290,9 +1290,7 @@ static bool add_line(String &buffer,char *line,char *in_string,
if (status.add_to_history && line[0] && not_in_history(line)) if (status.add_to_history && line[0] && not_in_history(line))
add_history(line); add_history(line);
#endif #endif
#ifdef USE_MB
char *end_of_line=line+(uint) strlen(line); char *end_of_line=line+(uint) strlen(line);
#endif
for (pos=out=line ; (inchar= (uchar) *pos) ; pos++) for (pos=out=line ; (inchar= (uchar) *pos) ; pos++)
{ {
...@@ -1382,7 +1380,7 @@ static bool add_line(String &buffer,char *line,char *in_string, ...@@ -1382,7 +1380,7 @@ static bool add_line(String &buffer,char *line,char *in_string,
} }
} }
else if (!*ml_comment && !*in_string && else if (!*ml_comment && !*in_string &&
strlen(pos) >= 10 && (end_of_line - pos) >= 10 &&
!my_strnncoll(charset_info, (uchar*) pos, 10, !my_strnncoll(charset_info, (uchar*) pos, 10,
(const uchar*) "delimiter ", 10)) (const uchar*) "delimiter ", 10))
{ {
......
...@@ -131,7 +131,8 @@ const char *delimiter= "\n"; ...@@ -131,7 +131,8 @@ const char *delimiter= "\n";
const char *create_schema_string= "mysqlslap"; const char *create_schema_string= "mysqlslap";
static my_bool opt_preserve= 0, debug_info_flag= 0, debug_check_flag= 0; static my_bool opt_preserve= TRUE;
static my_bool debug_info_flag= 0, debug_check_flag= 0;
static my_bool opt_only_print= FALSE; static my_bool opt_only_print= FALSE;
static my_bool opt_compress= FALSE, tty_password= FALSE, static my_bool opt_compress= FALSE, tty_password= FALSE,
opt_silent= FALSE, opt_silent= FALSE,
...@@ -508,12 +509,12 @@ static struct my_option my_long_options[] = ...@@ -508,12 +509,12 @@ static struct my_option my_long_options[] =
(uchar**) &auto_generate_sql, (uchar**) &auto_generate_sql, (uchar**) &auto_generate_sql, (uchar**) &auto_generate_sql,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"auto-generate-sql-add-autoincrement", OPT_SLAP_AUTO_GENERATE_ADD_AUTO, {"auto-generate-sql-add-autoincrement", OPT_SLAP_AUTO_GENERATE_ADD_AUTO,
"Add autoincrement to auto-generated tables.", "Add an AUTO_INCREMENT column to auto-generated tables.",
(uchar**) &auto_generate_sql_autoincrement, (uchar**) &auto_generate_sql_autoincrement,
(uchar**) &auto_generate_sql_autoincrement, (uchar**) &auto_generate_sql_autoincrement,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"auto-generate-sql-execute-number", OPT_SLAP_AUTO_GENERATE_EXECUTE_QUERIES, {"auto-generate-sql-execute-number", OPT_SLAP_AUTO_GENERATE_EXECUTE_QUERIES,
"Set this number to generate a set number of queries to run.\n", "Set this number to generate a set number of queries to run.",
(uchar**) &auto_actual_queries, (uchar**) &auto_actual_queries, (uchar**) &auto_actual_queries, (uchar**) &auto_actual_queries,
0, GET_ULL, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_ULL, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"auto-generate-sql-guid-primary", OPT_SLAP_AUTO_GENERATE_GUID_PRIMARY, {"auto-generate-sql-guid-primary", OPT_SLAP_AUTO_GENERATE_GUID_PRIMARY,
...@@ -522,32 +523,32 @@ static struct my_option my_long_options[] = ...@@ -522,32 +523,32 @@ static struct my_option my_long_options[] =
(uchar**) &auto_generate_sql_guid_primary, (uchar**) &auto_generate_sql_guid_primary,
0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
{"auto-generate-sql-load-type", OPT_SLAP_AUTO_GENERATE_SQL_LOAD_TYPE, {"auto-generate-sql-load-type", OPT_SLAP_AUTO_GENERATE_SQL_LOAD_TYPE,
"Load types are mixed, update, write, key, or read. Default is mixed\n", "Specify test load type: mixed, update, write, key, or read; default is mixed.",
(uchar**) &auto_generate_sql_type, (uchar**) &auto_generate_sql_type, (uchar**) &auto_generate_sql_type, (uchar**) &auto_generate_sql_type,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"auto-generate-sql-secondary-indexes", {"auto-generate-sql-secondary-indexes",
OPT_SLAP_AUTO_GENERATE_SECONDARY_INDEXES, OPT_SLAP_AUTO_GENERATE_SECONDARY_INDEXES,
"Number of secondary indexes to add auto-generated tables.", "Number of secondary indexes to add to auto-generated tables.",
(uchar**) &auto_generate_sql_secondary_indexes, (uchar**) &auto_generate_sql_secondary_indexes,
(uchar**) &auto_generate_sql_secondary_indexes, 0, (uchar**) &auto_generate_sql_secondary_indexes, 0,
GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"auto-generate-sql-unique-query-number", {"auto-generate-sql-unique-query-number",
OPT_SLAP_AUTO_GENERATE_UNIQUE_QUERY_NUM, OPT_SLAP_AUTO_GENERATE_UNIQUE_QUERY_NUM,
"Number of unique queries auto tests", "Number of unique queries to generate for automatic tests.",
(uchar**) &auto_generate_sql_unique_query_number, (uchar**) &auto_generate_sql_unique_query_number,
(uchar**) &auto_generate_sql_unique_query_number, (uchar**) &auto_generate_sql_unique_query_number,
0, GET_ULL, REQUIRED_ARG, 10, 0, 0, 0, 0, 0}, 0, GET_ULL, REQUIRED_ARG, 10, 0, 0, 0, 0, 0},
{"auto-generate-sql-unique-write-number", {"auto-generate-sql-unique-write-number",
OPT_SLAP_AUTO_GENERATE_UNIQUE_WRITE_NUM, OPT_SLAP_AUTO_GENERATE_UNIQUE_WRITE_NUM,
"Number of unique queries for auto-generate-sql-write-number", "Number of unique queries to generate for auto-generate-sql-write-number.",
(uchar**) &auto_generate_sql_unique_write_number, (uchar**) &auto_generate_sql_unique_write_number,
(uchar**) &auto_generate_sql_unique_write_number, (uchar**) &auto_generate_sql_unique_write_number,
0, GET_ULL, REQUIRED_ARG, 10, 0, 0, 0, 0, 0}, 0, GET_ULL, REQUIRED_ARG, 10, 0, 0, 0, 0, 0},
{"auto-generate-sql-write-number", OPT_SLAP_AUTO_GENERATE_WRITE_NUM, {"auto-generate-sql-write-number", OPT_SLAP_AUTO_GENERATE_WRITE_NUM,
"Number of rows to insert to used in read and write loads (default is 100).\n", "Number of row inserts to perform for each thread (default is 100).",
(uchar**) &auto_generate_sql_number, (uchar**) &auto_generate_sql_number, (uchar**) &auto_generate_sql_number, (uchar**) &auto_generate_sql_number,
0, GET_ULL, REQUIRED_ARG, 100, 0, 0, 0, 0, 0}, 0, GET_ULL, REQUIRED_ARG, 100, 0, 0, 0, 0, 0},
{"commit", OPT_SLAP_COMMIT, "Commit records after X number of statements.", {"commit", OPT_SLAP_COMMIT, "Commit records every X number of statements.",
(uchar**) &commit_rate, (uchar**) &commit_rate, 0, GET_UINT, REQUIRED_ARG, (uchar**) &commit_rate, (uchar**) &commit_rate, 0, GET_UINT, REQUIRED_ARG,
0, 0, 0, 0, 0, 0}, 0, 0, 0, 0, 0, 0},
{"compress", 'C', "Use compression in server/client protocol.", {"compress", 'C', "Use compression in server/client protocol.",
...@@ -566,9 +567,14 @@ static struct my_option my_long_options[] = ...@@ -566,9 +567,14 @@ static struct my_option my_long_options[] =
"Generate CSV output to named file or to stdout if no file is named.", "Generate CSV output to named file or to stdout if no file is named.",
(uchar**) &opt_csv_str, (uchar**) &opt_csv_str, 0, GET_STR, (uchar**) &opt_csv_str, (uchar**) &opt_csv_str, 0, GET_STR,
OPT_ARG, 0, 0, 0, 0, 0, 0}, OPT_ARG, 0, 0, 0, 0, 0, 0},
#ifdef DBUG_OFF
{"debug", '#', "This is a non-debug version. Catch this and exit.",
0, 0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0},
#else
{"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.", {"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.",
(uchar**) &default_dbug_option, (uchar**) &default_dbug_option, 0, GET_STR, (uchar**) &default_dbug_option, (uchar**) &default_dbug_option, 0, GET_STR,
OPT_ARG, 0, 0, 0, 0, 0, 0}, OPT_ARG, 0, 0, 0, 0, 0, 0},
#endif
{"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit .", {"debug-check", OPT_DEBUG_CHECK, "Check memory and open file usage at exit .",
(uchar**) &debug_check_flag, (uchar**) &debug_check_flag, 0, (uchar**) &debug_check_flag, (uchar**) &debug_check_flag, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0}, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
...@@ -578,7 +584,8 @@ static struct my_option my_long_options[] = ...@@ -578,7 +584,8 @@ static struct my_option my_long_options[] =
"Delimiter to use in SQL statements supplied in file or command line.", "Delimiter to use in SQL statements supplied in file or command line.",
(uchar**) &delimiter, (uchar**) &delimiter, 0, GET_STR, REQUIRED_ARG, (uchar**) &delimiter, (uchar**) &delimiter, 0, GET_STR, REQUIRED_ARG,
0, 0, 0, 0, 0, 0}, 0, 0, 0, 0, 0, 0},
{"detach", OPT_SLAP_DETACH, "Detach connections after X number of requests.", {"detach", OPT_SLAP_DETACH,
"Detach (close and reopen) connections after X number of requests.",
(uchar**) &detach_rate, (uchar**) &detach_rate, 0, GET_UINT, REQUIRED_ARG, (uchar**) &detach_rate, (uchar**) &detach_rate, 0, GET_UINT, REQUIRED_ARG,
0, 0, 0, 0, 0, 0}, 0, 0, 0, 0, 0, 0},
{"engine", 'e', "Storage engine to use for creating the table.", {"engine", 'e', "Storage engine to use for creating the table.",
...@@ -589,11 +596,11 @@ static struct my_option my_long_options[] = ...@@ -589,11 +596,11 @@ static struct my_option my_long_options[] =
{"iterations", 'i', "Number of times to run the tests.", (uchar**) &iterations, {"iterations", 'i', "Number of times to run the tests.", (uchar**) &iterations,
(uchar**) &iterations, 0, GET_UINT, REQUIRED_ARG, 1, 0, 0, 0, 0, 0}, (uchar**) &iterations, 0, GET_UINT, REQUIRED_ARG, 1, 0, 0, 0, 0, 0},
{"number-char-cols", 'x', {"number-char-cols", 'x',
"Number of VARCHAR columns to create table with if specifying --auto-generate-sql ", "Number of VARCHAR columns to create in table if specifying --auto-generate-sql.",
(uchar**) &num_char_cols_opt, (uchar**) &num_char_cols_opt, 0, GET_STR, REQUIRED_ARG, (uchar**) &num_char_cols_opt, (uchar**) &num_char_cols_opt, 0, GET_STR, REQUIRED_ARG,
0, 0, 0, 0, 0, 0}, 0, 0, 0, 0, 0, 0},
{"number-int-cols", 'y', {"number-int-cols", 'y',
"Number of INT columns to create table with if specifying --auto-generate-sql.", "Number of INT columns to create in table if specifying --auto-generate-sql.",
(uchar**) &num_int_cols_opt, (uchar**) &num_int_cols_opt, 0, GET_STR, REQUIRED_ARG, (uchar**) &num_int_cols_opt, (uchar**) &num_int_cols_opt, 0, GET_STR, REQUIRED_ARG,
0, 0, 0, 0, 0, 0}, 0, 0, 0, 0, 0, 0},
{"number-of-queries", OPT_MYSQL_NUMBER_OF_QUERY, {"number-of-queries", OPT_MYSQL_NUMBER_OF_QUERY,
...@@ -616,30 +623,25 @@ static struct my_option my_long_options[] = ...@@ -616,30 +623,25 @@ static struct my_option my_long_options[] =
(uchar**) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, MYSQL_PORT, 0, 0, 0, 0, (uchar**) &opt_mysql_port, 0, GET_UINT, REQUIRED_ARG, MYSQL_PORT, 0, 0, 0, 0,
0}, 0},
{"post-query", OPT_SLAP_POST_QUERY, {"post-query", OPT_SLAP_POST_QUERY,
"Query to run or file containing query to run after executing.", "Query to run or file containing query to execute after tests have completed.",
(uchar**) &user_supplied_post_statements, (uchar**) &user_supplied_post_statements,
(uchar**) &user_supplied_post_statements, (uchar**) &user_supplied_post_statements,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"post-system", OPT_SLAP_POST_SYSTEM, {"post-system", OPT_SLAP_POST_SYSTEM,
"System() string to run after the load has completed.", "system() string to execute after tests have completed.",
(uchar**) &post_system, (uchar**) &post_system,
(uchar**) &post_system, (uchar**) &post_system,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"pre-query", OPT_SLAP_PRE_QUERY, {"pre-query", OPT_SLAP_PRE_QUERY,
"Query to run or file containing query to run before executing.", "Query to run or file containing query to execute before running tests.",
(uchar**) &user_supplied_pre_statements, (uchar**) &user_supplied_pre_statements,
(uchar**) &user_supplied_pre_statements, (uchar**) &user_supplied_pre_statements,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"pre-system", OPT_SLAP_PRE_SYSTEM, {"pre-system", OPT_SLAP_PRE_SYSTEM,
"System() string to before load has completed.", "system() string to execute before running tests.",
(uchar**) &pre_system, (uchar**) &pre_system,
(uchar**) &pre_system, (uchar**) &pre_system,
0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"preserve-schema", OPT_MYSQL_PRESERVE_SCHEMA,
"Preserve the schema from the mysqlslap run, this happens unless "
"--auto-generate-sql or --create are used.",
(uchar**) &opt_preserve, (uchar**) &opt_preserve, 0, GET_BOOL,
NO_ARG, TRUE, 0, 0, 0, 0, 0},
{"protocol", OPT_MYSQL_PROTOCOL, {"protocol", OPT_MYSQL_PROTOCOL,
"The protocol of connection (tcp,socket,pipe,memory).", "The protocol of connection (tcp,socket,pipe,memory).",
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
...@@ -664,7 +666,7 @@ static struct my_option my_long_options[] = ...@@ -664,7 +666,7 @@ static struct my_option my_long_options[] =
(uchar**) &user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, (uchar**) &user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#endif #endif
{"verbose", 'v', {"verbose", 'v',
"More verbose output; You can use this multiple times to get even more " "More verbose output; you can use this multiple times to get even more "
"verbose output.", (uchar**) &verbose, (uchar**) &verbose, 0, "verbose output.", (uchar**) &verbose, (uchar**) &verbose, 0,
GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
{"version", 'V', "Output version information and exit.", 0, 0, 0, GET_NO_ARG, {"version", 'V', "Output version information and exit.", 0, 0, 0, GET_NO_ARG,
...@@ -1140,12 +1142,9 @@ get_options(int *argc,char ***argv) ...@@ -1140,12 +1142,9 @@ get_options(int *argc,char ***argv)
if (!user) if (!user)
user= (char *)"root"; user= (char *)"root";
/* If something is created we clean it up, otherwise we leave schemas alone */
if (create_string || auto_generate_sql) if (create_string || auto_generate_sql)
{
if (verbose >= 1)
fprintf(stderr, "Turning off preserve-schema!\n");
opt_preserve= FALSE; opt_preserve= FALSE;
}
if (auto_generate_sql && (create_string || user_supplied_query)) if (auto_generate_sql && (create_string || user_supplied_query))
{ {
...@@ -1767,7 +1766,8 @@ run_scheduler(stats *sptr, statement *stmts, uint concur, ulonglong limit) ...@@ -1767,7 +1766,8 @@ run_scheduler(stats *sptr, statement *stmts, uint concur, ulonglong limit)
pthread_handler_t run_task(void *p) pthread_handler_t run_task(void *p)
{ {
ulonglong counter= 0, queries; ulonglong counter= 0, queries;
ulonglong trans_counter; ulonglong detach_counter;
unsigned int commit_counter;
MYSQL *mysql; MYSQL *mysql;
MYSQL_RES *result; MYSQL_RES *result;
MYSQL_ROW row; MYSQL_ROW row;
...@@ -1811,12 +1811,16 @@ pthread_handler_t run_task(void *p) ...@@ -1811,12 +1811,16 @@ pthread_handler_t run_task(void *p)
printf("connected!\n"); printf("connected!\n");
queries= 0; queries= 0;
commit_counter= 0;
if (commit_rate)
run_query(mysql, "SET AUTOCOMMIT=0", strlen("SET AUTOCOMMIT=0"));
limit_not_met: limit_not_met:
for (ptr= con->stmt, trans_counter= 0; for (ptr= con->stmt, detach_counter= 0;
ptr && ptr->length; ptr && ptr->length;
ptr= ptr->next, trans_counter++) ptr= ptr->next, detach_counter++)
{ {
if (!opt_only_print && detach_rate && !(trans_counter % detach_rate)) if (!opt_only_print && detach_rate && !(detach_counter % detach_rate))
{ {
mysql_close(mysql); mysql_close(mysql);
...@@ -1890,8 +1894,11 @@ pthread_handler_t run_task(void *p) ...@@ -1890,8 +1894,11 @@ pthread_handler_t run_task(void *p)
} while(mysql_next_result(mysql) == 0); } while(mysql_next_result(mysql) == 0);
queries++; queries++;
if (commit_rate && commit_rate <= trans_counter) if (commit_rate && (++commit_counter == commit_rate))
{
commit_counter= 0;
run_query(mysql, "COMMIT", strlen("COMMIT")); run_query(mysql, "COMMIT", strlen("COMMIT"));
}
if (con->limit && queries == con->limit) if (con->limit && queries == con->limit)
goto end; goto end;
......
...@@ -504,13 +504,8 @@ sub command_line_setup () { ...@@ -504,13 +504,8 @@ sub command_line_setup () {
my $opt_comment; my $opt_comment;
$opt_master_myport= 9306; # Magic number -69.4 results in traditional test ports starting from 9306.
$opt_slave_myport= 9308; set_mtr_build_thread_ports(-69.4);
$opt_ndbcluster_port= 9310;
$opt_ndbcluster_port_slave= 9311;
$im_port= 9312;
$im_mysqld1_port= 9313;
$im_mysqld2_port= 9314;
# If so requested, we try to avail ourselves of a unique build thread number. # If so requested, we try to avail ourselves of a unique build thread number.
if ( $ENV{'MTR_BUILD_THREAD'} ) { if ( $ENV{'MTR_BUILD_THREAD'} ) {
...@@ -1369,6 +1364,7 @@ sub set_mtr_build_thread_ports($) { ...@@ -1369,6 +1364,7 @@ sub set_mtr_build_thread_ports($) {
} }
# Up to two masters, up to three slaves # Up to two masters, up to three slaves
# A magic value in command_line_setup depends on these equations.
$opt_master_myport= $mtr_build_thread * 10 + 10000; # and 1 $opt_master_myport= $mtr_build_thread * 10 + 10000; # and 1
$opt_slave_myport= $opt_master_myport + 2; # and 3 4 $opt_slave_myport= $opt_master_myport + 2; # and 3 4
$opt_ndbcluster_port= $opt_master_myport + 5; $opt_ndbcluster_port= $opt_master_myport + 5;
......
set autocommit=1;
reset master;
create table bug16206 (a int);
insert into bug16206 values(1);
start transaction;
insert into bug16206 values(2);
commit;
show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info
f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4
f n Query 1 n use `test`; create table bug16206 (a int)
f n Query 1 n use `test`; insert into bug16206 values(1)
f n Query 1 n use `test`; insert into bug16206 values(2)
drop table bug16206;
reset master;
create table bug16206 (a int) engine= bdb;
insert into bug16206 values(0);
insert into bug16206 values(1);
start transaction;
insert into bug16206 values(2);
commit;
insert into bug16206 values(3);
show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info
f n Format_desc 1 n Server ver: VERSION, Binlog ver: 4
f n Query 1 n use `test`; create table bug16206 (a int) engine= bdb
f n Query 1 n use `test`; insert into bug16206 values(0)
f n Query 1 n use `test`; insert into bug16206 values(1)
f n Query 1 n use `test`; BEGIN
f n Query 1 n use `test`; insert into bug16206 values(2)
f n Query 1 n use `test`; COMMIT
f n Query 1 n use `test`; insert into bug16206 values(3)
drop table bug16206;
set autocommit=0;
End of 5.0 tests
...@@ -177,13 +177,17 @@ INSERT INTO t1 VALUES (1, 'This is a test'); ...@@ -177,13 +177,17 @@ INSERT INTO t1 VALUES (1, 'This is a test');
insert into t2 values ('test', 'test2'); insert into t2 values ('test', 'test2');
SET AUTOCOMMIT=0; SET AUTOCOMMIT=0;
SHOW TABLES; SHOW TABLES;
SET AUTOCOMMIT=0;
select * from t1; select * from t1;
COMMIT;
select * from t2; select * from t2;
COMMIT; COMMIT;
select * from t1; select * from t1;
COMMIT;
select * from t2; select * from t2;
COMMIT; COMMIT;
select * from t1; select * from t1;
COMMIT;
select * from t2; select * from t2;
COMMIT; COMMIT;
COMMIT; COMMIT;
...@@ -199,13 +203,17 @@ INSERT INTO t1 VALUES (1, 'This is a test'); ...@@ -199,13 +203,17 @@ INSERT INTO t1 VALUES (1, 'This is a test');
insert into t2 values ('test', 'test2'); insert into t2 values ('test', 'test2');
SET AUTOCOMMIT=0; SET AUTOCOMMIT=0;
SHOW TABLES; SHOW TABLES;
SET AUTOCOMMIT=0;
select * from t1; select * from t1;
COMMIT;
select * from t2; select * from t2;
COMMIT; COMMIT;
select * from t1; select * from t1;
COMMIT;
select * from t2; select * from t2;
COMMIT; COMMIT;
select * from t1; select * from t1;
COMMIT;
select * from t2; select * from t2;
COMMIT; COMMIT;
COMMIT; COMMIT;
......
-- source include/not_embedded.inc
-- source include/have_bdb.inc
#
# Bug #16206: Superfluous COMMIT event in binlog when updating BDB in autocommit mode
#
set autocommit=1;
let $VERSION=`select version()`;
reset master;
create table bug16206 (a int);
insert into bug16206 values(1);
start transaction;
insert into bug16206 values(2);
commit;
--replace_result $VERSION VERSION
--replace_column 1 f 2 n 5 n
show binlog events;
drop table bug16206;
reset master;
create table bug16206 (a int) engine= bdb;
insert into bug16206 values(0);
insert into bug16206 values(1);
start transaction;
insert into bug16206 values(2);
commit;
insert into bug16206 values(3);
--replace_result $VERSION VERSION
--replace_column 1 f 2 n 5 n
show binlog events;
drop table bug16206;
set autocommit=0;
--echo End of 5.0 tests
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/mode.h> #include <sys/mode.h>
#include "my_manage.h" #include "my_manage.h"
#include "mysql_version.h"
#ifdef __NETWARE__ #ifdef __NETWARE__
#define strindex(a,b) ((char*)strindex(a,b)) #define strindex(a,b) ((char*)strindex(a,b))
#define strstr(a,b) ((char*)strstr(a,b)) #define strstr(a,b) ((char*)strstr(a,b))
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
#include "my_config.h" #include "my_config.h"
#include "my_manage.h" #include "my_manage.h"
#include "mysql_version.h"
/****************************************************************************** /******************************************************************************
......
...@@ -324,6 +324,16 @@ then ...@@ -324,6 +324,16 @@ then
args="$args --user=$user" args="$args --user=$user"
fi fi
# When doing a "cross bootstrap" install, no reference to the current
# host should be added to the system tables. So we filter out any
# lines which contain the current host name.
if test $cross_bootstrap -eq 1
then
filter_cmd_line="sed -e '/@current_hostname/d'"
else
filter_cmd_line="cat"
fi
# Configure mysqld command line # Configure mysqld command line
mysqld_bootstrap="${MYSQLD_BOOTSTRAP-$mysqld}" mysqld_bootstrap="${MYSQLD_BOOTSTRAP-$mysqld}"
mysqld_install_cmd_line="$mysqld_bootstrap $defaults $mysqld_opt --bootstrap \ mysqld_install_cmd_line="$mysqld_bootstrap $defaults $mysqld_opt --bootstrap \
...@@ -367,7 +377,7 @@ else ...@@ -367,7 +377,7 @@ else
fi fi
s_echo "Filling help tables..." s_echo "Filling help tables..."
if `(echo "use mysql;"; cat $fill_help_tables) | $mysqld_install_cmd_line` if { echo "use mysql;"; cat $fill_help_tables; } | $mysqld_install_cmd_line > /dev/null
then then
s_echo "OK" s_echo "OK"
else else
...@@ -377,12 +387,14 @@ else ...@@ -377,12 +387,14 @@ else
fi fi
# Don't output verbose information if running inside bootstrap or using # Don't output verbose information if running inside bootstrap or using
# --srcdir for testing. # --srcdir for testing. In such cases, there's no end user looking at
# the screen.
if test "$cross_bootstrap" -eq 0 && test -z "$srcdir" if test "$cross_bootstrap" -eq 0 && test -z "$srcdir"
then then
s_echo s_echo
s_echo "To start mysqld at boot time you have to copy" s_echo "To start mysqld at boot time you have to copy"
s_echo "support-files/mysql.server to the right place for your system" s_echo "support-files/mysql.server to the right place for your system"
echo echo
echo "PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !" echo "PLEASE REMEMBER TO SET A PASSWORD FOR THE MySQL root USER !"
echo "To do so, start the server, then issue the following commands:" echo "To do so, start the server, then issue the following commands:"
...@@ -401,8 +413,10 @@ then ...@@ -401,8 +413,10 @@ then
if test "$in_rpm" -eq 0 if test "$in_rpm" -eq 0
then then
echo
echo "You can start the MySQL daemon with:" echo "You can start the MySQL daemon with:"
echo "cd $basedir ; $bindir/mysqld_safe &" echo "cd $basedir ; $bindir/mysqld_safe &"
echo
echo "You can test the MySQL daemon with mysql-test-run.pl" echo "You can test the MySQL daemon with mysql-test-run.pl"
echo "cd $basedir/mysql-test ; perl mysql-test-run.pl" echo "cd $basedir/mysql-test ; perl mysql-test-run.pl"
fi fi
......
...@@ -482,7 +482,7 @@ sp_head::operator new(size_t size) throw() ...@@ -482,7 +482,7 @@ sp_head::operator new(size_t size) throw()
} }
void void
sp_head::operator delete(void *ptr, size_t size) sp_head::operator delete(void *ptr, size_t size) throw()
{ {
DBUG_ENTER("sp_head::operator delete"); DBUG_ENTER("sp_head::operator delete");
MEM_ROOT own_root; MEM_ROOT own_root;
......
...@@ -207,7 +207,12 @@ uint build_table_filename(char *buff, size_t bufflen, const char *db, ...@@ -207,7 +207,12 @@ uint build_table_filename(char *buff, size_t bufflen, const char *db,
if (pos - rootdir_len >= buff && if (pos - rootdir_len >= buff &&
memcmp(pos - rootdir_len, FN_ROOTDIR, rootdir_len) != 0) memcmp(pos - rootdir_len, FN_ROOTDIR, rootdir_len) != 0)
pos= strnmov(pos, FN_ROOTDIR, end - pos); pos= strnmov(pos, FN_ROOTDIR, end - pos);
pos= strxnmov(pos, end - pos, dbbuff, FN_ROOTDIR, tbbuff, ext, NullS); pos= strxnmov(pos, end - pos, dbbuff, FN_ROOTDIR, NullS);
#ifdef USE_SYMDIR
unpack_dirname(buff, buff);
pos= strend(buff);
#endif
pos= strxnmov(pos, end - pos, tbbuff, ext, NullS);
DBUG_PRINT("exit", ("buff: '%s'", buff)); DBUG_PRINT("exit", ("buff: '%s'", buff));
DBUG_RETURN(pos - buff); DBUG_RETURN(pos - buff);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment