summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorunknown <jimw@mysql.com>2005-01-28 11:16:49 -0800
committerunknown <jimw@mysql.com>2005-01-28 11:16:49 -0800
commitd848286e70a4e257ee7ebab5966cd33b40e12c03 (patch)
treee78426850158594b16a20fe75adce521f0fee383 /client
parenta271a6c878ffe8245bd631888bfeee3cb5055005 (diff)
downloadmariadb-git-d848286e70a4e257ee7ebab5966cd33b40e12c03.tar.gz
Use single quotes to set SQL_MODE in mysqldump output in case ANSI_QUOTES
was already defined on the server the dump is loaded into. (Bug #8148) client/mysqldump.c: Use single quotes when setting SQL_MODE
Diffstat (limited to 'client')
-rw-r--r--client/mysqldump.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/client/mysqldump.c b/client/mysqldump.c
index 00f5272e3d7..fb83947346d 100644
--- a/client/mysqldump.c
+++ b/client/mysqldump.c
@@ -489,7 +489,7 @@ static void write_header(FILE *sql_file, char *db_name)
");
}
fprintf(sql_file,
- "/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE=\"%s%s%s\" */;\n",
+ "/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='%s%s%s' */;\n",
path?"":"NO_AUTO_VALUE_ON_ZERO",compatible_mode_normal_str[0]==0?"":",",
compatible_mode_normal_str);
check_io(sql_file);
@@ -863,7 +863,7 @@ static int dbConnect(char *host, char *user,char *passwd)
cannot reconnect.
*/
sock->reconnect= 0;
- sprintf(buff, "/*!40100 SET @@SQL_MODE=\"%s\" */",
+ sprintf(buff, "/*!40100 SET @@SQL_MODE='%s' */",
compatible_mode_normal_str);
if (mysql_query_with_error_report(sock, 0, buff))
{