diff --git a/mysql-test/mysql-test-run.pl b/mysql-test/mysql-test-run.pl index 931cc63c513..355846d569b 100755 --- a/mysql-test/mysql-test-run.pl +++ b/mysql-test/mysql-test-run.pl @@ -3615,13 +3615,14 @@ sub mysqld_arguments ($$$$$) { } } - my $pidfile; + # Check if "extra_opt" contains --skip-log-bin + my $skip_binlog= grep('--skip-log-bin', @$extra_opt); if ( $type eq 'master' ) { my $id= $idx > 0 ? $idx + 101 : 1; - if (! $opt_skip_master_binlog) + if (! ($opt_skip_master_binlog || $skip_binlog) ) { mtr_add_arg($args, "%s--log-bin=%s/log/master-bin%s", $prefix, $opt_vardir, $sidx); @@ -3683,7 +3684,7 @@ sub mysqld_arguments ($$$$$) { mtr_add_arg($args, "%s--datadir=%s", $prefix, $slave->[$idx]->{'path_myddir'}); mtr_add_arg($args, "%s--init-rpl-role=slave", $prefix); - if (! $opt_skip_slave_binlog) + if (! ( $opt_skip_slave_binlog || $skip_binlog )) { mtr_add_arg($args, "%s--log-bin=%s/log/slave%s-bin", $prefix, $opt_vardir, $sidx); # FIXME use own dir for binlogs @@ -3820,6 +3821,10 @@ sub mysqld_arguments ($$$$$) { { $found_skip_core= 1; } + elsif ($skip_binlog and mtr_match_prefix($arg, "--binlog-format")) + { + ; # Dont add --binlog-format when running without binlog + } else { mtr_add_arg($args, "%s%s", $prefix, $arg); diff --git a/mysql-test/r/cast.result b/mysql-test/r/cast.result index c95c950e7e0..647c210b7d0 100644 --- a/mysql-test/r/cast.result +++ b/mysql-test/r/cast.result @@ -348,6 +348,10 @@ Warnings: Warning 1292 Truncated incorrect INTEGER value: '-1e+30' Warning 1292 Truncated incorrect INTEGER value: '1e+30' DROP TABLE t1; +select isnull(date(NULL)), isnull(cast(NULL as DATE)); +isnull(date(NULL)) isnull(cast(NULL as DATE)) +1 1 +End of 4.1 tests select cast('1.2' as decimal(3,2)); cast('1.2' as decimal(3,2)) 1.20 diff --git a/mysql-test/t/cast.test b/mysql-test/t/cast.test index ed9fdfa087a..bc50d484a5f 100644 --- a/mysql-test/t/cast.test +++ b/mysql-test/t/cast.test @@ -176,7 +176,13 @@ INSERT INTO t1 SET f1 = +1.0e+30 ; SELECT f1 AS double_val, CAST(f1 AS SIGNED INT) AS cast_val FROM t1; DROP TABLE t1; -# End of 4.1 tests +# +# Bug #23938: cast(NULL as DATE) +# + +select isnull(date(NULL)), isnull(cast(NULL as DATE)); + +--echo End of 4.1 tests #decimal-related additions diff --git a/mysql-test/t/disabled.def b/mysql-test/t/disabled.def index f1e7271ce2e..2ed9dbcd400 100644 --- a/mysql-test/t/disabled.def +++ b/mysql-test/t/disabled.def @@ -36,7 +36,6 @@ synchronization : Bug#24529 Test 'synchronization' fails on Mac pushb #ndb_binlog_discover : bug#21806 2006-08-24 #ndb_autodiscover3 : bug#21806 -flush2 : Bug#24805 Pushbuild can't handle test with --disable-log-bin mysql_upgrade : Bug#25074 mysql_upgrade gives inconsisten results plugin : Bug#25659 memory leak via "plugins" test rpl_ndb_dd_advance : Bug#25913 rpl_ndb_dd_advance fails randomly diff --git a/mysql-test/t/flush2-master.opt b/mysql-test/t/flush2-master.opt index ccbd01c91d3..789275fa25e 100644 --- a/mysql-test/t/flush2-master.opt +++ b/mysql-test/t/flush2-master.opt @@ -1 +1 @@ ---disable-log-bin +--skip-log-bin diff --git a/server-tools/instance-manager/instance.cc b/server-tools/instance-manager/instance.cc index 2c94689c664..31e060e27fe 100644 --- a/server-tools/instance-manager/instance.cc +++ b/server-tools/instance-manager/instance.cc @@ -17,7 +17,7 @@ #pragma implementation #endif - +#include #include #include diff --git a/sql/item_timefunc.cc b/sql/item_timefunc.cc index bcfdd403acf..00f077839c3 100644 --- a/sql/item_timefunc.cc +++ b/sql/item_timefunc.cc @@ -2531,7 +2531,10 @@ longlong Item_date_typecast::val_int() DBUG_ASSERT(fixed == 1); TIME ltime; if (args[0]->get_date(<ime, TIME_FUZZY_DATE)) + { + null_value= 1; return 0; + } return (longlong) (ltime.year * 10000L + ltime.month * 100 + ltime.day); }