Loading Build-tools/Bootstrap +8 −2 Original line number Diff line number Diff line Loading @@ -210,10 +210,16 @@ if (-d $target_dir) } else { &logger("Renaming $target_dir to $target_dir.old." . $$); # Get the time stamp of "configure.in" @stat= stat("$target_dir/configure.in"); my $mtime= $stat[9]; my ($sec,$min,$hour,$mday,$mon,$year) = localtime($mtime); my $mtime= sprintf("%04d%-02d-%02d-%02d:%02d", $year+1900, $mon+1, $mday, $hour, $min); &logger("Renaming $target_dir to $target_dir-$mtime"); $command= "mv "; $command.= "-v " if ($opt_verbose || defined $opt_log); $command.= "$target_dir $target_dir.old." . $$; $command.= "$target_dir $target_dir-$mtime"; &run_command($command, "Could not rename $target_dir!"); } } Loading client/mysqldump.c +2 −2 Original line number Diff line number Diff line Loading @@ -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); Loading Loading @@ -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)) { Loading extra/perror.c +12 −1 Original line number Diff line number Diff line Loading @@ -184,6 +184,7 @@ int main(int argc,char *argv[]) { int error,code,found; const char *msg; char *unknown_error = 0; MY_INIT(argv[0]); if (get_options(&argc,&argv)) Loading Loading @@ -212,7 +213,12 @@ int main(int argc,char *argv[]) string 'Unknown Error'. To avoid printing it we try to find the error string by asking for an impossible big error message. */ const char *unknown_error= strerror(10000); msg = strerror(10000); /* allocate a buffer for unknown_error since strerror always returns the same pointer on some platforms such as Windows */ unknown_error = malloc( strlen(msg)+1 ); strcpy( unknown_error, msg ); for ( ; argc-- > 0 ; argv++) { Loading Loading @@ -262,6 +268,11 @@ int main(int argc,char *argv[]) } } } /* if we allocated a buffer for unknown_error, free it now */ if (unknown_error) free(unknown_error); exit(error); return error; } mysql-test/r/compare.result +3 −0 Original line number Diff line number Diff line Loading @@ -36,3 +36,6 @@ hex(a) STRCMP(a,'a') STRCMP(a,'a ') 6109 -1 -1 61 0 0 DROP TABLE t1; SELECT CHAR(31) = '', '' = CHAR(31); CHAR(31) = '' '' = CHAR(31) 0 0 mysql-test/r/derived.result +9 −0 Original line number Diff line number Diff line Loading @@ -330,3 +330,12 @@ SELECT MIN(price) min, MAX(price) max, AVG(price) avg FROM (SELECT SUBSTRING( MA min max avg 10.00 10.00 10 DROP TABLE t1; create table t1 (a integer, b integer); insert into t1 values (1,4), (2,2),(2,2), (4,1),(4,1),(4,1),(4,1); select distinct sum(b) from t1 group by a; sum(b) 4 select distinct sum(b) from (select a,b from t1) y group by a; sum(b) 4 drop table t1; Loading
Build-tools/Bootstrap +8 −2 Original line number Diff line number Diff line Loading @@ -210,10 +210,16 @@ if (-d $target_dir) } else { &logger("Renaming $target_dir to $target_dir.old." . $$); # Get the time stamp of "configure.in" @stat= stat("$target_dir/configure.in"); my $mtime= $stat[9]; my ($sec,$min,$hour,$mday,$mon,$year) = localtime($mtime); my $mtime= sprintf("%04d%-02d-%02d-%02d:%02d", $year+1900, $mon+1, $mday, $hour, $min); &logger("Renaming $target_dir to $target_dir-$mtime"); $command= "mv "; $command.= "-v " if ($opt_verbose || defined $opt_log); $command.= "$target_dir $target_dir.old." . $$; $command.= "$target_dir $target_dir-$mtime"; &run_command($command, "Could not rename $target_dir!"); } } Loading
client/mysqldump.c +2 −2 Original line number Diff line number Diff line Loading @@ -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); Loading Loading @@ -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)) { Loading
extra/perror.c +12 −1 Original line number Diff line number Diff line Loading @@ -184,6 +184,7 @@ int main(int argc,char *argv[]) { int error,code,found; const char *msg; char *unknown_error = 0; MY_INIT(argv[0]); if (get_options(&argc,&argv)) Loading Loading @@ -212,7 +213,12 @@ int main(int argc,char *argv[]) string 'Unknown Error'. To avoid printing it we try to find the error string by asking for an impossible big error message. */ const char *unknown_error= strerror(10000); msg = strerror(10000); /* allocate a buffer for unknown_error since strerror always returns the same pointer on some platforms such as Windows */ unknown_error = malloc( strlen(msg)+1 ); strcpy( unknown_error, msg ); for ( ; argc-- > 0 ; argv++) { Loading Loading @@ -262,6 +268,11 @@ int main(int argc,char *argv[]) } } } /* if we allocated a buffer for unknown_error, free it now */ if (unknown_error) free(unknown_error); exit(error); return error; }
mysql-test/r/compare.result +3 −0 Original line number Diff line number Diff line Loading @@ -36,3 +36,6 @@ hex(a) STRCMP(a,'a') STRCMP(a,'a ') 6109 -1 -1 61 0 0 DROP TABLE t1; SELECT CHAR(31) = '', '' = CHAR(31); CHAR(31) = '' '' = CHAR(31) 0 0
mysql-test/r/derived.result +9 −0 Original line number Diff line number Diff line Loading @@ -330,3 +330,12 @@ SELECT MIN(price) min, MAX(price) max, AVG(price) avg FROM (SELECT SUBSTRING( MA min max avg 10.00 10.00 10 DROP TABLE t1; create table t1 (a integer, b integer); insert into t1 values (1,4), (2,2),(2,2), (4,1),(4,1),(4,1),(4,1); select distinct sum(b) from t1 group by a; sum(b) 4 select distinct sum(b) from (select a,b from t1) y group by a; sum(b) 4 drop table t1;