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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
c4e336e0
Commit
c4e336e0
authored
Oct 10, 2015
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix the encryption.filekeys_nofile test
and move the error reporting where it belongs
parent
affff1ae
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
13 deletions
+13
-13
mysql-test/suite/encryption/r/filekeys_nofile.result
mysql-test/suite/encryption/r/filekeys_nofile.result
+2
-2
mysql-test/suite/encryption/t/filekeys_nofile.test
mysql-test/suite/encryption/t/filekeys_nofile.test
+1
-1
plugin/file_key_management/file_key_management_plugin.cc
plugin/file_key_management/file_key_management_plugin.cc
+0
-8
plugin/file_key_management/parser.cc
plugin/file_key_management/parser.cc
+10
-2
No files found.
mysql-test/suite/encryption/r/filekeys_nofile.result
View file @
c4e336e0
call mtr.add_suppression("
File '' not found
");
call mtr.add_suppression("
file-key-management-filename is not set
");
call mtr.add_suppression("Plugin 'file_key_management' init function returned error");
call mtr.add_suppression("Plugin 'file_key_management' registration.*failed");
FOUND /
File '' not found
/ in mysqld.1.err
FOUND /
file-key-management-filename is not set
/ in mysqld.1.err
create table t1(c1 bigint not null, b char(200)) engine=innodb encrypted=yes encryption_key_id=1;
ERROR HY000: Can't create table `test`.`t1` (errno: 140 "Wrong create options")
select plugin_status from information_schema.plugins
...
...
mysql-test/suite/encryption/t/filekeys_nofile.test
View file @
c4e336e0
let
SEARCH_PATTERN
=
File
''
not
found
;
let
SEARCH_PATTERN
=
file
-
key
-
management
-
filename
is
not
set
;
source
filekeys_badtest
.
inc
;
plugin/file_key_management/file_key_management_plugin.cc
View file @
c4e336e0
...
...
@@ -16,7 +16,6 @@
#include "parser.h"
#include <mysql/plugin_encryption.h>
#include <mysqld_error.h>
#include <string.h>
static
char
*
filename
;
...
...
@@ -166,13 +165,6 @@ struct st_mariadb_encryption file_key_management_plugin= {
static
int
file_key_management_plugin_init
(
void
*
p
)
{
if
(
!
filename
||
!
filename
[
0
])
{
my_printf_error
(
ER_CANT_INITIALIZE_UDF
,
"file_key_management-filename is not set"
,
MYF
(
0
));
return
1
;
}
Parser
parser
(
filename
,
filekey
);
return
parser
.
parse
(
&
keys
);
}
...
...
plugin/file_key_management/parser.cc
View file @
c4e336e0
...
...
@@ -298,8 +298,16 @@ int Parser::parse_line(char **line_ptr, keyentry *key)
char
*
Parser
::
read_and_decrypt_file
(
const
char
*
secret
)
{
int
f
=
my_open
(
filename
,
O_RDONLY
,
MYF
(
MY_WME
));
if
(
f
<
0
)
if
(
!
filename
||
!
filename
[
0
])
{
my_printf_error
(
EE_CANT_OPEN_STREAM
,
"file-key-management-filename is not set"
,
MYF
(
ME_NOREFRESH
));
goto
err0
;
}
int
f
;
if
((
f
=
my_open
(
filename
,
O_RDONLY
,
MYF
(
MY_WME
)))
<
0
)
goto
err0
;
my_off_t
file_size
;
...
...
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