|
@ -575,10 +575,10 @@ char builtin_echo[FN_REFLEN]; |
|
|
|
|
|
|
|
|
struct st_replace_regex |
|
|
struct st_replace_regex |
|
|
{ |
|
|
{ |
|
|
DYNAMIC_ARRAY regex_arr; /* stores a list of st_regex subsitutions */ |
|
|
|
|
|
|
|
|
DYNAMIC_ARRAY regex_arr; /* stores a list of st_regex substitutions */ |
|
|
|
|
|
|
|
|
/*
|
|
|
/*
|
|
|
Temporary storage areas for substitutions. To reduce unnessary copying |
|
|
|
|
|
|
|
|
Temporary storage areas for substitutions. To reduce unnecessary copying |
|
|
and memory freeing/allocation, we pre-allocate two buffers, and alternate |
|
|
and memory freeing/allocation, we pre-allocate two buffers, and alternate |
|
|
their use, one for input/one for output, the roles changing on the next |
|
|
their use, one for input/one for output, the roles changing on the next |
|
|
st_regex substitution. At the end of substitutions buf points to the |
|
|
st_regex substitution. At the end of substitutions buf points to the |
|
@ -1934,7 +1934,7 @@ void show_diff(DYNAMIC_STRING* ds, |
|
|
needs special processing due to return values |
|
|
needs special processing due to return values |
|
|
on that OS |
|
|
on that OS |
|
|
This test is only done on Windows since it's only needed there |
|
|
This test is only done on Windows since it's only needed there |
|
|
in order to correctly detect non-availibility of 'diff', and |
|
|
|
|
|
|
|
|
in order to correctly detect non-availability of 'diff', and |
|
|
the way it's implemented does not work with default 'diff' on Solaris. |
|
|
the way it's implemented does not work with default 'diff' on Solaris. |
|
|
*/ |
|
|
*/ |
|
|
#ifdef _WIN32
|
|
|
#ifdef _WIN32
|
|
@ -2313,7 +2313,7 @@ static int strip_surrounding(char* str, char c1, char c2) |
|
|
/* Replace it with a space */ |
|
|
/* Replace it with a space */ |
|
|
*ptr= ' '; |
|
|
*ptr= ' '; |
|
|
|
|
|
|
|
|
/* Last non space charecter should be c2 */ |
|
|
|
|
|
|
|
|
/* Last non space character should be c2 */ |
|
|
ptr= strend(str)-1; |
|
|
ptr= strend(str)-1; |
|
|
while(*ptr && my_isspace(charset_info, *ptr)) |
|
|
while(*ptr && my_isspace(charset_info, *ptr)) |
|
|
ptr--; |
|
|
ptr--; |
|
@ -3082,7 +3082,7 @@ void open_file(const char *name) |
|
|
if overlay-dir is specified, and the file is located somewhere |
|
|
if overlay-dir is specified, and the file is located somewhere |
|
|
under overlay-dir or under suite-dir, the search works as follows: |
|
|
under overlay-dir or under suite-dir, the search works as follows: |
|
|
|
|
|
|
|
|
0.let suffix be current file dirname relative to siute-dir or overlay-dir |
|
|
|
|
|
|
|
|
0.let suffix be current file dirname relative to suite-dir or overlay-dir |
|
|
1.try in overlay-dir/suffix |
|
|
1.try in overlay-dir/suffix |
|
|
2.try in suite-dir/suffix |
|
|
2.try in suite-dir/suffix |
|
|
3.try in overlay-dir |
|
|
3.try in overlay-dir |
|
@ -5595,7 +5595,7 @@ void do_close_connection(struct st_command *command) |
|
|
con->stmt= 0; |
|
|
con->stmt= 0; |
|
|
#ifdef EMBEDDED_LIBRARY
|
|
|
#ifdef EMBEDDED_LIBRARY
|
|
|
/*
|
|
|
/*
|
|
|
As query could be still executed in a separate theread |
|
|
|
|
|
|
|
|
As query could be still executed in a separate thread |
|
|
we need to check if the query's thread was finished and probably wait |
|
|
we need to check if the query's thread was finished and probably wait |
|
|
(embedded-server specific) |
|
|
(embedded-server specific) |
|
|
*/ |
|
|
*/ |
|
@ -5894,7 +5894,7 @@ void do_connect(struct st_command *command) |
|
|
{ "connection name", ARG_STRING, TRUE, &ds_connection_name, "Name of the connection" }, |
|
|
{ "connection name", ARG_STRING, TRUE, &ds_connection_name, "Name of the connection" }, |
|
|
{ "host", ARG_STRING, TRUE, &ds_host, "Host to connect to" }, |
|
|
{ "host", ARG_STRING, TRUE, &ds_host, "Host to connect to" }, |
|
|
{ "user", ARG_STRING, FALSE, &ds_user, "User to connect as" }, |
|
|
{ "user", ARG_STRING, FALSE, &ds_user, "User to connect as" }, |
|
|
{ "passsword", ARG_STRING, FALSE, &ds_password, "Password used when connecting" }, |
|
|
|
|
|
|
|
|
{ "password", ARG_STRING, FALSE, &ds_password, "Password used when connecting" }, |
|
|
{ "database", ARG_STRING, FALSE, &ds_database, "Database to select after connect" }, |
|
|
{ "database", ARG_STRING, FALSE, &ds_database, "Database to select after connect" }, |
|
|
{ "port", ARG_STRING, FALSE, &ds_port, "Port to connect to" }, |
|
|
{ "port", ARG_STRING, FALSE, &ds_port, "Port to connect to" }, |
|
|
{ "socket", ARG_STRING, FALSE, &ds_sock, "Socket to connect with" }, |
|
|
{ "socket", ARG_STRING, FALSE, &ds_sock, "Socket to connect with" }, |
|
@ -6388,7 +6388,7 @@ void do_block(enum block_cmd cmd, struct st_command* command) |
|
|
} else |
|
|
} else |
|
|
{ |
|
|
{ |
|
|
if (*expr_start != '`' && ! my_isdigit(charset_info, *expr_start)) |
|
|
if (*expr_start != '`' && ! my_isdigit(charset_info, *expr_start)) |
|
|
die("Expression in if/while must beging with $, ` or a number"); |
|
|
|
|
|
|
|
|
die("Expression in if/while must begin with $, ` or a number"); |
|
|
eval_expr(&v, expr_start, &expr_end); |
|
|
eval_expr(&v, expr_start, &expr_end); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -8292,7 +8292,7 @@ void handle_no_error(struct st_command *command) |
|
|
/*
|
|
|
/*
|
|
|
Run query using prepared statement C API |
|
|
Run query using prepared statement C API |
|
|
|
|
|
|
|
|
SYNPOSIS |
|
|
|
|
|
|
|
|
SYNOPSIS |
|
|
run_query_stmt |
|
|
run_query_stmt |
|
|
mysql - mysql handle |
|
|
mysql - mysql handle |
|
|
command - current command pointer |
|
|
command - current command pointer |
|
@ -8527,6 +8527,7 @@ end: |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DBUG_VOID_RETURN; |
|
|
DBUG_VOID_RETURN; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
@ -8981,7 +8982,7 @@ int util_query(MYSQL* org_mysql, const char* query){ |
|
|
/*
|
|
|
/*
|
|
|
Run query |
|
|
Run query |
|
|
|
|
|
|
|
|
SYNPOSIS |
|
|
|
|
|
|
|
|
SYNOPSIS |
|
|
run_query() |
|
|
run_query() |
|
|
mysql mysql handle |
|
|
mysql mysql handle |
|
|
command current command pointer |
|
|
command current command pointer |
|
@ -10711,7 +10712,7 @@ err: |
|
|
/*
|
|
|
/*
|
|
|
Execute all substitutions on val. |
|
|
Execute all substitutions on val. |
|
|
|
|
|
|
|
|
Returns: true if substituition was made, false otherwise |
|
|
|
|
|
|
|
|
Returns: true if substitution was made, false otherwise |
|
|
Side-effect: Sets r->buf to be the buffer with all substitutions done. |
|
|
Side-effect: Sets r->buf to be the buffer with all substitutions done. |
|
|
|
|
|
|
|
|
IN: |
|
|
IN: |
|
@ -10805,7 +10806,7 @@ void free_replace_regex() |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
/*
|
|
|
auxiluary macro used by reg_replace |
|
|
|
|
|
|
|
|
auxiliary macro used by reg_replace |
|
|
makes sure the result buffer has sufficient length |
|
|
makes sure the result buffer has sufficient length |
|
|
*/ |
|
|
*/ |
|
|
#define SECURE_REG_BUF if (buf_len < need_buf_len) \
|
|
|
#define SECURE_REG_BUF if (buf_len < need_buf_len) \
|
|
@ -11344,7 +11345,7 @@ int init_sets(REP_SETS *sets,uint states) |
|
|
return 0; |
|
|
return 0; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/* Make help sets invisible for nicer codeing */ |
|
|
|
|
|
|
|
|
/* Make help sets invisible for nicer coding */ |
|
|
|
|
|
|
|
|
void make_sets_invisible(REP_SETS *sets) |
|
|
void make_sets_invisible(REP_SETS *sets) |
|
|
{ |
|
|
{ |
|
|