mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Pass location of charsets dir to mysqltest to avoid using the charsetdir locally installed on machine.
client/mysqltest.c: Add new option --character-sets-dir to mysqltest Set MYSQL_SET_CHRSET_DIR before connecting to mysqld if the above variable is set mysql-test/mysql-test-run.pl: Pass $path_charsetsdir to mysqltest
This commit is contained in:
@ -80,13 +80,13 @@ enum {
|
|||||||
OPT_SSL_CA, OPT_SSL_CAPATH, OPT_SSL_CIPHER, OPT_PS_PROTOCOL,
|
OPT_SSL_CA, OPT_SSL_CAPATH, OPT_SSL_CIPHER, OPT_PS_PROTOCOL,
|
||||||
OPT_SP_PROTOCOL, OPT_CURSOR_PROTOCOL, OPT_VIEW_PROTOCOL,
|
OPT_SP_PROTOCOL, OPT_CURSOR_PROTOCOL, OPT_VIEW_PROTOCOL,
|
||||||
OPT_SSL_VERIFY_SERVER_CERT, OPT_MAX_CONNECT_RETRIES,
|
OPT_SSL_VERIFY_SERVER_CERT, OPT_MAX_CONNECT_RETRIES,
|
||||||
OPT_MARK_PROGRESS
|
OPT_MARK_PROGRESS, OPT_CHARSETS_DIR
|
||||||
};
|
};
|
||||||
|
|
||||||
static int record= 0, opt_sleep= -1;
|
static int record= 0, opt_sleep= -1;
|
||||||
static char *db= 0, *pass= 0;
|
static char *db= 0, *pass= 0;
|
||||||
const char *user= 0, *host= 0, *unix_sock= 0, *opt_basedir= "./";
|
const char *user= 0, *host= 0, *unix_sock= 0, *opt_basedir= "./";
|
||||||
const char *opt_include= 0;
|
const char *opt_include= 0, *opt_charsets_dir;
|
||||||
static int port= 0;
|
static int port= 0;
|
||||||
static int opt_max_connect_retries;
|
static int opt_max_connect_retries;
|
||||||
static my_bool opt_compress= 0, silent= 0, verbose= 0;
|
static my_bool opt_compress= 0, silent= 0, verbose= 0;
|
||||||
@ -145,7 +145,6 @@ static struct st_test_file* file_stack_end;
|
|||||||
|
|
||||||
|
|
||||||
static CHARSET_INFO *charset_info= &my_charset_latin1; /* Default charset */
|
static CHARSET_INFO *charset_info= &my_charset_latin1; /* Default charset */
|
||||||
static const char *charset_name= "latin1"; /* Default character set name */
|
|
||||||
|
|
||||||
static const char *embedded_server_groups[]=
|
static const char *embedded_server_groups[]=
|
||||||
{
|
{
|
||||||
@ -3093,7 +3092,11 @@ void do_connect(struct st_command *command)
|
|||||||
if (opt_compress || con_compress)
|
if (opt_compress || con_compress)
|
||||||
mysql_options(&next_con->mysql, MYSQL_OPT_COMPRESS, NullS);
|
mysql_options(&next_con->mysql, MYSQL_OPT_COMPRESS, NullS);
|
||||||
mysql_options(&next_con->mysql, MYSQL_OPT_LOCAL_INFILE, 0);
|
mysql_options(&next_con->mysql, MYSQL_OPT_LOCAL_INFILE, 0);
|
||||||
mysql_options(&next_con->mysql, MYSQL_SET_CHARSET_NAME, charset_name);
|
mysql_options(&next_con->mysql, MYSQL_SET_CHARSET_NAME,
|
||||||
|
charset_info->csname);
|
||||||
|
if (opt_charsets_dir)
|
||||||
|
mysql_options(&cur_con->mysql, MYSQL_SET_CHARSET_DIR,
|
||||||
|
opt_charsets_dir);
|
||||||
|
|
||||||
#ifdef HAVE_OPENSSL
|
#ifdef HAVE_OPENSSL
|
||||||
if (opt_use_ssl || con_ssl)
|
if (opt_use_ssl || con_ssl)
|
||||||
@ -3779,6 +3782,9 @@ static struct my_option my_long_options[] =
|
|||||||
0, 0, 0, 0, 0, 0},
|
0, 0, 0, 0, 0, 0},
|
||||||
{"basedir", 'b', "Basedir for tests.", (gptr*) &opt_basedir,
|
{"basedir", 'b', "Basedir for tests.", (gptr*) &opt_basedir,
|
||||||
(gptr*) &opt_basedir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
(gptr*) &opt_basedir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
|
{"character-sets-dir", OPT_CHARSETS_DIR,
|
||||||
|
"Directory where character sets are.", (gptr*) &opt_charsets_dir,
|
||||||
|
(gptr*) &opt_charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"compress", 'C', "Use the compressed server/client protocol.",
|
{"compress", 'C', "Use the compressed server/client protocol.",
|
||||||
(gptr*) &opt_compress, (gptr*) &opt_compress, 0, GET_BOOL, NO_ARG, 0, 0, 0,
|
(gptr*) &opt_compress, (gptr*) &opt_compress, 0, GET_BOOL, NO_ARG, 0, 0, 0,
|
||||||
0, 0, 0},
|
0, 0, 0},
|
||||||
@ -5511,7 +5517,11 @@ int main(int argc, char **argv)
|
|||||||
if (opt_compress)
|
if (opt_compress)
|
||||||
mysql_options(&cur_con->mysql,MYSQL_OPT_COMPRESS,NullS);
|
mysql_options(&cur_con->mysql,MYSQL_OPT_COMPRESS,NullS);
|
||||||
mysql_options(&cur_con->mysql, MYSQL_OPT_LOCAL_INFILE, 0);
|
mysql_options(&cur_con->mysql, MYSQL_OPT_LOCAL_INFILE, 0);
|
||||||
mysql_options(&cur_con->mysql, MYSQL_SET_CHARSET_NAME, charset_name);
|
mysql_options(&cur_con->mysql, MYSQL_SET_CHARSET_NAME,
|
||||||
|
charset_info->csname);
|
||||||
|
if (opt_charsets_dir)
|
||||||
|
mysql_options(&cur_con->mysql, MYSQL_SET_CHARSET_DIR,
|
||||||
|
opt_charsets_dir);
|
||||||
|
|
||||||
#ifdef HAVE_OPENSSL
|
#ifdef HAVE_OPENSSL
|
||||||
|
|
||||||
|
@ -2976,6 +2976,7 @@ sub analyze_testcase_failure_sync_with_master($)
|
|||||||
mtr_add_arg($args, "--silent");
|
mtr_add_arg($args, "--silent");
|
||||||
mtr_add_arg($args, "--skip-safemalloc");
|
mtr_add_arg($args, "--skip-safemalloc");
|
||||||
mtr_add_arg($args, "--tmpdir=%s", $opt_tmpdir);
|
mtr_add_arg($args, "--tmpdir=%s", $opt_tmpdir);
|
||||||
|
mtr_add_arg($args, "--character-sets-dir=%s", $path_charsetsdir);
|
||||||
|
|
||||||
mtr_add_arg($args, "--socket=%s", $master->[0]->{'path_sock'});
|
mtr_add_arg($args, "--socket=%s", $master->[0]->{'path_sock'});
|
||||||
mtr_add_arg($args, "--port=%d", $master->[0]->{'port'});
|
mtr_add_arg($args, "--port=%d", $master->[0]->{'port'});
|
||||||
@ -4161,6 +4162,7 @@ sub run_check_testcase ($$) {
|
|||||||
mtr_add_arg($args, "--silent");
|
mtr_add_arg($args, "--silent");
|
||||||
mtr_add_arg($args, "--skip-safemalloc");
|
mtr_add_arg($args, "--skip-safemalloc");
|
||||||
mtr_add_arg($args, "--tmpdir=%s", $opt_tmpdir);
|
mtr_add_arg($args, "--tmpdir=%s", $opt_tmpdir);
|
||||||
|
mtr_add_arg($args, "--character-sets-dir=%s", $path_charsetsdir);
|
||||||
|
|
||||||
mtr_add_arg($args, "--socket=%s", $mysqld->{'path_sock'});
|
mtr_add_arg($args, "--socket=%s", $mysqld->{'path_sock'});
|
||||||
mtr_add_arg($args, "--port=%d", $mysqld->{'port'});
|
mtr_add_arg($args, "--port=%d", $mysqld->{'port'});
|
||||||
@ -4206,6 +4208,7 @@ sub run_mysqltest ($) {
|
|||||||
mtr_add_arg($args, "--silent");
|
mtr_add_arg($args, "--silent");
|
||||||
mtr_add_arg($args, "--skip-safemalloc");
|
mtr_add_arg($args, "--skip-safemalloc");
|
||||||
mtr_add_arg($args, "--tmpdir=%s", $opt_tmpdir);
|
mtr_add_arg($args, "--tmpdir=%s", $opt_tmpdir);
|
||||||
|
mtr_add_arg($args, "--character-sets-dir=%s", $path_charsetsdir);
|
||||||
|
|
||||||
if ($tinfo->{'component_id'} eq 'im')
|
if ($tinfo->{'component_id'} eq 'im')
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user