Commit 46b15e19 authored by tulin@build.mysql.com's avatar tulin@build.mysql.com

Merge build.mysql.com:/users/tulin/mysql-5.0

into build.mysql.com:/users/tulin/mysql-5.1
parents 2a05fab9 5ed1b144
...@@ -43,7 +43,13 @@ global_warnings="-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wch ...@@ -43,7 +43,13 @@ global_warnings="-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wch
c_warnings="$global_warnings -Wunused" c_warnings="$global_warnings -Wunused"
cxx_warnings="$global_warnings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor" cxx_warnings="$global_warnings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor"
base_max_configs="--with-innodb --with-bdb --with-ndbcluster --with-archive-storage-engine --with-raid --with-openssl --with-raid --with-vio"
max_leave_isam_configs="--with-innodb --with-bdb --with-ndbcluster --with-archive-storage-engine --with-federated-storage-engine --with-raid --with-openssl --with-raid --with-vio --with-embedded-server"
max_no_es_configs="$max_leave_isam_configs --without-isam"
max_configs="$max_no_es_configs --with-embedded-server"
alpha_cflags="-mcpu=ev6 -Wa,-mev6" # Not used yet alpha_cflags="-mcpu=ev6 -Wa,-mev6" # Not used yet
amd64_cflags="-DBIG_TABLES"
pentium_cflags="-mcpu=pentiumpro" pentium_cflags="-mcpu=pentiumpro"
pentium64_cflags="-mcpu=nocona -m64" pentium64_cflags="-mcpu=nocona -m64"
ppc_cflags="-mpowerpc -mcpu=powerpc" ppc_cflags="-mpowerpc -mcpu=powerpc"
...@@ -58,9 +64,11 @@ reckless_cflags="-O3 -fomit-frame-pointer " ...@@ -58,9 +64,11 @@ reckless_cflags="-O3 -fomit-frame-pointer "
debug_cflags="-DUNIV_MUST_NOT_INLINE -DEXTRA_DEBUG -DFORCE_INIT_OF_VARS -DSAFEMALLOC -DPEDANTIC_SAFEMALLOC -DSAFE_MUTEX" debug_cflags="-DUNIV_MUST_NOT_INLINE -DEXTRA_DEBUG -DFORCE_INIT_OF_VARS -DSAFEMALLOC -DPEDANTIC_SAFEMALLOC -DSAFE_MUTEX"
base_cxxflags="-felide-constructors -fno-exceptions -fno-rtti" base_cxxflags="-felide-constructors -fno-exceptions -fno-rtti"
amd64_cxxflags="-DBIG_TABLES"
base_configs="--prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-readline" base_configs="--prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-readline"
static_link="--with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static" static_link="--with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static"
amd64_configs=""
alpha_configs="" # Not used yet alpha_configs="" # Not used yet
pentium_configs="" pentium_configs=""
sparc_configs="" sparc_configs=""
......
#! /bin/sh #! /bin/sh
path=`dirname $0` path=`dirname $0`
. "$path/SETUP.sh" . "$path/SETUP.sh"
amd64_cflags="-DBIG_TABLES" extra_flags="$amd64_cflags $debug_cflags $max_cflags"
amd64_cxx_flags="-DBIG_TABLES"
amd64_configs=""
base_cxxflags="$amd64_cxx_flags $base_cxxflags"
extra_flags="$amd64_cflags $debug_cflags"
c_warnings="$c_warnings $debug_extra_warnings" c_warnings="$c_warnings $debug_extra_warnings"
cxx_warnings="$cxx_warnings $debug_extra_warnings" cxx_warnings="$cxx_warnings $debug_extra_warnings"
extra_configs="$amd64_configs $debug_configs" extra_configs="$amd64_configs $debug_configs $max_configs"
extra_configs="$extra_configs --with-berkeley-db --with-innodb --without-isam --with-embedded-server --with-openssl --with-raid --with-vio --with-ndbcluster"
. "$path/FINISH.sh" . "$path/FINISH.sh"
...@@ -2,16 +2,7 @@ ...@@ -2,16 +2,7 @@
path=`dirname $0` path=`dirname $0`
. "$path/SETUP.sh" . "$path/SETUP.sh"
amd64_cflags="-DBIG_TABLES" extra_flags="$amd64_cflags $fast_cflags $max_cflags -g"
amd64_cxx_flags="-DBIG_TABLES" extra_configs="$amd64_configs $max_configs"
amd64_configs=""
base_cxxflags="$amd64_cxx_flags $base_cxxflags"
extra_flags="$amd64_cflags $fast_cflags -g"
extra_configs="$amd64_configs"
#strip=yes
extra_configs="$extra_configs --with-innodb --with-berkeley-db \
--with-embedded-server --enable-thread-safe-client \
--with-openssl --with-vio --with-raid --with-ndbcluster"
. "$path/FINISH.sh" . "$path/FINISH.sh"
...@@ -3,11 +3,9 @@ ...@@ -3,11 +3,9 @@
path=`dirname $0` path=`dirname $0`
. "$path/SETUP.sh" . "$path/SETUP.sh"
extra_flags="$pentium_cflags $debug_cflags" extra_flags="$pentium_cflags $debug_cflags $max_cflags"
c_warnings="$c_warnings $debug_extra_warnings" c_warnings="$c_warnings $debug_extra_warnings"
cxx_warnings="$cxx_warnings $debug_extra_warnings" cxx_warnings="$cxx_warnings $debug_extra_warnings"
extra_configs="$pentium_configs $debug_configs" extra_configs="$pentium_configs $debug_configs $max_configs"
extra_configs="$extra_configs --with-berkeley-db --with-innodb --without-isam --with-embedded-server --with-openssl --with-raid --with-vio --with-ndbcluster"
. "$path/FINISH.sh" . "$path/FINISH.sh"
...@@ -3,11 +3,9 @@ ...@@ -3,11 +3,9 @@
path=`dirname $0` path=`dirname $0`
. "$path/SETUP.sh" . "$path/SETUP.sh"
extra_flags="$pentium_cflags $debug_cflags" extra_flags="$pentium_cflags $debug_cflags $max_cflags"
c_warnings="$c_warnings $debug_extra_warnings" c_warnings="$c_warnings $debug_extra_warnings"
cxx_warnings="$cxx_warnings $debug_extra_warnings" cxx_warnings="$cxx_warnings $debug_extra_warnings"
extra_configs="$pentium_configs $debug_configs" extra_configs="$pentium_configs $debug_configs $max_no_es_configs"
extra_configs="$extra_configs --with-berkeley-db --with-innodb --without-isam --with-openssl --with-raid"
. "$path/FINISH.sh" . "$path/FINISH.sh"
...@@ -3,12 +3,7 @@ ...@@ -3,12 +3,7 @@
path=`dirname $0` path=`dirname $0`
. "$path/SETUP.sh" . "$path/SETUP.sh"
extra_flags="$pentium_cflags $fast_cflags -g" extra_flags="$pentium_cflags $fast_cflags $max_cflags -g"
extra_configs="$pentium_configs" extra_configs="$pentium_configs $max_configs"
#strip=yes
extra_configs="$extra_configs --with-innodb --with-berkeley-db \
--with-embedded-server --enable-thread-safe-client \
--with-openssl --with-vio --with-raid --with-ndbcluster"
. "$path/FINISH.sh" . "$path/FINISH.sh"
...@@ -3,13 +3,13 @@ ...@@ -3,13 +3,13 @@
path=`dirname $0` path=`dirname $0`
. "$path/SETUP.sh" . "$path/SETUP.sh"
extra_flags="$pentium_cflags $debug_cflags -USAFEMALLOC -UFORCE_INIT_OF_VARS -DHAVE_purify -DMYSQL_SERVER_SUFFIX=-valgrind-max" extra_flags="$pentium_cflags $debug_cflags $max_cflags -USAFEMALLOC -UFORCE_INIT_OF_VARS -DHAVE_purify -DMYSQL_SERVER_SUFFIX=-valgrind-max"
c_warnings="$c_warnings $debug_extra_warnings" c_warnings="$c_warnings $debug_extra_warnings"
cxx_warnings="$cxx_warnings $debug_extra_warnings" cxx_warnings="$cxx_warnings $debug_extra_warnings"
extra_configs="$pentium_configs $debug_configs" extra_configs="$pentium_configs $debug_configs"
# We want to test isam when building with valgrind # We want to test isam when building with valgrind
extra_configs="$extra_configs --with-berkeley-db --with-innodb --with-isam --with-embedded-server --with-openssl --with-vio --with-raid --with-ndbcluster" extra_configs="$extra_configs $max_leave_isam_configs --with-isam"
. "$path/FINISH.sh" . "$path/FINISH.sh"
......
...@@ -3,11 +3,9 @@ ...@@ -3,11 +3,9 @@
path=`dirname $0` path=`dirname $0`
. "$path/SETUP.sh" . "$path/SETUP.sh"
extra_flags="$ppc_cflags $debug_cflags" extra_flags="$ppc_cflags $debug_cflags $max_cflags"
c_warnings="$c_warnings $debug_extra_warnings" c_warnings="$c_warnings $debug_extra_warnings"
cxx_warnings="$cxx_warnings $debug_extra_warnings" cxx_warnings="$cxx_warnings $debug_extra_warnings"
extra_configs="$debug_configs" extra_configs="$debug_configs $max_configs"
extra_configs="$extra_configs --with-berkeley-db --with-innodb --without-isam --with-embedded-server --with-openssl --with-raid --with-vio --with-ndbcluster"
. "$path/FINISH.sh" . "$path/FINISH.sh"
...@@ -3,11 +3,7 @@ ...@@ -3,11 +3,7 @@
path=`dirname $0` path=`dirname $0`
. "$path/SETUP.sh" . "$path/SETUP.sh"
extra_flags="$ppc_cflags $fast_cflags -g" extra_flags="$ppc_cflags $fast_cflags $max_cflags -g"
#strip=yes extra_configs="$extra_configs $max_configs"
extra_configs="$extra_configs --with-innodb --with-berkeley-db \
--with-embedded-server --enable-thread-safe-client \
--with-openssl --with-vio --with-raid --with-ndbcluster"
. "$path/FINISH.sh" . "$path/FINISH.sh"
...@@ -22,7 +22,6 @@ use Getopt::Long; ...@@ -22,7 +22,6 @@ use Getopt::Long;
Getopt::Long::Configure ("bundling"); Getopt::Long::Configure ("bundling");
use Sys::Hostname; use Sys::Hostname;
$opt_nobuild = undef;
$opt_cc= undef; $opt_cc= undef;
$opt_cflags= undef; $opt_cflags= undef;
$opt_clean= undef; $opt_clean= undef;
...@@ -33,6 +32,9 @@ $opt_help= undef; ...@@ -33,6 +32,9 @@ $opt_help= undef;
$opt_log= undef; $opt_log= undef;
$opt_mail= ""; $opt_mail= "";
$opt_verbose= undef; $opt_verbose= undef;
$opt_susebuild= undef;
$opt_susebuildroot= undef;
$opt_suserpms= undef;
# Set a dummy version until we know the correct one # Set a dummy version until we know the correct one
$VERSION= "x.y.z"; $VERSION= "x.y.z";
...@@ -49,7 +51,9 @@ GetOptions( ...@@ -49,7 +51,9 @@ GetOptions(
"help|h", "help|h",
"log|l:s", "log|l:s",
"mail|m=s", "mail|m=s",
"nobuild", "susebuild|s",
"susebuildroot|r=s",
"suserpms=s",
"verbose|v", "verbose|v",
) || &print_help; ) || &print_help;
...@@ -57,6 +61,20 @@ GetOptions( ...@@ -57,6 +61,20 @@ GetOptions(
defined($SPECFILE=$ARGV[0]) || print_help("Please provide the spec file name!"); 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 # Include helper functions
$PWD= cwd(); $PWD= cwd();
$LOGGER= "$PWD/logger.pm"; $LOGGER= "$PWD/logger.pm";
...@@ -72,7 +90,7 @@ else ...@@ -72,7 +90,7 @@ else
$subject= "RPM build for $SPECFILE failed" if $opt_mail; $subject= "RPM build for $SPECFILE failed" if $opt_mail;
# Open the spec file and extract the version number # 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>; @spec= <SPEC>;
close SPEC; close SPEC;
...@@ -94,7 +112,7 @@ $HOST= hostname(); ...@@ -94,7 +112,7 @@ $HOST= hostname();
$HOST=~ /^([^.-]*)/; $HOST=~ /^([^.-]*)/;
$HOST= $1; $HOST= $1;
$LOGFILE= "$PWD/Logs/Do-rpm-$HOST-$MAJOR.$MINOR.log"; $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 # Override predefined Log file name
...@@ -114,41 +132,91 @@ if (defined $opt_log) ...@@ -114,41 +132,91 @@ if (defined $opt_log)
} }
} }
# &logger("Using spec file for version: $VERSION");
# Newer RPM versions ship with a separate tool "rpmbuild" to build RPMs
# if ($opt_susebuild)
if (-x "/usr/bin/rpmbuild")
{ {
$RPM= "/usr/bin/rpmbuild"; &susebuild;
$RMSOURCE= "--rmsource --rmspec";
} }
else else
{ {
$RPM= "/bin/rpm"; &rpmbuild;
$RMSOURCE= "--rmspec";
} }
if ($RPM) &logger("SUCCESS: RPM files successfully created.") unless ($opt_dry_run);
{ exit 0;
&logger("Found rpm binary: $RPM");
} #
else # Build using SUSE's "build" script
#
sub susebuild
{ {
&abort("Unable to find RPM binary!"); $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!");
} }
# #
# determine some RPM settings for this host # Build using "plain" RPM
# #
chomp($RPMARCH= `$RPM --eval "%{_arch}" 2> /dev/null`); sub rpmbuild
chomp($RPMDIR= `$RPM --eval "%{_rpmdir}" 2> /dev/null`); {
chomp($SOURCEDIR= `$RPM --eval "%{_sourcedir}" 2> /dev/null`);
chomp($SPECDIR= `$RPM --eval "%{_specdir}" 2> /dev/null`); #
chomp($SRCRPMDIR= `$RPM --eval "%{_srcrpmdir}" 2> /dev/null`); # Newer RPM versions ship with a separate tool "rpmbuild" to build RPMs
#
if (-x "/usr/bin/rpmbuild")
{
$RPM= "/usr/bin/rpmbuild";
$RMSOURCE= "--rmsource --rmspec";
}
else
{
$RPM= "/bin/rpm";
$RMSOURCE= "--rmspec";
}
if ($RPM)
{
&logger("Found rpm binary: $RPM");
}
else
{
&abort("Unable to find RPM binary!");
}
$SOURCEFILE= glob "mysql*-$VERSION.tar.gz"; #
# determine some RPM settings for this host
#
chomp($RPMARCH= `$RPM --eval "%{_arch}" 2> /dev/null`);
chomp($RPMDIR= `$RPM --eval "%{_rpmdir}" 2> /dev/null`);
chomp($SOURCEDIR= `$RPM --eval "%{_sourcedir}" 2> /dev/null`);
chomp($SPECDIR= `$RPM --eval "%{_specdir}" 2> /dev/null`);
chomp($SRCRPMDIR= `$RPM --eval "%{_srcrpmdir}" 2> /dev/null`);
unless($opt_nobuild) { $SOURCEFILE= glob "mysql*-$VERSION.tar.gz";
&logger("Starting RPM build of MySQL-$VERSION on $HOST"); &logger("Starting RPM build of MySQL-$VERSION on $HOST");
...@@ -157,9 +225,9 @@ unless($opt_nobuild) { ...@@ -157,9 +225,9 @@ unless($opt_nobuild) {
&abort("Unable to find $file!") unless (-f "$file"); &abort("Unable to find $file!") unless (-f "$file");
} }
# #
# Install source and spec file # Install source and spec file
# #
&logger("Copying SOURCE and SPEC file to build directories."); &logger("Copying SOURCE and SPEC file to build directories.");
unless ($opt_dry_run) unless ($opt_dry_run)
{ {
...@@ -169,10 +237,10 @@ unless($opt_nobuild) { ...@@ -169,10 +237,10 @@ unless($opt_nobuild) {
or &abort("Unable to copy $SPECFILE to $SPECDIR!"); or &abort("Unable to copy $SPECFILE to $SPECDIR!");
} }
# #
# Set environment variables - these are being used in the # Set environment variables - these are being used in the
# official MySQL RPM spec file # official MySQL RPM spec file
# #
&logger("Setting special build environment variables") &logger("Setting special build environment variables")
if ($opt_cc) or ($opt_cflags) or ($opt_cxxflags) or ($opt_cxx); if ($opt_cc) or ($opt_cflags) or ($opt_cxxflags) or ($opt_cxx);
$ENV{MYSQL_BUILD_CC}=$opt_cc if ($opt_cc); $ENV{MYSQL_BUILD_CC}=$opt_cc if ($opt_cc);
...@@ -180,9 +248,9 @@ unless($opt_nobuild) { ...@@ -180,9 +248,9 @@ unless($opt_nobuild) {
$ENV{MYSQL_BUILD_CXXFLAGS}=$opt_cxxflags if ($opt_cxxflags); $ENV{MYSQL_BUILD_CXXFLAGS}=$opt_cxxflags if ($opt_cxxflags);
$ENV{MYSQL_BUILD_CXX}=$opt_cxx if ($opt_cxx); $ENV{MYSQL_BUILD_CXX}=$opt_cxx if ($opt_cxx);
# #
# Build the RPMs # Build the RPMs
# #
$command= "$RPM"; $command= "$RPM";
$command.= " -v" if ($opt_verbose); $command.= " -v" if ($opt_verbose);
$command.= " -ba"; $command.= " -ba";
...@@ -191,26 +259,22 @@ unless($opt_nobuild) { ...@@ -191,26 +259,22 @@ unless($opt_nobuild) {
$command.= basename($SPECFILE); $command.= basename($SPECFILE);
&logger("Building RPM."); &logger("Building RPM.");
&run_command($command, "Error while building the RPMs!"); &run_command($command, "Error while building the RPMs!");
}
#
# Move the resulting RPMs into the pwd
#
$command= "mv";
$command.= " -v " if ($opt_verbose);
$command.= " $SRCRPMDIR/MySQL*$VERSION_SRPM*.src.rpm $PWD";
&logger("Moving source RPM to current dir.");
&run_command($command, "Error moving source RPM!");
$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; # Move the resulting RPMs into the pwd
#
$command= "mv";
$command.= " -v " if ($opt_verbose);
$command.= " $SRCRPMDIR/MySQL*$VERSION_SRPM*.src.rpm $PWD";
&logger("Moving source RPM to current dir.");
&run_command($command, "Error moving source RPM!");
$command= "mv";
$command.= " -v " if ($opt_verbose);
$command.= " $RPMDIR/$RPMARCH/MySQL*$VERSION_SRPM*.$RPMARCH.rpm $PWD";
&logger("Moving binary RPMs to current dir.");
&run_command($command, "Error moving binary RPMs!");
}
sub print_help sub print_help
{ {
...@@ -218,7 +282,7 @@ sub print_help ...@@ -218,7 +282,7 @@ sub print_help
if ($message ne "") if ($message ne "")
{ {
print "\n"; print "\n";
print "ERROR: $message\n\n}"; print "ERROR: $message\n\n";
} }
print <<EOF; print <<EOF;
...@@ -241,12 +305,22 @@ Options: ...@@ -241,12 +305,22 @@ Options:
-t, --dry-run Dry run without executing -t, --dry-run Dry run without executing
-h, --help Print this help -h, --help Print this help
-l, --log[=<filename>] Write a log file [to <filename>] -l, --log[=<filename>] Write a log file [to <filename>]
(default is "$LOGFILE")
-m, --mail=<address> Mail a failure report to the given address -m, --mail=<address> Mail a failure report to the given address
(and include a log file snippet, if logging (and include a log file snippet, if logging
is enabled) is enabled)
Note that the \@-Sign needs to be quoted! Note that the \@-Sign needs to be quoted!
Example: --mail=user\\\@domain.com 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 -v, --verbose Verbose execution
Example: Example:
......
...@@ -42,7 +42,7 @@ sqlexamplessources = ha_example.cc ha_archive.cc ha_tina.cc ...@@ -42,7 +42,7 @@ sqlexamplessources = ha_example.cc ha_archive.cc ha_tina.cc
noinst_HEADERS = embedded_priv.h emb_qcache.h noinst_HEADERS = embedded_priv.h emb_qcache.h
sqlsources = derror.cc field.cc field_conv.cc strfunc.cc filesort.cc \ sqlsources = derror.cc field.cc field_conv.cc strfunc.cc filesort.cc \
ha_innodb.cc ha_berkeley.cc ha_heap.cc \ ha_innodb.cc ha_berkeley.cc ha_heap.cc ha_federated.cc \
ha_myisam.cc ha_myisammrg.cc handler.cc sql_handler.cc \ ha_myisam.cc ha_myisammrg.cc handler.cc sql_handler.cc \
hostname.cc init.cc password.c \ hostname.cc init.cc password.c \
item.cc item_buff.cc item_cmpfunc.cc item_create.cc \ item.cc item_buff.cc item_cmpfunc.cc item_create.cc \
......
...@@ -784,32 +784,32 @@ t2.flag_value IS NULL; ...@@ -784,32 +784,32 @@ t2.flag_value IS NULL;
flag_name flag_value flag_name flag_value
flag2 NULL flag2 NULL
DROP TABLE t1,t2; DROP TABLE t1,t2;
CREATE TABLE invoice ( CREATE TABLE t1 (
id int(11) unsigned NOT NULL auto_increment, id int(11) unsigned NOT NULL auto_increment,
text_id int(10) unsigned default NULL, text_id int(10) unsigned default NULL,
PRIMARY KEY (id) PRIMARY KEY (id)
); );
INSERT INTO invoice VALUES("1", "0"); INSERT INTO t1 VALUES("1", "0");
INSERT INTO invoice VALUES("2", "10"); INSERT INTO t1 VALUES("2", "10");
CREATE TABLE text_table ( CREATE TABLE t2 (
text_id char(3) NOT NULL default '', text_id char(3) NOT NULL default '',
language_id char(3) NOT NULL default '', language_id char(3) NOT NULL default '',
text_data text, text_data text,
PRIMARY KEY (text_id,language_id) PRIMARY KEY (text_id,language_id)
); );
INSERT INTO text_table VALUES("0", "EN", "0-EN"); INSERT INTO t2 VALUES("0", "EN", "0-EN");
INSERT INTO text_table VALUES("0", "SV", "0-SV"); INSERT INTO t2 VALUES("0", "SV", "0-SV");
INSERT INTO text_table VALUES("10", "EN", "10-EN"); INSERT INTO t2 VALUES("10", "EN", "10-EN");
INSERT INTO text_table VALUES("10", "SV", "10-SV"); INSERT INTO t2 VALUES("10", "SV", "10-SV");
SELECT invoice.id, invoice.text_id, text_table.text_data SELECT t1.id, t1.text_id, t2.text_data
FROM invoice LEFT JOIN text_table FROM t1 LEFT JOIN t2
ON invoice.text_id = text_table.text_id ON t1.text_id = t2.text_id
AND text_table.language_id = 'SV' AND t2.language_id = 'SV'
WHERE (invoice.id LIKE '%' OR text_table.text_data LIKE '%'); WHERE (t1.id LIKE '%' OR t2.text_data LIKE '%');
id text_id text_data id text_id text_data
1 0 0-SV 1 0 0-SV
2 10 10-SV 2 10 10-SV
DROP TABLE invoice, text_table; DROP TABLE t1, t2;
CREATE TABLE t0 (a0 int PRIMARY KEY); CREATE TABLE t0 (a0 int PRIMARY KEY);
CREATE TABLE t1 (a1 int PRIMARY KEY); CREATE TABLE t1 (a1 int PRIMARY KEY);
CREATE TABLE t2 (a2 int); CREATE TABLE t2 (a2 int);
......
...@@ -2160,3 +2160,11 @@ WHERE f1 <> ALL ( SELECT SUM(f1) AS sf1 FROM t2 HAVING sf1 > 10000); ...@@ -2160,3 +2160,11 @@ WHERE f1 <> ALL ( SELECT SUM(f1) AS sf1 FROM t2 HAVING sf1 > 10000);
f1 f1
NULL NULL
1 1
drop table t1,t2;
create table t1 (a1 int);
create table t2 (b1 int);
select * from t1 where a2 > any(select b1 from t2);
ERROR 42S22: Unknown column 'a2' in 'scalar IN/ALL/ANY subquery'
select * from t1 where a1 > any(select b1 from t2);
a1
drop table t1,t2;
...@@ -554,34 +554,34 @@ SELECT t1.flag_name,t2.flag_value ...@@ -554,34 +554,34 @@ SELECT t1.flag_name,t2.flag_value
DROP TABLE t1,t2; DROP TABLE t1,t2;
CREATE TABLE invoice ( CREATE TABLE t1 (
id int(11) unsigned NOT NULL auto_increment, id int(11) unsigned NOT NULL auto_increment,
text_id int(10) unsigned default NULL, text_id int(10) unsigned default NULL,
PRIMARY KEY (id) PRIMARY KEY (id)
); );
INSERT INTO invoice VALUES("1", "0"); INSERT INTO t1 VALUES("1", "0");
INSERT INTO invoice VALUES("2", "10"); INSERT INTO t1 VALUES("2", "10");
CREATE TABLE text_table ( CREATE TABLE t2 (
text_id char(3) NOT NULL default '', text_id char(3) NOT NULL default '',
language_id char(3) NOT NULL default '', language_id char(3) NOT NULL default '',
text_data text, text_data text,
PRIMARY KEY (text_id,language_id) PRIMARY KEY (text_id,language_id)
); );
INSERT INTO text_table VALUES("0", "EN", "0-EN"); INSERT INTO t2 VALUES("0", "EN", "0-EN");
INSERT INTO text_table VALUES("0", "SV", "0-SV"); INSERT INTO t2 VALUES("0", "SV", "0-SV");
INSERT INTO text_table VALUES("10", "EN", "10-EN"); INSERT INTO t2 VALUES("10", "EN", "10-EN");
INSERT INTO text_table VALUES("10", "SV", "10-SV"); INSERT INTO t2 VALUES("10", "SV", "10-SV");
SELECT invoice.id, invoice.text_id, text_table.text_data SELECT t1.id, t1.text_id, t2.text_data
FROM invoice LEFT JOIN text_table FROM t1 LEFT JOIN t2
ON invoice.text_id = text_table.text_id ON t1.text_id = t2.text_id
AND text_table.language_id = 'SV' AND t2.language_id = 'SV'
WHERE (invoice.id LIKE '%' OR text_table.text_data LIKE '%'); WHERE (t1.id LIKE '%' OR t2.text_data LIKE '%');
DROP TABLE invoice, text_table; DROP TABLE t1, t2;
# Test for bug #5896 # Test for bug #5896
......
...@@ -1417,3 +1417,14 @@ SELECT f1 FROM t1 ...@@ -1417,3 +1417,14 @@ SELECT f1 FROM t1
SELECT f1 FROM t1 SELECT f1 FROM t1
WHERE f1 <> ALL ( SELECT SUM(f1) AS sf1 FROM t2 HAVING sf1 > 10000); WHERE f1 <> ALL ( SELECT SUM(f1) AS sf1 FROM t2 HAVING sf1 > 10000);
drop table t1,t2;
# Test for BUG#7885: Server crash when 'any' subselect compared to
# non-existant field.
create table t1 (a1 int);
create table t2 (b1 int);
--error 1054
select * from t1 where a2 > any(select b1 from t2);
select * from t1 where a1 > any(select b1 from t2);
drop table t1,t2;
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
#ifndef ATTRIBUTE_HEADER #ifndef ATTRIBUTE_HEADER
#define ATTRIBUTE_HEADER #define ATTRIBUTE_HEADER
#include <new>
/** /**
* @class AttributeHeader * @class AttributeHeader
* @brief Header passed in front of every attribute value in AttrInfo signal * @brief Header passed in front of every attribute value in AttrInfo signal
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
#define NDB_TYPE_BIGUNSIGNED 10 #define NDB_TYPE_BIGUNSIGNED 10
#define NDB_TYPE_FLOAT 11 #define NDB_TYPE_FLOAT 11
#define NDB_TYPE_DOUBLE 12 #define NDB_TYPE_DOUBLE 12
#define NDB_TYPE_DECIMAL 13 // not used #define NDB_TYPE_DECIMAL 13 /* not used */
#define NDB_TYPE_CHAR 14 #define NDB_TYPE_CHAR 14
#define NDB_TYPE_VARCHAR 15 #define NDB_TYPE_VARCHAR 15
#define NDB_TYPE_BINARY 16 #define NDB_TYPE_BINARY 16
......
...@@ -115,10 +115,8 @@ static const char table_name_separator = '/'; ...@@ -115,10 +115,8 @@ static const char table_name_separator = '/';
#endif #endif
#ifdef __cplusplus #ifdef __cplusplus
#include <new> inline void* operator new(size_t, void* __p) { return __p; }
#endif inline void* operator new[](size_t, void* __p) { return __p; }
#ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
......
...@@ -22,7 +22,6 @@ ...@@ -22,7 +22,6 @@
//=========================================================================== //===========================================================================
#include "Backup.hpp" #include "Backup.hpp"
#include <new>
#include <Properties.hpp> #include <Properties.hpp>
#include <Configuration.hpp> #include <Configuration.hpp>
......
...@@ -39,7 +39,6 @@ ...@@ -39,7 +39,6 @@
#include <EventLogger.hpp> #include <EventLogger.hpp>
#include <TimeQueue.hpp> #include <TimeQueue.hpp>
#include <new>
#include <NdbSleep.h> #include <NdbSleep.h>
#include <SafeCounter.hpp> #include <SafeCounter.hpp>
......
...@@ -18,7 +18,6 @@ ...@@ -18,7 +18,6 @@
#define DBDIH_C #define DBDIH_C
#include "Dbdih.hpp" #include "Dbdih.hpp"
#include <ndb_limits.h> #include <ndb_limits.h>
#include <new>
#define DEBUG(x) { ndbout << "DIH::" << x << endl; } #define DEBUG(x) { ndbout << "DIH::" << x << endl; }
......
...@@ -19,7 +19,6 @@ ...@@ -19,7 +19,6 @@
#define DBLQH_C #define DBLQH_C
#include "Dblqh.hpp" #include "Dblqh.hpp"
#include <ndb_limits.h> #include <ndb_limits.h>
#include <new>
#define DEBUG(x) { ndbout << "LQH::" << x << endl; } #define DEBUG(x) { ndbout << "LQH::" << x << endl; }
......
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
#include <ndb_limits.h> #include <ndb_limits.h>
#include <Properties.hpp> #include <Properties.hpp>
#include <Configuration.hpp> #include <Configuration.hpp>
#include <new>
#define DEBUG(x) { ndbout << "TC::" << x << endl; } #define DEBUG(x) { ndbout << "TC::" << x << endl; }
......
...@@ -1312,7 +1312,10 @@ void Dbtc::execTCRELEASEREQ(Signal* signal) ...@@ -1312,7 +1312,10 @@ void Dbtc::execTCRELEASEREQ(Signal* signal)
if (tapiBlockref == apiConnectptr.p->ndbapiBlockref) { if (tapiBlockref == apiConnectptr.p->ndbapiBlockref) {
if (apiConnectptr.p->apiConnectstate == CS_CONNECTED || if (apiConnectptr.p->apiConnectstate == CS_CONNECTED ||
(apiConnectptr.p->apiConnectstate == CS_ABORTING && (apiConnectptr.p->apiConnectstate == CS_ABORTING &&
apiConnectptr.p->abortState == AS_IDLE)){ apiConnectptr.p->abortState == AS_IDLE) ||
(apiConnectptr.p->apiConnectstate == CS_STARTED &&
apiConnectptr.p->firstTcConnect == RNIL))
{
jam(); /* JUST REPLY OK */ jam(); /* JUST REPLY OK */
releaseApiCon(signal, apiConnectptr.i); releaseApiCon(signal, apiConnectptr.i);
signal->theData[0] = tuserpointer; signal->theData[0] = tuserpointer;
......
...@@ -31,7 +31,6 @@ ...@@ -31,7 +31,6 @@
#include <signaldata/TupKey.hpp> #include <signaldata/TupKey.hpp>
#include <signaldata/DropTab.hpp> #include <signaldata/DropTab.hpp>
#include <new>
#define DEBUG(x) { ndbout << "TUP::" << x << endl; } #define DEBUG(x) { ndbout << "TUP::" << x << endl; }
......
...@@ -17,7 +17,6 @@ ...@@ -17,7 +17,6 @@
#ifndef DBTUX_H #ifndef DBTUX_H
#define DBTUX_H #define DBTUX_H
#include <new>
#include <ndb_limits.h> #include <ndb_limits.h>
#include <SimulatedBlock.hpp> #include <SimulatedBlock.hpp>
#include <AttributeDescriptor.hpp> #include <AttributeDescriptor.hpp>
......
...@@ -15,7 +15,6 @@ ...@@ -15,7 +15,6 @@
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
#include "Grep.hpp" #include "Grep.hpp"
#include <new>
#include <Properties.hpp> #include <Properties.hpp>
#include <Configuration.hpp> #include <Configuration.hpp>
......
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
#include "Suma.hpp" #include "Suma.hpp"
#include <new>
#include <Properties.hpp> #include <Properties.hpp>
#include <Configuration.hpp> #include <Configuration.hpp>
......
...@@ -33,7 +33,6 @@ ...@@ -33,7 +33,6 @@
#include <NdbOut.hpp> #include <NdbOut.hpp>
#include <NdbMutex.h> #include <NdbMutex.h>
#include <NdbSleep.h> #include <NdbSleep.h>
#include <new>
extern "C" { extern "C" {
extern void (* ndb_new_handler)(); extern void (* ndb_new_handler)();
......
...@@ -36,7 +36,6 @@ ...@@ -36,7 +36,6 @@
#include <ErrorReporter.hpp> #include <ErrorReporter.hpp>
#include <ErrorHandlingMacros.hpp> #include <ErrorHandlingMacros.hpp>
#include <new>
#include "DLList.hpp" #include "DLList.hpp"
#include "ArrayPool.hpp" #include "ArrayPool.hpp"
#include "DLHashTable.hpp" #include "DLHashTable.hpp"
......
#include <ndb_types.h> #include <ndb_types.h>
#include <mgmapi.h> #include <mgmapi.h>
#include "mgmapi_configuration.hpp" #include "mgmapi_configuration.hpp"
#include <new>
ndb_mgm_configuration_iterator::ndb_mgm_configuration_iterator ndb_mgm_configuration_iterator::ndb_mgm_configuration_iterator
(const ndb_mgm_configuration & conf, unsigned type_of_section) (const ndb_mgm_configuration & conf, unsigned type_of_section)
......
...@@ -230,17 +230,17 @@ NdbScanOperation::fix_receivers(Uint32 parallel){ ...@@ -230,17 +230,17 @@ NdbScanOperation::fix_receivers(Uint32 parallel){
if(parallel > m_allocated_receivers){ if(parallel > m_allocated_receivers){
const Uint32 sz = parallel * (4*sizeof(char*)+sizeof(Uint32)); const Uint32 sz = parallel * (4*sizeof(char*)+sizeof(Uint32));
Uint32 * tmp = new Uint32[(sz+3)/4]; Uint64 * tmp = new Uint64[(sz+7)/8];
// Save old receivers // Save old receivers
memcpy(tmp+parallel, m_receivers, m_allocated_receivers*sizeof(char*)); memcpy(tmp, m_receivers, m_allocated_receivers*sizeof(char*));
delete[] m_array; delete[] m_array;
m_array = tmp; m_array = (Uint32*)tmp;
m_prepared_receivers = tmp; m_receivers = (NdbReceiver**)tmp;
m_receivers = (NdbReceiver**)(tmp + parallel);
m_api_receivers = m_receivers + parallel; m_api_receivers = m_receivers + parallel;
m_conf_receivers = m_api_receivers + parallel; m_conf_receivers = m_api_receivers + parallel;
m_sent_receivers = m_conf_receivers + parallel; m_sent_receivers = m_conf_receivers + parallel;
m_prepared_receivers = (Uint32*)(m_sent_receivers + parallel);
// Only get/init "new" receivers // Only get/init "new" receivers
NdbReceiver* tScanRec; NdbReceiver* tScanRec;
......
...@@ -210,8 +210,10 @@ do ...@@ -210,8 +210,10 @@ do
done done
$CP mysql-test/include/*.inc $BASE/mysql-test/include $CP mysql-test/include/*.inc $BASE/mysql-test/include
$CP mysql-test/std_data/*.dat mysql-test/std_data/*.*001 $BASE/mysql-test/std_data $CP mysql-test/std_data/*.dat mysql-test/std_data/*.frm \
$CP mysql-test/std_data/des_key_file $BASE/mysql-test/std_data mysql-test/std_data/*.pem mysql-test/std_data/Moscow_leap \
mysql-test/std_data/des_key_file mysql-test/std_data/*.*001 \
$BASE/mysql-test/std_data
$CP mysql-test/t/*test mysql-test/t/*.opt mysql-test/t/*.slave-mi mysql-test/t/*.sh $BASE/mysql-test/t $CP mysql-test/t/*test mysql-test/t/*.opt mysql-test/t/*.slave-mi mysql-test/t/*.sh $BASE/mysql-test/t
$CP mysql-test/r/*result mysql-test/r/*.require $BASE/mysql-test/r $CP mysql-test/r/*result mysql-test/r/*.require $BASE/mysql-test/r
......
...@@ -264,6 +264,7 @@ class Item_func_trig_cond: public Item_bool_func ...@@ -264,6 +264,7 @@ class Item_func_trig_cond: public Item_bool_func
longlong val_int() { return *trig_var ? args[0]->val_int() : 1; } longlong val_int() { return *trig_var ? args[0]->val_int() : 1; }
enum Functype functype() const { return TRIG_COND_FUNC; }; enum Functype functype() const { return TRIG_COND_FUNC; };
const char *func_name() const { return "trigcond"; }; const char *func_name() const { return "trigcond"; };
bool const_item() const { return FALSE; }
}; };
class Item_func_not_all :public Item_func_not class Item_func_not_all :public Item_func_not
......
...@@ -177,6 +177,8 @@ bool Item_subselect::fix_fields(THD *thd_param, TABLE_LIST *tables, Item **ref) ...@@ -177,6 +177,8 @@ bool Item_subselect::fix_fields(THD *thd_param, TABLE_LIST *tables, Item **ref)
} }
fix_length_and_dec(); fix_length_and_dec();
} }
else
return 1;
uint8 uncacheable= engine->uncacheable(); uint8 uncacheable= engine->uncacheable();
if (uncacheable) if (uncacheable)
{ {
...@@ -264,7 +266,6 @@ Item_singlerow_subselect::Item_singlerow_subselect(st_select_lex *select_lex) ...@@ -264,7 +266,6 @@ Item_singlerow_subselect::Item_singlerow_subselect(st_select_lex *select_lex)
{ {
DBUG_ENTER("Item_singlerow_subselect::Item_singlerow_subselect"); DBUG_ENTER("Item_singlerow_subselect::Item_singlerow_subselect");
init(select_lex, new select_singlerow_subselect(this)); init(select_lex, new select_singlerow_subselect(this));
max_columns= 1;
maybe_null= 1; maybe_null= 1;
max_columns= UINT_MAX; max_columns= UINT_MAX;
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
......
This diff is collapsed.
# This logname is set in mysql.server.sh that ends up in /etc/rc.d/init.d/mysql # This logname can be set in /etc/my.cnf
# by setting the variable "err-log"
# in the [safe_mysqld] section as follows:
#
# [safe_mysqld]
# err-log=@localstatedir@/mysqld.log
# #
# If the root user has a password you have to create a # If the root user has a password you have to create a
# /root/.my.cnf configuration file with the following # /root/.my.cnf configuration file with the following
...@@ -22,7 +27,9 @@ ...@@ -22,7 +27,9 @@
compress compress
postrotate postrotate
# just if mysqld is really running # just if mysqld is really running
if test -n "`ps acx|grep mysqld`"; then if test -x @bindir@/mysqladmin && \
@bindir@/mysqladmin ping &>/dev/null
then
@bindir@/mysqladmin flush-logs @bindir@/mysqladmin flush-logs
fi fi
endscript endscript
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment