summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorJim Winstead <jimw@mysql.com>2009-07-13 12:11:16 -0700
committerJim Winstead <jimw@mysql.com>2009-07-13 12:11:16 -0700
commitf9025ea331802d0427b46235d5ddf15b7ee4e795 (patch)
tree2c16863bd863c75d1a5827b99e320e258a585948 /client
parent0cb562f30479aae1158f437d561b557e6a5d0745 (diff)
parentb6ff6952317e55a69ec7b0c73c867d5bd031bb44 (diff)
downloadmariadb-git-f9025ea331802d0427b46235d5ddf15b7ee4e795.tar.gz
Merge bug fixes
Diffstat (limited to 'client')
-rw-r--r--client/Makefile.am2
-rw-r--r--client/mysqlbinlog.cc7
-rw-r--r--client/mysqldump.c18
3 files changed, 18 insertions, 9 deletions
diff --git a/client/Makefile.am b/client/Makefile.am
index 5fadbc171ae..ecdd010575f 100644
--- a/client/Makefile.am
+++ b/client/Makefile.am
@@ -71,7 +71,7 @@ mysqldump_SOURCES= mysqldump.c \
$(top_srcdir)/mysys/mf_getdate.c
mysqlimport_SOURCES= mysqlimport.c
-
+mysqlimport_CFLAGS= -DTHREAD -UUNDEF_THREADS_HACK
mysqlimport_LDADD = $(CXXLDFLAGS) $(CLIENT_THREAD_LIBS) \
@CLIENT_EXTRA_LDFLAGS@ \
$(LIBMYSQLCLIENT_LA) \
diff --git a/client/mysqlbinlog.cc b/client/mysqlbinlog.cc
index e200f23813a..82af7ca65f6 100644
--- a/client/mysqlbinlog.cc
+++ b/client/mysqlbinlog.cc
@@ -17,10 +17,8 @@
TODO: print the catalog (some USE catalog.db ????).
- Standalone program to read a MySQL binary log (or relay log);
- can read files produced by 3.23, 4.x, 5.0 servers.
+ Standalone program to read a MySQL binary log (or relay log).
- Can read binlogs from 3.23/4.x/5.0 and relay logs from 4.x/5.0.
Should be able to read any file of these categories, even with
--start-position.
An important fact: the Format_desc event of the log is at most the 3rd event
@@ -988,10 +986,13 @@ static struct my_option my_long_options[] =
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
#endif
{"base64-output", OPT_BASE64_OUTPUT_MODE,
+ /* '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."
diff --git a/client/mysqldump.c b/client/mysqldump.c
index 6b2c2a06834..6d45d901b33 100644
--- a/client/mysqldump.c
+++ b/client/mysqldump.c
@@ -3821,6 +3821,10 @@ static int dump_all_databases()
return 1;
while ((row= mysql_fetch_row(tableres)))
{
+ if (mysql_get_server_version(mysql) >= 50003 &&
+ !my_strcasecmp(&my_charset_latin1, row[0], "information_schema"))
+ continue;
+
if (dump_all_tables_in_db(row[0]))
result=1;
}
@@ -3835,6 +3839,10 @@ static int dump_all_databases()
}
while ((row= mysql_fetch_row(tableres)))
{
+ if (mysql_get_server_version(mysql) >= 50003 &&
+ !my_strcasecmp(&my_charset_latin1, row[0], "information_schema"))
+ continue;
+
if (dump_all_views_in_db(row[0]))
result=1;
}
@@ -3941,10 +3949,6 @@ int init_dumping_tables(char *qdatabase)
static int init_dumping(char *database, int init_func(char*))
{
- if (mysql_get_server_version(mysql) >= 50003 &&
- !my_strcasecmp(&my_charset_latin1, database, "information_schema"))
- return 1;
-
if (mysql_select_db(mysql, database))
{
DB_error(mysql, "when selecting the database");
@@ -4003,6 +4007,7 @@ static int dump_all_tables_in_db(char *database)
DBUG_RETURN(1);
if (opt_xml)
print_xml_tag(md_result_file, "", "\n", "database", "name=", database, NullS);
+
if (lock_tables)
{
DYNAMIC_STRING query;
@@ -4236,7 +4241,10 @@ static int dump_selected_tables(char *db, char **table_names, int tables)
}
end= pos;
- if (lock_tables)
+ /* Can't LOCK TABLES in INFORMATION_SCHEMA, so don't try. */
+ if (lock_tables &&
+ !(mysql_get_server_version(mysql) >= 50003 &&
+ !my_strcasecmp(&my_charset_latin1, db, "information_schema")))
{
if (mysql_real_query(mysql, lock_tables_query.str,
lock_tables_query.length-1))