summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorVladislav Vaintroub <wlad@mariadb.com>2021-09-24 10:07:01 +0200
committerVladislav Vaintroub <wlad@mariadb.com>2021-09-24 11:49:28 +0200
commit8221708e389728aef799046eef3c49b1eec2e400 (patch)
tree9ab35f7a736f230398b4b1a0824efcfb9fd876a1 /client
parentca7046dc19d8bbb5916c89d9e98e9d4632294fa8 (diff)
downloadmariadb-git-8221708e389728aef799046eef3c49b1eec2e400.tar.gz
Windows, mysqltest : cleanup, remove dead code USE_CYGWIN
Diffstat (limited to 'client')
-rw-r--r--client/mysqltest.cc54
1 files changed, 0 insertions, 54 deletions
diff --git a/client/mysqltest.cc b/client/mysqltest.cc
index 82bd1abf1a3..736e708e0f4 100644
--- a/client/mysqltest.cc
+++ b/client/mysqltest.cc
@@ -71,10 +71,6 @@ static my_bool non_blocking_api_enabled= 0;
#include "../tests/nonblock-wrappers.h"
#endif
-/* Use cygwin for --exec and --system before 5.0 */
-#if MYSQL_VERSION_ID < 50000
-#define USE_CYGWIN
-#endif
#define MAX_VAR_NAME_LENGTH 256
#define MAX_COLUMNS 256
@@ -618,11 +614,6 @@ void fix_win_paths(char *val, size_t len);
const char *get_errname_from_code (uint error_code);
int multi_reg_replace(struct st_replace_regex* r,char* val);
-#ifdef _WIN32
-void free_tmp_sh_file();
-void free_win_path_patterns();
-#endif
-
/* For replace_column */
static char *replace_column[MAX_COLUMNS];
@@ -1471,10 +1462,6 @@ void free_used_memory()
free_root(&require_file_root, MYF(0));
free_re();
my_free(read_command_buf);
-#ifdef _WIN32
- free_tmp_sh_file();
- free_win_path_patterns();
-#endif
DBUG_VOID_RETURN;
}
@@ -3204,33 +3191,6 @@ void do_source(struct st_command *command)
}
-#if defined _WIN32
-
-#ifdef USE_CYGWIN
-/* Variables used for temporary sh files used for emulating Unix on Windows */
-char tmp_sh_name[64], tmp_sh_cmd[70];
-#endif
-
-void init_tmp_sh_file()
-{
-#ifdef USE_CYGWIN
- /* Format a name for the tmp sh file that is unique for this process */
- my_snprintf(tmp_sh_name, sizeof(tmp_sh_name), "tmp_%d.sh", getpid());
- /* Format the command to execute in order to run the script */
- my_snprintf(tmp_sh_cmd, sizeof(tmp_sh_cmd), "sh %s", tmp_sh_name);
-#endif
-}
-
-
-void free_tmp_sh_file()
-{
-#ifdef USE_CYGWIN
- my_delete(tmp_sh_name, MYF(0));
-#endif
-}
-#endif
-
-
static void init_builtin_echo(void)
{
#ifdef _WIN32
@@ -3346,7 +3306,6 @@ void do_exec(struct st_command *command)
}
#ifdef _WIN32
-#ifndef USE_CYGWIN
/* Replace /dev/null with NUL */
while(replace(&ds_cmd, "/dev/null", 9, "NUL", 3) == 0)
;
@@ -3354,7 +3313,6 @@ void do_exec(struct st_command *command)
while(replace(&ds_cmd, ">&-", 3, ">&4", 3) == 0)
;
#endif
-#endif
if (disable_result_log)
{
@@ -3512,13 +3470,7 @@ int do_modify_var(struct st_command *command,
int my_system(DYNAMIC_STRING* ds_cmd)
{
-#if defined _WIN32 && defined USE_CYGWIN
- /* Dump the command into a sh script file and execute with system */
- str_to_file(tmp_sh_name, ds_cmd->str, ds_cmd->length);
- return system(tmp_sh_cmd);
-#else
return system(ds_cmd->str);
-#endif
}
@@ -3552,12 +3504,10 @@ void do_system(struct st_command *command)
do_eval(&ds_cmd, command->first_argument, command->end, !is_windows);
#ifdef _WIN32
-#ifndef USE_CYGWIN
/* Replace /dev/null with NUL */
while(replace(&ds_cmd, "/dev/null", 9, "NUL", 3) == 0)
;
#endif
-#endif
DBUG_PRINT("info", ("running system command '%s' as '%s'",
@@ -9221,12 +9171,8 @@ int main(int argc, char **argv)
init_builtin_echo();
#ifdef _WIN32
-#ifndef USE_CYGWIN
is_windows= 1;
#endif
- init_tmp_sh_file();
- init_win_path_patterns();
-#endif
read_command_buf= (char*)my_malloc(read_command_buflen= 65536, MYF(MY_FAE));