summaryrefslogtreecommitdiffstats
path: root/storage/maria/ha_s3.cc
diff options
context:
space:
mode:
Diffstat (limited to 'storage/maria/ha_s3.cc')
-rw-r--r--storage/maria/ha_s3.cc34
1 files changed, 30 insertions, 4 deletions
diff --git a/storage/maria/ha_s3.cc b/storage/maria/ha_s3.cc
index 8c105522..0abb3f07 100644
--- a/storage/maria/ha_s3.cc
+++ b/storage/maria/ha_s3.cc
@@ -121,6 +121,29 @@ static void update_secret_key(MYSQL_THD thd,
}
}
+static void update_s3_debug(MYSQL_THD thd,
+ struct st_mysql_sys_var *var
+ __attribute__((unused)),
+ void *var_ptr __attribute__((unused)),
+ const void *save)
+{
+ char new_state= *(char *) save;
+ if (s3_debug != new_state)
+ {
+ s3_debug= new_state;
+ if (s3_hton) // If library is initalized
+ {
+ ms3_debug(new_state);
+ if (!new_state)
+ {
+ /* Ensure that all logging is written to log */
+ fflush(stderr);
+ }
+ }
+ }
+}
+
+
/* Define system variables for S3 */
static MYSQL_SYSVAR_ULONG(block_size, s3_block_size,
@@ -129,9 +152,9 @@ static MYSQL_SYSVAR_ULONG(block_size, s3_block_size,
4*1024*1024, 65536, 16*1024*1024, 8192);
static MYSQL_SYSVAR_BOOL(debug, s3_debug,
- PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
+ PLUGIN_VAR_RQCMDARG,
"Generates trace file from libmarias3 on stderr for debugging",
- 0, 0, 0);
+ 0, update_s3_debug, 0);
static MYSQL_SYSVAR_BOOL(slave_ignore_updates, s3_slave_ignore_updates,
PLUGIN_VAR_RQCMDARG | PLUGIN_VAR_READONLY,
@@ -147,7 +170,10 @@ static MYSQL_SYSVAR_BOOL(replicate_alter_as_create_select,
static MYSQL_SYSVAR_ENUM(protocol_version, s3_protocol_version,
PLUGIN_VAR_RQCMDARG,
"Protocol used to communication with S3. One of "
- "\"Auto\", \"Amazon\" or \"Original\".",
+ "\"Auto\", \"Legacy\", \"Original\", \"Amazon\", "
+ "\"Path\" or \"Domain\". "
+ "Note: \"Legacy\", \"Original\" and \"Amazon\" are "
+ "deprecated.",
NULL, NULL, 0, &s3_protocol_typelib);
static MYSQL_SYSVAR_ULONG(pagecache_age_threshold,
@@ -1048,7 +1074,7 @@ static int ha_s3_init(void *p)
s3_pagecache.big_block_free= s3_free;
s3_init_library();
if (s3_debug)
- ms3_debug();
+ ms3_debug(1);
struct s3_func s3f_real =
{