summaryrefslogtreecommitdiff
path: root/client/mysqlbinlog.cc
diff options
context:
space:
mode:
authorAndrei Elkin <aelkin@mysql.com>2009-11-30 14:34:39 +0200
committerAndrei Elkin <aelkin@mysql.com>2009-11-30 14:34:39 +0200
commit3962da934f6e2a92ba04505bd6a33dd7d8322005 (patch)
treec5510a774ac5e8722c26070e21e3d266d6408381 /client/mysqlbinlog.cc
parent13dad4ebd268e4bf26c4d6f478f19896770d9b78 (diff)
parenta95f54c6d81f20b07e41a7e0e2246ee00641df6c (diff)
downloadmariadb-git-3962da934f6e2a92ba04505bd6a33dd7d8322005.tar.gz
merging from 5.1 to rep+2 starting at gca(5.1, next-mr) == build@mysql.com-20091104182209-iui387z35159aoyw
Diffstat (limited to 'client/mysqlbinlog.cc')
-rw-r--r--client/mysqlbinlog.cc28
1 files changed, 21 insertions, 7 deletions
diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc
index 894a3ac9146..cf56713ec0d 100644
--- a/client/mysqlbinlog.cc
+++ b/client/mysqlbinlog.cc
@@ -78,6 +78,9 @@ static const char* host = 0;
static int port= 0;
static uint my_end_arg;
static const char* sock= 0;
+#ifdef HAVE_SMEM
+static char *shared_memory_base_name= 0;
+#endif
static const char* user = 0;
static char* pass = 0;
static char *charset= 0;
@@ -1009,13 +1012,13 @@ static struct my_option my_long_options[] =
/* 'unspec' is not mentioned because it is just a placeholder. */
"Determine when the output statements should be base64-encoded BINLOG "
"statements: 'never' disables it and works only for binlogs without "
- "row-based events; 'auto' is the default and prints base64 only when "
- "necessary (i.e., for row-based events and format description events); "
- "'decode-rows' suppresses BINLOG statements for row events, but does "
- "not exit as an error if a row event is found, unlike 'never'; "
- "'always' prints base64 whenever possible. 'always' is for debugging "
- "only and should not be used in a production system. The default is "
- "'auto'. --base64-output is a short form for --base64-output=always."
+ "row-based events; 'decode-rows' decodes row events into commented SQL "
+ "statements if the --verbose option is also given; 'auto' prints base64 "
+ "only when necessary (i.e., for row-based events and format description "
+ "events); 'always' prints base64 whenever possible. 'always' is for "
+ "debugging only and should not be used in a production system. If this "
+ "argument is not given, the default is 'auto'; if it is given with no "
+ "argument, 'always' is used."
,(uchar**) &opt_base64_output_mode_str,
(uchar**) &opt_base64_output_mode_str,
0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
@@ -1094,6 +1097,12 @@ static struct my_option my_long_options[] =
{"set-charset", OPT_SET_CHARSET,
"Add 'SET NAMES character_set' to the output.", (uchar**) &charset,
(uchar**) &charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+#ifdef HAVE_SMEM
+ {"shared-memory-base-name", OPT_SHARED_MEMORY_BASE_NAME,
+ "Base name of shared memory.", (uchar**) &shared_memory_base_name,
+ (uchar**) &shared_memory_base_name,
+ 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
+#endif
{"short-form", 's', "Just show regular queries: no extra info and no "
"row-based events. This is for testing only, and should not be used in "
"production systems. If you want to suppress base64-output, consider "
@@ -1395,6 +1404,11 @@ static Exit_status safe_connect()
if (opt_protocol)
mysql_options(mysql, MYSQL_OPT_PROTOCOL, (char*) &opt_protocol);
+#ifdef HAVE_SMEM
+ if (shared_memory_base_name)
+ mysql_options(mysql, MYSQL_SHARED_MEMORY_BASE_NAME,
+ shared_memory_base_name);
+#endif
if (!mysql_real_connect(mysql, host, user, pass, 0, port, sock, 0))
{
error("Failed on connect: %s", mysql_error(mysql));