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
44554d61
Commit
44554d61
authored
Apr 26, 2016
by
Alexey Botchkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-9605 mysqlbinlog does not accept ssl-ca option as expected.
Added SSL support to the mysqlbinlog.
parent
0dbc6649
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
0 deletions
+31
-0
client/mysqlbinlog.cc
client/mysqlbinlog.cc
+15
-0
mysql-test/r/openssl_1.result
mysql-test/r/openssl_1.result
+9
-0
mysql-test/t/openssl_1.test
mysql-test/t/openssl_1.test
+7
-0
No files found.
client/mysqlbinlog.cc
View file @
44554d61
...
@@ -34,6 +34,7 @@
...
@@ -34,6 +34,7 @@
#define TABLE TABLE_CLIENT
#define TABLE TABLE_CLIENT
#include "client_priv.h"
#include "client_priv.h"
#include <my_time.h>
#include <my_time.h>
#include <sslopt-vars.h>
/* That one is necessary for defines of OPTION_NO_FOREIGN_KEY_CHECKS etc */
/* That one is necessary for defines of OPTION_NO_FOREIGN_KEY_CHECKS etc */
#include "sql_priv.h"
#include "sql_priv.h"
#include "log_event.h"
#include "log_event.h"
...
@@ -1392,6 +1393,7 @@ static struct my_option my_options[] =
...
@@ -1392,6 +1393,7 @@ static struct my_option my_options[] =
{
"socket"
,
'S'
,
"The socket file to use for connection."
,
{
"socket"
,
'S'
,
"The socket file to use for connection."
,
&
sock
,
&
sock
,
0
,
GET_STR
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
&
sock
,
&
sock
,
0
,
GET_STR
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
0
,
0
},
#include <sslopt-longopts.h>
{
"start-datetime"
,
OPT_START_DATETIME
,
{
"start-datetime"
,
OPT_START_DATETIME
,
"Start reading the binlog at first event having a datetime equal or "
"Start reading the binlog at first event having a datetime equal or "
"posterior to the argument; the argument must be a date and time "
"posterior to the argument; the argument must be a date and time "
...
@@ -1599,6 +1601,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
...
@@ -1599,6 +1601,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
DBUG_PUSH
(
argument
?
argument
:
default_dbug_option
);
DBUG_PUSH
(
argument
?
argument
:
default_dbug_option
);
break
;
break
;
#endif
#endif
#include <sslopt-case.h>
case
'd'
:
case
'd'
:
one_database
=
1
;
one_database
=
1
;
break
;
break
;
...
@@ -1748,6 +1751,18 @@ static Exit_status safe_connect()
...
@@ -1748,6 +1751,18 @@ static Exit_status safe_connect()
return
ERROR_STOP
;
return
ERROR_STOP
;
}
}
#ifdef HAVE_OPENSSL
if
(
opt_use_ssl
)
{
mysql_ssl_set
(
mysql
,
opt_ssl_key
,
opt_ssl_cert
,
opt_ssl_ca
,
opt_ssl_capath
,
opt_ssl_cipher
);
mysql_options
(
mysql
,
MYSQL_OPT_SSL_CRL
,
opt_ssl_crl
);
mysql_options
(
mysql
,
MYSQL_OPT_SSL_CRLPATH
,
opt_ssl_crlpath
);
}
mysql_options
(
mysql
,
MYSQL_OPT_SSL_VERIFY_SERVER_CERT
,
(
char
*
)
&
opt_ssl_verify_server_cert
);
#endif
/*HAVE_OPENSSL*/
if
(
opt_plugindir
&&
*
opt_plugindir
)
if
(
opt_plugindir
&&
*
opt_plugindir
)
mysql_options
(
mysql
,
MYSQL_PLUGIN_DIR
,
opt_plugindir
);
mysql_options
(
mysql
,
MYSQL_PLUGIN_DIR
,
opt_plugindir
);
...
...
mysql-test/r/openssl_1.result
View file @
44554d61
...
@@ -207,3 +207,12 @@ Variable_name Value
...
@@ -207,3 +207,12 @@ Variable_name Value
Ssl_cipher DHE-RSA-AES256-SHA
Ssl_cipher DHE-RSA-AES256-SHA
DROP USER bug42158@localhost;
DROP USER bug42158@localhost;
End of 5.1 tests
End of 5.1 tests
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=1*/;
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
/*!50003 SET @OLD_COMPLETION_TYPE=@@COMPLETION_TYPE,COMPLETION_TYPE=0*/;
DELIMITER /*!*/;
DELIMITER ;
# End of log file
ROLLBACK /* added by mysqlbinlog */;
/*!50003 SET COMPLETION_TYPE=@OLD_COMPLETION_TYPE*/;
/*!50530 SET @@SESSION.PSEUDO_SLAVE_MODE=0*/;
mysql-test/t/openssl_1.test
View file @
44554d61
...
@@ -265,5 +265,12 @@ DROP USER bug42158@localhost;
...
@@ -265,5 +265,12 @@ DROP USER bug42158@localhost;
--
echo
End
of
5.1
tests
--
echo
End
of
5.1
tests
#
# MDEV-9605 mysqlbinlog does not accept ssl-ca option as expected.
#
--
error
1
--
exec
$MYSQL_BINLOG
--
read
-
from
-
remote
-
server
--
ssl
-
ca
--
user
=
root
--
host
=
localhost
nobinlog
.
111111
# Wait till we reached the initial number of concurrent sessions
# Wait till we reached the initial number of concurrent sessions
--
source
include
/
wait_until_count_sessions
.
inc
--
source
include
/
wait_until_count_sessions
.
inc
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