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
66ab2056
Commit
66ab2056
authored
Jul 13, 2001
by
sasha@mysql.sashanet.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge work:/home/bk/mysql-4.0
into mysql.sashanet.com:/home/sasha/src/bk/mysql-4.0
parents
59968f3a
115c62f5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
0 deletions
+19
-0
libmysql/libmysql.c
libmysql/libmysql.c
+19
-0
No files found.
libmysql/libmysql.c
View file @
66ab2056
...
...
@@ -1845,6 +1845,23 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user,
DBUG_RETURN
(
0
);
}
/* needed when we move MYSQL structure to a different address */
static
void
mysql_fix_pointers
(
MYSQL
*
mysql
,
MYSQL
*
old_mysql
)
{
MYSQL
*
tmp
,
*
tmp_prev
;
if
(
mysql
->
master
==
old_mysql
)
mysql
->
master
=
mysql
;
if
(
mysql
->
last_used_con
==
old_mysql
)
mysql
->
last_used_con
=
mysql
;
if
(
mysql
->
last_used_slave
==
old_mysql
)
mysql
->
last_used_slave
=
mysql
;
for
(
tmp_prev
=
mysql
,
tmp
=
mysql
->
next_slave
;
tmp
!=
old_mysql
;
tmp
=
tmp
->
next_slave
)
{
tmp_prev
=
tmp
;
}
tmp_prev
->
next_slave
=
mysql
;
}
static
my_bool
mysql_reconnect
(
MYSQL
*
mysql
)
{
...
...
@@ -1860,6 +1877,7 @@ static my_bool mysql_reconnect(MYSQL *mysql)
}
mysql_init
(
&
tmp_mysql
);
tmp_mysql
.
options
=
mysql
->
options
;
tmp_mysql
.
rpl_pivot
=
mysql
->
rpl_pivot
;
if
(
!
mysql_real_connect
(
&
tmp_mysql
,
mysql
->
host
,
mysql
->
user
,
mysql
->
passwd
,
mysql
->
db
,
mysql
->
port
,
mysql
->
unix_socket
,
mysql
->
client_flag
))
...
...
@@ -1869,6 +1887,7 @@ static my_bool mysql_reconnect(MYSQL *mysql)
bzero
((
char
*
)
&
mysql
->
options
,
sizeof
(
mysql
->
options
));
mysql_close
(
mysql
);
*
mysql
=
tmp_mysql
;
mysql_fix_pointers
(
mysql
,
&
tmp_mysql
);
/* adjust connection pointers */
net_clear
(
&
mysql
->
net
);
mysql
->
affected_rows
=
~
(
my_ulonglong
)
0
;
DBUG_RETURN
(
0
);
...
...
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