From 7c90fa7b2cb8131bfcf314c1e25538bd1062fa5d Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 11 Mar 2005 02:17:03 +0300 Subject: Fix for BUG#8711: "<=>" may have true value for NULL arguments, so make Item_func_equal::not_null_tables() always return 0. mysql-test/r/join_outer.result: Testcase for BUG#8711 mysql-test/t/join_outer.test: Testcase for BUG#8711 sql/item_cmpfunc.h: Fix for BUG#8711: "<=>" may have true value for NULL arguments, i.e. it can accept NULL-complemented table rows. This differs from assumptions made in Item_func::not_null_tables(), so add Item_func_equal::not_null_tables(). Item_func_equal::not_null_tables_cache value doesn't make sense now, but we still let it be calculated (and ignore it) --- mysql-test/r/join_outer.result | 20 ++++++++++++++++++++ mysql-test/t/join_outer.test | 13 +++++++++++++ sql/item_cmpfunc.h | 1 + 3 files changed, 34 insertions(+) diff --git a/mysql-test/r/join_outer.result b/mysql-test/r/join_outer.result index 5778b2f9b72..d6ce93e632b 100644 --- a/mysql-test/r/join_outer.result +++ b/mysql-test/r/join_outer.result @@ -684,3 +684,23 @@ t1 ALL NULL NULL NULL NULL 3 t2 ALL NULL NULL NULL NULL 2 t3 ALL NULL NULL NULL NULL 2 drop table t1, t2, t3; +create table t1 ( +a int(11), +b char(10), +key (a) +); +insert into t1 (a) values (1),(2),(3),(4); +create table t2 (a int); +select * from t1 left join t2 on t1.a=t2.a where not (t2.a <=> t1.a); +a b a +1 NULL NULL +2 NULL NULL +3 NULL NULL +4 NULL NULL +select * from t1 left join t2 on t1.a=t2.a having not (t2.a <=> t1.a); +a b a +1 NULL NULL +2 NULL NULL +3 NULL NULL +4 NULL NULL +drop table t1,t2; diff --git a/mysql-test/t/join_outer.test b/mysql-test/t/join_outer.test index bed4d4b033b..f32cc9d56ac 100644 --- a/mysql-test/t/join_outer.test +++ b/mysql-test/t/join_outer.test @@ -450,3 +450,16 @@ select * from t1 left join t2 on b1 = a1 left join t3 on c1 = a1 and b1 is explain select * from t1 left join t2 on b1 = a1 left join t3 on c1 = a1 and b1 is null; drop table t1, t2, t3; + +# Test for BUG#8711 '<=>' was considered to be a NULL-rejecting predicate. +create table t1 ( + a int(11), + b char(10), + key (a) +); +insert into t1 (a) values (1),(2),(3),(4); +create table t2 (a int); + +select * from t1 left join t2 on t1.a=t2.a where not (t2.a <=> t1.a); +select * from t1 left join t2 on t1.a=t2.a having not (t2.a <=> t1.a); +drop table t1,t2; diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index 8f1aa525190..a1977e76f67 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -78,6 +78,7 @@ public: Item_func_equal(Item *a,Item *b) :Item_bool_func2(a,b) { }; longlong val_int(); void fix_length_and_dec(); + table_map not_null_tables() const { return 0; } enum Functype functype() const { return EQUAL_FUNC; } enum Functype rev_functype() const { return EQUAL_FUNC; } cond_result eq_cmp_result() const { return COND_TRUE; } -- cgit v1.2.1 From 27a69b091e87cb7c406ae14b568bfb9d48a5db30 Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 10 Mar 2005 19:42:52 -0600 Subject: Do-solaris-pkg: Many changes to improve error handling, and fix problem of multiple packaging processes trampling each other (32 & 64bit at the same time) Build-tools/Do-solaris-pkg: Many changes to improve error handling, and fix problem of multiple packaging processes trampling each other (32 & 64bit at the same time) --- Build-tools/Do-solaris-pkg | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/Build-tools/Do-solaris-pkg b/Build-tools/Do-solaris-pkg index 685a1f0923b..8815033146c 100644 --- a/Build-tools/Do-solaris-pkg +++ b/Build-tools/Do-solaris-pkg @@ -14,19 +14,17 @@ $pkginfo = "pkginfo"; ($gid ,$pkg ,$uid ,$userInfo ,$email ,$quota ,$group ,$passwd ,$category ,$userHome ,$vendor ,$loginShell ,$pstamp ,$basedir)=(); -$fullname = shift @ARGV; -$fullname or die "No package name was specified"; --d $fullname or die "That directory is not present!"; +$tarball= $fullname= shift @ARGV; +$fullname=~ s/.*(mysql.*)\.tar\.gz/$1/; +$workdir= $$; +chomp ($parent_workdir= `pwd`); -$fullname =~ s,/+$,,; # Remove ending slash if any +$hostname= ($fullname=~ m/^.+-64bit$/) ? $hostname . "-64bit" : $hostname; +$pkgdir= "$ENV{'HOME'}/$hostname"; -$pkgdir= `cd ../$hostname; pwd`; -$pwd = `pwd`; -if ($pwd =~ '\/usr\/local') { - $pwd = $`; -} -die "Wrong location, please cd to /usr/local/ and run again.\n" - if ($pwd eq ""); +mkdir $workdir or die "Can't make workdir: $!\n"; +chdir $workdir or die "Can't change to workdir: $!\n"; +system ("tar xzvf $tarball") == 0 or die "Can't untar: $!\n"; system ("$find . -print | $pkgproto > $temp"); open (PREPROTO,"<$temp") or die "Unable to read prototype information ($!)\n"; @@ -57,8 +55,9 @@ unlink $temp or warn "Unable to remove tempfile ($!)\n"; # Now we can start building the package # # First get some info +$fullname =~ s,/+$,,; # Remove ending slash if any -$fullname =~ /^((mysql)-.+)-([\d\.]+)-.+$/ +$fullname =~ /^((mysql)-\w+-?\w+?)-([\d\.]+\w?)-.+$/ or die "This name is not what I expected - \"$fullname\""; $default{"name"}= $2; @@ -137,10 +136,11 @@ system ("gzip /tmp/$packagename"); # Clean-up the spool area system ("(cd /var/spool/pkg; rm -rf $pkg)"); # Clean-up the ~/packaging/ area -system ("(rm -rf mysql*)"); unlink $pkginfo; unlink $prototype; -system ("mv /tmp/${packagename}.gz $pkgdir"); +chdir $parent_workdir or die "Can't change to parent workdir '$parent_workdir': $!\n"; +system ("rm -rf $workdir") == 0 or die "Can't remove the working dir: $!\n"; +system ("mv /tmp/${packagename}.gz $pkgdir") == 0 or die "Can't move the finished package out of /tmp: $!\n"; print "Done. (~/$hostname/$packagename.gz)\n"; # The subroutines sub chkvar { -- cgit v1.2.1