mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
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
This commit is contained in:
@ -489,7 +489,7 @@ static void write_header(FILE *sql_file, char *db_name)
|
|||||||
");
|
");
|
||||||
}
|
}
|
||||||
fprintf(sql_file,
|
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?"":",",
|
path?"":"NO_AUTO_VALUE_ON_ZERO",compatible_mode_normal_str[0]==0?"":",",
|
||||||
compatible_mode_normal_str);
|
compatible_mode_normal_str);
|
||||||
check_io(sql_file);
|
check_io(sql_file);
|
||||||
@ -863,7 +863,7 @@ static int dbConnect(char *host, char *user,char *passwd)
|
|||||||
cannot reconnect.
|
cannot reconnect.
|
||||||
*/
|
*/
|
||||||
sock->reconnect= 0;
|
sock->reconnect= 0;
|
||||||
sprintf(buff, "/*!40100 SET @@SQL_MODE=\"%s\" */",
|
sprintf(buff, "/*!40100 SET @@SQL_MODE='%s' */",
|
||||||
compatible_mode_normal_str);
|
compatible_mode_normal_str);
|
||||||
if (mysql_query_with_error_report(sock, 0, buff))
|
if (mysql_query_with_error_report(sock, 0, buff))
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user