mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
--tmpdir=dir1:dir2... uses (is_windows ? ";" : ":") as a delimiter
This commit is contained in:
parent
c05fc7c9bd
commit
2b70d7e567
3 changed files with 25 additions and 8 deletions
|
@ -340,7 +340,13 @@ static void usage(void)
|
|||
this option is deprecated; you can set variables\n\
|
||||
directly with '--variable-name=value'.\n\
|
||||
-t, --tmpdir=path Path for temporary files. Multiple paths can be\n\
|
||||
specified, separated by colon (:), they will be used\n\
|
||||
specified, separated by "
|
||||
#if defined( __WIN__) || defined(OS2)
|
||||
"semicolon (;)"
|
||||
#else
|
||||
"colon (:)"
|
||||
#endif
|
||||
", they will be used\n\
|
||||
in a round-robin fashion.\n\
|
||||
-s, --silent Only print errors. One can use two -s to make\n\
|
||||
myisamchk very silent\n\
|
||||
|
|
|
@ -17,7 +17,12 @@
|
|||
#include "mysys_priv.h"
|
||||
#include <m_string.h>
|
||||
|
||||
#if defined( __WIN__) || defined(OS2)
|
||||
#define DELIM ';'
|
||||
#else
|
||||
#define DELIM ':'
|
||||
#endif
|
||||
|
||||
my_bool init_tmpdir(MY_TMPDIR *tmpdir, const char *pathlist)
|
||||
{
|
||||
char *end, *copy;
|
||||
|
@ -45,13 +50,13 @@ my_bool init_tmpdir(MY_TMPDIR *tmpdir, const char *pathlist)
|
|||
convert_dirname(buff, pathlist, end);
|
||||
if (!(copy=my_strdup(buff, MYF(MY_WME))))
|
||||
return TRUE;
|
||||
if (insert_dynamic(&t_arr, ©))
|
||||
if (insert_dynamic(&t_arr, (gptr)©))
|
||||
return TRUE;
|
||||
pathlist=end+1;
|
||||
}
|
||||
while (*end);
|
||||
freeze_size(&t_arr);
|
||||
tmpdir->list=t_arr.buffer;
|
||||
tmpdir->list=(char **)t_arr.buffer;
|
||||
tmpdir->max=t_arr.elements-1;
|
||||
tmpdir->cur=0;
|
||||
return FALSE;
|
||||
|
@ -72,7 +77,7 @@ void free_tmpdir(MY_TMPDIR *tmpdir)
|
|||
uint i;
|
||||
for (i=0; i<=tmpdir->max; i++)
|
||||
my_free(tmpdir->list[i], MYF(0));
|
||||
my_free(tmpdir->list, MYF(0));
|
||||
my_free((gptr)tmpdir->list, MYF(0));
|
||||
pthread_mutex_destroy(&tmpdir->mutex);
|
||||
}
|
||||
|
||||
|
|
|
@ -2931,13 +2931,13 @@ struct my_option my_long_options[] =
|
|||
#endif /* HAVE_BERKELEY_DB */
|
||||
{"skip-bdb", OPT_BDB_SKIP, "Don't use berkeley db (will save memory)",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"big-tables", OPT_BIG_TABLES,
|
||||
{"big-tables", OPT_BIG_TABLES,
|
||||
"Allow big result sets by saving all temporary sets on file (Solves most 'table full' errors)",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"binlog-do-db", OPT_BINLOG_DO_DB,
|
||||
"Tells the master it should log updates for the specified database, and exclude all others not explicitly mentioned.",
|
||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"binlog-ignore-db", OPT_BINLOG_IGNORE_DB,
|
||||
{"binlog-ignore-db", OPT_BINLOG_IGNORE_DB,
|
||||
"Tells the master that updates to the given database should not be logged tothe binary log",
|
||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"bind-address", OPT_BIND_ADDRESS, "IP address to bind to",
|
||||
|
@ -3306,12 +3306,18 @@ struct my_option my_long_options[] =
|
|||
#ifdef HAVE_OPENSSL
|
||||
#include "sslopt-longopts.h"
|
||||
#endif
|
||||
{"temp-pool", OPT_TEMP_POOL,
|
||||
{"temp-pool", OPT_TEMP_POOL,
|
||||
"Using this option will cause most temporary files created to use a small set of names, rather than a unique name for each new file.",
|
||||
(gptr*) &use_temp_pool, (gptr*) &use_temp_pool, 0, GET_BOOL, NO_ARG, 1,
|
||||
0, 0, 0, 0, 0},
|
||||
{"tmpdir", 't',
|
||||
"Path for temporary files. Several paths may be specified, separated by a colon (:), in this case they are used in a round-robin fashion.",
|
||||
"Path for temporary files. Several paths may be specified, separated by a "
|
||||
#if defined( __WIN__) || defined(OS2)
|
||||
"semicolon (;)"
|
||||
#else
|
||||
"colon (:)"
|
||||
#endif
|
||||
", in this case they are used in a round-robin fashion.",
|
||||
(gptr*) &opt_mysql_tmpdir,
|
||||
(gptr*) &opt_mysql_tmpdir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"transaction-isolation", OPT_TX_ISOLATION,
|
||||
|
|
Loading…
Reference in a new issue