Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
e38fe316
Commit
e38fe316
authored
Sep 03, 2005
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal:/home/bk/mysql-5.0
into mysql.com:/home/jimw/my/mysql-5.0-clean
parents
acbf048c
777e8b3d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
10 deletions
+25
-10
client/mysqltest.c
client/mysqltest.c
+21
-9
include/mysql.h
include/mysql.h
+1
-1
sql-common/client.c
sql-common/client.c
+3
-0
No files found.
client/mysqltest.c
View file @
e38fe316
...
...
@@ -1974,14 +1974,15 @@ int safe_connect(MYSQL* con, const char *host, const char *user,
const
char
*
pass
,
const
char
*
db
,
int
port
,
const
char
*
sock
)
{
int
con_error
=
1
;
int
con_error
=
1
;
my_bool
reconnect
=
1
;
int
i
;
for
(
i
=
0
;
i
<
MAX_CON_TRIES
;
++
i
)
for
(
i
=
0
;
i
<
MAX_CON_TRIES
;
++
i
)
{
if
(
mysql_real_connect
(
con
,
host
,
user
,
pass
,
db
,
port
,
sock
,
CLIENT_MULTI_STATEMENTS
|
CLIENT_REMEMBER_OPTIONS
))
{
con_error
=
0
;
con_error
=
0
;
break
;
}
sleep
(
CON_RETRY_SLEEP
);
...
...
@@ -1990,7 +1991,7 @@ int safe_connect(MYSQL* con, const char *host, const char *user,
TODO: change this to 0 in future versions, but the 'kill' test relies on
existing behavior
*/
con
->
reconnect
=
1
;
mysql_options
(
con
,
MYSQL_OPT_RECONNECT
,
(
char
*
)
&
reconnect
)
;
return
con_error
;
}
...
...
@@ -2024,6 +2025,7 @@ int connect_n_handle_errors(struct st_query *q, MYSQL* con, const char* host,
int
*
create_conn
)
{
DYNAMIC_STRING
ds_tmp
,
*
ds
;
my_bool
reconnect
=
1
;
int
error
=
0
;
/*
...
...
@@ -2089,7 +2091,7 @@ int connect_n_handle_errors(struct st_query *q, MYSQL* con, const char* host,
TODO: change this to 0 in future versions, but the 'kill' test relies on
existing behavior
*/
con
->
reconnect
=
1
;
mysql_options
(
con
,
MYSQL_OPT_RECONNECT
,
(
char
*
)
&
reconnect
)
;
if
(
record
)
{
...
...
@@ -2368,6 +2370,7 @@ int read_line(char *buf, int size)
enum
{
R_NORMAL
,
R_Q
,
R_Q_IN_Q
,
R_SLASH_IN_Q
,
R_COMMENT
,
R_LINE_START
}
state
=
R_LINE_START
;
DBUG_ENTER
(
"read_line"
);
LINT_INIT
(
quote
);
start_lineno
=
*
lineno
;
for
(;
p
<
buf_end
;)
...
...
@@ -4264,11 +4267,17 @@ int main(int argc, char **argv)
ps_protocol_enabled
=
ps_protocol
;
break
;
case
Q_DISABLE_RECONNECT
:
cur_con
->
mysql
.
reconnect
=
0
;
{
my_bool
reconnect
=
0
;
mysql_options
(
&
cur_con
->
mysql
,
MYSQL_OPT_RECONNECT
,
(
char
*
)
&
reconnect
);
break
;
}
case
Q_ENABLE_RECONNECT
:
cur_con
->
mysql
.
reconnect
=
1
;
{
my_bool
reconnect
=
1
;
mysql_options
(
&
cur_con
->
mysql
,
MYSQL_OPT_RECONNECT
,
(
char
*
)
&
reconnect
);
break
;
}
case
Q_DISABLE_PARSING
:
parsing_disabled
++
;
break
;
...
...
@@ -4284,13 +4293,16 @@ int main(int argc, char **argv)
case
Q_EXIT
:
abort_flag
=
1
;
break
;
default:
processed
=
0
;
break
;
default:
processed
=
0
;
break
;
}
}
if
(
!
processed
)
{
current_line_inc
=
0
;
current_line_inc
=
0
;
switch
(
q
->
type
)
{
case
Q_WHILE
:
do_block
(
cmd_while
,
q
);
break
;
case
Q_IF
:
do_block
(
cmd_if
,
q
);
break
;
...
...
include/mysql.h
View file @
e38fe316
...
...
@@ -146,7 +146,7 @@ enum mysql_option
MYSQL_OPT_WRITE_TIMEOUT
,
MYSQL_OPT_USE_RESULT
,
MYSQL_OPT_USE_REMOTE_CONNECTION
,
MYSQL_OPT_USE_EMBEDDED_CONNECTION
,
MYSQL_OPT_GUESS_CONNECTION
,
MYSQL_SET_CLIENT_IP
,
MYSQL_SECURE_AUTH
,
MYSQL_REPORT_DATA_TRUNCATION
MYSQL_REPORT_DATA_TRUNCATION
,
MYSQL_OPT_RECONNECT
};
struct
st_mysql_options
{
...
...
sql-common/client.c
View file @
e38fe316
...
...
@@ -2760,6 +2760,9 @@ mysql_options(MYSQL *mysql,enum mysql_option option, const char *arg)
case
MYSQL_REPORT_DATA_TRUNCATION
:
mysql
->
options
.
report_data_truncation
=
test
(
*
(
my_bool
*
)
arg
);
break
;
case
MYSQL_OPT_RECONNECT
:
mysql
->
reconnect
=
*
(
my_bool
*
)
arg
;
break
;
default:
DBUG_RETURN
(
1
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment