summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorunknown <monty@donna.mysql.fi>2001-04-13 16:21:38 +0300
committerunknown <monty@donna.mysql.fi>2001-04-13 16:21:38 +0300
commit3b78ab65bb8e340b328cac5bca3188f64396ed61 (patch)
treed5bf5dce34ab694fbf5f6372332cd9a4226fe04c
parent0948956b802845699f9868b1e2c6b61a74f36b8d (diff)
downloadmariadb-git-3b78ab65bb8e340b328cac5bca3188f64396ed61.tar.gz
Changes to get mysqld-max to compile
BUILD/SETUP.sh: Changed to use -ffixed-ebp with -fomit-frame-pointer BUILD/compile-pentium: Changed to use reckless flags as defaults as this appears to work good, even with stack-traces. Build-tools/Do-all-build-steps: Innobase -> Innodb Docs/manual.texi: Added information about -ffixed-ebp scripts/safe_mysqld.sh: Added option --mysqld-version Use mysqld-max binary as default if installed and --mysqld or --mysqld-version is not used support-files/mysql-max.spec.sh: Fixed bugs support-files/mysql.spec.sh: Added Max package tests/fork_big.pl: Added --user and --password
-rw-r--r--BUILD/SETUP.sh2
-rwxr-xr-xBUILD/compile-pentium2
-rwxr-xr-xBuild-tools/Do-all-build-steps4
-rw-r--r--Docs/manual.texi13
-rw-r--r--scripts/safe_mysqld.sh10
-rw-r--r--support-files/mysql-max.spec.sh12
-rw-r--r--support-files/mysql.spec.sh37
-rwxr-xr-xtests/fork_big.pl8
8 files changed, 61 insertions, 27 deletions
diff --git a/BUILD/SETUP.sh b/BUILD/SETUP.sh
index 5be7942e935..d1de9ab12e7 100644
--- a/BUILD/SETUP.sh
+++ b/BUILD/SETUP.sh
@@ -44,7 +44,7 @@ pentium_cflags="-mpentiumpro"
sparc_cflags=""
fast_cflags="-O6 -fno-omit-frame-pointer"
-reckless_cflags="-O6 -fomit-frame-pointer"
+reckless_cflags="-O6 -fomit-frame-pointer -ffixed-ebp"
debug_cflags="-DEXTRA_DEBUG -DFORCE_INIT_OF_VARS -DSAFEMALLOC -DSAFE_MUTEX -O2"
base_cxxflags="-felide-constructors -fno-exceptions -fno-rtti"
diff --git a/BUILD/compile-pentium b/BUILD/compile-pentium
index 11559be93de..9607ca03e7e 100755
--- a/BUILD/compile-pentium
+++ b/BUILD/compile-pentium
@@ -3,7 +3,7 @@
path=`dirname $0`
. "$path/SETUP.sh"
-extra_flags="$pentium_cflags $fast_cflags"
+extra_flags="$pentium_cflags $reckless_cflags"
extra_configs="$pentium_configs"
strip=yes
diff --git a/Build-tools/Do-all-build-steps b/Build-tools/Do-all-build-steps
index c3c0f4a6bf8..ccd437a3b7e 100755
--- a/Build-tools/Do-all-build-steps
+++ b/Build-tools/Do-all-build-steps
@@ -56,7 +56,7 @@ aclocal; autoheader; aclocal; automake; autoconf
(cd bdb/dist && sh s_all)
(cd innobase && aclocal && autoheader && aclocal && automake && autoconf)
-# A normal user starts here. We must use mit-threads, bdb and innobase.
+# A normal user starts here. We must use mit-threads, bdb and innodb.
# Otherwise they do not end up in the distribution.
./configure \
--with-unix-socket-path=/var/tmp/mysql.sock \
@@ -64,7 +64,7 @@ aclocal; autoheader; aclocal; automake; autoconf
--with-mit-threads=yes $EXTRA_CONFIG \
--enable-thread-safe-client \
--with-berkeley-db \
- --with-innobase
+ --with-innodb
gmake -j 2
diff --git a/Docs/manual.texi b/Docs/manual.texi
index fc1f10bfec5..d3811a14b2e 100644
--- a/Docs/manual.texi
+++ b/Docs/manual.texi
@@ -9255,7 +9255,7 @@ above can always mail them to the developer's mailing list at
@email{internals@@lists.mysql.com}.
RPM distributions prior to @strong{MySQL} Version 3.22 are user-contributed.
-Beginning with Version 3.22, some RPMs are generated by us at
+Beginning with Version 3.22, the RPMs are generated by us at
@strong{MySQL AB}.
If you want to compile a debug version of @strong{MySQL}, you should add
@@ -28322,8 +28322,9 @@ get bigger.
Running with @code{--log-bin} makes @strong{[MySQL} 1 % slower.
@item
-Compiling without frame pointers @code{-fomit-frame-pointer} with gcc makes
-@strong{MySQL} 1% faster.
+Compiling on Linux-x86 using gcc without frame pointers
+@code{-fomit-frame-pointer} or @code{-fomit-frame-pointer -ffixed-ebp}
+@code{mysqld} 1-4% faster.
@end itemize
The @strong{MySQL}-Linux distribution provided by @strong{MySQL AB} used
@@ -48717,8 +48718,10 @@ setting the @code{DBI_TRACE} environment variable.
On some operating systems, the error log will contain a stack trace if
@code{mysqld} dies unexpectedly. You can use this to find out where (and
maybe why) @code{mysqld} died. @xref{Error log}. To get a stack trace,
-you should NOT compile @code{mysqld} with the
-@code{-fomit-frame-pointer} option to gcc.
+you should NOT compile @code{mysqld} with the @code{-fomit-frame-pointer}
+option to gcc. On Linux-x86 you can use
+@code{-fomit-frame-pointer -ffixed-ebp} to get both speed and a reasonable
+accurate stack trace.
@xref{Compiling for debugging}.
If the error file contains something like the following:
diff --git a/scripts/safe_mysqld.sh b/scripts/safe_mysqld.sh
index 6d215ec3d16..cc06d20668f 100644
--- a/scripts/safe_mysqld.sh
+++ b/scripts/safe_mysqld.sh
@@ -52,6 +52,7 @@ parse_arguments() {
--core-file-size=*) core_file_size=`echo "$arg" | sed -e "s;--core_file_size=;;"` ;;
--timezone=*) TZ=`echo "$arg" | sed -e "s;--timezone=;;"` ; export TZ; ;;
--mysqld=*) MYSQLD=`echo "$arg" | sed -e "s;--mysqld=;;"` ;;
+ --mysqld-version=*) MYSQLD=mysqld-`echo "$arg" | sed -e "s;--mysqld-version=;;"` ;;
*)
if test -n "$pick_args"
then
@@ -92,7 +93,14 @@ fi
MYSQL_UNIX_PORT=${MYSQL_UNIX_PORT:-@MYSQL_UNIX_ADDR@}
MYSQL_TCP_PORT=${MYSQL_TCP_PORT:-@MYSQL_TCP_PORT@}
user=@MYSQLD_USER@
-MYSQLD=mysqld
+
+# Use the mysqld-max binary by default if the user doesn't specify a binary
+if test -x $ledir/mysqld-max
+then
+ MYSQLD=mysqld-max
+else
+ MYSQLD=mysqld
+fi
# these rely on $DATADIR by default, so we'll set them later on
pid_file=
diff --git a/support-files/mysql-max.spec.sh b/support-files/mysql-max.spec.sh
index 8408b09c6ab..49f131154c0 100644
--- a/support-files/mysql-max.spec.sh
+++ b/support-files/mysql-max.spec.sh
@@ -22,7 +22,7 @@ Obsoletes: mysql
# Think about what you use here since the first step is to
# run a rm -rf
-BuildRoot: /var/tmp/mysql
+BuildRoot: /var/tmp/mysql-max
# From the manual
%description
@@ -72,7 +72,7 @@ para maiores informações.
%prep
%setup -n mysql-max-%{mysql_version}
-# %setup -T -D -a 1 -n mysql-%{mysql_version}
+# %setup -T -D -a 1 -n mysql-max-%{mysql_version}
%build
# The all-static flag is to make the RPM work on different
@@ -118,7 +118,7 @@ sh -c "PATH=\"${MYSQL_BUILD_PATH:-/bin:/usr/bin}\" \
# Use the build root for temporary storage of the shared libraries.
RBR=$RPM_BUILD_ROOT
-MBD=$RPM_BUILD_DIR/mysql-%{mysql_version}
+MBD=$RPM_BUILD_DIR/mysql-max-%{mysql_version}
if test -z "$RBR" -o "$RBR" = "/"
then
echo "RPM_BUILD_ROOT has stupid value"
@@ -140,7 +140,7 @@ BuildMySQL "--disable-shared" \
%install -n mysql-max-%{mysql_version}
RBR=$RPM_BUILD_ROOT
-MBD=$RPM_BUILD_DIR/mysql-%{mysql_version}
+MBD=$RPM_BUILD_DIR/mysql-max-%{mysql_version}
# Ensure that needed directories exists
install -d $RBR/etc/{logrotate.d,rc.d/init.d}
install -d $RBR/var/lib/mysql/mysql
@@ -157,7 +157,7 @@ install -m644 $MBD/support-files/mysql-log-rotate $RBR/etc/logrotate.d/mysql
install -m755 $MBD/support-files/mysql.server $RBR/etc/rc.d/init.d/mysql
# Install docs
-install -m644 $RPM_BUILD_DIR/mysql-%{mysql_version}/Docs/mysql.info \
+install -m644 $RPM_BUILD_DIR/mysql-max-%{mysql_version}/Docs/mysql.info \
$RBR/usr/info/mysql.info
for file in README COPYING COPYING.LIB Docs/manual_toc.html Docs/manual.html \
Docs/manual.txt Docs/manual.texi Docs/manual.ps \
@@ -259,5 +259,5 @@ fi
%changelog
-* 2000-04-01 Monty
+* Fri Apr 13 2001 Monty
First version of mysql-max.spec.sh based on mysql.spec.sh
diff --git a/support-files/mysql.spec.sh b/support-files/mysql.spec.sh
index b3ce83fa8c4..3fd602dd818 100644
--- a/support-files/mysql.spec.sh
+++ b/support-files/mysql.spec.sh
@@ -127,6 +127,17 @@ Group: Applications/Databases
This package contains the shared libraries (*.so*) which certain
languages and applications need to dynamically load and use MySQL.
+%package Max
+Release: %{release}
+Summary: MySQL - server with Berkeley DB and Innodb support
+Group: Applications/Databases
+Obsoletes: mysql-Max
+
+%description Max
+Extra MySQL server binary to get support extra features like
+transactional tables. To active these features on only have to install
+this package after the server package.
+
%prep
%setup -n mysql-%{mysql_version}
@@ -160,8 +171,6 @@ sh -c "PATH=\"${MYSQL_BUILD_PATH:-/bin:/usr/bin}\" \
--infodir=/usr/info \
--includedir=/usr/include \
--mandir=/usr/man \
- --without-berkeley-db \
- --without-innodb \
--with-comment=\"Official MySQL RPM\";
# Add this for more debugging support
# --with-debug
@@ -185,12 +194,15 @@ fi
rm -rf $RBR
mkdir -p $RBR
-BuildMySQL "--enable-shared --enable-thread-safe-client --without-server"
+# Build the shared libraries and mysqld-max
+
+BuildMySQL "--enable-shared --enable-thread-safe-client --with-berkeley-db --with-innodb --with-mysqld-ldflags='-all-static' --with-server-suffix='-Max'"
-# Save everything for debus
-tar cf $RBR/all.tar .
+# Save everything for debug
+# tar cf $RBR/all.tar .
-# Save shared libraries
+# Save shared libraries and mysqld-max
+mv sql/mysqld sql/mysqld-max
(cd libmysql/.libs; tar cf $RBR/shared-libs.tar *.so*)
(cd libmysql_r/.libs; tar rf $RBR/shared-libs.tar *.so*)
@@ -201,7 +213,8 @@ mv Docs/manual.ps.save Docs/manual.ps
BuildMySQL "--disable-shared" \
"--with-mysqld-ldflags='-all-static'" \
- "--with-client-ldflags='-all-static'"
+ "--with-client-ldflags='-all-static'" \
+ "--without-berkeley-db --without-innodb"
%install -n mysql-%{mysql_version}
RBR=$RPM_BUILD_ROOT
@@ -220,6 +233,9 @@ make install DESTDIR=$RBR benchdir_root=/usr/share/
# Install shared libraries (Disable for architectures that don't support it)
(cd $RBR/usr/lib; tar xf $RBR/shared-libs.tar)
+# install saved mysqld-max
+install -m755 $MBD/sql/mysqld-max $RBR/usr/sbin/mysqld-max
+
# Install logrotate and autostart
install -m644 $MBD/support-files/mysql-log-rotate $RBR/etc/logrotate.d/mysql
install -m755 $MBD/support-files/mysql.server $RBR/etc/rc.d/init.d/mysql
@@ -370,8 +386,15 @@ fi
%attr(-, root, root) /usr/share/sql-bench
%attr(-, root, root) /usr/share/mysql-test
+%files Max
+%attr(755, root, root) /usr/sbin/mysqld-max
+
%changelog
+* Fri Apr 13 2001 Monty
+
+- Added mysqld-max to the distribution
+
* Tue Jan 2 2001 Monty
- Added mysql-test to the bench package
diff --git a/tests/fork_big.pl b/tests/fork_big.pl
index b38c77c7f7c..8f16db74793 100755
--- a/tests/fork_big.pl
+++ b/tests/fork_big.pl
@@ -17,9 +17,9 @@ package main;
$opt_skip_create=$opt_skip_in=$opt_verbose=$opt_fast_insert=
$opt_lock_tables=$opt_debug=$opt_skip_delete=$opt_fast=$opt_force=0;
$opt_threads=5;
-$opt_host=""; $opt_db="test";
+$opt_host=$opt_user=$opt_password=""; $opt_db="test";
-GetOptions("host=s","db=s","loop-count=i","skip-create","skip-in","skip-delete","verbose","fast-insert","lock-tables","debug","fast","force","threads=i") || die "Aborted";
+GetOptions("host=s","db=s","user=s","password=s","loop-count=i","skip-create","skip-in","skip-delete","verbose","fast-insert","lock-tables","debug","fast","force","threads=i") || die "Aborted";
$opt_verbose=$opt_debug=$opt_lock_tables=$opt_fast_insert=$opt_fast=$opt_skip_in=$opt_force=undef; # Ignore warnings from these
print "Test of multiple connections that test the following things:\n";
@@ -400,7 +400,7 @@ sub test_flush
sub test_database
{
my ($database) = @_;
- my ($dbh, $row, $i, $type, $table, $tables);
+ my ($dbh, $row, $i, $type, $tables);
$dbh = DBI->connect("DBI:mysql:$database:$opt_host",
$opt_user, $opt_password,
{ PrintError => 0}) || die $DBI::errstr;
@@ -409,7 +409,7 @@ sub test_database
$type= "check";
for ($i=0 ; !test_if_abort($dbh) ; $i++)
{
- sleep(10);
+ sleep(120);
$sth=$dbh->prepare("$type table $tables") || die "Got error on prepare: $DBI::errstr\n";
$sth->execute || die $DBI::errstr;