diff options
-rwxr-xr-x | Build-tools/Do-compile | 6 | ||||
-rw-r--r-- | Build-tools/Do-solaris-pkg | 28 | ||||
-rw-r--r-- | VC++Files/tests/mysql_client_test.dsp | 10 | ||||
-rw-r--r-- | VC++Files/tests/mysql_client_test_ia64.dsp | 6 | ||||
-rw-r--r-- | mysql-test/lib/mtr_report.pl | 2 | ||||
-rw-r--r-- | mysql-test/mysql-test-run.sh | 2 | ||||
-rw-r--r-- | mysql-test/r/join_outer.result | 20 | ||||
-rw-r--r-- | mysql-test/r/query_cache.result | 21 | ||||
-rw-r--r-- | mysql-test/t/join_outer.test | 13 | ||||
-rw-r--r-- | mysql-test/t/query_cache.test | 13 | ||||
-rw-r--r-- | scripts/make_win_src_distribution.sh | 34 | ||||
-rw-r--r-- | scripts/mysqld_safe.sh | 9 | ||||
-rw-r--r-- | sql/item_cmpfunc.h | 1 | ||||
-rw-r--r-- | sql/sql_table.cc | 4 |
14 files changed, 132 insertions, 37 deletions
diff --git a/Build-tools/Do-compile b/Build-tools/Do-compile index c7cba7f967f..0cd782c023e 100755 --- a/Build-tools/Do-compile +++ b/Build-tools/Do-compile @@ -394,13 +394,13 @@ if ($opt_stage <= 5 && !$opt_no_test && !$opt_no_mysqltest) info("Running test suite"); system("mkdir $bench_tmpdir") if (! -d $bench_tmpdir); safe_cd("${test_dir}/mysql-test"); - check_system("./mysql-test-run $flags --tmpdir=$bench_tmpdir --master_port=$mysql_tcp_port --slave_port=$slave_port --ndbcluster_port=$ndbcluster_port --manager-port=$manager_port --no-manager --sleep=10", "tests were successful"); + check_system("./mysql-test-run $flags --tmpdir=$bench_tmpdir --master_port=$mysql_tcp_port --slave_port=$slave_port --ndbcluster_port=$ndbcluster_port --manager-port=$manager_port --no-manager --sleep=10", "were successful"); unless ($opt_skip_ps_test) { log_timestamp(); info("Running test suite using prepared statements"); - check_system("./mysql-test-run $flags --ps-protocol --tmpdir=$bench_tmpdir --master_port=$mysql_tcp_port --slave_port=$slave_port --ndbcluster_port=$ndbcluster_port --manager-port=$manager_port --no-manager --sleep=10", "tests were successful"); + check_system("./mysql-test-run $flags --ps-protocol --tmpdir=$bench_tmpdir --master_port=$mysql_tcp_port --slave_port=$slave_port --ndbcluster_port=$ndbcluster_port --manager-port=$manager_port --no-manager --sleep=10", "were successful"); } unless ($opt_skip_embedded_test) @@ -409,7 +409,7 @@ if ($opt_stage <= 5 && !$opt_no_test && !$opt_no_mysqltest) info("Running embedded server test suite"); # Embedded server and NDB don't jive $flags=~ s/ --with-ndbcluster//; - check_system("./mysql-test-run $flags --embedded-server --tmpdir=$bench_tmpdir --master_port=$mysql_tcp_port --slave_port=$slave_port --manager-port=$manager_port --no-manager --sleep=10", "tests were successful"); + check_system("./mysql-test-run $flags --embedded-server --tmpdir=$bench_tmpdir --master_port=$mysql_tcp_port --slave_port=$slave_port --manager-port=$manager_port --no-manager --sleep=10", "were successful"); } # 'mysql-test-run' writes its own final message for log evaluation. } 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 <PKGBASE>/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 { diff --git a/VC++Files/tests/mysql_client_test.dsp b/VC++Files/tests/mysql_client_test.dsp index 3d1e6728181..14873c8a94c 100644 --- a/VC++Files/tests/mysql_client_test.dsp +++ b/VC++Files/tests/mysql_client_test.dsp @@ -51,8 +51,8 @@ BSC32=bscmake.exe # ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib odbc32.lib odbccp32.lib mysqlclient.lib wsock32.lib mysys.lib regex.lib /nologo /out:"..\tests\mysql_client_test.exe" /incremental:yes /libpath:"..\lib_debug\" /debug /pdb:".\Debug\mysql_client_test.pdb" /pdbtype:sept /map:".\Debug\mysql_client_test.map" /subsystem:console
-# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib odbc32.lib odbccp32.lib mysqlclient.lib wsock32.lib mysys.lib regex.lib /nologo /out:"..\tests\mysql_client_test.exe" /incremental:yes /libpath:"..\lib_debug\" /debug /pdb:".\Debug\mysql_client_test.pdb" /pdbtype:sept /map:".\Debug\mysql_client_test.map" /subsystem:console
+# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib odbc32.lib odbccp32.lib mysqlclient.lib wsock32.lib mysys.lib regex.lib /nologo /out:"..\mysql_client_test.exe" /incremental:yes /libpath:"..\lib_debug\" /debug /pdb:".\Debug\mysql_client_test.pdb" /pdbtype:sept /map:".\Debug\mysql_client_test.map" /subsystem:console +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib odbc32.lib odbccp32.lib mysqlclient.lib wsock32.lib mysys.lib regex.lib /nologo /out:"..\mysql_client_test.exe" /incremental:yes /libpath:"..\lib_debug\" /debug /pdb:".\Debug\mysql_client_test.pdb" /pdbtype:sept /map:".\Debug\mysql_client_test.map" /subsystem:console !ELSEIF "$(CFG)" == "mysql_client_test - Win32 Release"
@@ -76,8 +76,8 @@ BSC32=bscmake.exe # ADD BASE BSC32 /nologo
# ADD BSC32 /nologo
LINK32=link.exe
-# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib odbc32.lib odbccp32.lib Ws2_32.lib /nologo /out:"..\tests\mysql_client_test.exe" /incremental:no /pdb:".\Release\mysql_client_test.pdb" /pdbtype:sept /subsystem:console -# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib odbc32.lib odbccp32.lib Ws2_32.lib /nologo /out:"..\tests\mysql_client_test.exe" /incremental:no /pdb:".\Release\mysql_client_test.pdb" /pdbtype:sept /subsystem:console +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib odbc32.lib odbccp32.lib Ws2_32.lib /nologo /out:"..\mysql_client_test.exe" /incremental:no /pdb:".\Release\mysql_client_test.pdb" /pdbtype:sept /subsystem:console +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib odbc32.lib odbccp32.lib Ws2_32.lib /nologo /out:"..\mysql_client_test.exe" /incremental:no /pdb:".\Release\mysql_client_test.pdb" /pdbtype:sept /subsystem:console !ENDIF
@@ -87,7 +87,7 @@ LINK32=link.exe # Name "mysql_client_test - Win32 Release"
# Begin Source File
-SOURCE=tests\mysql_client_test.c
+SOURCE=mysql_client_test.c # End Source File
# End Target
# End Project
diff --git a/VC++Files/tests/mysql_client_test_ia64.dsp b/VC++Files/tests/mysql_client_test_ia64.dsp index 6b4f29ed59f..f9dfbe5f027 100644 --- a/VC++Files/tests/mysql_client_test_ia64.dsp +++ b/VC++Files/tests/mysql_client_test_ia64.dsp @@ -48,16 +48,16 @@ BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib odbc32.lib odbccp32.lib Ws2_32.lib /nologo /subsystem:console /out:"..\tests\mysql_client_test.exe" /machine:IA64 +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib odbc32.lib odbccp32.lib Ws2_32.lib /nologo /subsystem:console /out:"..\mysql_client_test.exe" /machine:IA64 # SUBTRACT BASE LINK32 /pdb:none -# ADD LINK32 ..\lib_release\mysys.lib ..\lib_release\strings.lib ..\lib_release\libmysql.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib odbc32.lib odbccp32.lib Ws2_32.lib bufferoverflowU.lib /nologo /subsystem:console /nodefaultlib /out:"..\tests\mysql_client_test.exe" /machine:IA64 /machine:IA64 +# ADD LINK32 ..\lib_release\mysys.lib ..\lib_release\strings.lib ..\lib_release\libmysql.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib odbc32.lib odbccp32.lib Ws2_32.lib bufferoverflowU.lib /nologo /subsystem:console /nodefaultlib /out:"..\mysql_client_test.exe" /machine:IA64 /machine:IA64 # SUBTRACT LINK32 /pdb:none # Begin Target # Name "mysql_client_test - WinIA64 Release" # Begin Source File -SOURCE=tests\mysql_client_test.c +SOURCE=mysql_client_test.c DEP_CPP_MYSQL=\ "..\include\config-netware.h"\ "..\include\config-os2.h"\ diff --git a/mysql-test/lib/mtr_report.pl b/mysql-test/lib/mtr_report.pl index 3729ff512ee..9947fed9d27 100644 --- a/mysql-test/lib/mtr_report.pl +++ b/mysql-test/lib/mtr_report.pl @@ -161,7 +161,7 @@ sub mtr_report_stats ($) { { my $ratio= $tot_passed * 100 / $tot_tests; printf "Failed $tot_failed/$tot_tests tests, " . - "%.2f\% successful.\n\n", $ratio; + "%.2f\% were successful.\n\n", $ratio; print "The log files in var/log may give you some hint\n", "of what when wrong.\n", diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh index 0e60ab4d6fc..afed2e2ac84 100644 --- a/mysql-test/mysql-test-run.sh +++ b/mysql-test/mysql-test-run.sh @@ -861,7 +861,7 @@ report_stats () { whole=`$PRINTF %.2s $raw` xwhole=`$EXPR $whole \* 100` deci=`$EXPR $raw - $xwhole` - $ECHO "Failed ${TOT_FAIL}/${TOT_TEST} tests, ${whole}.${deci}% successful." + $ECHO "Failed ${TOT_FAIL}/${TOT_TEST} tests, ${whole}.${deci}% were successful." $ECHO "" $ECHO "The log files in $MY_LOG_DIR may give you some hint" $ECHO "of what when wrong." diff --git a/mysql-test/r/join_outer.result b/mysql-test/r/join_outer.result index d2879e18726..01447d5e464 100644 --- a/mysql-test/r/join_outer.result +++ b/mysql-test/r/join_outer.result @@ -677,6 +677,26 @@ id select_type table type possible_keys key key_len ref rows Extra 1 SIMPLE 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; +create table t1 ( match_id tinyint(3) unsigned not null auto_increment, home tinyint(3) unsigned default '0', unique key match_id (match_id), diff --git a/mysql-test/r/query_cache.result b/mysql-test/r/query_cache.result index 3568be8cc12..3becb9546e2 100644 --- a/mysql-test/r/query_cache.result +++ b/mysql-test/r/query_cache.result @@ -957,3 +957,24 @@ drop table t1; select table_name from information_schema.tables where table_schema="test"; table_name +set global query_cache_size=1024*1024; +flush query cache; +create table t1 ( a int ); +insert into t1 values (1); +select a from t1; +a +1 +select a from t1; +a +1 +show status like 'qcache_queries_in_cache'; +Variable_name Value +Qcache_queries_in_cache 1 +repair table t1; +Table Op Msg_type Msg_text +test.t1 repair status OK +show status like 'qcache_queries_in_cache'; +Variable_name Value +Qcache_queries_in_cache 0 +drop table t1; +set GLOBAL query_cache_size=0; diff --git a/mysql-test/t/join_outer.test b/mysql-test/t/join_outer.test index 66de5e5a4c9..7d85ab09b08 100644 --- a/mysql-test/t/join_outer.test +++ b/mysql-test/t/join_outer.test @@ -457,6 +457,19 @@ explain select * from t1 left join t2 on b1 = a1 left join t3 on c1 = a1 an 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; + # Test for BUG#5088 create table t1 ( diff --git a/mysql-test/t/query_cache.test b/mysql-test/t/query_cache.test index 26f939582e5..f393ce69cfa 100644 --- a/mysql-test/t/query_cache.test +++ b/mysql-test/t/query_cache.test @@ -697,3 +697,16 @@ where table_schema="test"; drop table t1; select table_name from information_schema.tables where table_schema="test"; +# Bug #8480: REPAIR TABLE needs to flush the table from the query cache +set global query_cache_size=1024*1024; +flush query cache; +create table t1 ( a int ); +insert into t1 values (1); +select a from t1; +select a from t1; +show status like 'qcache_queries_in_cache'; +repair table t1; +show status like 'qcache_queries_in_cache'; +drop table t1; + +set GLOBAL query_cache_size=0; diff --git a/scripts/make_win_src_distribution.sh b/scripts/make_win_src_distribution.sh index 101007554a3..efcbeffeb11 100644 --- a/scripts/make_win_src_distribution.sh +++ b/scripts/make_win_src_distribution.sh @@ -16,12 +16,25 @@ OUTTAR="0" OUTZIP="0" # +# An "abort" function taking a variable number of strings (one per line) +# + +abort() +{ + for line + do + echo "$line" + done + exit 1 +} + + +# # This script must run from MySQL top directory # if [ ! -f scripts/make_win_src_distribution ]; then - echo "ERROR : You must run this script from the MySQL top-level directory" - exit 1 + abort "ERROR : You must run this script from the MySQL top-level directory" fi SOURCE=`pwd` @@ -30,9 +43,8 @@ SOURCE=`pwd` # if [ ! -f sql/sql_yacc.cc ]; then - echo "ERROR : Sorry, you must run this script after the complete build," - echo " hope you know what you are trying to do !!" - exit 1 + abort "ERROR : Sorry, you must run this script after the complete build," \ + " hope you know what you are trying to do !!" fi # @@ -86,9 +98,7 @@ parse_arguments() { --tar) OUTTAR=1 ;; --zip) OUTZIP=1 ;; --help) show_usage ;; - *) - echo "Unknown argument '$arg'" - exit 1 + *) abort "Unknown argument '$arg'" ;; esac done @@ -138,6 +148,7 @@ if [ -d $BASE ] ; then fi $CP -r $SOURCE/VC++Files $BASE +# This includes an implicit 'mkdir $BASE' ! # # Process version tags in InstallShield files @@ -312,7 +323,12 @@ do print_debug "Copying directory '$i'" if [ -d $i ] then - $CP -R $i $BASE/$i + if [ -d $BASE/$i ] + then + $CP -R $i $BASE + else + $CP -R $i $BASE/$i + fi fi done diff --git a/scripts/mysqld_safe.sh b/scripts/mysqld_safe.sh index e38127ffd8e..10983d2850f 100644 --- a/scripts/mysqld_safe.sh +++ b/scripts/mysqld_safe.sh @@ -194,6 +194,15 @@ parse_arguments `$print_defaults $defaults --loose-verbose mysqld_safe safe_mysq parse_arguments PICK-ARGS-FROM-ARGV "$@" safe_mysql_unix_port=${mysql_unix_port:-${MYSQL_UNIX_PORT:-@MYSQL_UNIX_ADDR@}} +# Make sure that directory for $safe_mysql_unix_port exists +mysql_unix_port_dir=`dirname $safe_mysql_unix_port` +if [ ! -d $mysql_unix_port_dir ] +then + mkdir $mysql_unix_port_dir + chown $user $mysql_unix_port_dir +fi + + if test ! -x $ledir/$MYSQLD then echo "The file $ledir/$MYSQLD doesn't exist or is not executable" diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index 5a87635a4dc..38717672ba8 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -323,6 +323,7 @@ public: Item_func_equal(Item *a,Item *b) :Item_bool_rowready_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; } diff --git a/sql/sql_table.cc b/sql/sql_table.cc index 31a1f51b085..2f872b2ad05 100644 --- a/sql/sql_table.cc +++ b/sql/sql_table.cc @@ -2144,7 +2144,9 @@ static bool mysql_admin_table(THD* thd, TABLE_LIST* tables, thd->exit_cond(old_message); if (thd->killed) goto err; - open_for_modify=0; + /* Flush entries in the query cache involving this table. */ + query_cache_invalidate3(thd, table->table, 0); + open_for_modify= 0; } result_code = (table->table->file->*operator_func)(thd, check_opt); |