diff options
author | unknown <msvensson@pilot.mysql.com> | 2008-05-02 19:42:34 +0200 |
---|---|---|
committer | unknown <msvensson@pilot.mysql.com> | 2008-05-02 19:42:34 +0200 |
commit | 390b57f2ac568e54429a099abe1bf3a49abe3d27 (patch) | |
tree | 995e2746501fc9ed2e5051533c475dc88ac48b4c /client | |
parent | ca0939d57d8b891080c27bf1aa56e297213249b9 (diff) | |
parent | 6add5be771fc955d2f22b1eb0f14596a5bac1ca0 (diff) | |
download | mariadb-git-390b57f2ac568e54429a099abe1bf3a49abe3d27.tar.gz |
Merge pilot.mysql.com:/data/msvensson/mysql/my50-bt-36463
into pilot.mysql.com:/data/msvensson/mysql/mysql-5.1-bugteam
client/mysqltest.c:
Auto merged
dbug/dbug.c:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
client/mysql_upgrade.c:
SCCS merged
Diffstat (limited to 'client')
-rw-r--r-- | client/mysql_upgrade.c | 11 | ||||
-rw-r--r-- | client/mysqltest.c | 2 |
2 files changed, 11 insertions, 2 deletions
diff --git a/client/mysql_upgrade.c b/client/mysql_upgrade.c index 6d0e78509a8..6c5ca039a41 100644 --- a/client/mysql_upgrade.c +++ b/client/mysql_upgrade.c @@ -43,6 +43,8 @@ static DYNAMIC_STRING ds_args; static char *opt_password= 0; static my_bool tty_password= 0; +static char opt_tmpdir[FN_REFLEN]; + #ifndef DBUG_OFF static char *default_dbug_option= (char*) "d:t:O,/tmp/mysql_upgrade.trace"; #endif @@ -113,6 +115,8 @@ static struct my_option my_long_options[]= #endif {"socket", 'S', "Socket file to use for connection.", 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, + {"tmpdir", 't', "Directory for temporary files", + 0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, {"user", 'u', "User for login if not current user.", (uchar**) &opt_user, (uchar**) &opt_user, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0}, #include <sslopt-longopts.h> @@ -239,6 +243,11 @@ get_one_option(int optid, const struct my_option *opt, } break; + case 't': + strnmov(opt_tmpdir, argument, sizeof(opt_tmpdir)); + add_option= FALSE; + break; + case 'b': /* --basedir */ case 'v': /* --verbose */ case 'd': /* --datadir */ @@ -460,7 +469,7 @@ static int run_query(const char *query, DYNAMIC_STRING *ds_res, char query_file_path[FN_REFLEN]; DBUG_ENTER("run_query"); DBUG_PRINT("enter", ("query: %s", query)); - if ((fd= create_temp_file(query_file_path, NULL, + if ((fd= create_temp_file(query_file_path, opt_tmpdir, "sql", O_CREAT | O_SHARE | O_RDWR, MYF(MY_WME))) < 0) die("Failed to create temporary file for defaults"); diff --git a/client/mysqltest.c b/client/mysqltest.c index 0360a8e4ba9..3187265e6f0 100644 --- a/client/mysqltest.c +++ b/client/mysqltest.c @@ -1520,7 +1520,7 @@ int dyn_string_cmp(DYNAMIC_STRING* ds, const char *fname) DBUG_ENTER("dyn_string_cmp"); DBUG_PRINT("enter", ("fname: %s", fname)); - if ((fd= create_temp_file(temp_file_path, NULL, + if ((fd= create_temp_file(temp_file_path, TMPDIR, "tmp", O_CREAT | O_SHARE | O_RDWR, MYF(MY_WME))) < 0) die("Failed to create temporary file for ds"); |