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
8e2a24bb
Commit
8e2a24bb
authored
Jun 26, 2019
by
Monty
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added s3_protocol_version=auto
parent
0765d823
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
11 deletions
+14
-11
storage/maria/aria_s3_copy.cc
storage/maria/aria_s3_copy.cc
+7
-5
storage/maria/ha_s3.cc
storage/maria/ha_s3.cc
+3
-3
storage/maria/s3_func.c
storage/maria/s3_func.c
+4
-3
No files found.
storage/maria/aria_s3_copy.cc
View file @
8e2a24bb
...
...
@@ -77,9 +77,9 @@ static struct my_option my_long_options[] =
&
opt_block_size
,
&
opt_block_size
,
0
,
GET_ULONG
,
REQUIRED_ARG
,
4
*
1024
*
1024
,
64
*
1024
,
16
*
1024
*
1024
,
MALLOC_OVERHEAD
,
1024
,
0
},
{
"s3_protocol_version"
,
'L'
,
"Protocol used to communication with S3. One of
\"
Amazon
\"
or
\"
Original
\"
."
,
"Protocol used to communication with S3. One of
\"
A
uto
\"
,
\"
A
mazon
\"
or
\"
Original
\"
."
,
&
opt_protocol_version
,
&
opt_protocol_version
,
&
s3_protocol_typelib
,
GET_ENUM
,
REQUIRED_ARG
,
1
,
0
,
0
,
0
,
0
,
0
},
GET_ENUM
,
REQUIRED_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"force"
,
'f'
,
"Force copy even if target exists"
,
&
opt_force
,
&
opt_force
,
0
,
GET_BOOL
,
NO_ARG
,
0
,
0
,
0
,
0
,
0
,
0
},
{
"verbose"
,
'v'
,
"Write more information"
,
&
opt_verbose
,
&
opt_verbose
,
...
...
@@ -209,10 +209,12 @@ int main(int argc, char** argv)
{
size_t
block_size
=
opt_block_size
;
uint8_t
protocol_version
=
(
uint8_t
)
opt_protocol_version
+
1
;
uint8_t
protocol_version
=
(
uint8_t
)
opt_protocol_version
;
ms3_set_option
(
global_s3_client
,
MS3_OPT_BUFFER_CHUNK_SIZE
,
&
block_size
);
ms3_set_option
(
global_s3_client
,
MS3_OPT_FORCE_PROTOCOL_VERSION
,
&
protocol_version
);
if
(
protocol_version
)
ms3_set_option
(
global_s3_client
,
MS3_OPT_FORCE_PROTOCOL_VERSION
,
&
protocol_version
);
}
for
(;
*
argv
;
argv
++
)
...
...
storage/maria/ha_s3.cc
View file @
8e2a24bb
...
...
@@ -127,8 +127,8 @@ static MYSQL_SYSVAR_BOOL(debug, s3_debug,
static
MYSQL_SYSVAR_ENUM
(
protocol_version
,
s3_protocol_version
,
PLUGIN_VAR_RQCMDARG
,
"Protocol used to communication with S3. One of "
"
\"
Amazon
\"
or
\"
Original
\"
."
,
NULL
,
NULL
,
1
,
&
s3_protocol_typelib
);
"
\"
A
uto
\"
,
\"
A
mazon
\"
or
\"
Original
\"
."
,
NULL
,
NULL
,
0
,
&
s3_protocol_typelib
);
static
MYSQL_SYSVAR_ULONG
(
pagecache_age_threshold
,
s3_pagecache_age_threshold
,
PLUGIN_VAR_RQCMDARG
,
...
...
@@ -259,7 +259,7 @@ static my_bool s3_info_init(S3_INFO *info)
{
if
(
!
s3_usable
())
return
1
;
info
->
protocol_version
=
(
uint8_t
)
s3_protocol_version
+
1
;
info
->
protocol_version
=
(
uint8_t
)
s3_protocol_version
;
lex_string_set
(
&
info
->
host_name
,
s3_host_name
);
lex_string_set
(
&
info
->
access_key
,
s3_access_key
);
lex_string_set
(
&
info
->
secret_key
,
s3_secret_key
);
...
...
storage/maria/s3_func.c
View file @
8e2a24bb
...
...
@@ -39,7 +39,7 @@ static int s3_read_frm_from_disk(const char *filename, uchar **to,
/* Used by ha_s3.cc and tools to define different protocol options */
static
const
char
*
protocol_types
[]
=
{
"Original"
,
"Amazon"
,
NullS
};
static
const
char
*
protocol_types
[]
=
{
"
Auto"
,
"
Original"
,
"Amazon"
,
NullS
};
TYPELIB
s3_protocol_typelib
=
{
array_elements
(
protocol_types
)
-
1
,
""
,
protocol_types
,
NULL
};
...
...
@@ -149,8 +149,9 @@ ms3_st *s3_open_connection(S3_INFO *s3)
errno
,
ms3_error
(
errno
));
my_errno
=
HA_ERR_NO_SUCH_TABLE
;
}
ms3_set_option
(
s3_client
,
MS3_OPT_FORCE_PROTOCOL_VERSION
,
&
s3
->
protocol_version
);
if
(
s3
->
protocol_version
)
ms3_set_option
(
s3_client
,
MS3_OPT_FORCE_PROTOCOL_VERSION
,
&
s3
->
protocol_version
);
return
s3_client
;
}
...
...
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