diff --git a/client/mysql_upgrade.c b/client/mysql_upgrade.c index 78e4acd4c1d..551be79fc99 100644 --- a/client/mysql_upgrade.c +++ b/client/mysql_upgrade.c @@ -135,7 +135,9 @@ static int create_check_file(const char *path) if (check_file < 0) return 1; - error= my_write(check_file, VERSION, strlen(VERSION), MYF(MY_WME | MY_FNABP)); + error= my_write(check_file, + MYSQL_SERVER_VERSION, strlen(MYSQL_SERVER_VERSION), + MYF(MY_WME | MY_FNABP)); error= my_close(check_file, MYF(MY_FAE | MY_WME)) || error; return error; } @@ -243,7 +245,7 @@ int main(int argc, char **argv) && (test_file_exists("./bin", "mysqld") || test_file_exists("./libexec", "mysqld"))) { - getcwd(bindir, sizeof(bindir)); + my_getwd(bindir, sizeof(bindir), MYF(0)); bindir_end= bindir + strlen(bindir); } else diff --git a/client/mysqltest.c b/client/mysqltest.c index b630de8be4e..21ca1d6e3a1 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -153,7 +153,7 @@ static uint global_expected_errors; /* ************************************************************************ */ -static int record = 0, opt_sleep=0; +static int record= 0, opt_sleep= -1; static char *db = 0, *pass=0; const char *user = 0, *host = 0, *unix_sock = 0, *opt_basedir="./"; const char *opt_include= 0; @@ -1880,11 +1880,12 @@ int do_sleep(struct st_query *query, my_bool real_sleep) query->first_argument); /* Fixed sleep time selected by --sleep option */ - if (opt_sleep && !real_sleep) + if (opt_sleep >= 0 && !real_sleep) sleep_val= opt_sleep; DBUG_PRINT("info", ("sleep_val: %f", sleep_val)); - my_sleep((ulong) (sleep_val * 1000000L)); + if (sleep_val) + my_sleep((ulong) (sleep_val * 1000000L)); query->last_argument= sleep_end; return 0; } @@ -3310,7 +3311,7 @@ static struct my_option my_long_options[] = "Don't use the memory allocation checking.", 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}, {"sleep", 'T', "Sleep always this many seconds on sleep commands.", - (gptr*) &opt_sleep, (gptr*) &opt_sleep, 0, GET_INT, REQUIRED_ARG, 0, 0, 0, + (gptr*) &opt_sleep, (gptr*) &opt_sleep, 0, GET_INT, REQUIRED_ARG, -1, 0, 0, 0, 0, 0}, {"socket", 'S', "Socket file to use for connection.", (gptr*) &unix_sock, (gptr*) &unix_sock, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, diff --git a/include/config-win.h b/include/config-win.h index b6fb1077cc6..6d0f40adbd3 100644 --- a/include/config-win.h +++ b/include/config-win.h @@ -382,6 +382,7 @@ inline double ulonglong2double(ulonglong value) #include #else #define DEFAULT_MYSQL_HOME "c:\\mysql" +#define DATADIR "c:\\mysql\\data" #define PACKAGE "mysql" #define DEFAULT_BASEDIR "C:\\" #define SHAREDIR "share" diff --git a/sql/repl_failsafe.cc b/sql/repl_failsafe.cc index e207a0bf633..9cabe1a3df0 100644 --- a/sql/repl_failsafe.cc +++ b/sql/repl_failsafe.cc @@ -861,7 +861,8 @@ bool load_master_data(THD* thd) if (!rpl_filter->db_ok(db) || !rpl_filter->db_ok_with_wild_table(db) || - !strcmp(db,"mysql")) + !strcmp(db,"mysql") || + is_schema_db(db)) { *cur_table_res = 0; continue;