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
cf194297
Commit
cf194297
authored
Aug 13, 2001
by
monty@hundin.mysql.fi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cleanups
parent
4a470fcc
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
39 additions
and
40 deletions
+39
-40
client/mysqltest.c
client/mysqltest.c
+9
-0
sql/mysqld.cc
sql/mysqld.cc
+6
-20
sql/slave.cc
sql/slave.cc
+2
-2
vio/viossl.c
vio/viossl.c
+22
-18
No files found.
client/mysqltest.c
View file @
cf194297
...
...
@@ -245,6 +245,15 @@ static char *out_buff;
static
uint
out_length
;
static
int
eval_result
=
0
;
/* Disable functions that only exist in MySQL 4.0 */
#if MYSQL_VERSION_ID < 40000
static
void
mysql_enable_rpl_parse
(
MYSQL
*
mysql
)
{}
static
void
mysql_disable_rpl_parse
(
MYSQL
*
mysql
)
{}
static
int
mysql_rpl_parse_enabled
(
MYSQL
*
mysql
)
{
return
1
;
}
static
int
mysql_rpl_probe
(
MYSQL
*
mysql
)
{
return
1
;
}
#endif
static
void
do_eval
(
DYNAMIC_STRING
*
query_eval
,
const
char
*
query
)
{
const
char
*
p
;
...
...
sql/mysqld.cc
View file @
cf194297
...
...
@@ -702,26 +702,12 @@ void clean_up(bool print_message)
end_raid
();
#endif
#ifdef HAVE_OPENSSL
if
(
opt_ssl_key
)
{
my_free
(
opt_ssl_key
,
MYF
(
0
));
opt_ssl_key
=
0
;
}
if
(
opt_ssl_cert
)
{
my_free
(
opt_ssl_cert
,
MYF
(
0
));
opt_ssl_cert
=
0
;
}
if
(
opt_ssl_ca
)
{
my_free
(
opt_ssl_ca
,
MYF
(
0
));
opt_ssl_ca
=
0
;
}
if
(
opt_ssl_capath
)
{
my_free
(
opt_ssl_capath
,
MYF
(
0
));
opt_ssl_capath
=
0
;
}
if
(
ssl_acceptor_fd
)
{
my_free
((
gptr
)
ssl_acceptor_fd
,
MYF
(
0
));
ssl_acceptor_fd
=
0
;
}
my_free
(
opt_ssl_key
,
MYF
(
MYF_ALLOW_ZERO_PTR
));
my_free
(
opt_ssl_cert
,
MYF
(
MYF_ALLOW_ZERO_PTR
));
my_free
(
opt_ssl_ca
,
MYF
(
MYF_ALLOW_ZERO_PTR
));
my_free
(
opt_ssl_capath
,
MYF
(
MYF_ALLOW_ZERO_PTR
));
my_free
(
opt_ssl_accceptor
,
MYF
(
MYF_ALLOW_ZERO_PTR
));
opt_ssl_key
=
opt_ssl_cert
=
opt_ssl_ca
=
opt_ssl_capath
=
opt_ssl_acceptor
=
0
;
#endif
/* HAVE_OPENSSL */
free_defaults
(
defaults_argv
);
my_free
(
charsets_list
,
MYF
(
MY_ALLOW_ZERO_PTR
));
...
...
sql/slave.cc
View file @
cf194297
...
...
@@ -664,9 +664,9 @@ int show_master_info(THD* thd)
net_store_data
(
packet
,
(
longlong
)
glob_mi
.
pos
);
last_log_seq
=
glob_mi
.
last_log_seq
;
pthread_mutex_unlock
(
&
glob_mi
.
lock
);
pthread_mutex_lock
(
&
LOCK_slave
);
pthread_mutex_lock
(
&
LOCK_slave
);
// QQ; This is not needed
net_store_data
(
packet
,
slave_running
?
"Yes"
:
"No"
);
pthread_mutex_unlock
(
&
LOCK_slave
);
pthread_mutex_unlock
(
&
LOCK_slave
);
// QQ; This is not needed
net_store_data
(
packet
,
&
replicate_do_db
);
net_store_data
(
packet
,
&
replicate_ignore_db
);
net_store_data
(
packet
,
(
uint32
)
last_slave_errno
);
...
...
vio/viossl.c
View file @
cf194297
...
...
@@ -105,10 +105,12 @@ int vio_ssl_read(Vio * vio, gptr buf, int size)
{
int
r
;
DBUG_ENTER
(
"vio_ssl_read"
);
DBUG_PRINT
(
"enter"
,
(
"sd=%d, buf=%p, size=%d, ssl_=%p"
,
vio
->
sd
,
buf
,
size
,
vio
->
ssl_
));
assert
(
vio
->
ssl_
!=
0
);
DBUG_PRINT
(
"enter"
,
(
"sd=%d, buf=%p, size=%d, ssl_=%p"
,
vio
->
sd
,
buf
,
size
,
vio
->
ssl_
));
DBUG_ASSERT
(
vio
->
ssl_
!=
0
);
DBUG_PRINT
(
"info"
,(
"SSL_get_cipher_name() = '%s'"
,
SSL_get_cipher_name
(
vio
->
ssl_
)));
DBUG_PRINT
(
"info"
,(
"SSL_get_cipher_name() = '%s'"
,
SSL_get_cipher_name
(
vio
->
ssl_
)));
r
=
SSL_read
(
vio
->
ssl_
,
buf
,
size
);
#ifndef DBUG_OFF
...
...
@@ -125,8 +127,9 @@ int vio_ssl_write(Vio * vio, const gptr buf, int size)
int
r
;
DBUG_ENTER
(
"vio_ssl_write"
);
DBUG_PRINT
(
"enter"
,
(
"sd=%d, buf=%p, size=%d"
,
vio
->
sd
,
buf
,
size
));
assert
(
vio
->
ssl_
!=
0
);
DBUG_PRINT
(
"info"
,(
"SSL_get_cipher_name() = '%s'"
,
SSL_get_cipher_name
(
vio
->
ssl_
)));
DBUG_ASSERT
(
vio
->
ssl_
!=
0
);
DBUG_PRINT
(
"info"
,(
"SSL_get_cipher_name() = '%s'"
,
SSL_get_cipher_name
(
vio
->
ssl_
)));
r
=
SSL_write
(
vio
->
ssl_
,
buf
,
size
);
#ifndef DBUG_OFF
if
(
r
<
0
)
...
...
@@ -301,12 +304,11 @@ void sslaccept(struct st_VioSSLAcceptorFd* ptr, Vio* sd)
DBUG_ENTER
(
"sslaccept"
);
DBUG_PRINT
(
"enter"
,
(
"sd=%s ptr=%p"
,
sd
->
sd
,
ptr
));
vio_reset
(
sd
,
VIO_TYPE_SSL
,
sd
->
sd
,
0
,
FALSE
);
// ptr->bio_=0;
sd
->
ssl_
=
0
;
sd
->
open_
=
FALSE
;
assert
(
sd
!=
0
);
assert
(
ptr
!=
0
);
assert
(
ptr
->
ssl_context_
!=
0
);
DBUG_ASSERT
(
sd
!=
0
);
DBUG_ASSERT
(
ptr
!=
0
);
DBUG_ASSERT
(
ptr
->
ssl_context_
!=
0
);
if
(
!
(
sd
->
ssl_
=
SSL_new
(
ptr
->
ssl_context_
)))
{
DBUG_PRINT
(
"error"
,
(
"SSL_new failure"
));
...
...
@@ -315,7 +317,7 @@ void sslaccept(struct st_VioSSLAcceptorFd* ptr, Vio* sd)
}
DBUG_PRINT
(
"info"
,
(
"ssl_=%p"
,
sd
->
ssl_
));
SSL_set_fd
(
sd
->
ssl_
,
sd
->
sd
);
/
/ SSL_accept(sd->ssl_);
/
* SSL_accept(sd->ssl_); */
/* if (!(ptr->bio_ = BIO_new_socket(sd->sd, BIO_NOCLOSE)))
{
DBUG_PRINT("error", ("BIO_new_socket failure"));
...
...
@@ -326,8 +328,10 @@ void sslaccept(struct st_VioSSLAcceptorFd* ptr, Vio* sd)
}
SSL_set_bio(sd->ssl_, ptr->bio_, ptr->bio_);*/
SSL_set_accept_state
(
sd
->
ssl_
);
// sprintf(ptr->desc_, "VioSSL(%d)", sd->sd);
// sd->ssl_cip_ = SSL_get_cipher(sd->ssl_);
/*
sprintf(ptr->desc_, "VioSSL(%d)", sd->sd);
sd->ssl_cip_ = SSL_get_cipher(sd->ssl_);
*/
sd
->
open_
=
TRUE
;
...
...
@@ -335,12 +339,12 @@ void sslaccept(struct st_VioSSLAcceptorFd* ptr, Vio* sd)
if
(
client_cert
!=
NULL
)
{
DBUG_PRINT
(
"info"
,(
"Client certificate:"
));
str
=
X509_NAME_oneline
(
X509_get_subject_name
(
client_cert
),
0
,
0
);
/
/CHK_NULL(str);
/
* CHK_NULL(str); */
DBUG_PRINT
(
"info"
,(
"
\t
subject: %s"
,
str
));
free
(
str
);
str
=
X509_NAME_oneline
(
X509_get_issuer_name
(
client_cert
),
0
,
0
);
/
/CHK_NULL(str);
/
* CHK_NULL(str); */
DBUG_PRINT
(
"info"
,(
"
\t
issuer: %s"
,
str
));
free
(
str
);
...
...
@@ -365,9 +369,9 @@ void sslconnect(struct st_VioSSLConnectorFd* ptr, Vio* sd)
sd
->
bio_
=
0
;
sd
->
ssl_
=
0
;
sd
->
open_
=
FALSE
;
assert
(
sd
!=
0
);
assert
(
ptr
!=
0
);
assert
(
ptr
->
ssl_context_
!=
0
);
DBUG_ASSERT
(
sd
!=
0
);
DBUG_ASSERT
(
ptr
!=
0
);
DBUG_ASSERT
(
ptr
->
ssl_context_
!=
0
);
if
(
!
(
sd
->
ssl_
=
SSL_new
(
ptr
->
ssl_context_
)))
{
...
...
@@ -408,7 +412,7 @@ void sslconnect(struct st_VioSSLConnectorFd* ptr, Vio* sd)
}
else
DBUG_PRINT
(
"info"
,(
"Server does not have certificate."
));
// sd->ssl_cip_ = SSL_get_cipher(sd->ssl_);
/* sd->ssl_cip_ = SSL_get_cipher(sd->ssl_); */
sd
->
open_
=
TRUE
;
DBUG_VOID_RETURN
;
}
...
...
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