Commit b897f84d authored by monty@donna.mysql.fi's avatar monty@donna.mysql.fi

Changes to get mysqld-max to compile

parent 46839ed2
...@@ -44,7 +44,7 @@ pentium_cflags="-mpentiumpro" ...@@ -44,7 +44,7 @@ pentium_cflags="-mpentiumpro"
sparc_cflags="" sparc_cflags=""
fast_cflags="-O6 -fno-omit-frame-pointer" 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" debug_cflags="-DEXTRA_DEBUG -DFORCE_INIT_OF_VARS -DSAFEMALLOC -DSAFE_MUTEX -O2"
base_cxxflags="-felide-constructors -fno-exceptions -fno-rtti" base_cxxflags="-felide-constructors -fno-exceptions -fno-rtti"
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
path=`dirname $0` path=`dirname $0`
. "$path/SETUP.sh" . "$path/SETUP.sh"
extra_flags="$pentium_cflags $fast_cflags" extra_flags="$pentium_cflags $reckless_cflags"
extra_configs="$pentium_configs" extra_configs="$pentium_configs"
strip=yes strip=yes
......
...@@ -56,7 +56,7 @@ aclocal; autoheader; aclocal; automake; autoconf ...@@ -56,7 +56,7 @@ aclocal; autoheader; aclocal; automake; autoconf
(cd bdb/dist && sh s_all) (cd bdb/dist && sh s_all)
(cd innobase && aclocal && autoheader && aclocal && automake && autoconf) (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. # Otherwise they do not end up in the distribution.
./configure \ ./configure \
--with-unix-socket-path=/var/tmp/mysql.sock \ --with-unix-socket-path=/var/tmp/mysql.sock \
...@@ -64,7 +64,7 @@ aclocal; autoheader; aclocal; automake; autoconf ...@@ -64,7 +64,7 @@ aclocal; autoheader; aclocal; automake; autoconf
--with-mit-threads=yes $EXTRA_CONFIG \ --with-mit-threads=yes $EXTRA_CONFIG \
--enable-thread-safe-client \ --enable-thread-safe-client \
--with-berkeley-db \ --with-berkeley-db \
--with-innobase --with-innodb
gmake -j 2 gmake -j 2
......
...@@ -9255,7 +9255,7 @@ above can always mail them to the developer's mailing list at ...@@ -9255,7 +9255,7 @@ above can always mail them to the developer's mailing list at
@email{internals@@lists.mysql.com}. @email{internals@@lists.mysql.com}.
RPM distributions prior to @strong{MySQL} Version 3.22 are user-contributed. 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}. @strong{MySQL AB}.
If you want to compile a debug version of @strong{MySQL}, you should add If you want to compile a debug version of @strong{MySQL}, you should add
...@@ -28322,8 +28322,9 @@ get bigger. ...@@ -28322,8 +28322,9 @@ get bigger.
Running with @code{--log-bin} makes @strong{[MySQL} 1 % slower. Running with @code{--log-bin} makes @strong{[MySQL} 1 % slower.
@item @item
Compiling without frame pointers @code{-fomit-frame-pointer} with gcc makes Compiling on Linux-x86 using gcc without frame pointers
@strong{MySQL} 1% faster. @code{-fomit-frame-pointer} or @code{-fomit-frame-pointer -ffixed-ebp}
@code{mysqld} 1-4% faster.
@end itemize @end itemize
The @strong{MySQL}-Linux distribution provided by @strong{MySQL AB} used The @strong{MySQL}-Linux distribution provided by @strong{MySQL AB} used
...@@ -48717,8 +48718,10 @@ setting the @code{DBI_TRACE} environment variable. ...@@ -48717,8 +48718,10 @@ setting the @code{DBI_TRACE} environment variable.
On some operating systems, the error log will contain a stack trace if 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 @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, maybe why) @code{mysqld} died. @xref{Error log}. To get a stack trace,
you should NOT compile @code{mysqld} with the you should NOT compile @code{mysqld} with the @code{-fomit-frame-pointer}
@code{-fomit-frame-pointer} option to gcc. 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}. @xref{Compiling for debugging}.
If the error file contains something like the following: If the error file contains something like the following:
...@@ -52,6 +52,7 @@ parse_arguments() { ...@@ -52,6 +52,7 @@ parse_arguments() {
--core-file-size=*) core_file_size=`echo "$arg" | sed -e "s;--core_file_size=;;"` ;; --core-file-size=*) core_file_size=`echo "$arg" | sed -e "s;--core_file_size=;;"` ;;
--timezone=*) TZ=`echo "$arg" | sed -e "s;--timezone=;;"` ; export TZ; ;; --timezone=*) TZ=`echo "$arg" | sed -e "s;--timezone=;;"` ; export TZ; ;;
--mysqld=*) MYSQLD=`echo "$arg" | sed -e "s;--mysqld=;;"` ;; --mysqld=*) MYSQLD=`echo "$arg" | sed -e "s;--mysqld=;;"` ;;
--mysqld-version=*) MYSQLD=mysqld-`echo "$arg" | sed -e "s;--mysqld-version=;;"` ;;
*) *)
if test -n "$pick_args" if test -n "$pick_args"
then then
...@@ -92,7 +93,14 @@ fi ...@@ -92,7 +93,14 @@ fi
MYSQL_UNIX_PORT=${MYSQL_UNIX_PORT:-@MYSQL_UNIX_ADDR@} MYSQL_UNIX_PORT=${MYSQL_UNIX_PORT:-@MYSQL_UNIX_ADDR@}
MYSQL_TCP_PORT=${MYSQL_TCP_PORT:-@MYSQL_TCP_PORT@} MYSQL_TCP_PORT=${MYSQL_TCP_PORT:-@MYSQL_TCP_PORT@}
user=@MYSQLD_USER@ 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 # these rely on $DATADIR by default, so we'll set them later on
pid_file= pid_file=
......
...@@ -22,7 +22,7 @@ Obsoletes: mysql ...@@ -22,7 +22,7 @@ Obsoletes: mysql
# Think about what you use here since the first step is to # Think about what you use here since the first step is to
# run a rm -rf # run a rm -rf
BuildRoot: /var/tmp/mysql BuildRoot: /var/tmp/mysql-max
# From the manual # From the manual
%description %description
...@@ -72,7 +72,7 @@ para maiores informa ...@@ -72,7 +72,7 @@ para maiores informa
%prep %prep
%setup -n mysql-max-%{mysql_version} %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 %build
# The all-static flag is to make the RPM work on different # 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}\" \ ...@@ -118,7 +118,7 @@ sh -c "PATH=\"${MYSQL_BUILD_PATH:-/bin:/usr/bin}\" \
# Use the build root for temporary storage of the shared libraries. # Use the build root for temporary storage of the shared libraries.
RBR=$RPM_BUILD_ROOT 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" = "/" if test -z "$RBR" -o "$RBR" = "/"
then then
echo "RPM_BUILD_ROOT has stupid value" echo "RPM_BUILD_ROOT has stupid value"
...@@ -140,7 +140,7 @@ BuildMySQL "--disable-shared" \ ...@@ -140,7 +140,7 @@ BuildMySQL "--disable-shared" \
%install -n mysql-max-%{mysql_version} %install -n mysql-max-%{mysql_version}
RBR=$RPM_BUILD_ROOT RBR=$RPM_BUILD_ROOT
MBD=$RPM_BUILD_DIR/mysql-%{mysql_version} MBD=$RPM_BUILD_DIR/mysql-max-%{mysql_version}
# Ensure that needed directories exists # Ensure that needed directories exists
install -d $RBR/etc/{logrotate.d,rc.d/init.d} install -d $RBR/etc/{logrotate.d,rc.d/init.d}
install -d $RBR/var/lib/mysql/mysql install -d $RBR/var/lib/mysql/mysql
...@@ -157,7 +157,7 @@ install -m644 $MBD/support-files/mysql-log-rotate $RBR/etc/logrotate.d/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 -m755 $MBD/support-files/mysql.server $RBR/etc/rc.d/init.d/mysql
# Install docs # 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 $RBR/usr/info/mysql.info
for file in README COPYING COPYING.LIB Docs/manual_toc.html Docs/manual.html \ for file in README COPYING COPYING.LIB Docs/manual_toc.html Docs/manual.html \
Docs/manual.txt Docs/manual.texi Docs/manual.ps \ Docs/manual.txt Docs/manual.texi Docs/manual.ps \
...@@ -259,5 +259,5 @@ fi ...@@ -259,5 +259,5 @@ fi
%changelog %changelog
* 2000-04-01 Monty * Fri Apr 13 2001 Monty
First version of mysql-max.spec.sh based on mysql.spec.sh First version of mysql-max.spec.sh based on mysql.spec.sh
...@@ -127,6 +127,17 @@ Group: Applications/Databases ...@@ -127,6 +127,17 @@ Group: Applications/Databases
This package contains the shared libraries (*.so*) which certain This package contains the shared libraries (*.so*) which certain
languages and applications need to dynamically load and use MySQL. 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 %prep
%setup -n mysql-%{mysql_version} %setup -n mysql-%{mysql_version}
...@@ -160,8 +171,6 @@ sh -c "PATH=\"${MYSQL_BUILD_PATH:-/bin:/usr/bin}\" \ ...@@ -160,8 +171,6 @@ sh -c "PATH=\"${MYSQL_BUILD_PATH:-/bin:/usr/bin}\" \
--infodir=/usr/info \ --infodir=/usr/info \
--includedir=/usr/include \ --includedir=/usr/include \
--mandir=/usr/man \ --mandir=/usr/man \
--without-berkeley-db \
--without-innodb \
--with-comment=\"Official MySQL RPM\"; --with-comment=\"Official MySQL RPM\";
# Add this for more debugging support # Add this for more debugging support
# --with-debug # --with-debug
...@@ -185,12 +194,15 @@ fi ...@@ -185,12 +194,15 @@ fi
rm -rf $RBR rm -rf $RBR
mkdir -p $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 # Save everything for debug
tar cf $RBR/all.tar . # 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/.libs; tar cf $RBR/shared-libs.tar *.so*)
(cd libmysql_r/.libs; tar rf $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 ...@@ -201,7 +213,8 @@ mv Docs/manual.ps.save Docs/manual.ps
BuildMySQL "--disable-shared" \ BuildMySQL "--disable-shared" \
"--with-mysqld-ldflags='-all-static'" \ "--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} %install -n mysql-%{mysql_version}
RBR=$RPM_BUILD_ROOT RBR=$RPM_BUILD_ROOT
...@@ -220,6 +233,9 @@ make install DESTDIR=$RBR benchdir_root=/usr/share/ ...@@ -220,6 +233,9 @@ make install DESTDIR=$RBR benchdir_root=/usr/share/
# Install shared libraries (Disable for architectures that don't support it) # Install shared libraries (Disable for architectures that don't support it)
(cd $RBR/usr/lib; tar xf $RBR/shared-libs.tar) (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 logrotate and autostart
install -m644 $MBD/support-files/mysql-log-rotate $RBR/etc/logrotate.d/mysql 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 -m755 $MBD/support-files/mysql.server $RBR/etc/rc.d/init.d/mysql
...@@ -370,8 +386,15 @@ fi ...@@ -370,8 +386,15 @@ fi
%attr(-, root, root) /usr/share/sql-bench %attr(-, root, root) /usr/share/sql-bench
%attr(-, root, root) /usr/share/mysql-test %attr(-, root, root) /usr/share/mysql-test
%files Max
%attr(755, root, root) /usr/sbin/mysqld-max
%changelog %changelog
* Fri Apr 13 2001 Monty
- Added mysqld-max to the distribution
* Tue Jan 2 2001 Monty * Tue Jan 2 2001 Monty
- Added mysql-test to the bench package - Added mysql-test to the bench package
......
...@@ -17,9 +17,9 @@ package main; ...@@ -17,9 +17,9 @@ package main;
$opt_skip_create=$opt_skip_in=$opt_verbose=$opt_fast_insert= $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_lock_tables=$opt_debug=$opt_skip_delete=$opt_fast=$opt_force=0;
$opt_threads=5; $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 $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"; print "Test of multiple connections that test the following things:\n";
...@@ -400,7 +400,7 @@ sub test_flush ...@@ -400,7 +400,7 @@ sub test_flush
sub test_database sub test_database
{ {
my ($database) = @_; my ($database) = @_;
my ($dbh, $row, $i, $type, $table, $tables); my ($dbh, $row, $i, $type, $tables);
$dbh = DBI->connect("DBI:mysql:$database:$opt_host", $dbh = DBI->connect("DBI:mysql:$database:$opt_host",
$opt_user, $opt_password, $opt_user, $opt_password,
{ PrintError => 0}) || die $DBI::errstr; { PrintError => 0}) || die $DBI::errstr;
...@@ -409,7 +409,7 @@ sub test_database ...@@ -409,7 +409,7 @@ sub test_database
$type= "check"; $type= "check";
for ($i=0 ; !test_if_abort($dbh) ; $i++) 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=$dbh->prepare("$type table $tables") || die "Got error on prepare: $DBI::errstr\n";
$sth->execute || die $DBI::errstr; $sth->execute || die $DBI::errstr;
......
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