Loading client/mysql.cc +2 −2 Original line number Diff line number Diff line Loading @@ -2629,7 +2629,7 @@ com_connect(String *buffer, char *line) bzero(buff, sizeof(buff)); if (buffer) { strmov(buff, line); strmake(buff, line, sizeof(buff) - 1); tmp= get_arg(buff, 0); if (tmp && *tmp) { Loading Loading @@ -2743,7 +2743,7 @@ com_use(String *buffer __attribute__((unused)), char *line) char *tmp, buff[FN_REFLEN + 1]; bzero(buff, sizeof(buff)); strmov(buff, line); strmake(buff, line, sizeof(buff) - 1); tmp= get_arg(buff, 0); if (!tmp || !*tmp) { Loading mysql-test/r/func_time.result +12 −0 Original line number Diff line number Diff line Loading @@ -694,6 +694,18 @@ t1 CREATE TABLE `t1` ( `from_unixtime(1) + 0` double(23,6) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; SET NAMES latin1; SET character_set_results = NULL; SHOW VARIABLES LIKE 'character_set_results'; Variable_name Value character_set_results CREATE TABLE testBug8868 (field1 DATE, field2 VARCHAR(32) CHARACTER SET BINARY); INSERT INTO testBug8868 VALUES ('2006-09-04', 'abcd'); SELECT DATE_FORMAT(field1,'%b-%e %l:%i%p') as fmtddate, field2 FROM testBug8868; fmtddate field2 Sep-4 12:00AM abcd DROP TABLE testBug8868; SET NAMES DEFAULT; (select time_format(timediff(now(), DATE_SUB(now(),INTERVAL 5 DAY)),'%H') As H) union (select time_format(timediff(now(), DATE_SUB(now(),INTERVAL 5 DAY)),'%H') As H); Loading mysql-test/t/func_time.test +19 −0 Original line number Diff line number Diff line Loading @@ -368,6 +368,25 @@ create table t1 select now() - now(), curtime() - curtime(), show create table t1; drop table t1; # # 21913: DATE_FORMAT() Crashes mysql server if I use it through # mysql-connector-j driver. # SET NAMES latin1; SET character_set_results = NULL; SHOW VARIABLES LIKE 'character_set_results'; CREATE TABLE testBug8868 (field1 DATE, field2 VARCHAR(32) CHARACTER SET BINARY); INSERT INTO testBug8868 VALUES ('2006-09-04', 'abcd'); SELECT DATE_FORMAT(field1,'%b-%e %l:%i%p') as fmtddate, field2 FROM testBug8868; DROP TABLE testBug8868; SET NAMES DEFAULT; # # Bug #19844 time_format in Union truncates values # Loading mysql-test/t/lowercase_fs_off.test +1 −0 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ # i.e. lower_case_filesystem=OFF # -- source include/have_case_sensitive_file_system.inc -- source include/not_embedded.inc connect (master,localhost,root,,); connection master; Loading sql/mysqld.cc +2 −2 Original line number Diff line number Diff line Loading @@ -6552,10 +6552,10 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), } switch (method-1) { case 0: method_conv= MI_STATS_METHOD_NULLS_EQUAL; method_conv= MI_STATS_METHOD_NULLS_NOT_EQUAL; break; case 1: method_conv= MI_STATS_METHOD_NULLS_NOT_EQUAL; method_conv= MI_STATS_METHOD_NULLS_EQUAL; break; case 2: method_conv= MI_STATS_METHOD_IGNORE_NULLS; Loading Loading
client/mysql.cc +2 −2 Original line number Diff line number Diff line Loading @@ -2629,7 +2629,7 @@ com_connect(String *buffer, char *line) bzero(buff, sizeof(buff)); if (buffer) { strmov(buff, line); strmake(buff, line, sizeof(buff) - 1); tmp= get_arg(buff, 0); if (tmp && *tmp) { Loading Loading @@ -2743,7 +2743,7 @@ com_use(String *buffer __attribute__((unused)), char *line) char *tmp, buff[FN_REFLEN + 1]; bzero(buff, sizeof(buff)); strmov(buff, line); strmake(buff, line, sizeof(buff) - 1); tmp= get_arg(buff, 0); if (!tmp || !*tmp) { Loading
mysql-test/r/func_time.result +12 −0 Original line number Diff line number Diff line Loading @@ -694,6 +694,18 @@ t1 CREATE TABLE `t1` ( `from_unixtime(1) + 0` double(23,6) default NULL ) ENGINE=MyISAM DEFAULT CHARSET=latin1 drop table t1; SET NAMES latin1; SET character_set_results = NULL; SHOW VARIABLES LIKE 'character_set_results'; Variable_name Value character_set_results CREATE TABLE testBug8868 (field1 DATE, field2 VARCHAR(32) CHARACTER SET BINARY); INSERT INTO testBug8868 VALUES ('2006-09-04', 'abcd'); SELECT DATE_FORMAT(field1,'%b-%e %l:%i%p') as fmtddate, field2 FROM testBug8868; fmtddate field2 Sep-4 12:00AM abcd DROP TABLE testBug8868; SET NAMES DEFAULT; (select time_format(timediff(now(), DATE_SUB(now(),INTERVAL 5 DAY)),'%H') As H) union (select time_format(timediff(now(), DATE_SUB(now(),INTERVAL 5 DAY)),'%H') As H); Loading
mysql-test/t/func_time.test +19 −0 Original line number Diff line number Diff line Loading @@ -368,6 +368,25 @@ create table t1 select now() - now(), curtime() - curtime(), show create table t1; drop table t1; # # 21913: DATE_FORMAT() Crashes mysql server if I use it through # mysql-connector-j driver. # SET NAMES latin1; SET character_set_results = NULL; SHOW VARIABLES LIKE 'character_set_results'; CREATE TABLE testBug8868 (field1 DATE, field2 VARCHAR(32) CHARACTER SET BINARY); INSERT INTO testBug8868 VALUES ('2006-09-04', 'abcd'); SELECT DATE_FORMAT(field1,'%b-%e %l:%i%p') as fmtddate, field2 FROM testBug8868; DROP TABLE testBug8868; SET NAMES DEFAULT; # # Bug #19844 time_format in Union truncates values # Loading
mysql-test/t/lowercase_fs_off.test +1 −0 Original line number Diff line number Diff line Loading @@ -3,6 +3,7 @@ # i.e. lower_case_filesystem=OFF # -- source include/have_case_sensitive_file_system.inc -- source include/not_embedded.inc connect (master,localhost,root,,); connection master; Loading
sql/mysqld.cc +2 −2 Original line number Diff line number Diff line Loading @@ -6552,10 +6552,10 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), } switch (method-1) { case 0: method_conv= MI_STATS_METHOD_NULLS_EQUAL; method_conv= MI_STATS_METHOD_NULLS_NOT_EQUAL; break; case 1: method_conv= MI_STATS_METHOD_NULLS_NOT_EQUAL; method_conv= MI_STATS_METHOD_NULLS_EQUAL; break; case 2: method_conv= MI_STATS_METHOD_IGNORE_NULLS; Loading