diff options
author | unknown <monty@hundin.mysql.fi> | 2001-11-29 15:34:37 +0200 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2001-11-29 15:34:37 +0200 |
commit | 573eb1dec4a96d304b1abf4f2cf50236f58f6409 (patch) | |
tree | 5278a62187996e3ff76046ee3a27680bcadfc05f /Build-tools | |
parent | fa7ba453f92412f82e7d982e8e64494e9df257d8 (diff) | |
download | mariadb-git-573eb1dec4a96d304b1abf4f2cf50236f58f6409.tar.gz |
Better optimization for InnoDB and BDB tables for ORDER BYmysql-3.23.46
Build-tools/Do-compile:
Merge with 4.0
Docs/manual.texi:
Changelog
mysql-test/r/innodb.result:
New tests cases for ORDER BY
mysql-test/r/myisam.result:
New tests cases for ORDER BY
mysql-test/t/innodb.test:
New tests cases for ORDER BY
mysql-test/t/myisam.test:
New tests cases for ORDER BY
Diffstat (limited to 'Build-tools')
-rwxr-xr-x | Build-tools/Do-compile | 73 |
1 files changed, 67 insertions, 6 deletions
diff --git a/Build-tools/Do-compile b/Build-tools/Do-compile index 6c5f79e0d4f..24b70453e5f 100755 --- a/Build-tools/Do-compile +++ b/Build-tools/Do-compile @@ -36,6 +36,10 @@ if (defined($gcc_version) && ! $opt_config_env) { $opt_config_env= 'CC=gcc CFLAGS="-O2 -fno-omit-frame-pointer" CXX=gcc CXXFLAGS="-O2 -fno-omit-frame-pointer"'; } + elsif ($tmp =~ /version 3\.0\./) + { + $opt_config_env= 'CC=gcc CFLAGS="-O3 -fno-omit-frame-pointer" CXXFLAGS="-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti"'; + } else { $opt_config_env= 'CC=gcc CFLAGS="-O3 -fno-omit-frame-pointer" CXX=gcc CXXFLAGS="-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti"'; @@ -65,10 +69,11 @@ $sendmail=find("/usr/lib/sendmail","/usr/sbin/sendmail"); $sur= $opt_sur ? "/my/local/bin/sur" : ""; delete $ENV{'MYSQL_PWD'}; # Reset possibly password delete $ENV{'MY_BASEDIR_VERSION'}; -$ENV{'MYSQL_TCP_PORT'}= $mysql_tcp_port= 3334 + $opt_build_thread; +$ENV{'MYSQL_TCP_PORT'}= $mysql_tcp_port= 3334 + $opt_build_thread*2; $ENV{'MYSQL_UNIX_PORT'}=$mysql_unix_port="$opt_tmp/mysql$opt_suffix.build"; $ENV{"PERL5LIB"}="$pwd/$host/perl5:$pwd/$host/perl5/site_perl"; $slave_port=$mysql_tcp_port+16; +$manager_port=$mysql_tcp_port+1; if (-x "$host/bin/mysqladmin") { @@ -78,6 +83,7 @@ if (-x "$host/bin/mysqladmin") log_system("$host/bin/mysqladmin --no-defaults -u root -P 9306 -h $host -s shutdown"); log_system("$host/bin/mysqladmin --no-defaults -u root -P 9307 -h $host -s shutdown"); } +kill_all("mysqlmanager"); if ($opt_stage == 0) { @@ -106,7 +112,21 @@ safe_cd("$host"); if ($opt_stage == 0 && ! $opt_use_old_distribution) { safe_system("gunzip < $opt_distribution | $tar xf -"); + + # Fix file times; This is needed because the time for files may be + # in the future + system("touch timestamp; find . -newer timestamp -print | xargs touch; rm -f timestamp"); + sleep(2); + # Ensure that files we don't want to rebuild are newer than other files + foreach $name ("configure", + "Docs/include.texi", + "Docs/*.html", "Docs/manual.txt", "Docs/mysql.info", + "sql/sql_yacc.h", "sql/sql_yacc.cc") + { + system("touch $name"); + } } + safe_cd($ver); if ($opt_stage <= 1) { @@ -136,7 +156,7 @@ if ($opt_stage <= 1) { $opt_config_options.= " --with-innodb" } - check_system("$opt_config_env ./configure --prefix=/usr/local/mysql \"--with-comment=Official MySQL$version_suffix binary\" --with-extra-charsets=complex \"--with-server-suffix=$version_suffix\" $opt_config_options","Thank you for choosing MySQL"); + check_system("$opt_config_env ./configure --prefix=/usr/local/mysql \"--with-comment=Official MySQL$version_suffix binary\" --with-extra-charsets=complex \"--with-server-suffix=$version_suffix\" --enable-thread-safe-client $opt_config_options","Thank you for choosing MySQL"); if (-d "$pwd/$host/include-mysql") { safe_system("cp -r $pwd/$host/include-mysql/* $pwd/$host/$ver/include"); @@ -192,7 +212,7 @@ if ($opt_stage <= 4 && !$opt_no_test) $tar_file =~ /(mysql-[^\/]*)\.tar/; $ver=$1; $test_dir="$pwd/$host/test/$ver"; -$ENV{"LD_LIBRARY_PATH"}= "$testdir/lib:" . $ENV{"LD_LIBRARY_PATH"}; +$ENV{"LD_LIBRARY_PATH"}= "$test_dir/lib:" . $ENV{"LD_LIBRARY_PATH"}; if ($opt_stage <= 5 && !$opt_no_test && !$opt_no_mysqltest) { @@ -220,7 +240,7 @@ if (!$opt_no_test) { $extra.=" --innodb_data_file_path=ibdata1:100M"; } - safe_system("./bin/mysqld --no-defaults --basedir . --datadir ./data --skip-l\ocking $extra >> $log 2>&1 &"); + safe_system("./bin/mysqld --no-defaults --basedir . --datadir ./data --skip-locking $extra >> $log 2>&1 &"); sleep(2); } @@ -300,7 +320,7 @@ exit 0; sub usage { print <<EOF; -$0 version 1.2 +$0 version 1.4 $0 takes the following options: @@ -314,7 +334,7 @@ Compile with support for Innodb tables Compile with support for Berkeley DB tables --user 'user_name' -Mail 'user_name'\@analytikerna.se if something went wrong. +Mail 'user_name'\@mysql.com if something went wrong. If user is empty then no mail is sent. --distribution 'distribution_file' @@ -513,3 +533,44 @@ sub rm_all } } } + +sub kill_all +{ + my ($pattern) = @_; + my ($USER,$BSD,$LINUX,$pscmd, $user, $pid); + $user=$ENV{'USER'}; + $BSD = -f '/vmunix' || $ENV{"OS"} eq "SunOS4"; + $LINUX = $^O eq 'linux'; + $pscmd = $BSD ? "/bin/ps -auxww" : $LINUX ? "/bin/ps axuw" : "/bin/ps -ef"; + + open(PS, "$pscmd|") || die "can't run $pscmd: $!"; + + # Catch any errors with eval. A bad pattern, for instance. + process: + while ($cand = <PS>) + { + chop($cand); + ($pid_user, $pid) = split(' ', $cand); + next if $pid == $$; + next process if (! ($cand =~ $pattern) || $pid_user ne $user); + print LOG "Killing $_\n"; + &killpid($pid); + } +} + +sub killpid +{ + local($pid) = @_; + kill 15, $pid; + for (1..5) + { + sleep 2; + return if kill(0, $pid) == 0; + } + kill 9, $pid; + for (1..5) { + sleep 2; + return if kill(0, $pid) == 0; + } + print LOG "$pid will not die!\n"; +} |