Loading Build-tools/Do-rpm +159 −85 Original line number Diff line number Diff line Loading @@ -22,7 +22,6 @@ use Getopt::Long; Getopt::Long::Configure ("bundling"); use Sys::Hostname; $opt_nobuild = undef; $opt_cc= undef; $opt_cflags= undef; $opt_clean= undef; Loading @@ -33,6 +32,9 @@ $opt_help= undef; $opt_log= undef; $opt_mail= ""; $opt_verbose= undef; $opt_susebuild= undef; $opt_susebuildroot= undef; $opt_suserpms= undef; # Set a dummy version until we know the correct one $VERSION= "x.y.z"; Loading @@ -49,7 +51,9 @@ GetOptions( "help|h", "log|l:s", "mail|m=s", "nobuild", "susebuild|s", "susebuildroot|r=s", "suserpms=s", "verbose|v", ) || &print_help; Loading @@ -57,6 +61,20 @@ GetOptions( defined($SPECFILE=$ARGV[0]) || print_help("Please provide the spec file name!"); &print_help("Please define the location of the RPM repository!") if $opt_susebuild && !($opt_suserpms || $ENV{BUILD_RPMS}); unless ($opt_susebuildroot) { if ($ENV{BUILD_ROOT}) { $opt_susebuildroot= $ENV{BUILD_ROOT}; } else { $opt_susebuildroot="/var/tmp/build-root"; } } # Include helper functions $PWD= cwd(); $LOGGER= "$PWD/logger.pm"; Loading @@ -72,7 +90,7 @@ else $subject= "RPM build for $SPECFILE failed" if $opt_mail; # Open the spec file and extract the version number open(SPEC, $SPECFILE) or &abort("Unable to open \"$ARGV[0]\": $!"); open(SPEC, $SPECFILE) or die "Unable to open \"$ARGV[0]\": $!"; @spec= <SPEC>; close SPEC; Loading @@ -94,7 +112,7 @@ $HOST= hostname(); $HOST=~ /^([^.-]*)/; $HOST= $1; $LOGFILE= "$PWD/Logs/Do-rpm-$HOST-$MAJOR.$MINOR.log"; &logger("Using spec file for version: $VERSION"); &logger("Logging to $LOGFILE"); # # Override predefined Log file name Loading @@ -114,6 +132,58 @@ if (defined $opt_log) } } &logger("Using spec file for version: $VERSION"); if ($opt_susebuild) { &susebuild; } else { &rpmbuild; } &logger("SUCCESS: RPM files successfully created.") unless ($opt_dry_run); exit 0; # # Build using SUSE's "build" script # sub susebuild { $BUILD= "/usr/bin/build"; ( -x $BUILD) ? &logger("$BUILD found, proceeding.") : &abort("$BUILD could not be found!"); $command= "sudo $BUILD --clean"; $command.= " --root=$opt_susebuildroot"; $command.= " --rpms=$opt_suserpms" if $opt_suserpms; $command.= " $SPECFILE"; &logger("Building RPMs using SUSE build."); &run_command($command, "Error while running the SUSE RPM build!"); # # Move the resulting RPMs into the pwd - we can use broad globs here # as the build root has been cleaned up before so there should not be # any residuals from previous build runs # $command= "cp"; $command.= " -v " if ($opt_verbose); $command.= " $opt_susebuildroot/usr/src/packages/SRPMS/MySQL*.src.rpm $PWD"; &logger("Copying source RPM to current dir."); &run_command($command, "Error moving source RPM!"); $command= "cp"; $command.= " -v " if ($opt_verbose); $command.= " $opt_susebuildroot/usr/src/packages/RPMS/*/MySQL*.rpm $PWD"; &logger("Copying binary RPMs to current dir."); &run_command($command, "Error moving binary RPMs!"); } # # Build using "plain" RPM # sub rpmbuild { # # Newer RPM versions ship with a separate tool "rpmbuild" to build RPMs # Loading Loading @@ -148,8 +218,6 @@ chomp($SRCRPMDIR= `$RPM --eval "%{_srcrpmdir}" 2> /dev/null`); $SOURCEFILE= glob "mysql*-$VERSION.tar.gz"; unless($opt_nobuild) { &logger("Starting RPM build of MySQL-$VERSION on $HOST"); foreach $file ($SOURCEFILE, $SPECFILE) Loading Loading @@ -191,7 +259,6 @@ unless($opt_nobuild) { $command.= basename($SPECFILE); &logger("Building RPM."); &run_command($command, "Error while building the RPMs!"); } # # Move the resulting RPMs into the pwd Loading @@ -204,13 +271,10 @@ $command.= " $SRCRPMDIR/MySQL*$VERSION_SRPM*.src.rpm $PWD"; $command= "mv"; $command.= " -v " if ($opt_verbose); # $command.= " $RPMDIR/$RPMARCH/MySQL*$VERSION*.$RPMARCH.rpm $PWD"; $command.= " $RPMDIR/$RPMARCH/MySQL*$VERSION_SRPM*.$RPMARCH.rpm $PWD"; &logger("Moving binary RPMs to current dir."); &run_command($command, "Error moving binary RPMs!"); &logger("SUCCESS: RPM files successfully created.") unless ($opt_dry_run); exit 0; } sub print_help { Loading @@ -218,7 +282,7 @@ sub print_help if ($message ne "") { print "\n"; print "ERROR: $message\n\n}"; print "ERROR: $message\n\n"; } print <<EOF; Loading @@ -241,12 +305,22 @@ Options: -t, --dry-run Dry run without executing -h, --help Print this help -l, --log[=<filename>] Write a log file [to <filename>] (default is "$LOGFILE") -m, --mail=<address> Mail a failure report to the given address (and include a log file snippet, if logging is enabled) Note that the \@-Sign needs to be quoted! Example: --mail=user\\\@domain.com -s, --susebuild Use the SUSE "build" script instead of RPM directly (requires sudo privileges to run the /usr/bin/build command) -r, --susebuildroot=<root> Use <root> as the build root directory for the SUSE "build" (default is /var/tmp/build-root or defined by the BUILD_ROOT environment variable) --suserpms=<path> Path to the SUSE RPM repository to build up the build root (mandatory option when using --susebuild and the BUILD_RPMS environment variable is not set.) -v, --verbose Verbose execution Example: Loading mysql-test/mysql-test-run.sh +3 −0 Original line number Diff line number Diff line Loading @@ -540,6 +540,7 @@ if [ x$SOURCE_DIST = x1 ] ; then INSTALL_DB="./install_test_db" MYSQL_FIX_SYSTEM_TABLES="$BASEDIR/scripts/mysql_fix_privilege_tables" NDB_TOOLS_DIR="$BASEDIR/ndb/tools" NDB_MGM="$BASEDIR/ndb/src/mgmclient/ndb_mgm" else if test -x "$BASEDIR/libexec/mysqld" then Loading @@ -566,6 +567,7 @@ else INSTALL_DB="./install_test_db --bin" MYSQL_FIX_SYSTEM_TABLES="$CLIENT_BINDIR/mysql_fix_privilege_tables" NDB_TOOLS_DIR="$CLIENT_BINDIR" NDB_MGM="$CLIENT_BINDIR/ndb_mgm" if test -d "$BASEDIR/share/mysql/english" then LANGUAGE="$BASEDIR/share/mysql/english/" Loading Loading @@ -615,6 +617,7 @@ MYSQL="$MYSQL --host=localhost --port=$MASTER_MYPORT --socket=$MASTER_MYSOCK --u export MYSQL MYSQL_DUMP MYSQL_BINLOG MYSQL_FIX_SYSTEM_TABLES export CLIENT_BINDIR TESTS_BINDIR CHARSETSDIR export NDB_TOOLS_DIR export NDB_MGM MYSQL_TEST_ARGS="--no-defaults --socket=$MASTER_MYSOCK --database=$DB \ --user=$DBUSER --password=$DBPASSWD --silent -v --skip-safemalloc \ Loading mysql-test/r/func_in.result +8 −0 Original line number Diff line number Diff line Loading @@ -157,6 +157,14 @@ a bbbb цццц drop table t1; create table t1 (a char(10) character set latin1 not null); insert into t1 values ('a'),('b'),('c'); select a from t1 where a IN ('a','b','c') order by a; a a b c drop table t1; set names latin1; select '1.0' in (1,2); '1.0' in (1,2) Loading mysql-test/r/ndb_autodiscover.result +10 −0 Original line number Diff line number Diff line Loading @@ -359,6 +359,16 @@ information_schema mysql test use test; drop database if exists test_only_ndb_tables; create database test_only_ndb_tables; use test_only_ndb_tables; create table t1 (a int primary key) engine=ndb; select * from t1; a select * from t1; ERROR HY000: Can't lock file (errno: 4009) use test; drop database test_only_ndb_tables; CREATE TABLE t9 ( a int NOT NULL PRIMARY KEY, b int Loading mysql-test/t/func_in.test +5 −0 Original line number Diff line number Diff line Loading @@ -80,6 +80,11 @@ create table t1 (a char(10) character set utf8 not null); insert into t1 values ('bbbb'),(_koi8r'ÃÃÃÃ'),(_latin1'ÄÄÄÄ'); select a from t1 where a in ('bbbb',_koi8r'ÃÃÃÃ',_latin1'ÄÄÄÄ') order by a; drop table t1; # Bug#7834 Illegal mix of collations in IN operator create table t1 (a char(10) character set latin1 not null); insert into t1 values ('a'),('b'),('c'); select a from t1 where a IN ('a','b','c') order by a; drop table t1; set names latin1; select '1.0' in (1,2); Loading Loading
Build-tools/Do-rpm +159 −85 Original line number Diff line number Diff line Loading @@ -22,7 +22,6 @@ use Getopt::Long; Getopt::Long::Configure ("bundling"); use Sys::Hostname; $opt_nobuild = undef; $opt_cc= undef; $opt_cflags= undef; $opt_clean= undef; Loading @@ -33,6 +32,9 @@ $opt_help= undef; $opt_log= undef; $opt_mail= ""; $opt_verbose= undef; $opt_susebuild= undef; $opt_susebuildroot= undef; $opt_suserpms= undef; # Set a dummy version until we know the correct one $VERSION= "x.y.z"; Loading @@ -49,7 +51,9 @@ GetOptions( "help|h", "log|l:s", "mail|m=s", "nobuild", "susebuild|s", "susebuildroot|r=s", "suserpms=s", "verbose|v", ) || &print_help; Loading @@ -57,6 +61,20 @@ GetOptions( defined($SPECFILE=$ARGV[0]) || print_help("Please provide the spec file name!"); &print_help("Please define the location of the RPM repository!") if $opt_susebuild && !($opt_suserpms || $ENV{BUILD_RPMS}); unless ($opt_susebuildroot) { if ($ENV{BUILD_ROOT}) { $opt_susebuildroot= $ENV{BUILD_ROOT}; } else { $opt_susebuildroot="/var/tmp/build-root"; } } # Include helper functions $PWD= cwd(); $LOGGER= "$PWD/logger.pm"; Loading @@ -72,7 +90,7 @@ else $subject= "RPM build for $SPECFILE failed" if $opt_mail; # Open the spec file and extract the version number open(SPEC, $SPECFILE) or &abort("Unable to open \"$ARGV[0]\": $!"); open(SPEC, $SPECFILE) or die "Unable to open \"$ARGV[0]\": $!"; @spec= <SPEC>; close SPEC; Loading @@ -94,7 +112,7 @@ $HOST= hostname(); $HOST=~ /^([^.-]*)/; $HOST= $1; $LOGFILE= "$PWD/Logs/Do-rpm-$HOST-$MAJOR.$MINOR.log"; &logger("Using spec file for version: $VERSION"); &logger("Logging to $LOGFILE"); # # Override predefined Log file name Loading @@ -114,6 +132,58 @@ if (defined $opt_log) } } &logger("Using spec file for version: $VERSION"); if ($opt_susebuild) { &susebuild; } else { &rpmbuild; } &logger("SUCCESS: RPM files successfully created.") unless ($opt_dry_run); exit 0; # # Build using SUSE's "build" script # sub susebuild { $BUILD= "/usr/bin/build"; ( -x $BUILD) ? &logger("$BUILD found, proceeding.") : &abort("$BUILD could not be found!"); $command= "sudo $BUILD --clean"; $command.= " --root=$opt_susebuildroot"; $command.= " --rpms=$opt_suserpms" if $opt_suserpms; $command.= " $SPECFILE"; &logger("Building RPMs using SUSE build."); &run_command($command, "Error while running the SUSE RPM build!"); # # Move the resulting RPMs into the pwd - we can use broad globs here # as the build root has been cleaned up before so there should not be # any residuals from previous build runs # $command= "cp"; $command.= " -v " if ($opt_verbose); $command.= " $opt_susebuildroot/usr/src/packages/SRPMS/MySQL*.src.rpm $PWD"; &logger("Copying source RPM to current dir."); &run_command($command, "Error moving source RPM!"); $command= "cp"; $command.= " -v " if ($opt_verbose); $command.= " $opt_susebuildroot/usr/src/packages/RPMS/*/MySQL*.rpm $PWD"; &logger("Copying binary RPMs to current dir."); &run_command($command, "Error moving binary RPMs!"); } # # Build using "plain" RPM # sub rpmbuild { # # Newer RPM versions ship with a separate tool "rpmbuild" to build RPMs # Loading Loading @@ -148,8 +218,6 @@ chomp($SRCRPMDIR= `$RPM --eval "%{_srcrpmdir}" 2> /dev/null`); $SOURCEFILE= glob "mysql*-$VERSION.tar.gz"; unless($opt_nobuild) { &logger("Starting RPM build of MySQL-$VERSION on $HOST"); foreach $file ($SOURCEFILE, $SPECFILE) Loading Loading @@ -191,7 +259,6 @@ unless($opt_nobuild) { $command.= basename($SPECFILE); &logger("Building RPM."); &run_command($command, "Error while building the RPMs!"); } # # Move the resulting RPMs into the pwd Loading @@ -204,13 +271,10 @@ $command.= " $SRCRPMDIR/MySQL*$VERSION_SRPM*.src.rpm $PWD"; $command= "mv"; $command.= " -v " if ($opt_verbose); # $command.= " $RPMDIR/$RPMARCH/MySQL*$VERSION*.$RPMARCH.rpm $PWD"; $command.= " $RPMDIR/$RPMARCH/MySQL*$VERSION_SRPM*.$RPMARCH.rpm $PWD"; &logger("Moving binary RPMs to current dir."); &run_command($command, "Error moving binary RPMs!"); &logger("SUCCESS: RPM files successfully created.") unless ($opt_dry_run); exit 0; } sub print_help { Loading @@ -218,7 +282,7 @@ sub print_help if ($message ne "") { print "\n"; print "ERROR: $message\n\n}"; print "ERROR: $message\n\n"; } print <<EOF; Loading @@ -241,12 +305,22 @@ Options: -t, --dry-run Dry run without executing -h, --help Print this help -l, --log[=<filename>] Write a log file [to <filename>] (default is "$LOGFILE") -m, --mail=<address> Mail a failure report to the given address (and include a log file snippet, if logging is enabled) Note that the \@-Sign needs to be quoted! Example: --mail=user\\\@domain.com -s, --susebuild Use the SUSE "build" script instead of RPM directly (requires sudo privileges to run the /usr/bin/build command) -r, --susebuildroot=<root> Use <root> as the build root directory for the SUSE "build" (default is /var/tmp/build-root or defined by the BUILD_ROOT environment variable) --suserpms=<path> Path to the SUSE RPM repository to build up the build root (mandatory option when using --susebuild and the BUILD_RPMS environment variable is not set.) -v, --verbose Verbose execution Example: Loading
mysql-test/mysql-test-run.sh +3 −0 Original line number Diff line number Diff line Loading @@ -540,6 +540,7 @@ if [ x$SOURCE_DIST = x1 ] ; then INSTALL_DB="./install_test_db" MYSQL_FIX_SYSTEM_TABLES="$BASEDIR/scripts/mysql_fix_privilege_tables" NDB_TOOLS_DIR="$BASEDIR/ndb/tools" NDB_MGM="$BASEDIR/ndb/src/mgmclient/ndb_mgm" else if test -x "$BASEDIR/libexec/mysqld" then Loading @@ -566,6 +567,7 @@ else INSTALL_DB="./install_test_db --bin" MYSQL_FIX_SYSTEM_TABLES="$CLIENT_BINDIR/mysql_fix_privilege_tables" NDB_TOOLS_DIR="$CLIENT_BINDIR" NDB_MGM="$CLIENT_BINDIR/ndb_mgm" if test -d "$BASEDIR/share/mysql/english" then LANGUAGE="$BASEDIR/share/mysql/english/" Loading Loading @@ -615,6 +617,7 @@ MYSQL="$MYSQL --host=localhost --port=$MASTER_MYPORT --socket=$MASTER_MYSOCK --u export MYSQL MYSQL_DUMP MYSQL_BINLOG MYSQL_FIX_SYSTEM_TABLES export CLIENT_BINDIR TESTS_BINDIR CHARSETSDIR export NDB_TOOLS_DIR export NDB_MGM MYSQL_TEST_ARGS="--no-defaults --socket=$MASTER_MYSOCK --database=$DB \ --user=$DBUSER --password=$DBPASSWD --silent -v --skip-safemalloc \ Loading
mysql-test/r/func_in.result +8 −0 Original line number Diff line number Diff line Loading @@ -157,6 +157,14 @@ a bbbb цццц drop table t1; create table t1 (a char(10) character set latin1 not null); insert into t1 values ('a'),('b'),('c'); select a from t1 where a IN ('a','b','c') order by a; a a b c drop table t1; set names latin1; select '1.0' in (1,2); '1.0' in (1,2) Loading
mysql-test/r/ndb_autodiscover.result +10 −0 Original line number Diff line number Diff line Loading @@ -359,6 +359,16 @@ information_schema mysql test use test; drop database if exists test_only_ndb_tables; create database test_only_ndb_tables; use test_only_ndb_tables; create table t1 (a int primary key) engine=ndb; select * from t1; a select * from t1; ERROR HY000: Can't lock file (errno: 4009) use test; drop database test_only_ndb_tables; CREATE TABLE t9 ( a int NOT NULL PRIMARY KEY, b int Loading
mysql-test/t/func_in.test +5 −0 Original line number Diff line number Diff line Loading @@ -80,6 +80,11 @@ create table t1 (a char(10) character set utf8 not null); insert into t1 values ('bbbb'),(_koi8r'ÃÃÃÃ'),(_latin1'ÄÄÄÄ'); select a from t1 where a in ('bbbb',_koi8r'ÃÃÃÃ',_latin1'ÄÄÄÄ') order by a; drop table t1; # Bug#7834 Illegal mix of collations in IN operator create table t1 (a char(10) character set latin1 not null); insert into t1 values ('a'),('b'),('c'); select a from t1 where a IN ('a','b','c') order by a; drop table t1; set names latin1; select '1.0' in (1,2); Loading