summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2014-03-05 23:20:10 +0100
committerSergei Golubchik <sergii@pisem.net>2014-03-05 23:20:10 +0100
commit4c788b06d47a06e28659a6ff77c8666648642786 (patch)
treeef6fc78f1aa274d42768c40e9ce6209272dacd9b /client
parent75124c5d2b1cdd5356063fa2af6615424f4838da (diff)
parent23af77d26e3ff336e415a5d8bf3f4c4a7bc84a18 (diff)
downloadmariadb-git-4c788b06d47a06e28659a6ff77c8666648642786.tar.gz
10.0-base merge
Diffstat (limited to 'client')
-rw-r--r--client/mysqldump.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/client/mysqldump.c b/client/mysqldump.c
index fa5c06786d2..a0222f370b3 100644
--- a/client/mysqldump.c
+++ b/client/mysqldump.c
@@ -4004,7 +4004,13 @@ static int dump_tablespaces(char* ts_where)
char *ubs;
char *endsemi;
DBUG_ENTER("dump_tablespaces");
-
+
+ /*
+ Try to turn off semi-join optimization (if that fails, this is a
+ pre-optimizer_switch server, and the old query plan is ok for us.
+ */
+ mysql_query(mysql, "set optimizer_switch='semijoin=off'");
+
init_dynamic_string_checked(&sqlbuf,
"SELECT LOGFILE_GROUP_NAME,"
" FILE_NAME,"
@@ -4164,6 +4170,8 @@ static int dump_tablespaces(char* ts_where)
mysql_free_result(tableres);
dynstr_free(&sqlbuf);
+ mysql_query(mysql, "set optimizer_switch=default");
+
DBUG_RETURN(0);
}