Commit 3ebe7e2a authored by unknown's avatar unknown

Merge kboortz@bk-internal.mysql.com:/home/bk/mysql-4.1

into  mysql.com:/home/kent/bk/mysql-4.1-merge
parents d24da25c 0169639a
......@@ -40,22 +40,22 @@ CLEAN_FILES: $(TXT_FILES)
GT = $(srcdir)/Support/generate-text-files.pl
../INSTALL-SOURCE: mysql.info $(GT)
perl -w $(GT) $< "installing-source" "windows-source-build" > $@
perl -w $(GT) $(srcdir)/mysql.info "installing-source" "windows-source-build" > $@
../INSTALL-WIN-SOURCE: mysql.info $(GT)
perl -w $(GT) $< "windows-source-build" "post-installation" > $@
perl -w $(GT) $(srcdir)/mysql.info "windows-source-build" "post-installation" > $@
# We put the description for the binary installation here so that
# people who download source wont have to see it. It is moved up to
# the toplevel by the script that makes the binary tar files.
INSTALL-BINARY: mysql.info $(GT)
perl -w $(GT) $< "installing-binary" "installing-source" > $@
perl -w $(GT) $(srcdir)/mysql.info "installing-binary" "installing-source" > $@
../EXCEPTIONS-CLIENT: mysql.info $(GT)
perl -w $(GT) $< "mysql-floss-license-exception" "function-index" > $@
perl -w $(GT) $(srcdir)/mysql.info "mysql-floss-license-exception" "function-index" > $@
../support-files/MacOSX/ReadMe.txt: mysql.info $(GT)
perl -w $(GT) $< "mac-os-x-installation" "netware-installation" > $@
perl -w $(GT) $(srcdir)/mysql.info "mac-os-x-installation" "netware-installation" > $@
# Don't update the files from bitkeeper
%::SCCS/s.%
......@@ -1448,20 +1448,20 @@ bdb_version_ok=yes
])
AC_DEFUN([MYSQL_TOP_BUILDDIR], [
# Remove trailing "./" if any
[$1]=`echo $[$1] | sed -e 's,^\./,,'`
case "$[$1]" in
/* ) ;; # don't do anything with an absolute path
"$srcdir"/* )
"bdb" | "$srcdir/bdb" | "$top_srcdir/bdb" | "$abs_top_srcdir/bdb" )
# If BDB is under the source directory, we need to look under the
# build directory for bdb/build_unix.
# NOTE: I'm being lazy, and assuming the user did not specify
# something like --with-berkeley-db=bdb (it would be missing "./").
[$1]="\$(top_builddir)/"`echo "$[$1]" | sed -e "s,^$srcdir/,,"`
[$1]="\$(top_builddir)/bdb"
;;
/* ) ;; # Other absolute path is assume to be external BDB directory
* )
AC_MSG_ERROR([The BDB directory must be directly under the MySQL source directory, or be specified using the full path. ('$srcdir'; '$[$1]')])
;;
esac
if test X"$[$1]" != "/"
if test X"$[$1]" != X"/"
then
[$1]=`echo $[$1] | sed -e 's,/$,,'`
fi
......@@ -1493,7 +1493,7 @@ AC_DEFUN([MYSQL_CHECK_INNODB], [
AC_MSG_RESULT([Using Innodb])
AC_DEFINE([HAVE_INNOBASE_DB], [1], [Using Innobase DB])
have_innodb="yes"
innodb_includes="-I../innobase/include"
innodb_includes="-I\$(top_builddir)/innobase/include -I\$(top_srcdir)/innobase/include"
innodb_system_libs=""
dnl Some libs are listed several times, in order for gcc to sort out
dnl circular references.
......@@ -1812,7 +1812,7 @@ AC_DEFUN([MYSQL_CHECK_NDBCLUSTER], [
AC_MSG_RESULT([Using NDB Cluster])
AC_DEFINE([HAVE_NDBCLUSTER_DB], [1], [Using Ndb Cluster DB])
have_ndbcluster="yes"
ndbcluster_includes="-I../ndb/include -I../ndb/include/ndbapi"
ndbcluster_includes="-I\$(top_builddir)/ndb/include -I\$(top_srcdir)/ndb/include -I\$(top_srcdir)/ndb/include/ndbapi"
ndbcluster_libs="\$(top_builddir)/ndb/src/.libs/libndbclient.a"
ndbcluster_system_libs=""
ndb_mgmclient_libs="\$(top_builddir)/ndb/src/mgmclient/libndbmgmclient.la"
......
......@@ -180,7 +180,7 @@ BEGIN {
t = types[i];
if (modes[i] == "POINTER") {
ndx = index(t, "*");
t = substr(types[i], 0, ndx - 2);
t = substr(types[i], 1, ndx - 2);
}
printf("\t%s\t%s;\n", t, vars[i]) >> HFILE
}
......
......@@ -46,12 +46,14 @@ do
case $host_os in
netware* | modesto*)
echo "$i/errmsg.sys: $i/errmsg.txt
\$(top_builddir)/extra/comp_err.linux -C\$(srcdir)/charsets/ $i/errmsg.txt $i/errmsg.sys" \
mkdir -p $i
\$(top_builddir)/extra/comp_err.linux -C\$(srcdir)/charsets/ \$(srcdir)/$i/errmsg.txt $i/errmsg.sys" \
>> $AVAILABLE_LANGUAGES_ERRORS_RULES
;;
*)
echo "$i/errmsg.sys: $i/errmsg.txt
\$(top_builddir)/extra/comp_err -C\$(srcdir)/charsets/ $i/errmsg.txt $i/errmsg.sys" \
mkdir -p $i
\$(top_builddir)/extra/comp_err -C\$(srcdir)/charsets/ \$(srcdir)/$i/errmsg.txt $i/errmsg.sys" \
>> $AVAILABLE_LANGUAGES_ERRORS_RULES
;;
esac
......
......@@ -31,8 +31,6 @@ INCLUDES = @MT_INCLUDES@ \
## automake barfs if you don't use $(srcdir) or $(top_srcdir) in include
include $(top_srcdir)/libmysql/Makefile.shared
libmysql_dir = $(top_srcdir)/libmysql
libmysqlclient_r_la_SOURCES = $(target_sources)
libmysqlclient_r_la_LIBADD = $(target_libadd)
libmysqlclient_r_la_LDFLAGS = $(target_ldflags)
......@@ -40,7 +38,9 @@ libmysqlclient_r_la_LDFLAGS = $(target_ldflags)
# This is called from the toplevel makefile
link_sources:
set -x; \
for f in `cd $(libmysql_dir) && echo *.[ch]`; do \
rm -f $$f; \
@LN_CP_F@ $(libmysql_dir)/$$f $$f; \
for d in $(top_srcdir)/libmysql $(top_builddir)/libmysql; do \
for f in `cd $$d && echo *.[ch]`; do \
rm -f $$f; \
@LN_CP_F@ $$d/$$f $$f; \
done; \
done
......@@ -25,9 +25,11 @@ DEFS = -DEMBEDDED_LIBRARY -DMYSQL_SERVER \
-DDEFAULT_MYSQL_HOME="\"$(MYSQLBASEdir)\"" \
-DDATADIR="\"$(MYSQLDATAdir)\"" \
-DSHAREDIR="\"$(MYSQLSHAREdir)\""
INCLUDES= @MT_INCLUDES@ @bdb_includes@ \
INCLUDES= @MT_INCLUDES@ @bdb_includes@ @innodb_includes@ @ndbcluster_includes@ \
-I$(top_builddir)/include -I$(top_srcdir)/include \
-I$(top_srcdir)/sql -I$(top_srcdir)/sql/examples -I$(top_srcdir)/regex \
-I$(top_builddir)/sql -I$(top_srcdir)/sql \
-I$(top_srcdir)/sql/examples \
-I$(top_srcdir)/regex \
$(openssl_includes) @ZLIB_INCLUDES@
noinst_LIBRARIES = libmysqld_int.a
......@@ -118,16 +120,28 @@ endif
#libmysqld_la_LDFLAGS = -version-info @SHARED_LIB_VERSION@
#CLEANFILES = $(libmysqld_la_LIBADD) libmysqld.la
# This is called from the toplevel makefile
# This is called from the toplevel makefile. If we can link now
# to an existing file in source, we do that, else we assume it
# will show up in the build tree eventually (generated file).
link_sources:
set -x; \
for f in $(sqlsources); do \
rm -f $$f; \
@LN_CP_F@ $(top_srcdir)/sql/$$f $$f; \
if test -e $(top_srcdir)/sql/$$f ; \
then \
@LN_CP_F@ $(top_srcdir)/sql/$$f $$f; \
else \
@LN_CP_F@ $(top_builddir)/sql/$$f $$f; \
fi ; \
done; \
for f in $(libmysqlsources); do \
rm -f $$f; \
@LN_CP_F@ $(top_srcdir)/libmysql/$$f $$f; \
if test -e $(top_srcdir)/libmysql/$$f ; \
then \
@LN_CP_F@ $(top_srcdir)/libmysql/$$f $$f; \
else \
@LN_CP_F@ $(top_builddir)/libmysql/$$f $$f; \
fi ; \
done; \
for f in $(sqlexamplessources); do \
rm -f $$f; \
......
#
# This file is used from mysql-test-run.pl when choosing
# port numbers and directories to use for running mysqld.
#
use strict;
use Fcntl ':flock';
#
# Requested IDs are stored in a hash and released upon END.
#
my %mtr_unique_assigned_ids = ();
END {
while(my ($id,$file) = each(%mtr_unique_assigned_ids)) {
print "Autoreleasing $file:$id\n";
mtr_release_unique_id($file, $id);
}
}
#
# Require a unique, numerical ID, given a file name (where all
# requested IDs are stored), a minimum and a maximum value.
#
# We use flock to implement locking for the ID file and ignore
# possible problems arising from lack of support for it on
# some platforms (it should work on most, and the possible
# race condition would occur rarely). The proper solution for
# this is a daemon that manages IDs, of course.
#
# If no unique ID within the specified parameters can be
# obtained, return undef.
#
sub mtr_require_unique_id($$$) {
my $file = shift;
my $min = shift;
my $max = shift;
my $ret = undef;
my $changed = 0;
my $can_use_ps = `ps -e | grep '^[ ]*$$ '`;
if(eval("readlink '$file'") || eval("readlink '$file.sem'")) {
die 'lock file is a symbolic link';
}
chmod 0777, "$file.sem";
open SEM, ">", "$file.sem" or die "can't write to $file.sem";
flock SEM, LOCK_EX or die "can't lock $file.sem";
if(! -e $file) {
open FILE, ">", $file or die "can't create $file";
close FILE;
}
if(eval("readlink '$file'") || eval("readlink '$file.sem'")) {
die 'lock file is a symbolic link';
}
chmod 0777, $file;
open FILE, "+<", $file or die "can't open $file";
select undef,undef,undef,0.2;
seek FILE, 0, 0;
my %taken = ();
while(<FILE>) {
chomp;
my ($id, $pid) = split / /;
$taken{$id} = $pid;
if($can_use_ps) {
my $res = `ps -e | grep '^[ ]*$pid '`;
if(!$res) {
print "Ignoring slot $id used by missing process $pid.\n";
delete $taken{$id};
++$changed;
}
}
}
for(my $i=$min; $i<=$max; ++$i) {
if(! exists $taken{$i}) {
$ret = $i;
$taken{$i} = $$;
++$changed;
last;
}
}
if($changed) {
seek FILE, 0, 0;
truncate FILE, 0 or die "can't truncate $file";
for my $k (keys %taken) {
print FILE $k . ' ' . $taken{$k} . "\n";
}
}
close FILE;
flock SEM, LOCK_UN or warn "can't unlock $file.sem";
close SEM;
$mtr_unique_assigned_ids{$ret} = $file if defined $ret;
return $ret;
}
#
# Require a unique ID like above, but sleep if no ID can be
# obtained immediately.
#
sub mtr_require_unique_id_and_wait($$$) {
my $ret = mtr_require_unique_id($_[0],$_[1],$_[2]);
while(! defined $ret) {
sleep 30;
$ret = mtr_require_unique_id($_[0],$_[1],$_[2]);
print "Waiting for unique id to become available...\n" unless $ret;
}
return $ret;
}
#
# Release a unique ID.
#
sub mtr_release_unique_id($$) {
my $file = shift;
my $myid = shift;
if(eval("readlink '$file'") || eval("readlink '$file.sem'")) {
die 'lock file is a symbolic link';
}
open SEM, ">", "$file.sem" or die "can't write to $file.sem";
flock SEM, LOCK_EX or die "can't lock $file.sem";
if(eval("readlink '$file'") || eval("readlink '$file.sem'")) {
die 'lock file is a symbolic link';
}
if(! -e $file) {
open FILE, ">", $file or die "can't create $file";
close FILE;
}
open FILE, "+<", $file or die "can't open $file";
select undef,undef,undef,0.2;
seek FILE, 0, 0;
my %taken = ();
while(<FILE>) {
chomp;
my ($id, $pid) = split / /;
$taken{$id} = $pid;
}
delete $taken{$myid};
seek FILE, 0, 0;
truncate FILE, 0 or die "can't truncate $file";
for my $k (keys %taken) {
print FILE $k . ' ' . $taken{$k} . "\n";
}
close FILE;
flock SEM, LOCK_UN or warn "can't unlock $file.sem";
close SEM;
delete $mtr_unique_assigned_ids{$myid};
}
1;
......@@ -85,6 +85,7 @@ require "lib/mtr_diff.pl";
require "lib/mtr_match.pl";
require "lib/mtr_misc.pl";
require "lib/mtr_stress.pl";
require "lib/mtr_unique.pl";
$Devel::Trace::TRACE= 1;
......@@ -449,6 +450,15 @@ sub initial_setup () {
select(STDOUT);
$| = 1; # Make unbuffered
# If so requested, we try to avail ourselves of a unique build thread number.
if ( $ENV{'MTR_BUILD_THREAD'} ) {
if ( lc($ENV{'MTR_BUILD_THREAD'}) eq 'auto' ) {
print "Requesting build thread... ";
$ENV{'MTR_BUILD_THREAD'} = mtr_require_unique_id_and_wait("/tmp/mysql-test-ports", 200, 299);
print "got ".$ENV{'MTR_BUILD_THREAD'}."\n";
}
}
$glob_scriptname= basename($0);
# We require that we are in the "mysql-test" directory
......
......@@ -7,6 +7,6 @@ ndbapiincludedir = "$(pkgincludedir)/ndb/ndbapi"
mgmapiincludedir = "$(pkgincludedir)/ndb/mgmapi"
INCLUDES = $(INCLUDES_LOC)
LDADD = $(LDADD_LOC) -L$(top_srcdir)/ndb/src/common/portlib -lmygcc
LDADD = $(LDADD_LOC) -L$(top_builddir)/ndb/src/common/portlib -lmygcc
DEFS = @DEFS@ @NDB_DEFS@ $(DEFS_LOC) $(NDB_EXTRA_FLAGS)
NDB_CXXFLAGS=@ndb_cxxflags_fix@ $(NDB_CXXFLAGS_LOC)
INCLUDES += \
-I$(srcdir) -I$(top_srcdir)/include \
-I$(srcdir) \
-I$(top_builddir)/include \
-I$(top_builddir)/ndb/include \
-I$(top_srcdir)/include \
-I$(top_srcdir)/ndb/include \
-I$(top_srcdir)/ndb/src/kernel/vm \
-I$(top_srcdir)/ndb/src/kernel/error \
......
INCLUDES += \
-I$(srcdir) -I$(top_srcdir)/include -I$(top_srcdir)/ndb/include \
-I$(srcdir) \
-I$(top_builddir)/include \
-I$(top_builddir)/ndb/include \
-I$(top_srcdir)/include \
-I$(top_srcdir)/ndb/include \
-I$(top_srcdir)/ndb/include/kernel \
-I$(top_srcdir)/ndb/include/transporter \
-I$(top_srcdir)/ndb/include/debugger \
......
......@@ -5,7 +5,10 @@ LDADD += $(top_builddir)/ndb/test/src/libNDBT.a \
$(top_builddir)/mysys/libmysys.a \
$(top_builddir)/strings/libmystrings.a @NDB_SCI_LIBS@
INCLUDES += -I$(top_srcdir) -I$(top_srcdir)/include \
INCLUDES += -I$(top_srcdir) \
-I$(top_builddir)/include \
-I$(top_builddir)/ndb/include \
-I$(top_srcdir)/include \
-I$(top_srcdir)/ndb/include \
-I$(top_srcdir)/ndb/include/ndbapi \
-I$(top_srcdir)/ndb/include/util \
......
......@@ -5,7 +5,10 @@ LDADD += \
$(top_builddir)/mysys/libmysys.a \
$(top_builddir)/strings/libmystrings.a @NDB_SCI_LIBS@ -lmygcc
INCLUDES += -I$(srcdir) -I$(top_srcdir)/include \
INCLUDES += -I$(srcdir) \
-I$(top_builddir)/include \
-I$(top_builddir)/ndb/include \
-I$(top_srcdir)/include \
-I$(top_srcdir)/ndb/include \
-I$(top_srcdir)/ndb/include/ndbapi \
-I$(top_srcdir)/ndb/include/util \
......
INCLUDES += -I$(srcdir) -I$(top_srcdir)/include \
INCLUDES += -I$(srcdir) \
-I$(top_builddir)/include \
-I$(top_builddir)/ndb/include \
-I$(top_srcdir)/include \
-I$(top_srcdir)/ndb/include \
-I$(top_srcdir)/ndb/include/util \
-I$(top_srcdir)/ndb/include/portlib \
......
......@@ -9,21 +9,21 @@ ndbd_SOURCES = main.cpp SimBlockList.cpp
include $(top_srcdir)/ndb/config/type_kernel.mk.am
INCLUDES += \
-Iblocks/cmvmi \
-Iblocks/dbacc \
-Iblocks/dbdict \
-Iblocks/dbdih \
-Iblocks/dblqh \
-Iblocks/dbtc \
-Iblocks/dbtup \
-Iblocks/ndbfs \
-Iblocks/ndbcntr \
-Iblocks/qmgr \
-Iblocks/trix \
-Iblocks/backup \
-Iblocks/dbutil \
-Iblocks/suma \
-Iblocks/dbtux
-I$(srcdir)/blocks/cmvmi \
-I$(srcdir)/blocks/dbacc \
-I$(srcdir)/blocks/dbdict \
-I$(srcdir)/blocks/dbdih \
-I$(srcdir)/blocks/dblqh \
-I$(srcdir)/blocks/dbtc \
-I$(srcdir)/blocks/dbtup \
-I$(srcdir)/blocks/ndbfs \
-I$(srcdir)/blocks/ndbcntr \
-I$(srcdir)/blocks/qmgr \
-I$(srcdir)/blocks/trix \
-I$(srcdir)/blocks/backup \
-I$(srcdir)/blocks/dbutil \
-I$(srcdir)/blocks/suma \
-I$(srcdir)/blocks/dbtux
LDADD += \
blocks/cmvmi/libcmvmi.a \
......
......@@ -170,6 +170,8 @@ necessary to develop MySQL client applications.
%package shared
Summary: MySQL - Shared libraries
Group: Applications/Databases
Provides: mysql-shared
Obsoletes: mysql-shared
%description shared
This package contains the shared libraries (*.so*) which certain
......@@ -317,7 +319,10 @@ then
cp -fp config.log "$MYSQL_MAXCONFLOG_DEST"
fi
make -i test-force || true
( cd mysql-test
perl ./mysql-test-run.pl --force --report-features
perl ./mysql-test-run.pl --force --ps-protocol
true )
# Save mysqld-max
./libtool --mode=execute cp sql/mysqld sql/mysqld-max
......@@ -380,7 +385,10 @@ then
cp -fp config.log "$MYSQL_CONFLOG_DEST"
fi
make -i test-force || true
( cd mysql-test
perl ./mysql-test-run.pl --force --report-features
perl ./mysql-test-run.pl --force --ps-protocol
true )
%install
RBR=$RPM_BUILD_ROOT
......@@ -716,6 +724,17 @@ fi
# itself - note that they must be ordered by date (important when
# merging BK trees)
%changelog
* Thu Nov 16 2006 Joerg Bruehe <joerg@mysql.com>
- Explicitly note that the "MySQL-shared" RPMs (as built by MySQL AB)
replace "mysql-shared" (as distributed by SuSE) to allow easy upgrading
(bug#22081).
* Wed Nov 15 2006 Joerg Bruehe <joerg@mysql.com>
- Switch from "make test*" to explicit calls of the test suite,
so that "report features" can be used.
* Tue Jun 27 2006 Joerg Bruehe <joerg@mysql.com>
- move "mysqldumpslow" from the client RPM to the server RPM (bug#20216)
......
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