Commit 82edccb9 authored by vva@genie.(none)'s avatar vva@genie.(none)

Merge genie.(none):/home/vva/work/mysql.orig/clear/4.1

into genie.(none):/home/vva/work/new_readline/4.1
parents 43371561 c74c93ff
...@@ -31,8 +31,11 @@ BitKeeper/etc/gone ...@@ -31,8 +31,11 @@ BitKeeper/etc/gone
BitKeeper/etc/level BitKeeper/etc/level
BitKeeper/etc/pushed BitKeeper/etc/pushed
BitKeeper/tmp/* BitKeeper/tmp/*
BitKeeper/tmp/bkr3sAHD
BitKeeper/tmp/gone
COPYING COPYING
COPYING.LIB COPYING.LIB
Docs/#manual.texi#
Docs/INSTALL-BINARY Docs/INSTALL-BINARY
Docs/include.texi Docs/include.texi
Docs/internals.info Docs/internals.info
...@@ -73,6 +76,9 @@ PENDING/* ...@@ -73,6 +76,9 @@ PENDING/*
TAGS TAGS
aclocal.m4 aclocal.m4
autom4te.cache/* autom4te.cache/*
autom4te.cache/output.0
autom4te.cache/requests
autom4te.cache/traces.0
bdb/README bdb/README
bdb/btree/btree_auto.c bdb/btree/btree_auto.c
bdb/build_unix/* bdb/build_unix/*
...@@ -81,17 +87,21 @@ bdb/build_vxworks/db_int.h ...@@ -81,17 +87,21 @@ bdb/build_vxworks/db_int.h
bdb/build_win32/db.h bdb/build_win32/db.h
bdb/build_win32/db_archive.dsp bdb/build_win32/db_archive.dsp
bdb/build_win32/db_checkpoint.dsp bdb/build_win32/db_checkpoint.dsp
bdb/build_win32/db_config.h
bdb/build_win32/db_cxx.h
bdb/build_win32/db_deadlock.dsp bdb/build_win32/db_deadlock.dsp
bdb/build_win32/db_dll.dsp bdb/build_win32/db_dll.dsp
bdb/build_win32/db_dump.dsp bdb/build_win32/db_dump.dsp
bdb/build_win32/db_int.h bdb/build_win32/db_int.h
bdb/build_win32/db_java.dsp bdb/build_win32/db_java.dsp
bdb/build_win32/db_load.dsp bdb/build_win32/db_load.dsp
bdb/build_win32/db_perf.dsp
bdb/build_win32/db_printlog.dsp bdb/build_win32/db_printlog.dsp
bdb/build_win32/db_recover.dsp bdb/build_win32/db_recover.dsp
bdb/build_win32/db_stat.dsp bdb/build_win32/db_stat.dsp
bdb/build_win32/db_static.dsp bdb/build_win32/db_static.dsp
bdb/build_win32/db_tcl.dsp bdb/build_win32/db_tcl.dsp
bdb/build_win32/db_test.dsp
bdb/build_win32/db_upgrade.dsp bdb/build_win32/db_upgrade.dsp
bdb/build_win32/db_verify.dsp bdb/build_win32/db_verify.dsp
bdb/build_win32/ex_access.dsp bdb/build_win32/ex_access.dsp
...@@ -107,9 +117,16 @@ bdb/build_win32/excxx_lock.dsp ...@@ -107,9 +117,16 @@ bdb/build_win32/excxx_lock.dsp
bdb/build_win32/excxx_mpool.dsp bdb/build_win32/excxx_mpool.dsp
bdb/build_win32/excxx_tpcb.dsp bdb/build_win32/excxx_tpcb.dsp
bdb/build_win32/include.tcl bdb/build_win32/include.tcl
bdb/build_win32/libdb.def
bdb/build_win32/libdb.rc bdb/build_win32/libdb.rc
bdb/db/crdel_auto.c bdb/db/crdel_auto.c
bdb/db/db_auto.c bdb/db/db_auto.c
bdb/dbinc_auto/*.*
bdb/dbreg/dbreg_auto.c
bdb/dist/autom4te.cache/*
bdb/dist/autom4te.cache/output.0
bdb/dist/autom4te.cache/requests
bdb/dist/autom4te.cache/traces.0
bdb/dist/config.hin bdb/dist/config.hin
bdb/dist/configure bdb/dist/configure
bdb/dist/tags bdb/dist/tags
...@@ -118,11 +135,17 @@ bdb/dist/template/gen_client_ret ...@@ -118,11 +135,17 @@ bdb/dist/template/gen_client_ret
bdb/dist/template/rec_btree bdb/dist/template/rec_btree
bdb/dist/template/rec_crdel bdb/dist/template/rec_crdel
bdb/dist/template/rec_db bdb/dist/template/rec_db
bdb/dist/template/rec_dbreg
bdb/dist/template/rec_fileops
bdb/dist/template/rec_hash bdb/dist/template/rec_hash
bdb/dist/template/rec_log bdb/dist/template/rec_log
bdb/dist/template/rec_qam bdb/dist/template/rec_qam
bdb/dist/template/rec_txn bdb/dist/template/rec_txn
bdb/examples_c/ex_apprec/ex_apprec_auto.c
bdb/examples_c/ex_apprec/ex_apprec_auto.h
bdb/examples_c/ex_apprec/ex_apprec_template
bdb/examples_java bdb/examples_java
bdb/fileops/fileops_auto.c
bdb/hash/hash_auto.c bdb/hash/hash_auto.c
bdb/include/btree_auto.h bdb/include/btree_auto.h
bdb/include/btree_ext.h bdb/include/btree_ext.h
...@@ -151,16 +174,33 @@ bdb/include/tcl_ext.h ...@@ -151,16 +174,33 @@ bdb/include/tcl_ext.h
bdb/include/txn_auto.h bdb/include/txn_auto.h
bdb/include/txn_ext.h bdb/include/txn_ext.h
bdb/include/xa_ext.h bdb/include/xa_ext.h
bdb/java/src/com/sleepycat/db/Db.java
bdb/java/src/com/sleepycat/db/DbBtreeStat.java
bdb/java/src/com/sleepycat/db/DbConstants.java bdb/java/src/com/sleepycat/db/DbConstants.java
bdb/java/src/com/sleepycat/db/DbHashStat.java
bdb/java/src/com/sleepycat/db/DbLockStat.java
bdb/java/src/com/sleepycat/db/DbLogStat.java
bdb/java/src/com/sleepycat/db/DbMpoolFStat.java
bdb/java/src/com/sleepycat/db/DbQueueStat.java
bdb/java/src/com/sleepycat/db/DbRepStat.java
bdb/java/src/com/sleepycat/db/DbTxnStat.java
bdb/libdb_java/java_stat_auto.c
bdb/libdb_java/java_stat_auto.h
bdb/log/log_auto.c bdb/log/log_auto.c
bdb/qam/qam_auto.c bdb/qam/qam_auto.c
bdb/rpc_client/db_server_clnt.c bdb/rpc_client/db_server_clnt.c
bdb/rpc_client/gen_client.c bdb/rpc_client/gen_client.c
bdb/rpc_server/c/db_server_proc.c
bdb/rpc_server/c/db_server_proc.sed
bdb/rpc_server/c/db_server_svc.c
bdb/rpc_server/c/db_server_xdr.c
bdb/rpc_server/c/gen_db_server.c
bdb/rpc_server/db_server.x bdb/rpc_server/db_server.x
bdb/rpc_server/db_server_proc.sed bdb/rpc_server/db_server_proc.sed
bdb/rpc_server/db_server_svc.c bdb/rpc_server/db_server_svc.c
bdb/rpc_server/db_server_xdr.c bdb/rpc_server/db_server_xdr.c
bdb/rpc_server/gen_db_server.c bdb/rpc_server/gen_db_server.c
bdb/test/TESTS
bdb/test/include.tcl bdb/test/include.tcl
bdb/test/logtrack.list bdb/test/logtrack.list
bdb/txn/txn_auto.c bdb/txn/txn_auto.c
...@@ -194,6 +234,7 @@ configure.lineno ...@@ -194,6 +234,7 @@ configure.lineno
core core
db-*.*.* db-*.*.*
dbug/user.t dbug/user.t
depcomp
extra/comp_err extra/comp_err
extra/my_print_defaults extra/my_print_defaults
extra/mysql_install extra/mysql_install
...@@ -209,6 +250,9 @@ include/my_global.h ...@@ -209,6 +250,9 @@ include/my_global.h
include/mysql_version.h include/mysql_version.h
include/widec.h include/widec.h
innobase/autom4te.cache/* innobase/autom4te.cache/*
innobase/autom4te.cache/output.0
innobase/autom4te.cache/requests
innobase/autom4te.cache/traces.0
innobase/configure.lineno innobase/configure.lineno
innobase/conftest.s1 innobase/conftest.s1
innobase/conftest.subs innobase/conftest.subs
...@@ -392,9 +436,11 @@ mysql.kdevprj ...@@ -392,9 +436,11 @@ mysql.kdevprj
mysql.proj mysql.proj
mysqld.S mysqld.S
mysqld.sym mysqld.sym
mysys/#mf_iocache.c#
mysys/charset2html mysys/charset2html
mysys/getopt.c mysys/getopt.c
mysys/getopt1.c mysys/getopt1.c
mysys/ste5KbMa
mysys/test_charset mysys/test_charset
mysys/test_dir mysys/test_dir
mysys/test_io_cache mysys/test_io_cache
...@@ -511,33 +557,3 @@ vio/test-ssl ...@@ -511,33 +557,3 @@ vio/test-ssl
vio/test-sslclient vio/test-sslclient
vio/test-sslserver vio/test-sslserver
vio/viotest-ssl vio/viotest-ssl
bdb/build_win32/db_config.h
bdb/build_win32/db_cxx.h
bdb/build_win32/db_perf.dsp
bdb/build_win32/db_test.dsp
bdb/build_win32/libdb.def
bdb/dbinc_auto/*.*
bdb/dbreg/dbreg_auto.c
bdb/dist/template/rec_dbreg
bdb/dist/template/rec_fileops
bdb/examples_c/ex_apprec/ex_apprec_auto.c
bdb/examples_c/ex_apprec/ex_apprec_auto.h
bdb/examples_c/ex_apprec/ex_apprec_template
bdb/fileops/fileops_auto.c
bdb/java/src/com/sleepycat/db/Db.java
bdb/java/src/com/sleepycat/db/DbBtreeStat.java
bdb/java/src/com/sleepycat/db/DbHashStat.java
bdb/java/src/com/sleepycat/db/DbLockStat.java
bdb/java/src/com/sleepycat/db/DbLogStat.java
bdb/java/src/com/sleepycat/db/DbMpoolFStat.java
bdb/java/src/com/sleepycat/db/DbQueueStat.java
bdb/java/src/com/sleepycat/db/DbRepStat.java
bdb/java/src/com/sleepycat/db/DbTxnStat.java
bdb/libdb_java/java_stat_auto.c
bdb/libdb_java/java_stat_auto.h
bdb/rpc_server/c/db_server_proc.c
bdb/rpc_server/c/db_server_proc.sed
bdb/rpc_server/c/db_server_svc.c
bdb/rpc_server/c/db_server_xdr.c
bdb/rpc_server/c/gen_db_server.c
bdb/test/TESTS
...@@ -37,7 +37,7 @@ EXTRA_DIST = FINISH.sh \ ...@@ -37,7 +37,7 @@ EXTRA_DIST = FINISH.sh \
compile-pentium-pgcc \ compile-pentium-pgcc \
compile-solaris-sparc \ compile-solaris-sparc \
compile-solaris-sparc-debug \ compile-solaris-sparc-debug \
compile-solaris-sparc-fortre \ compile-solaris-sparc-forte \
compile-solaris-sparc-purify compile-solaris-sparc-purify
# Don't update the files from bitkeeper # Don't update the files from bitkeeper
......
#! /bin/sh
path=`dirname $0`
. "$path/SETUP.sh"
extra_flags="$pentium_cflags $debug_cflags -DHAVE_purify"
c_warnings="$c_warnings $debug_extra_warnings"
cxx_warnings="$cxx_warnings $debug_extra_warnings"
extra_configs="$pentium_configs $debug_configs"
extra_configs="$extra_configs --with-berkeley-db --with-innodb --with-embedded-server --with-openssl"
. "$path/FINISH.sh"
...@@ -11,9 +11,29 @@ then ...@@ -11,9 +11,29 @@ then
(cd gemini && aclocal && autoheader && aclocal && automake && autoconf) (cd gemini && aclocal && autoheader && aclocal && automake && autoconf)
fi fi
# Assume Forte is installed in /opt/SUNWSpro
PATH=/opt/SUNWspro/bin/:$PATH PATH=/opt/SUNWspro/bin/:$PATH
CC=cc CFLAGS="-Xa -fast -xO4 -native -xstrconst -mt -D_FORTREC_" \
CXX=CC CXXFLAGS="-noex -xO4 -mt" \ # For "optimal" code for this computer add -fast to EXTRA
# To compile 64 bit, add -xarch=v9 to EXTRA_64_BIT
EXTRA_64_BIT="-xarch=v9" # Remove comment to get 64 bit binaries
EXTRA="-fast" # Remove comment to target current machine
#
# The following should not need to be touched
#
STD="-mt -D_FORTEC_ $EXTRA $EXTRA_64_BIT"
ASFLAGS="$EXTRA_64_BIT" \
CC=cc-5.0 CFLAGS="-Xa -xstrconst $STD" \
CXX=CC CXXFLAGS="-noex $STD" \
./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client
gmake -j 4 gmake -j 4
if [ $? = 0 ]
then
make test
fi
...@@ -42,7 +42,7 @@ single_host: ...@@ -42,7 +42,7 @@ single_host:
# discovers a problem which requires local intervention. Please make the # discovers a problem which requires local intervention. Please make the
# contact information accurate so we can support you. # contact information accurate so we can support you.
# #
contact: Sasha Pachev <sasha@mysql.com> contact: sys@mysql.com
# #
# It is very important that this email address is filled out and accurate. # It is very important that this email address is filled out and accurate.
# If someone converts your repository to open logging (which you may not # If someone converts your repository to open logging (which you may not
...@@ -51,7 +51,7 @@ contact: Sasha Pachev <sasha@mysql.com> ...@@ -51,7 +51,7 @@ contact: Sasha Pachev <sasha@mysql.com>
# response from anyone else at your location after 90 days, then open logging # response from anyone else at your location after 90 days, then open logging
# will be implicitly approved. # will be implicitly approved.
# #
email: sasha@mysql.com email: sys@mysql.com
# #
# Add your street address if you like, it is optional. # Add your street address if you like, it is optional.
# #
......
This diff is collapsed.
...@@ -16,6 +16,7 @@ bar@gw.udmsearch.izhnet.ru ...@@ -16,6 +16,7 @@ bar@gw.udmsearch.izhnet.ru
bell@sanja.is.com.ua bell@sanja.is.com.ua
bk@admin.bk bk@admin.bk
davida@isil.mysql.com davida@isil.mysql.com
gluh@gluh.(none)
heikki@donna.mysql.fi heikki@donna.mysql.fi
heikki@hundin.mysql.fi heikki@hundin.mysql.fi
heikki@rescue. heikki@rescue.
...@@ -41,6 +42,7 @@ miguel@hegel.local ...@@ -41,6 +42,7 @@ miguel@hegel.local
miguel@light. miguel@light.
miguel@light.local miguel@light.local
monty@bitch.mysql.fi monty@bitch.mysql.fi
monty@butch.
monty@donna.mysql.fi monty@donna.mysql.fi
monty@hundin.mysql.fi monty@hundin.mysql.fi
monty@mashka.mysql.fi monty@mashka.mysql.fi
......
...@@ -8,13 +8,13 @@ use Getopt::Long; ...@@ -8,13 +8,13 @@ use Getopt::Long;
$opt_distribution=$opt_user=$opt_config_env=""; $opt_distribution=$opt_user=$opt_config_env="";
$opt_dbd_options=$opt_perl_options=$opt_config_options=$opt_make_options=$opt_suffix=""; $opt_dbd_options=$opt_perl_options=$opt_config_options=$opt_make_options=$opt_suffix="";
$opt_tmp=$opt_version_suffix=""; $opt_tmp=$opt_version_suffix="";
$opt_help=$opt_delete=$opt_debug=$opt_stage=$opt_no_test=$opt_no_perl=$opt_with_low_memory=$opt_fast_benchmark=$opt_static_client=$opt_static_server=$opt_static_perl=$opt_sur=$opt_with_small_disk=$opt_local_perl=$opt_tcpip=$opt_build_thread=$opt_use_old_distribution=$opt_enable_shared=$opt_no_crash_me=$opt_no_strip=0; $opt_help=$opt_delete=$opt_debug=$opt_stage=$opt_no_test=$opt_no_perl=$opt_with_low_memory=$opt_fast_benchmark=$opt_static_client=$opt_static_server=$opt_static_perl=$opt_sur=$opt_with_small_disk=$opt_local_perl=$opt_tcpip=$opt_build_thread=$opt_use_old_distribution=$opt_enable_shared=$opt_no_crash_me=$opt_no_strip=$opt_with_debug=0;
$opt_innodb=$opt_bdb=$opt_raid=$opt_libwrap=0; $opt_innodb=$opt_bdb=$opt_raid=$opt_libwrap=0;
GetOptions( GetOptions(
"bdb", "bdb",
"build-thread=i", "build-thread=i",
"config-env=s", "config-env=s" => \@config_env,
"config-options=s" => \@config_options, "config-options=s" => \@config_options,
"dbd-options=s", "dbd-options=s",
"debug", "debug",
...@@ -45,6 +45,7 @@ GetOptions( ...@@ -45,6 +45,7 @@ GetOptions(
"use-old-distribution", "use-old-distribution",
"user=s", "user=s",
"version-suffix=s", "version-suffix=s",
"with-debug",
"with-low-memory", "with-low-memory",
"with-other-libc=s", "with-other-libc=s",
"with-small-disk", "with-small-disk",
...@@ -53,11 +54,6 @@ GetOptions( ...@@ -53,11 +54,6 @@ GetOptions(
usage() if ($opt_help); usage() if ($opt_help);
usage() if (!$opt_distribution); usage() if (!$opt_distribution);
if ($opt_bdb && $opt_version_suffix eq "")
{
$opt_version_suffix="-max";
}
if (@make_options > 0) if (@make_options > 0)
{ {
chomp(@make_options); chomp(@make_options);
...@@ -70,6 +66,12 @@ if (@config_options > 0) ...@@ -70,6 +66,12 @@ if (@config_options > 0)
$opt_config_options= join(" ", @config_options); $opt_config_options= join(" ", @config_options);
} }
if (@config_env > 0)
{
chomp(@config_env);
$opt_config_env= join(" ", @config_env);
}
chomp($host=`hostname`); chomp($host=`hostname`);
$full_host_name=$host; $full_host_name=$host;
$connect_option= ($opt_tcpip ? "--host=$host" : ""); $connect_option= ($opt_tcpip ? "--host=$host" : "");
...@@ -208,6 +210,7 @@ if ($opt_stage <= 1) ...@@ -208,6 +210,7 @@ if ($opt_stage <= 1)
$opt_config_options.= " --disable-shared" if (!$opt_enable_shared); # Default for binary versions $opt_config_options.= " --disable-shared" if (!$opt_enable_shared); # Default for binary versions
$opt_config_options.= " --with-berkeley-db" if ($opt_bdb); $opt_config_options.= " --with-berkeley-db" if ($opt_bdb);
$opt_config_options.= " --with-client-ldflags=-all-static" if ($opt_static_client); $opt_config_options.= " --with-client-ldflags=-all-static" if ($opt_static_client);
$opt_config_options.= " --with-debug" if ($opt_with_debug);
$opt_config_options.= " --with-libwrap" if ($opt_libwrap); $opt_config_options.= " --with-libwrap" if ($opt_libwrap);
$opt_config_options.= " --with-low-memory" if ($opt_with_low_memory); $opt_config_options.= " --with-low-memory" if ($opt_with_low_memory);
$opt_config_options.= " --with-mysqld-ldflags=-all-static" if ($opt_static_server); $opt_config_options.= " --with-mysqld-ldflags=-all-static" if ($opt_static_server);
...@@ -258,7 +261,7 @@ if ($opt_stage <= 3) ...@@ -258,7 +261,7 @@ if ($opt_stage <= 3)
log_system("rm -fr mysql-3* mysql-4* $pwd/$host/*.tar.gz"); log_system("rm -fr mysql-3* mysql-4* $pwd/$host/*.tar.gz");
log_system("nm -n sql/mysqld | gzip -9 -v 2>&1 > sql/mysqld.sym.gz | cat"); log_system("nm -n sql/mysqld | gzip -9 -v 2>&1 > sql/mysqld.sym.gz | cat");
$flags.= "--no-strip" if ($opt_no_strip); $flags.= "--no-strip" if ($opt_no_strip || $opt_with_debug);
check_system("scripts/make_binary_distribution --tmp=$opt_tmp --suffix=$opt_suffix $flags",".tar.gz created"); check_system("scripts/make_binary_distribution --tmp=$opt_tmp --suffix=$opt_suffix $flags",".tar.gz created");
safe_system("mv mysql*.tar.gz $pwd/$host"); safe_system("mv mysql*.tar.gz $pwd/$host");
if (-f "client/.libs/mysqladmin") if (-f "client/.libs/mysqladmin")
...@@ -381,13 +384,15 @@ if ($opt_stage <= 9 && !$opt_no_test) ...@@ -381,13 +384,15 @@ if ($opt_stage <= 9 && !$opt_no_test)
log_system("rm -f output/*"); log_system("rm -f output/*");
$tmp= $opt_fast_benchmark ? "--fast --user root --small-test" : ""; $tmp= $opt_fast_benchmark ? "--fast --user root --small-test" : "";
check_system("perl ./run-all-tests --log --die-on-errors $connect_option $tmp","RUN-mysql"); check_system("perl ./run-all-tests --log --die-on-errors $connect_option $tmp","RUN-mysql");
# Run additional fast test with dynamic-row tables
check_system("perl ./run-all-tests --log --suffix=\"_dynamic_rows\" --die-on-errors $connect_option --fast --user=root --small-test --create-options=\"row_format=dynamic\"","RUN-mysql");
if ($opt_innodb) if ($opt_innodb)
{ {
check_system("perl ./run-all-tests --log --suffix=\"_innodb\" --die-on-errors $connect_option $tmp --create-option=\"type=innodb\"","RUN-mysql"); check_system("perl ./run-all-tests --log --suffix=\"_innodb\" --die-on-errors $connect_option $tmp --create-options=\"type=innodb\"","RUN-mysql");
} }
if ($opt_bdb) if ($opt_bdb)
{ {
check_system("perl ./run-all-tests --log --suffix=\"_bdb\" --die-on-errors $connect_option $tmp --create-option=\"type=bdb\"","RUN-mysql"); check_system("perl ./run-all-tests --log --suffix=\"_bdb\" --die-on-errors $connect_option $tmp --create-options=\"type=bdb\"","RUN-mysql");
} }
} }
...@@ -498,6 +503,9 @@ If user is empty then no mail is sent. ...@@ -498,6 +503,9 @@ If user is empty then no mail is sent.
--version-suffix suffix --version-suffix suffix
Set name suffix (e.g. 'com' or '-max') for a distribution Set name suffix (e.g. 'com' or '-max') for a distribution
--with-debug
Build binaries with debug information (implies "--no-strip")
--with-low-memory --with-low-memory
Use less memory when compiling. Use less memory when compiling.
...@@ -528,7 +536,7 @@ sub abort ...@@ -528,7 +536,7 @@ sub abort
print TMP "To: $email\n"; print TMP "To: $email\n";
print TMP "Subject: $ver$opt_version_suffix compilation failed\n\n"; print TMP "Subject: $ver$opt_version_suffix compilation failed\n\n";
close TMP; close TMP;
system("tail -40 $log > $log.mail"); system("tail -n 40 $log > $log.mail");
system("cat $mail_header_file $log.mail | $sendmail -t -f $email"); system("cat $mail_header_file $log.mail | $sendmail -t -f $email");
unlink($mail_header_file); unlink($mail_header_file);
unlink("$log.mail"); unlink("$log.mail");
...@@ -604,7 +612,7 @@ sub which ...@@ -604,7 +612,7 @@ sub which
my(@progs)=@_; my(@progs)=@_;
foreach $prog (@progs) foreach $prog (@progs)
{ {
chomp($found=`which $prog | head -1`); chomp($found=`which $prog | head -n 1`);
if ($? == 0 && $found ne "" && index($found," ") == -1) if ($? == 0 && $found ne "" && index($found," ") == -1)
{ {
$found =~ s|/+|/|g; # Make nicer output $found =~ s|/+|/|g; # Make nicer output
......
This diff is collapsed.
This diff is collapsed.
...@@ -274,7 +274,7 @@ ...@@ -274,7 +274,7 @@
#undef SPRINTF_RETURNS_INT #undef SPRINTF_RETURNS_INT
#undef SPRINTF_RETURNS_GARBAGE #undef SPRINTF_RETURNS_GARBAGE
/* Needed to get large file supportat HPUX 10.20 */ /* Needed to get large file support on HPUX 10.20 */
#undef __STDC_EXT__ #undef __STDC_EXT__
#undef STACK_DIRECTION #undef STACK_DIRECTION
......
...@@ -1190,5 +1190,142 @@ dnl --------------------------------------------------------------------------- ...@@ -1190,5 +1190,142 @@ dnl ---------------------------------------------------------------------------
dnl END OF MYSQL_CHECK_INNODB SECTION dnl END OF MYSQL_CHECK_INNODB SECTION
dnl --------------------------------------------------------------------------- dnl ---------------------------------------------------------------------------
dnl By default, many hosts won't let programs access large files;
dnl one must use special compiler options to get large-file access to work.
dnl For more details about this brain damage please see:
dnl http://www.sas.com/standards/large.file/x_open.20Mar96.html
dnl Written by Paul Eggert <eggert@twinsun.com>.
dnl Internal subroutine of AC_SYS_LARGEFILE.
dnl AC_SYS_LARGEFILE_FLAGS(FLAGSNAME)
AC_DEFUN(AC_SYS_LARGEFILE_FLAGS,
[AC_CACHE_CHECK([for $1 value to request large file support],
ac_cv_sys_largefile_$1,
[if ($GETCONF LFS_$1) >conftest.1 2>conftest.2 && test ! -s conftest.2
then
ac_cv_sys_largefile_$1=`cat conftest.1`
else
ac_cv_sys_largefile_$1=no
ifelse($1, CFLAGS,
[case "$host_os" in
# HP-UX 10.20 requires -D__STDC_EXT__ with gcc 2.95.1.
changequote(, )dnl
hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
changequote([, ])dnl
if test "$GCC" = yes; then
ac_cv_sys_largefile_CFLAGS=-D__STDC_EXT__
fi
;;
# IRIX 6.2 and later require cc -n32.
changequote(, )dnl
irix6.[2-9]* | irix6.1[0-9]* | irix[7-9].* | irix[1-9][0-9]*)
changequote([, ])dnl
if test "$GCC" != yes; then
ac_cv_sys_largefile_CFLAGS=-n32
fi
esac
if test "$ac_cv_sys_largefile_CFLAGS" != no; then
ac_save_CC="$CC"
CC="$CC $ac_cv_sys_largefile_CFLAGS"
AC_TRY_LINK(, , , ac_cv_sys_largefile_CFLAGS=no)
CC="$ac_save_CC"
fi])
fi
rm -f conftest*])])
dnl Internal subroutine of AC_SYS_LARGEFILE.
dnl AC_SYS_LARGEFILE_SPACE_APPEND(VAR, VAL)
AC_DEFUN(AC_SYS_LARGEFILE_SPACE_APPEND,
[case $2 in
no) ;;
?*)
case "[$]$1" in
'') $1=$2 ;;
*) $1=[$]$1' '$2 ;;
esac ;;
esac])
dnl Internal subroutine of AC_SYS_LARGEFILE.
dnl AC_SYS_LARGEFILE_MACRO_VALUE(C-MACRO, CACHE-VAR, COMMENT, CODE-TO-SET-DEFAULT)
AC_DEFUN(AC_SYS_LARGEFILE_MACRO_VALUE,
[AC_CACHE_CHECK([for $1], $2,
[$2=no
changequote(, )dnl
for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
case "$ac_flag" in
-D$1)
$2=1 ;;
-D$1=*)
$2=`expr " $ac_flag" : '[^=]*=\(.*\)'` ;;
esac
done
$4
changequote([, ])dnl
])
if test "[$]$2" != no; then
AC_DEFINE_UNQUOTED([$1], [$]$2, [$3])
fi])
AC_DEFUN(MYSQL_SYS_LARGEFILE,
[AC_REQUIRE([AC_CANONICAL_HOST])
AC_ARG_ENABLE(largefile,
[ --disable-largefile Omit support for large files])
if test "$enable_largefile" != no; then
AC_CHECK_TOOL(GETCONF, getconf)
AC_SYS_LARGEFILE_FLAGS(CFLAGS)
AC_SYS_LARGEFILE_FLAGS(LDFLAGS)
AC_SYS_LARGEFILE_FLAGS(LIBS)
for ac_flag in $ac_cv_sys_largefile_CFLAGS no; do
case "$ac_flag" in
no) ;;
-D_FILE_OFFSET_BITS=*) ;;
-D_LARGEFILE_SOURCE | -D_LARGEFILE_SOURCE=*) ;;
-D_LARGE_FILES | -D_LARGE_FILES=*) ;;
-D?* | -I?*)
AC_SYS_LARGEFILE_SPACE_APPEND(CPPFLAGS, "$ac_flag") ;;
*)
AC_SYS_LARGEFILE_SPACE_APPEND(CFLAGS, "$ac_flag") ;;
esac
done
AC_SYS_LARGEFILE_SPACE_APPEND(LDFLAGS, "$ac_cv_sys_largefile_LDFLAGS")
AC_SYS_LARGEFILE_SPACE_APPEND(LIBS, "$ac_cv_sys_largefile_LIBS")
AC_SYS_LARGEFILE_MACRO_VALUE(_FILE_OFFSET_BITS,
ac_cv_sys_file_offset_bits,
[Number of bits in a file offset, on hosts where this is settable.],
[case "$host_os" in
# HP-UX 10.20 and later
hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
ac_cv_sys_file_offset_bits=64 ;;
# We can't declare _FILE_OFFSET_BITS here as this will cause
# compile errors as AC_PROG_CC adds include files in confdefs.h
# We solve this (until autoconf is fixed) by instead declaring it
# as define instead
solaris2.[8,9])
CFLAGS="$CFLAGS -D_FILE_OFFSET_BITS=64"
CXXFLAGS="$CXXFLAGS -D_FILE_OFFSET_BITS=64"
ac_cv_sys_file_offset_bits=no ;;
esac])
AC_SYS_LARGEFILE_MACRO_VALUE(_LARGEFILE_SOURCE,
ac_cv_sys_largefile_source,
[Define to make fseeko etc. visible, on some hosts.],
[case "$host_os" in
# HP-UX 10.20 and later
hpux10.[2-9][0-9]* | hpux1[1-9]* | hpux[2-9][0-9]*)
ac_cv_sys_largefile_source=1 ;;
esac])
AC_SYS_LARGEFILE_MACRO_VALUE(_LARGE_FILES,
ac_cv_sys_large_files,
[Define for large files, on AIX-style hosts.],
[case "$host_os" in
# AIX 4.2 and later
aix4.[2-9]* | aix4.1[0-9]* | aix[5-9].* | aix[1-9][0-9]*)
ac_cv_sys_large_files=1 ;;
esac])
fi
])
dnl --------------------------------------------------------------------------- dnl ---------------------------------------------------------------------------
This diff is collapsed.
#
# Custom Makefile shell
#
# This file may be edited freely, since it will not be regenerated
# by the project manager.
#
# Use this makefile to define rules to make external binaries
# and deposit them in the $(EXTERNAL_BINARIES_DIR) directory.
#
# If you have specified external modules during your component
# creation, you will find make rules already in place below.
# You will likely have to edit these to suit your individual
# build setup.
#
# You may wish to use the CPU, BUILD_SPEC or TOOL make variables in
# your Makefile to support builds for different architectures. Use
# the FORCE_EXTERNAL_MAKE phony target to ensure that your external
# make always runs.
#
# The example below assumes that your custom makefile is in the
# mySourceTree directory, and that the binary file it produces
# is placed into the $(BUILD_SPEC) sub-directory.
#
# EXTERNAL_SOURCE_BASE = /folk/me/mySourceTree
# EXTERNAL_MODULE = myLibrary.o
# EXTERNAL_MAKE = make
#
# $(EXTERNAL_BINARIES_DIR)/$(EXTERNAL_MODULE) : FORCE_EXTERNAL_MAKE
# $(EXTERNAL_MAKE) -C $(EXTERNAL_SOURCE_BASE) \
# -f $(EXTERNAL_SOURCE_BASE)/Makefile \
# CPU=$(CPU) BUILD_SPEC=$(BUILD_SPEC) $(@F)
# $(CP) $(subst /,$(DIRCHAR),$(EXTERNAL_SOURCE_BASE)/$(BUILD_SPEC)/$(@F) $@)
#
# If you are not adding your external modules from the component wizard,
# you will have to include them in your component yourself:
#
# From the GUI, you can do this with the Component's 'Add external module'
# dialog.
#
# If you are using the command line, add the module(s) by editing the
# MODULES line in component.cdf file, e.g.
#
# Component INCLUDE_MYCOMPONENT {
#
# MODULES foo.o goo.o \
# myLibrary.o
#
# rules to build custom libraries
This diff is collapsed.
This diff is collapsed.
/*-
* See the file LICENSE for redistribution information.
*
* Copyright (c) 1996-2002
* Sleepycat Software. All rights reserved.
*/
#include "db_config.h"
#ifndef lint
static const char copyright[] =
"Copyright (c) 1996-2002\nSleepycat Software Inc. All rights reserved.\n";
static const char revid[] =
"$Id: db_archive.c,v 11.36 2002/03/28 20:13:34 bostic Exp $";
#endif
#ifndef NO_SYSTEM_INCLUDES
#include <sys/types.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#endif
#include "db_int.h"
int db_archive_main __P((int, char *[]));
int db_archive_usage __P((void));
int db_archive_version_check __P((const char *));
int
db_archive(args)
char *args;
{
int argc;
char **argv;
__db_util_arg("db_archive", args, &argc, &argv);
return (db_archive_main(argc, argv) ? EXIT_FAILURE : EXIT_SUCCESS);
}
#include <stdio.h>
#define ERROR_RETURN ERROR
int
db_archive_main(argc, argv)
int argc;
char *argv[];
{
extern char *optarg;
extern int optind, __db_getopt_reset;
const char *progname = "db_archive";
DB_ENV *dbenv;
u_int32_t flags;
int ch, e_close, exitval, ret, verbose;
char **file, *home, **list, *passwd;
if ((ret = db_archive_version_check(progname)) != 0)
return (ret);
flags = 0;
e_close = exitval = verbose = 0;
home = passwd = NULL;
__db_getopt_reset = 1;
while ((ch = getopt(argc, argv, "ah:lP:sVv")) != EOF)
switch (ch) {
case 'a':
LF_SET(DB_ARCH_ABS);
break;
case 'h':
home = optarg;
break;
case 'l':
LF_SET(DB_ARCH_LOG);
break;
case 'P':
passwd = strdup(optarg);
memset(optarg, 0, strlen(optarg));
if (passwd == NULL) {
fprintf(stderr, "%s: strdup: %s\n",
progname, strerror(errno));
return (EXIT_FAILURE);
}
break;
case 's':
LF_SET(DB_ARCH_DATA);
break;
case 'V':
printf("%s\n", db_version(NULL, NULL, NULL));
return (EXIT_SUCCESS);
case 'v':
verbose = 1;
break;
case '?':
default:
return (db_archive_usage());
}
argc -= optind;
argv += optind;
if (argc != 0)
return (db_archive_usage());
/* Handle possible interruptions. */
__db_util_siginit();
/*
* Create an environment object and initialize it for error
* reporting.
*/
if ((ret = db_env_create(&dbenv, 0)) != 0) {
fprintf(stderr,
"%s: db_env_create: %s\n", progname, db_strerror(ret));
goto shutdown;
}
e_close = 1;
dbenv->set_errfile(dbenv, stderr);
dbenv->set_errpfx(dbenv, progname);
if (verbose)
(void)dbenv->set_verbose(dbenv, DB_VERB_CHKPOINT, 1);
if (passwd != NULL && (ret = dbenv->set_encrypt(dbenv,
passwd, DB_ENCRYPT_AES)) != 0) {
dbenv->err(dbenv, ret, "set_passwd");
goto shutdown;
}
/*
* If attaching to a pre-existing environment fails, create a
* private one and try again.
*/
if ((ret = dbenv->open(dbenv,
home, DB_JOINENV | DB_USE_ENVIRON, 0)) != 0 &&
(ret = dbenv->open(dbenv, home, DB_CREATE |
DB_INIT_LOG | DB_INIT_TXN | DB_PRIVATE | DB_USE_ENVIRON, 0)) != 0) {
dbenv->err(dbenv, ret, "open");
goto shutdown;
}
/* Get the list of names. */
if ((ret = dbenv->log_archive(dbenv, &list, flags)) != 0) {
dbenv->err(dbenv, ret, "DB_ENV->log_archive");
goto shutdown;
}
/* Print the list of names. */
if (list != NULL) {
for (file = list; *file != NULL; ++file)
printf("%s\n", *file);
free(list);
}
if (0) {
shutdown: exitval = 1;
}
if (e_close && (ret = dbenv->close(dbenv, 0)) != 0) {
exitval = 1;
fprintf(stderr,
"%s: dbenv->close: %s\n", progname, db_strerror(ret));
}
/* Resend any caught signal. */
__db_util_sigresend();
return (exitval == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
}
int
db_archive_usage()
{
(void)fprintf(stderr,
"usage: db_archive [-alsVv] [-h home] [-P password]\n");
return (EXIT_FAILURE);
}
int
db_archive_version_check(progname)
const char *progname;
{
int v_major, v_minor, v_patch;
/* Make sure we're loaded with the right version of the DB library. */
(void)db_version(&v_major, &v_minor, &v_patch);
if (v_major != DB_VERSION_MAJOR ||
v_minor != DB_VERSION_MINOR || v_patch != DB_VERSION_PATCH) {
fprintf(stderr,
"%s: version %d.%d.%d doesn't match library version %d.%d.%d\n",
progname, DB_VERSION_MAJOR, DB_VERSION_MINOR,
DB_VERSION_PATCH, v_major, v_minor, v_patch);
return (EXIT_FAILURE);
}
return (0);
}
Document file - DO NOT EDIT
<BEGIN> BUILD_PENTIUMgnu_BUILDRULE
db_archive.out
<END>
<BEGIN> BUILD_PENTIUMgnu_MACRO_AR
ar386
<END>
<BEGIN> BUILD_PENTIUMgnu_MACRO_ARCHIVE
$(PRJ_DIR)/PENTIUMgnu/db_archive.a
<END>
<BEGIN> BUILD_PENTIUMgnu_MACRO_AS
cc386
<END>
<BEGIN> BUILD_PENTIUMgnu_MACRO_CC
cc386
<END>
<BEGIN> BUILD_PENTIUMgnu_MACRO_CFLAGS
-g \
-mpentium \
-ansi \
-nostdinc \
-DRW_MULTI_THREAD \
-D_REENTRANT \
-fvolatile \
-nostdlib \
-fno-builtin \
-fno-defer-pop \
-I$(PRJ_DIR)/.. \
-I$(PRJ_DIR)/../.. \
-I$(WIND_BASE)/target/h \
-DCPU=PENTIUM
<END>
<BEGIN> BUILD_PENTIUMgnu_MACRO_CFLAGS_AS
-g \
-mpentium \
-ansi \
-nostdinc \
-fvolatile \
-nostdlib \
-fno-builtin \
-fno-defer-pop \
-P \
-x \
assembler-with-cpp \
-I$(WIND_BASE)/target/h \
-DCPU=PENTIUM
<END>
<BEGIN> BUILD_PENTIUMgnu_MACRO_CPP
cc386 -E -P -xc
<END>
<BEGIN> BUILD_PENTIUMgnu_MACRO_LD
ld386
<END>
<BEGIN> BUILD_PENTIUMgnu_MACRO_LDDEPS
<END>
<BEGIN> BUILD_PENTIUMgnu_MACRO_LDFLAGS
-X -N
<END>
<BEGIN> BUILD_PENTIUMgnu_MACRO_LD_PARTIAL_FLAGS
-X -r
<END>
<BEGIN> BUILD_PENTIUMgnu_MACRO_NM
nm386 -g
<END>
<BEGIN> BUILD_PENTIUMgnu_MACRO_OPTION_DEFINE_MACRO
-D
<END>
<BEGIN> BUILD_PENTIUMgnu_MACRO_OPTION_INCLUDE_DIR
-I
<END>
<BEGIN> BUILD_PENTIUMgnu_MACRO_POST_BUILD_RULE
<END>
<BEGIN> BUILD_PENTIUMgnu_MACRO_PRJ_LIBS
<END>
<BEGIN> BUILD_PENTIUMgnu_MACRO_SIZE
size386
<END>
<BEGIN> BUILD_PENTIUMgnu_RO_DEPEND_PATH
{$(WIND_BASE)/target/h/} \
{$(WIND_BASE)/target/src/} \
{$(WIND_BASE)/target/config/}
<END>
<BEGIN> BUILD_PENTIUMgnu_TC
::tc_PENTIUMgnu
<END>
<BEGIN> BUILD_RULE_archive
<END>
<BEGIN> BUILD_RULE_db_archive.out
<END>
<BEGIN> BUILD_RULE_objects
<END>
<BEGIN> BUILD__CURRENT
PENTIUMgnu
<END>
<BEGIN> BUILD__LIST
PENTIUMgnu
<END>
<BEGIN> CORE_INFO_TYPE
::prj_vxApp
<END>
<BEGIN> CORE_INFO_VERSION
2.0
<END>
<BEGIN> FILE_db_archive.c_dependDone
FALSE
<END>
<BEGIN> FILE_db_archive.c_dependencies
<END>
<BEGIN> FILE_db_archive.c_objects
db_archive.o
<END>
<BEGIN> FILE_db_archive.c_tool
C/C++ compiler
<END>
<BEGIN> PROJECT_FILES
$(PRJ_DIR)/db_archive.c
<END>
<BEGIN> userComments
db_archive
<END>
#
# Custom Makefile shell
#
# This file may be edited freely, since it will not be regenerated
# by the project manager.
#
# Use this makefile to define rules to make external binaries
# and deposit them in the $(EXTERNAL_BINARIES_DIR) directory.
#
# If you have specified external modules during your component
# creation, you will find make rules already in place below.
# You will likely have to edit these to suit your individual
# build setup.
#
# You may wish to use the CPU, BUILD_SPEC or TOOL make variables in
# your Makefile to support builds for different architectures. Use
# the FORCE_EXTERNAL_MAKE phony target to ensure that your external
# make always runs.
#
# The example below assumes that your custom makefile is in the
# mySourceTree directory, and that the binary file it produces
# is placed into the $(BUILD_SPEC) sub-directory.
#
# EXTERNAL_SOURCE_BASE = /folk/me/mySourceTree
# EXTERNAL_MODULE = myLibrary.o
# EXTERNAL_MAKE = make
#
# $(EXTERNAL_BINARIES_DIR)/$(EXTERNAL_MODULE) : FORCE_EXTERNAL_MAKE
# $(EXTERNAL_MAKE) -C $(EXTERNAL_SOURCE_BASE) \
# -f $(EXTERNAL_SOURCE_BASE)/Makefile \
# CPU=$(CPU) BUILD_SPEC=$(BUILD_SPEC) $(@F)
# $(CP) $(subst /,$(DIRCHAR),$(EXTERNAL_SOURCE_BASE)/$(BUILD_SPEC)/$(@F) $@)
#
# If you are not adding your external modules from the component wizard,
# you will have to include them in your component yourself:
#
# From the GUI, you can do this with the Component's 'Add external module'
# dialog.
#
# If you are using the command line, add the module(s) by editing the
# MODULES line in component.cdf file, e.g.
#
# Component INCLUDE_MYCOMPONENT {
#
# MODULES foo.o goo.o \
# myLibrary.o
#
# rules to build custom libraries
/* component.cdf - dynamically updated configuration */
/*
* NOTE: you may edit this file to alter the configuration
* But all non-configuration information, including comments,
* will be lost upon rebuilding this project.
*/
/* Component information */
Component INCLUDE_DB_ARCHIVE {
ENTRY_POINTS ALL_GLOBAL_SYMBOLS
MODULES db_archive.o
NAME db_archive
PREF_DOMAIN ANY
_INIT_ORDER usrComponentsInit
}
/* EntryPoint information */
/* Module information */
Module db_archive.o {
NAME db_archive.o
SRC_PATH_NAME $PRJ_DIR/../db_archive.c
}
/* Parameter information */
Document file - DO NOT EDIT
<BEGIN> CORE_INFO_TYPE
::prj_component
<END>
<BEGIN> CORE_INFO_VERSION
AE1.1
<END>
<BEGIN> BUILD__CURRENT
PENTIUM2gnu.debug
<END>
<BEGIN> BUILD_PENTIUM2gnu.debug_CURRENT_TARGET
default
<END>
<BEGIN> BUILD_PENTIUM2gnu.debug_DEFAULTFORCPU
1
<END>
<BEGIN> BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_archive.c_infoTags
toolMacro objects
<END>
<BEGIN> BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_archive.c_objects
db_archive.o
<END>
<BEGIN> BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_archive.c_toolMacro
CC
<END>
<BEGIN> BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_archive.c_objects
db_archive.o
<END>
<BEGIN> BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/../db_archive.c_toolMacro
CC
<END>
<BEGIN> BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/compConfig.c_infoTags
toolMacro objects
<END>
<BEGIN> BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/compConfig.c_objects
compConfig.o
<END>
<BEGIN> BUILD_PENTIUM2gnu.debug_FILE_$(PRJ_DIR)/compConfig.c_toolMacro
CC
<END>
<BEGIN> BUILD_PENTIUM2gnu.debug_MACRO_AR
arpentium
<END>
<BEGIN> BUILD_PENTIUM2gnu.debug_MACRO_AS
ccpentium
<END>
<BEGIN> BUILD_PENTIUM2gnu.debug_MACRO_CC
ccpentium
<END>
<BEGIN> BUILD_PENTIUM2gnu.debug_MACRO_CFLAGS
-mcpu=pentiumpro \
-march=pentiumpro \
-ansi \
-DRW_MULTI_THREAD \
-D_REENTRANT \
-g \
-nostdlib \
-fno-builtin \
-fno-defer-pop \
-MD \
-Wall \
-I. \
-I$(WIND_BASE)/target/h \
-I$(PRJ_DIR)/../.. \
-I$(PRJ_DIR)/../../.. \
-DCPU=PENTIUM2
<END>
<BEGIN> BUILD_PENTIUM2gnu.debug_MACRO_CFLAGS_AS
-mcpu=pentiumpro \
-march=pentiumpro \
-ansi \
-g \
-nostdlib \
-fno-builtin \
-fno-defer-pop \
-P \
-x \
assembler-with-cpp \
-Wall \
-I. \
-I$(WIND_BASE)/target/h \
-DCPU=PENTIUM2
<END>
<BEGIN> BUILD_PENTIUM2gnu.debug_MACRO_CPP
ccpentium -E -P
<END>
<BEGIN> BUILD_PENTIUM2gnu.debug_MACRO_CPPFILT
c++filtpentium --strip-underscores
<END>
<BEGIN> BUILD_PENTIUM2gnu.debug_MACRO_LD
ldpentium
<END>
<BEGIN> BUILD_PENTIUM2gnu.debug_MACRO_LDFLAGS
-X
<END>
<BEGIN> BUILD_PENTIUM2gnu.debug_MACRO_LDPARTIAL
ccpentium \
-B$(WIND_BASE)/host/$(WIND_HOST_TYPE)/lib/gcc-lib/ \
-nostdlib \
-r \
-Wl,-X
<END>
<BEGIN> BUILD_PENTIUM2gnu.debug_MACRO_LD_PARTIAL_FLAGS
-X -r
<END>
<BEGIN> BUILD_PENTIUM2gnu.debug_MACRO_NM
nmpentium -g
<END>
<BEGIN> BUILD_PENTIUM2gnu.debug_MACRO_OPTION_DEFINE_MACRO
-D
<END>
<BEGIN> BUILD_PENTIUM2gnu.debug_MACRO_OPTION_GENERATE_DEPENDENCY_FILE
-MD
<END>
<BEGIN> BUILD_PENTIUM2gnu.debug_MACRO_OPTION_INCLUDE_DIR
-I
<END>
<BEGIN> BUILD_PENTIUM2gnu.debug_MACRO_RELEASE
0
<END>
<BEGIN> BUILD_PENTIUM2gnu.debug_MACRO_SIZE
sizepentium
<END>
<BEGIN> BUILD_PENTIUM2gnu.debug_RELEASE
0
<END>
<BEGIN> BUILD_PENTIUM2gnu.debug_RO_DEPEND_PATH
$(WIND_BASE)/target/h/
<END>
<BEGIN> BUILD_PENTIUM2gnu.debug_TC
::tc_PENTIUM2gnu.debug
<END>
<BEGIN> BUILD_PENTIUM2gnu.release_DEFAULTFORCPU
0
<END>
<BEGIN> BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../db_archive.c_infoTags
toolMacro objects
<END>
<BEGIN> BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../db_archive.c_objects
db_archive.o
<END>
<BEGIN> BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/../db_archive.c_toolMacro
CC
<END>
<BEGIN> BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/compConfig.c_infoTags
toolMacro objects
<END>
<BEGIN> BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/compConfig.c_objects
compConfig.o
<END>
<BEGIN> BUILD_PENTIUM2gnu.release_FILE_$(PRJ_DIR)/compConfig.c_toolMacro
CC
<END>
<BEGIN> BUILD_PENTIUM2gnu.release_MACRO_AR
arpentium
<END>
<BEGIN> BUILD_PENTIUM2gnu.release_MACRO_AS
ccpentium
<END>
<BEGIN> BUILD_PENTIUM2gnu.release_MACRO_CC
ccpentium
<END>
<BEGIN> BUILD_PENTIUM2gnu.release_MACRO_CFLAGS
-mcpu=pentiumpro \
-march=pentiumpro \
-ansi \
-DRW_MULTI_THREAD \
-D_REENTRANT \
-O2 \
-nostdlib \
-fno-builtin \
-fno-defer-pop \
-MD \
-Wall \
-I. \
-I$(WIND_BASE)/target/h \
-I$(PRJ_DIR)/../.. \
-I$(PRJ_DIR)/../../.. \
-DCPU=PENTIUM2
<END>
<BEGIN> BUILD_PENTIUM2gnu.release_MACRO_CFLAGS_AS
-mcpu=pentiumpro \
-march=pentiumpro \
-ansi \
-O2 \
-nostdlib \
-fno-builtin \
-fno-defer-pop \
-P \
-x \
assembler-with-cpp \
-Wall \
-I. \
-I$(WIND_BASE)/target/h \
-DCPU=PENTIUM2
<END>
<BEGIN> BUILD_PENTIUM2gnu.release_MACRO_CPP
ccpentium -E -P
<END>
<BEGIN> BUILD_PENTIUM2gnu.release_MACRO_CPPFILT
c++filtpentium --strip-underscores
<END>
<BEGIN> BUILD_PENTIUM2gnu.release_MACRO_LD
ldpentium
<END>
<BEGIN> BUILD_PENTIUM2gnu.release_MACRO_LDFLAGS
-X
<END>
<BEGIN> BUILD_PENTIUM2gnu.release_MACRO_LDPARTIAL
ccpentium \
-B$(WIND_BASE)/host/$(WIND_HOST_TYPE)/lib/gcc-lib/ \
-nostdlib \
-r \
-Wl,-X
<END>
<BEGIN> BUILD_PENTIUM2gnu.release_MACRO_LD_PARTIAL_FLAGS
-X -r
<END>
<BEGIN> BUILD_PENTIUM2gnu.release_MACRO_NM
nmpentium -g
<END>
<BEGIN> BUILD_PENTIUM2gnu.release_MACRO_OPTION_DEFINE_MACRO
-D
<END>
<BEGIN> BUILD_PENTIUM2gnu.release_MACRO_OPTION_GENERATE_DEPENDENCY_FILE
-MD
<END>
<BEGIN> BUILD_PENTIUM2gnu.release_MACRO_OPTION_INCLUDE_DIR
-I
<END>
<BEGIN> BUILD_PENTIUM2gnu.release_MACRO_RELEASE
1
<END>
<BEGIN> BUILD_PENTIUM2gnu.release_MACRO_SIZE
sizepentium
<END>
<BEGIN> BUILD_PENTIUM2gnu.release_RELEASE
1
<END>
<BEGIN> BUILD_PENTIUM2gnu.release_RO_DEPEND_PATH
$(WIND_BASE)/target/h/
<END>
<BEGIN> BUILD_PENTIUM2gnu.release_TC
::tc_PENTIUM2gnu.release
<END>
<BEGIN> BUILD_PENTIUMgnu.debug_DEFAULTFORCPU
1
<END>
<BEGIN> BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../db_archive.c_infoTags
toolMacro objects
<END>
<BEGIN> BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../db_archive.c_objects
db_archive.o
<END>
<BEGIN> BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/../db_archive.c_toolMacro
CC
<END>
<BEGIN> BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/compConfig.c_infoTags
toolMacro objects
<END>
<BEGIN> BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/compConfig.c_objects
compConfig.o
<END>
<BEGIN> BUILD_PENTIUMgnu.debug_FILE_$(PRJ_DIR)/compConfig.c_toolMacro
CC
<END>
<BEGIN> BUILD_PENTIUMgnu.debug_MACRO_AR
arpentium
<END>
<BEGIN> BUILD_PENTIUMgnu.debug_MACRO_AS
ccpentium
<END>
<BEGIN> BUILD_PENTIUMgnu.debug_MACRO_CC
ccpentium
<END>
<BEGIN> BUILD_PENTIUMgnu.debug_MACRO_CFLAGS
-mcpu=pentium \
-march=pentium \
-ansi \
-DRW_MULTI_THREAD \
-D_REENTRANT \
-g \
-nostdlib \
-fno-builtin \
-fno-defer-pop \
-MD \
-Wall \
-I. \
-I$(WIND_BASE)/target/h \
-I$(PRJ_DIR)/../.. \
-I$(PRJ_DIR)/../../.. \
-DCPU=PENTIUM
<END>
<BEGIN> BUILD_PENTIUMgnu.debug_MACRO_CFLAGS_AS
-mcpu=pentium \
-march=pentium \
-ansi \
-g \
-nostdlib \
-fno-builtin \
-fno-defer-pop \
-P \
-x \
assembler-with-cpp \
-Wall \
-I. \
-I$(WIND_BASE)/target/h \
-DCPU=PENTIUM
<END>
<BEGIN> BUILD_PENTIUMgnu.debug_MACRO_CPP
ccpentium -E -P
<END>
<BEGIN> BUILD_PENTIUMgnu.debug_MACRO_CPPFILT
c++filtpentium --strip-underscores
<END>
<BEGIN> BUILD_PENTIUMgnu.debug_MACRO_LD
ldpentium
<END>
<BEGIN> BUILD_PENTIUMgnu.debug_MACRO_LDFLAGS
-X
<END>
<BEGIN> BUILD_PENTIUMgnu.debug_MACRO_LDPARTIAL
ccpentium \
-B$(WIND_BASE)/host/$(WIND_HOST_TYPE)/lib/gcc-lib/ \
-nostdlib \
-r \
-Wl,-X
<END>
<BEGIN> BUILD_PENTIUMgnu.debug_MACRO_LD_PARTIAL_FLAGS
-X -r
<END>
<BEGIN> BUILD_PENTIUMgnu.debug_MACRO_NM
nmpentium -g
<END>
<BEGIN> BUILD_PENTIUMgnu.debug_MACRO_OPTION_DEFINE_MACRO
-D
<END>
<BEGIN> BUILD_PENTIUMgnu.debug_MACRO_OPTION_GENERATE_DEPENDENCY_FILE
-MD
<END>
<BEGIN> BUILD_PENTIUMgnu.debug_MACRO_OPTION_INCLUDE_DIR
-I
<END>
<BEGIN> BUILD_PENTIUMgnu.debug_MACRO_RELEASE
0
<END>
<BEGIN> BUILD_PENTIUMgnu.debug_MACRO_SIZE
sizepentium
<END>
<BEGIN> BUILD_PENTIUMgnu.debug_RELEASE
0
<END>
<BEGIN> BUILD_PENTIUMgnu.debug_RO_DEPEND_PATH
$(WIND_BASE)/target/h/
<END>
<BEGIN> BUILD_PENTIUMgnu.debug_TC
::tc_PENTIUMgnu.debug
<END>
<BEGIN> BUILD__LIST
PENTIUM2gnu.debug PENTIUM2gnu.release PENTIUMgnu.debug
<END>
<BEGIN> PROJECT_FILES
$(PRJ_DIR)/../db_archive.c \
$(PRJ_DIR)/compConfig.c
<END>
<BEGIN> WCC__CDF_PATH
$(PRJ_DIR)
<END>
<BEGIN> WCC__CURRENT
PENTIUM2gnu.debug
<END>
<BEGIN> WCC__LIST
PENTIUM2gnu.debug
<END>
<BEGIN> WCC__MXR_LIBS
lib$(CPU)$(TOOL)vx.a
<END>
<BEGIN> WCC__OBJS_PATH
$(WIND_BASE)/target/lib/obj$CPU$TOOLvx
<END>
/*-
* See the file LICENSE for redistribution information.
*
* Copyright (c) 1996-2002
* Sleepycat Software. All rights reserved.
*/
#include "db_config.h"
#ifndef lint
static const char copyright[] =
"Copyright (c) 1996-2002\nSleepycat Software Inc. All rights reserved.\n";
static const char revid[] =
"$Id: db_checkpoint.c,v 11.46 2002/08/08 03:50:31 bostic Exp $";
#endif
#ifndef NO_SYSTEM_INCLUDES
#include <sys/types.h>
#if TIME_WITH_SYS_TIME
#include <sys/time.h>
#include <time.h>
#else
#if HAVE_SYS_TIME_H
#include <sys/time.h>
#else
#include <time.h>
#endif
#endif
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#endif
#include "db_int.h"
#include "dbinc/db_page.h"
#include "dbinc/db_am.h"
int db_checkpoint_main __P((int, char *[]));
int db_checkpoint_usage __P((void));
int db_checkpoint_version_check __P((const char *));
int
db_checkpoint(args)
char *args;
{
int argc;
char **argv;
__db_util_arg("db_checkpoint", args, &argc, &argv);
return (db_checkpoint_main(argc, argv) ? EXIT_FAILURE : EXIT_SUCCESS);
}
#include <stdio.h>
#define ERROR_RETURN ERROR
int
db_checkpoint_main(argc, argv)
int argc;
char *argv[];
{
extern char *optarg;
extern int optind, __db_getopt_reset;
DB_ENV *dbenv;
const char *progname = "db_checkpoint";
time_t now;
long argval;
u_int32_t flags, kbytes, minutes, seconds;
int ch, e_close, exitval, once, ret, verbose;
char *home, *logfile, *passwd;
if ((ret = db_checkpoint_version_check(progname)) != 0)
return (ret);
/*
* !!!
* Don't allow a fully unsigned 32-bit number, some compilers get
* upset and require it to be specified in hexadecimal and so on.
*/
#define MAX_UINT32_T 2147483647
kbytes = minutes = 0;
e_close = exitval = once = verbose = 0;
flags = 0;
home = logfile = passwd = NULL;
__db_getopt_reset = 1;
while ((ch = getopt(argc, argv, "1h:k:L:P:p:Vv")) != EOF)
switch (ch) {
case '1':
once = 1;
flags = DB_FORCE;
break;
case 'h':
home = optarg;
break;
case 'k':
if (__db_getlong(NULL, progname,
optarg, 1, (long)MAX_UINT32_T, &argval))
return (EXIT_FAILURE);
kbytes = argval;
break;
case 'L':
logfile = optarg;
break;
case 'P':
passwd = strdup(optarg);
memset(optarg, 0, strlen(optarg));
if (passwd == NULL) {
fprintf(stderr, "%s: strdup: %s\n",
progname, strerror(errno));
return (EXIT_FAILURE);
}
break;
case 'p':
if (__db_getlong(NULL, progname,
optarg, 1, (long)MAX_UINT32_T, &argval))
return (EXIT_FAILURE);
minutes = argval;
break;
case 'V':
printf("%s\n", db_version(NULL, NULL, NULL));
return (EXIT_SUCCESS);
case 'v':
verbose = 1;
break;
case '?':
default:
return (db_checkpoint_usage());
}
argc -= optind;
argv += optind;
if (argc != 0)
return (db_checkpoint_usage());
if (once == 0 && kbytes == 0 && minutes == 0) {
(void)fprintf(stderr,
"%s: at least one of -1, -k and -p must be specified\n",
progname);
return (EXIT_FAILURE);
}
/* Handle possible interruptions. */
__db_util_siginit();
/* Log our process ID. */
if (logfile != NULL && __db_util_logset(progname, logfile))
goto shutdown;
/*
* Create an environment object and initialize it for error
* reporting.
*/
if ((ret = db_env_create(&dbenv, 0)) != 0) {
fprintf(stderr,
"%s: db_env_create: %s\n", progname, db_strerror(ret));
goto shutdown;
}
e_close = 1;
dbenv->set_errfile(dbenv, stderr);
dbenv->set_errpfx(dbenv, progname);
if (passwd != NULL && (ret = dbenv->set_encrypt(dbenv,
passwd, DB_ENCRYPT_AES)) != 0) {
dbenv->err(dbenv, ret, "set_passwd");
goto shutdown;
}
/* Initialize the environment. */
if ((ret = dbenv->open(dbenv,
home, DB_JOINENV | DB_USE_ENVIRON, 0)) != 0) {
dbenv->err(dbenv, ret, "open");
goto shutdown;
}
/* Register the standard pgin/pgout functions, in case we do I/O. */
if ((ret = dbenv->memp_register(
dbenv, DB_FTYPE_SET, __db_pgin, __db_pgout)) != 0) {
dbenv->err(dbenv, ret,
"DB_ENV->memp_register: failed to register access method functions");
goto shutdown;
}
/*
* If we have only a time delay, then we'll sleep the right amount
* to wake up when a checkpoint is necessary. If we have a "kbytes"
* field set, then we'll check every 30 seconds.
*/
seconds = kbytes != 0 ? 30 : minutes * 60;
while (!__db_util_interrupted()) {
if (verbose) {
(void)time(&now);
dbenv->errx(dbenv, "checkpoint: %s", ctime(&now));
}
if ((ret = dbenv->txn_checkpoint(dbenv,
kbytes, minutes, flags)) != 0) {
dbenv->err(dbenv, ret, "txn_checkpoint");
goto shutdown;
}
if (once)
break;
(void)__os_sleep(dbenv, seconds, 0);
}
if (0) {
shutdown: exitval = 1;
}
/* Clean up the logfile. */
if (logfile != NULL)
remove(logfile);
/* Clean up the environment. */
if (e_close && (ret = dbenv->close(dbenv, 0)) != 0) {
exitval = 1;
fprintf(stderr,
"%s: dbenv->close: %s\n", progname, db_strerror(ret));
}
/* Resend any caught signal. */
__db_util_sigresend();
return (exitval == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
}
int
db_checkpoint_usage()
{
(void)fprintf(stderr, "%s\n\t%s\n",
"usage: db_checkpoint [-1Vv]",
"[-h home] [-k kbytes] [-L file] [-P password] [-p min]");
return (EXIT_FAILURE);
}
int
db_checkpoint_version_check(progname)
const char *progname;
{
int v_major, v_minor, v_patch;
/* Make sure we're loaded with the right version of the DB library. */
(void)db_version(&v_major, &v_minor, &v_patch);
if (v_major != DB_VERSION_MAJOR ||
v_minor != DB_VERSION_MINOR || v_patch != DB_VERSION_PATCH) {
fprintf(stderr,
"%s: version %d.%d.%d doesn't match library version %d.%d.%d\n",
progname, DB_VERSION_MAJOR, DB_VERSION_MINOR,
DB_VERSION_PATCH, v_major, v_minor, v_patch);
return (EXIT_FAILURE);
}
return (0);
}
Document file - DO NOT EDIT
<BEGIN> BUILD_PENTIUMgnu_BUILDRULE
db_checkpoint.out
<END>
<BEGIN> BUILD_PENTIUMgnu_MACRO_AR
ar386
<END>
<BEGIN> BUILD_PENTIUMgnu_MACRO_ARCHIVE
$(PRJ_DIR)/PENTIUMgnu/db_checkpoint.a
<END>
<BEGIN> BUILD_PENTIUMgnu_MACRO_AS
cc386
<END>
<BEGIN> BUILD_PENTIUMgnu_MACRO_CC
cc386
<END>
<BEGIN> BUILD_PENTIUMgnu_MACRO_CFLAGS
-g \
-mpentium \
-ansi \
-nostdinc \
-DRW_MULTI_THREAD \
-D_REENTRANT \
-fvolatile \
-nostdlib \
-fno-builtin \
-fno-defer-pop \
-I$(PRJ_DIR)/.. \
-I$(PRJ_DIR)/../.. \
-I$(WIND_BASE)/target/h \
-DCPU=PENTIUM
<END>
<BEGIN> BUILD_PENTIUMgnu_MACRO_CFLAGS_AS
-g \
-mpentium \
-ansi \
-nostdinc \
-fvolatile \
-nostdlib \
-fno-builtin \
-fno-defer-pop \
-P \
-x \
assembler-with-cpp \
-I$(WIND_BASE)/target/h \
-DCPU=PENTIUM
<END>
<BEGIN> BUILD_PENTIUMgnu_MACRO_CPP
cc386 -E -P -xc
<END>
<BEGIN> BUILD_PENTIUMgnu_MACRO_LD
ld386
<END>
<BEGIN> BUILD_PENTIUMgnu_MACRO_LDDEPS
<END>
<BEGIN> BUILD_PENTIUMgnu_MACRO_LDFLAGS
-X -N
<END>
<BEGIN> BUILD_PENTIUMgnu_MACRO_LD_PARTIAL_FLAGS
-X -r
<END>
<BEGIN> BUILD_PENTIUMgnu_MACRO_NM
nm386 -g
<END>
<BEGIN> BUILD_PENTIUMgnu_MACRO_OPTION_DEFINE_MACRO
-D
<END>
<BEGIN> BUILD_PENTIUMgnu_MACRO_OPTION_INCLUDE_DIR
-I
<END>
<BEGIN> BUILD_PENTIUMgnu_MACRO_POST_BUILD_RULE
<END>
<BEGIN> BUILD_PENTIUMgnu_MACRO_PRJ_LIBS
<END>
<BEGIN> BUILD_PENTIUMgnu_MACRO_SIZE
size386
<END>
<BEGIN> BUILD_PENTIUMgnu_RO_DEPEND_PATH
{$(WIND_BASE)/target/h/} \
{$(WIND_BASE)/target/src/} \
{$(WIND_BASE)/target/config/}
<END>
<BEGIN> BUILD_PENTIUMgnu_TC
::tc_PENTIUMgnu
<END>
<BEGIN> BUILD_RULE_archive
<END>
<BEGIN> BUILD_RULE_db_checkpoint.out
<END>
<BEGIN> BUILD_RULE_objects
<END>
<BEGIN> BUILD__CURRENT
PENTIUMgnu
<END>
<BEGIN> BUILD__LIST
PENTIUMgnu
<END>
<BEGIN> CORE_INFO_TYPE
::prj_vxApp
<END>
<BEGIN> CORE_INFO_VERSION
2.0
<END>
<BEGIN> FILE_db_checkpoint.c_dependDone
FALSE
<END>
<BEGIN> FILE_db_checkpoint.c_dependencies
<END>
<BEGIN> FILE_db_checkpoint.c_objects
db_checkpoint.o
<END>
<BEGIN> FILE_db_checkpoint.c_tool
C/C++ compiler
<END>
<BEGIN> PROJECT_FILES
$(PRJ_DIR)/db_checkpoint.c
<END>
<BEGIN> userComments
db_checkpoint
<END>
#
# Custom Makefile shell
#
# This file may be edited freely, since it will not be regenerated
# by the project manager.
#
# Use this makefile to define rules to make external binaries
# and deposit them in the $(EXTERNAL_BINARIES_DIR) directory.
#
# If you have specified external modules during your component
# creation, you will find make rules already in place below.
# You will likely have to edit these to suit your individual
# build setup.
#
# You may wish to use the CPU, BUILD_SPEC or TOOL make variables in
# your Makefile to support builds for different architectures. Use
# the FORCE_EXTERNAL_MAKE phony target to ensure that your external
# make always runs.
#
# The example below assumes that your custom makefile is in the
# mySourceTree directory, and that the binary file it produces
# is placed into the $(BUILD_SPEC) sub-directory.
#
# EXTERNAL_SOURCE_BASE = /folk/me/mySourceTree
# EXTERNAL_MODULE = myLibrary.o
# EXTERNAL_MAKE = make
#
# $(EXTERNAL_BINARIES_DIR)/$(EXTERNAL_MODULE) : FORCE_EXTERNAL_MAKE
# $(EXTERNAL_MAKE) -C $(EXTERNAL_SOURCE_BASE) \
# -f $(EXTERNAL_SOURCE_BASE)/Makefile \
# CPU=$(CPU) BUILD_SPEC=$(BUILD_SPEC) $(@F)
# $(CP) $(subst /,$(DIRCHAR),$(EXTERNAL_SOURCE_BASE)/$(BUILD_SPEC)/$(@F) $@)
#
# If you are not adding your external modules from the component wizard,
# you will have to include them in your component yourself:
#
# From the GUI, you can do this with the Component's 'Add external module'
# dialog.
#
# If you are using the command line, add the module(s) by editing the
# MODULES line in component.cdf file, e.g.
#
# Component INCLUDE_MYCOMPONENT {
#
# MODULES foo.o goo.o \
# myLibrary.o
#
# rules to build custom libraries
/* component.cdf - dynamically updated configuration */
/*
* NOTE: you may edit this file to alter the configuration
* But all non-configuration information, including comments,
* will be lost upon rebuilding this project.
*/
/* Component information */
Component INCLUDE_DB_CHECKPOINT {
ENTRY_POINTS ALL_GLOBAL_SYMBOLS
MODULES db_checkpoint.o
NAME db_checkpoint
PREF_DOMAIN ANY
_INIT_ORDER usrComponentsInit
}
/* EntryPoint information */
/* Module information */
Module db_checkpoint.o {
NAME db_checkpoint.o
SRC_PATH_NAME $PRJ_DIR/../db_checkpoint.c
}
/* Parameter information */
This diff is collapsed.
/*-
* See the file LICENSE for redistribution information.
*
* Copyright (c) 1996-2002
* Sleepycat Software. All rights reserved.
*/
#include "db_config.h"
#ifndef lint
static const char copyright[] =
"Copyright (c) 1996-2002\nSleepycat Software Inc. All rights reserved.\n";
static const char revid[] =
"$Id: db_deadlock.c,v 11.38 2002/08/08 03:50:32 bostic Exp $";
#endif
#ifndef NO_SYSTEM_INCLUDES
#include <sys/types.h>
#if TIME_WITH_SYS_TIME
#include <sys/time.h>
#include <time.h>
#else
#if HAVE_SYS_TIME_H
#include <sys/time.h>
#else
#include <time.h>
#endif
#endif
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#endif
#include "db_int.h"
int db_deadlock_main __P((int, char *[]));
int db_deadlock_usage __P((void));
int db_deadlock_version_check __P((const char *));
int
db_deadlock(args)
char *args;
{
int argc;
char **argv;
__db_util_arg("db_deadlock", args, &argc, &argv);
return (db_deadlock_main(argc, argv) ? EXIT_FAILURE : EXIT_SUCCESS);
}
#include <stdio.h>
#define ERROR_RETURN ERROR
int
db_deadlock_main(argc, argv)
int argc;
char *argv[];
{
extern char *optarg;
extern int optind, __db_getopt_reset;
const char *progname = "db_deadlock";
DB_ENV *dbenv;
u_int32_t atype;
time_t now;
long secs, usecs;
int ch, e_close, exitval, ret, verbose;
char *home, *logfile, *str;
if ((ret = db_deadlock_version_check(progname)) != 0)
return (ret);
atype = DB_LOCK_DEFAULT;
home = logfile = NULL;
secs = usecs = 0;
e_close = exitval = verbose = 0;
__db_getopt_reset = 1;
while ((ch = getopt(argc, argv, "a:h:L:t:Vvw")) != EOF)
switch (ch) {
case 'a':
switch (optarg[0]) {
case 'e':
atype = DB_LOCK_EXPIRE;
break;
case 'm':
atype = DB_LOCK_MAXLOCKS;
break;
case 'n':
atype = DB_LOCK_MINLOCKS;
break;
case 'o':
atype = DB_LOCK_OLDEST;
break;
case 'w':
atype = DB_LOCK_MINWRITE;
break;
case 'y':
atype = DB_LOCK_YOUNGEST;
break;
default:
return (db_deadlock_usage());
/* NOTREACHED */
}
if (optarg[1] != '\0')
return (db_deadlock_usage());
break;
case 'h':
home = optarg;
break;
case 'L':
logfile = optarg;
break;
case 't':
if ((str = strchr(optarg, '.')) != NULL) {
*str++ = '\0';
if (*str != '\0' && __db_getlong(
NULL, progname, str, 0, LONG_MAX, &usecs))
return (EXIT_FAILURE);
}
if (*optarg != '\0' && __db_getlong(
NULL, progname, optarg, 0, LONG_MAX, &secs))
return (EXIT_FAILURE);
if (secs == 0 && usecs == 0)
return (db_deadlock_usage());
break;
case 'V':
printf("%s\n", db_version(NULL, NULL, NULL));
return (EXIT_SUCCESS);
case 'v':
verbose = 1;
break;
case 'w': /* Undocumented. */
/* Detect every 100ms (100000 us) when polling. */
secs = 0;
usecs = 100000;
break;
case '?':
default:
return (db_deadlock_usage());
}
argc -= optind;
argv += optind;
if (argc != 0)
return (db_deadlock_usage());
/* Handle possible interruptions. */
__db_util_siginit();
/* Log our process ID. */
if (logfile != NULL && __db_util_logset(progname, logfile))
goto shutdown;
/*
* Create an environment object and initialize it for error
* reporting.
*/
if ((ret = db_env_create(&dbenv, 0)) != 0) {
fprintf(stderr,
"%s: db_env_create: %s\n", progname, db_strerror(ret));
goto shutdown;
}
e_close = 1;
dbenv->set_errfile(dbenv, stderr);
dbenv->set_errpfx(dbenv, progname);
if (verbose) {
(void)dbenv->set_verbose(dbenv, DB_VERB_DEADLOCK, 1);
(void)dbenv->set_verbose(dbenv, DB_VERB_WAITSFOR, 1);
}
/* An environment is required. */
if ((ret = dbenv->open(dbenv, home,
DB_JOINENV | DB_USE_ENVIRON, 0)) != 0) {
dbenv->err(dbenv, ret, "open");
goto shutdown;
}
while (!__db_util_interrupted()) {
if (verbose) {
(void)time(&now);
dbenv->errx(dbenv, "running at %.24s", ctime(&now));
}
if ((ret = dbenv->lock_detect(dbenv, 0, atype, NULL)) != 0) {
dbenv->err(dbenv, ret, "DB_ENV->lock_detect");
goto shutdown;
}
/* Make a pass every "secs" secs and "usecs" usecs. */
if (secs == 0 && usecs == 0)
break;
(void)__os_sleep(dbenv, secs, usecs);
}
if (0) {
shutdown: exitval = 1;
}
/* Clean up the logfile. */
if (logfile != NULL)
remove(logfile);
/* Clean up the environment. */
if (e_close && (ret = dbenv->close(dbenv, 0)) != 0) {
exitval = 1;
fprintf(stderr,
"%s: dbenv->close: %s\n", progname, db_strerror(ret));
}
/* Resend any caught signal. */
__db_util_sigresend();
return (exitval == 0 ? EXIT_SUCCESS : EXIT_FAILURE);
}
int
db_deadlock_usage()
{
(void)fprintf(stderr, "%s\n\t%s\n",
"usage: db_deadlock [-Vv]",
"[-a e | m | n | o | w | y] [-h home] [-L file] [-t sec.usec]");
return (EXIT_FAILURE);
}
int
db_deadlock_version_check(progname)
const char *progname;
{
int v_major, v_minor, v_patch;
/* Make sure we're loaded with the right version of the DB library. */
(void)db_version(&v_major, &v_minor, &v_patch);
if (v_major != DB_VERSION_MAJOR ||
v_minor != DB_VERSION_MINOR || v_patch != DB_VERSION_PATCH) {
fprintf(stderr,
"%s: version %d.%d.%d doesn't match library version %d.%d.%d\n",
progname, DB_VERSION_MAJOR, DB_VERSION_MINOR,
DB_VERSION_PATCH, v_major, v_minor, v_patch);
return (EXIT_FAILURE);
}
return (0);
}
This diff is collapsed.
#
# Custom Makefile shell
#
# This file may be edited freely, since it will not be regenerated
# by the project manager.
#
# Use this makefile to define rules to make external binaries
# and deposit them in the $(EXTERNAL_BINARIES_DIR) directory.
#
# If you have specified external modules during your component
# creation, you will find make rules already in place below.
# You will likely have to edit these to suit your individual
# build setup.
#
# You may wish to use the CPU, BUILD_SPEC or TOOL make variables in
# your Makefile to support builds for different architectures. Use
# the FORCE_EXTERNAL_MAKE phony target to ensure that your external
# make always runs.
#
# The example below assumes that your custom makefile is in the
# mySourceTree directory, and that the binary file it produces
# is placed into the $(BUILD_SPEC) sub-directory.
#
# EXTERNAL_SOURCE_BASE = /folk/me/mySourceTree
# EXTERNAL_MODULE = myLibrary.o
# EXTERNAL_MAKE = make
#
# $(EXTERNAL_BINARIES_DIR)/$(EXTERNAL_MODULE) : FORCE_EXTERNAL_MAKE
# $(EXTERNAL_MAKE) -C $(EXTERNAL_SOURCE_BASE) \
# -f $(EXTERNAL_SOURCE_BASE)/Makefile \
# CPU=$(CPU) BUILD_SPEC=$(BUILD_SPEC) $(@F)
# $(CP) $(subst /,$(DIRCHAR),$(EXTERNAL_SOURCE_BASE)/$(BUILD_SPEC)/$(@F) $@)
#
# If you are not adding your external modules from the component wizard,
# you will have to include them in your component yourself:
#
# From the GUI, you can do this with the Component's 'Add external module'
# dialog.
#
# If you are using the command line, add the module(s) by editing the
# MODULES line in component.cdf file, e.g.
#
# Component INCLUDE_MYCOMPONENT {
#
# MODULES foo.o goo.o \
# myLibrary.o
#
# rules to build custom libraries
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -38,4 +38,4 @@ enum options { OPT_CHARSETS_DIR=256, OPT_DEFAULT_CHARSET, ...@@ -38,4 +38,4 @@ enum options { OPT_CHARSETS_DIR=256, OPT_DEFAULT_CHARSET,
OPT_SSL_KEY, OPT_SSL_CERT, OPT_SSL_CA, OPT_SSL_CAPATH, OPT_SSL_KEY, OPT_SSL_CERT, OPT_SSL_CA, OPT_SSL_CAPATH,
OPT_SSL_CIPHER, OPT_SHUTDOWN_TIMEOUT, OPT_LOCAL_INFILE, OPT_SSL_CIPHER, OPT_SHUTDOWN_TIMEOUT, OPT_LOCAL_INFILE,
OPT_PROMPT, OPT_IGN_LINES,OPT_TRANSACTION,OPT_MYSQL_PROTOCOL, OPT_PROMPT, OPT_IGN_LINES,OPT_TRANSACTION,OPT_MYSQL_PROTOCOL,
OPT_SHARED_MEMORY_BASE_NAME }; OPT_SHARED_MEMORY_BASE_NAME, OPT_FRM };
...@@ -176,7 +176,7 @@ static void dump_remote_file(NET* net, const char* fname) ...@@ -176,7 +176,7 @@ static void dump_remote_file(NET* net, const char* fname)
} }
static my_bool extern "C" my_bool
get_one_option(int optid, const struct my_option *opt __attribute__((unused)), get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
char *argument) char *argument)
{ {
...@@ -210,7 +210,6 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)), ...@@ -210,7 +210,6 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
print_version(); print_version();
exit(0); exit(0);
case '?': case '?':
default:
usage(); usage();
exit(0); exit(0);
} }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -18,7 +18,7 @@ INCLUDES = @MT_INCLUDES@ -I$(srcdir)/../include -I../include -I.. ...@@ -18,7 +18,7 @@ INCLUDES = @MT_INCLUDES@ -I$(srcdir)/../include -I../include -I..
LDADD = @CLIENT_EXTRA_LDFLAGS@ ../mysys/libmysys.a \ LDADD = @CLIENT_EXTRA_LDFLAGS@ ../mysys/libmysys.a \
../dbug/libdbug.a ../strings/libmystrings.a ../dbug/libdbug.a ../strings/libmystrings.a
bin_PROGRAMS = replace comp_err perror resolveip my_print_defaults \ bin_PROGRAMS = replace comp_err perror resolveip my_print_defaults \
resolve_stack_dump mysql_install resolve_stack_dump mysql_install
# Don't update the files from bitkeeper # Don't update the files from bitkeeper
%::SCCS/s.% %::SCCS/s.%
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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