Merge 4.1 -> 5.0.
BitKeeper/etc/ignore: auto-union BitKeeper/etc/logging_ok: auto-union VC++Files/sql/mysqld.dsp: Auto merged client/Makefile.am: Auto merged client/mysql.cc: Auto merged client/mysqltest.c: Auto merged configure.in: Auto merged include/my_global.h: Auto merged include/my_pthread.h: Auto merged include/my_sys.h: Auto merged include/mysql_com.h: Auto merged libmysqld/Makefile.am: Auto merged libmysqld/lib_sql.cc: Auto merged myisam/mi_check.c: Auto merged myisam/myisamchk.c: Auto merged myisam/myisamdef.h: Auto merged mysql-test/install_test_db.sh: Auto merged mysql-test/r/insert_select.result: Auto merged mysql-test/r/join_outer.result: Auto merged mysql-test/r/null.result: Auto merged mysql-test/r/connect.result: Auto merged mysql-test/r/func_sapdb.result: Auto merged mysql-test/r/mix_innodb_myisam_binlog.result: Auto merged mysql-test/r/mysqldump.result: Auto merged mysql-test/r/rpl_change_master.result: Auto merged mysql-test/r/rpl_log.result: Auto merged mysql-test/r/show_check.result: Auto merged mysql-test/r/symlink.result: Auto merged mysql-test/r/rpl_flush_log_loop.result: Auto merged mysql-test/r/rpl_flush_tables.result: Auto merged mysql-test/r/rpl_loaddata.result: Auto merged mysql-test/r/rpl_loaddata_rule_m.result: Auto merged mysql-test/r/rpl_loaddata_rule_s.result: Auto merged mysql-test/r/rpl_max_relay_size.result: Auto merged mysql-test/r/rpl_reset_slave.result: Auto merged mysql-test/r/rpl_temporary.result: Auto merged mysql-test/r/rpl_until.result: Auto merged mysql-test/r/rpl_user_variables.result: Auto merged mysql-test/r/subselect.result: Auto merged mysql-test/r/union.result: Auto merged mysql-test/r/variables.result: Auto merged mysql-test/t/func_sapdb.test: Auto merged mysql-test/t/mix_innodb_myisam_binlog.test: Auto merged mysql-test/t/mysqlbinlog.test: Auto merged mysql-test/t/rpl_change_master.test: Auto merged mysql-test/t/rpl_log.test: Auto merged mysql-test/t/variables.test: Auto merged netware/BUILD/compile-linux-tools: Auto merged netware/BUILD/compile-netware-END: Auto merged netware/BUILD/compile-netware-all: Auto merged netware/BUILD/compile-netware-standard: Auto merged mysql-test/t/rpl_empty_master_crash.test: Auto merged mysql-test/t/rpl_error_ignored_table.test: Auto merged mysql-test/t/rpl_flush_log_loop.test: Auto merged mysql-test/t/rpl_loaddata.test: Auto merged mysql-test/t/rpl_loaddata_rule_m.test: Auto merged mysql-test/t/rpl_loaddata_rule_s.test: Auto merged mysql-test/t/rpl_max_relay_size.test: Auto merged mysql-test/t/rpl_openssl.test: Auto merged mysql-test/t/rpl_relayrotate-slave.opt: Auto merged mysql-test/t/rpl_reset_slave.test: Auto merged mysql-test/t/rpl_trunc_binlog.test: Auto merged mysql-test/t/rpl_until.test: Auto merged mysql-test/t/rpl_user_variables.test: Auto merged mysql-test/t/subselect.test: Auto merged scripts/make_binary_distribution.sh: Auto merged scripts/mysql_create_system_tables.sh: Auto merged scripts/mysql_fix_privilege_tables.sql: Auto merged scripts/mysql_install_db.sh: Auto merged sql/filesort.cc: Auto merged sql/ha_berkeley.cc: Auto merged sql/ha_berkeley.h: Auto merged sql/ha_innodb.h: Auto merged sql/ha_myisam.cc: Auto merged sql/handler.cc: Auto merged sql/handler.h: Auto merged sql/item.cc: Auto merged sql/item.h: Auto merged sql/item_cmpfunc.cc: Auto merged sql/item_cmpfunc.h: Auto merged sql/item_create.cc: Auto merged sql/item_create.h: Auto merged sql/item_subselect.cc: Auto merged sql/item_sum.cc: Auto merged sql/item_sum.h: Auto merged sql/item_timefunc.h: Auto merged sql/lock.cc: Auto merged sql/log_event.h: Auto merged sql/mysqld.cc: Auto merged sql/net_serv.cc: Auto merged sql/protocol.cc: Auto merged sql/protocol.h: Auto merged sql/repl_failsafe.cc: Auto merged sql/sql_acl.cc: Auto merged sql/sql_acl.h: Auto merged sql/sql_base.cc: Auto merged sql/sql_cache.cc: Auto merged sql/sql_class.h: Auto merged sql/sql_db.cc: Auto merged sql/sql_delete.cc: Auto merged sql/sql_derived.cc: Auto merged sql/sql_lex.h: Auto merged sql/sql_list.h: Auto merged sql/sql_load.cc: Auto merged sql/sql_rename.cc: Auto merged sql/sql_repl.cc: Auto merged sql/sql_repl.h: Auto merged sql/sql_select.cc: Auto merged sql/sql_select.h: Auto merged sql/sql_show.cc: Auto merged sql/sql_table.cc: Auto merged sql/sql_test.cc: Auto merged sql/sql_update.cc: Auto merged sql-common/client.c: Auto merged tests/client_test.c: Auto merged
This commit is contained in:
commit
c635d37479
@ -250,6 +250,7 @@ client/thimble
|
||||
client/thread_test
|
||||
client_test
|
||||
cmd-line-utils/libedit/common.h
|
||||
cmd-line-utils/libedit/makelist
|
||||
comon.h
|
||||
config.cache
|
||||
config.h
|
||||
@ -361,6 +362,7 @@ libmysqld/item_func.cc
|
||||
libmysqld/item_geofunc.cc
|
||||
libmysqld/item_row.cc
|
||||
libmysqld/item_strfunc.cc
|
||||
libmysqld/item_subselect.cc
|
||||
libmysqld/item_sum.cc
|
||||
libmysqld/item_timefunc.cc
|
||||
libmysqld/item_uniq.cc
|
||||
@ -402,6 +404,7 @@ libmysqld/sql_command
|
||||
libmysqld/sql_crypt.cc
|
||||
libmysqld/sql_db.cc
|
||||
libmysqld/sql_delete.cc
|
||||
libmysqld/sql_derived.cc
|
||||
libmysqld/sql_do.cc
|
||||
libmysqld/sql_handler.cc
|
||||
libmysqld/sql_help.cc
|
||||
@ -443,6 +446,7 @@ linked_libmysqldex_sources
|
||||
linked_server_sources
|
||||
linked_tools_sources
|
||||
locked
|
||||
man/*.1
|
||||
mit-pthreads/config.flags
|
||||
mit-pthreads/include/bits
|
||||
mit-pthreads/include/pthread/machdep.h
|
||||
@ -465,6 +469,7 @@ myisam/mi_test2
|
||||
myisam/mi_test3
|
||||
myisam/mi_test_all
|
||||
myisam/myisam.log
|
||||
myisam/myisam_ftdump
|
||||
myisam/myisamchk
|
||||
myisam/myisamlog
|
||||
myisam/myisampack
|
||||
@ -496,6 +501,7 @@ mysql-test/std_data/*.pem
|
||||
mysql-test/var/*
|
||||
mysql.kdevprj
|
||||
mysql.proj
|
||||
mysql_priv.h
|
||||
mysqld.S
|
||||
mysqld.sym
|
||||
mysys/#mf_iocache.c#
|
||||
@ -506,6 +512,7 @@ mysys/main.cc
|
||||
mysys/ste5KbMa
|
||||
mysys/test_charset
|
||||
mysys/test_dir
|
||||
mysys/test_gethwaddr
|
||||
mysys/test_io_cache
|
||||
mysys/test_thr_alarm
|
||||
mysys/test_thr_lock
|
||||
@ -524,6 +531,7 @@ scripts/fill_help_tables
|
||||
scripts/fill_help_tables.sql
|
||||
scripts/make_binary_distribution
|
||||
scripts/make_sharedlib_distribution
|
||||
scripts/make_win_binary_distribution
|
||||
scripts/make_win_src_distribution
|
||||
scripts/msql2mysql
|
||||
scripts/mysql_config
|
||||
@ -647,4 +655,3 @@ vio/test-ssl
|
||||
vio/test-sslclient
|
||||
vio/test-sslserver
|
||||
vio/viotest-ssl
|
||||
mysql_priv.h
|
||||
|
@ -37,6 +37,7 @@ EXTRA_DIST = FINISH.sh \
|
||||
compile-pentium-pgcc \
|
||||
compile-solaris-sparc \
|
||||
compile-solaris-sparc-debug \
|
||||
compile-irix-mips64-mipspro \
|
||||
compile-solaris-sparc-forte \
|
||||
compile-solaris-sparc-purify
|
||||
|
||||
|
84
BUILD/compile-irix-mips64-mipspro
Executable file
84
BUILD/compile-irix-mips64-mipspro
Executable file
@ -0,0 +1,84 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ ! -f "sql/mysqld.cc" ]; then
|
||||
echo "You must run this script from the MySQL top-level directory."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
cflags="-64 -mips4"
|
||||
|
||||
if [ "$#" != 0 ]; then
|
||||
case "$1" in
|
||||
--help)
|
||||
echo "Usage: $0 [options]"
|
||||
echo "Options:"
|
||||
echo "--help print this message"
|
||||
echo "-32 build 32-bit binary"
|
||||
echo "-64 build 64-bit binary [default]"
|
||||
exit 0
|
||||
;;
|
||||
-64)
|
||||
echo "Building 64-bit binary"
|
||||
;;
|
||||
-32)
|
||||
echo "Building 32-bit binary"
|
||||
cflags=""
|
||||
;;
|
||||
*)
|
||||
echo "$0: invalid option '$1'; use --help to show usage"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
else
|
||||
echo "Building 64-bit binary"
|
||||
fi
|
||||
|
||||
set -x
|
||||
make distclean
|
||||
aclocal
|
||||
autoheader
|
||||
libtoolize --automake --force
|
||||
automake --force --add-missing
|
||||
autoconf
|
||||
|
||||
(cd bdb/dist && sh s_all)
|
||||
(cd innobase && aclocal && autoheader && aclocal && automake && autoconf)
|
||||
|
||||
# C options:
|
||||
# -apo - auto-parallize for multiprocessors (implies -mp)
|
||||
# -mp - generate multiprocessor code
|
||||
# These two common optimization options apparently use 'sproc' model of
|
||||
# threading, which is not compatible with PTHREADS: don't add them unless you
|
||||
# know what you're doing.
|
||||
#
|
||||
# -c99 - enable C features standardized in C99, such as long long,
|
||||
# strtoll, stroull etc.
|
||||
# This option is vital to compile MySQL.
|
||||
# -woff - turn off some warnings
|
||||
# -64 - generate 64 bit object (implies -mips4)
|
||||
# -mips4 - produce code for MIPS R10000, MIPS R12000 and further 64 bit
|
||||
# processors
|
||||
# -OPT:Olimit=0 - no limits exists to size of function for compiler to optimize
|
||||
# it
|
||||
nowarn="-woff 1064,1188,1460,1552,1681,1682,3303"
|
||||
cflags="$cflags $nowarn -O3 -c99 -OPT:Olimit=0"
|
||||
|
||||
# C++ only options:
|
||||
# -LANG:exceptions=OFF - don't generate exception handling code
|
||||
# MySQL doesn't use exceptions.
|
||||
# -LANG:std=OFF - don't link standard C++ library, such as
|
||||
# <iostream>, <complex>, etc.
|
||||
# -LANG:libc_in_namespace_std=OFF - libstdc functions can be
|
||||
# declared in namespace 'std', when included
|
||||
# into C++ code. Switch this feature off.
|
||||
# This option is vital to compile MySQL
|
||||
|
||||
cxxflags="$cflags -LANG:exceptions=OFF -LANG:std=OFF"
|
||||
cxxflags="$cxxflags -LANG:libc_in_namespace_std=OFF"
|
||||
|
||||
CC=cc CXX=CC CFLAGS="$cflags" CXXFLAGS="$cxxflags" \
|
||||
./configure --prefix=/usr/local/mysql --disable-shared \
|
||||
--with-extra-charsets=complex --enable-thread-safe-client \
|
||||
--without-extra-tools --disable-dependency-tracking
|
||||
|
||||
make
|
@ -8,6 +8,6 @@ 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 --without-isam --with-embedded-server --with-openssl --with-raid"
|
||||
extra_configs="$extra_configs --with-berkeley-db --with-innodb --without-isam --with-embedded-server --with-openssl --with-raid --with-vio"
|
||||
|
||||
. "$path/FINISH.sh"
|
||||
|
@ -9,6 +9,6 @@ extra_configs="$pentium_configs"
|
||||
|
||||
extra_configs="$extra_configs --with-innodb --with-berkeley-db \
|
||||
--with-embedded-server --enable-thread-safe-client \
|
||||
--with-openssl --with-vio"
|
||||
--with-openssl --with-vio --with-raid"
|
||||
|
||||
. "$path/FINISH.sh"
|
||||
|
@ -71,3 +71,4 @@ hours:
|
||||
[arjen:]checkout:get
|
||||
[nick:]checkout:get
|
||||
checkout:edit
|
||||
eoln:unix
|
||||
|
@ -2,6 +2,7 @@ Administrador@light.
|
||||
Administrator@co3064164-a.
|
||||
Administrator@co3064164-a.rochd1.qld.optushome.com.au
|
||||
Administrator@fred.
|
||||
Greg@greg-laptop.
|
||||
Miguel@light.local
|
||||
Sinisa@sinisa.nasamreza.org
|
||||
WAX@sergbook.mysql.com
|
||||
@ -10,6 +11,7 @@ administrador@light.hegel.local
|
||||
ahlentz@co3064164-a.rochd1.qld.optusnet.com.au
|
||||
akishkin@work.mysql.com
|
||||
antony@ltantony.rdg.cyberkinetica.homeunix.net
|
||||
arjen@bitbike.com
|
||||
arjen@co3064164-a.bitbike.com
|
||||
arjen@fred.bitbike.com
|
||||
arjen@george.bitbike.com
|
||||
@ -26,6 +28,7 @@ carsten@tsort.bitbybit.dk
|
||||
davida@isil.mysql.com
|
||||
dlenev@brandersnatch.localdomain
|
||||
dlenev@build.mysql.com
|
||||
dlenev@jabberwock.localdomain
|
||||
dlenev@mysql.com
|
||||
gerberb@ou800.zenez.com
|
||||
gluh@gluh.(none)
|
||||
@ -36,6 +39,7 @@ guilhem@mysql.com
|
||||
gweir@build.mysql.com
|
||||
gweir@work.mysql.com
|
||||
harrison@mysql.com
|
||||
harry@corona.lordblink.com
|
||||
heikki@donna.mysql.fi
|
||||
heikki@hundin.mysql.fi
|
||||
heikki@rescue.
|
||||
@ -47,6 +51,8 @@ hf@deer.mysql.r18.ru
|
||||
hf@genie.(none)
|
||||
igor@hundin.mysql.fi
|
||||
igor@rurik.mysql.com
|
||||
ingo@mysql.com
|
||||
jani@a80-186-24-72.elisa-laajakaista.fi
|
||||
jani@dsl-jkl1657.dial.inet.fi
|
||||
jani@dsl-kpogw4gb5.dial.inet.fi
|
||||
jani@hynda.(none)
|
||||
@ -58,8 +64,10 @@ jani@rhols221.arenanet.fi
|
||||
jani@ua126d19.elisa.omakaista.fi
|
||||
jani@ua141d10.elisa.omakaista.fi
|
||||
jani@ua167d18.elisa.omakaista.fi
|
||||
jani@ua72d24.elisa.omakaista.fi
|
||||
jcole@abel.spaceapes.com
|
||||
jcole@main.burghcom.com
|
||||
jcole@mugatu.jcole.us
|
||||
jcole@mugatu.spaceapes.com
|
||||
jcole@sarvik.tfr.cafe.ee
|
||||
jcole@tetra.spaceapes.com
|
||||
@ -69,6 +77,7 @@ konstantin@mysql.com
|
||||
kostja@oak.local
|
||||
lenz@kallisto.mysql.com
|
||||
lenz@mysql.com
|
||||
marko@hundin.mysql.fi
|
||||
miguel@hegel.(none)
|
||||
miguel@hegel.br
|
||||
miguel@hegel.local
|
||||
@ -94,6 +103,7 @@ monty@work.mysql.com
|
||||
mwagner@cash.mwagner.org
|
||||
mwagner@evoq.mwagner.org
|
||||
mwagner@work.mysql.com
|
||||
mydev@mysql.com
|
||||
mysql@home.(none)
|
||||
mysqldev@build.mysql2.com
|
||||
nick@mysql.com
|
||||
@ -123,8 +133,10 @@ root@x3.internalnet
|
||||
salle@banica.(none)
|
||||
salle@geopard.(none)
|
||||
salle@geopard.online.bg
|
||||
salle@vafla.home
|
||||
salle@vafla.online.bg
|
||||
sasha@mysql.sashanet.com
|
||||
serg@build.mysql.com
|
||||
serg@build.mysql2.com
|
||||
serg@serg.mylan
|
||||
serg@serg.mysql.com
|
||||
@ -146,6 +158,7 @@ tonu@hundin.mysql.fi
|
||||
tonu@volk.internalnet
|
||||
tonu@x153.internalnet
|
||||
tonu@x3.internalnet
|
||||
ulli@morbus.(none)
|
||||
venu@hundin.mysql.fi
|
||||
venu@myvenu.com
|
||||
venu@work.mysql.com
|
||||
|
@ -1,12 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
#shift
|
||||
TO=dev-public@mysql.com
|
||||
FROM=$USER@mysql.com
|
||||
INTERNALS=internals@lists.mysql.com
|
||||
DOCS=docs-commit@mysql.com
|
||||
LIMIT=10000
|
||||
REPOV=5.0
|
||||
VERSION="5.0"
|
||||
|
||||
if [ "$REAL_EMAIL" = "" ]
|
||||
then
|
||||
@ -21,17 +20,24 @@ if [ "$BK_STATUS" = OK ]
|
||||
then
|
||||
|
||||
CHANGESET=`bk -R prs -r+ -h -d':P:::I:' ChangeSet`
|
||||
BUG=`bk -R prs -r+ -h -d':C:' ChangeSet | sed -ne 's/^.*[Bb][Uu][Gg] *# *\([0-9][0-9]*\).*$/ BUG#\1/p'`
|
||||
|
||||
if [ "$BUG" = "" ]
|
||||
then
|
||||
TO=dev-public@mysql.com
|
||||
else
|
||||
TO=dev-bugs@mysql.com
|
||||
fi
|
||||
#++
|
||||
# dev-public@
|
||||
# dev-public@ / dev-bugs@
|
||||
#--
|
||||
echo "Commit successful, notifying developers at $TO"
|
||||
(
|
||||
cat <<EOF
|
||||
List-ID: <bk.mysql-$REPOV>
|
||||
List-ID: <bk.mysql-$VERSION>
|
||||
From: $FROM
|
||||
To: $TO
|
||||
Subject: bk commit - $REPOV tree ($CHANGESET)
|
||||
Subject: bk commit - $VERSION tree ($CHANGESET)$BUG
|
||||
|
||||
EOF
|
||||
bk changes -v -r+
|
||||
@ -44,13 +50,13 @@ EOF
|
||||
echo "Notifying internals list at $INTERNALS"
|
||||
(
|
||||
cat <<EOF
|
||||
List-ID: <bk.mysql-$REPOV>
|
||||
List-ID: <bk.mysql-$VERSION>
|
||||
From: $FROM
|
||||
To: $INTERNALS
|
||||
Subject: bk commit into $REPOV tree ($CHANGESET)
|
||||
Subject: bk commit into $VERSION tree ($CHANGESET)
|
||||
|
||||
Below is the list of changes that have just been committed into a local
|
||||
$REPOV repository of $USER. When $USER does a push these changes will
|
||||
$VERSION repository of $USER. When $USER does a push these changes will
|
||||
be propagated to the main repository and, within 24 hours after the
|
||||
push, to the public repository.
|
||||
For information on how to access the public repository
|
||||
@ -71,10 +77,10 @@ EOF
|
||||
echo "Notifying docs list at $DOCS"
|
||||
(
|
||||
cat <<EOF
|
||||
List-ID: <bk.mysql-$REPOV>
|
||||
List-ID: <bk.mysql-$VERSION>
|
||||
From: $FROM
|
||||
To: $DOCS
|
||||
Subject: bk commit - $REPOV tree (Manual) ($CHANGESET)
|
||||
Subject: bk commit - $VERSION tree (Manual) ($CHANGESET)
|
||||
|
||||
EOF
|
||||
bk changes -v -r+
|
||||
|
11
BitKeeper/triggers/pre-delta
Executable file
11
BitKeeper/triggers/pre-delta
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
|
||||
if [ `tail -c1 $BK_FILE` ]
|
||||
then
|
||||
echo "File $BK_FILE does not end with a new-line character!"
|
||||
echo ""
|
||||
echo "Checkin FAILED!"
|
||||
echo "Fix the problem and retry."
|
||||
exit 1
|
||||
fi
|
||||
|
@ -257,7 +257,7 @@ if (defined $opt_changelog)
|
||||
$msg= "Adding $target_dir/ChangeLog";
|
||||
$msg.= " (down to revision $opt_changelog)" if $opt_changelog ne "";
|
||||
&logger($msg);
|
||||
$command= "bk changes -v";
|
||||
$command= "bk changes -mv";
|
||||
$command.= " -r" if ($opt_changelog ne "" || $opt_revision);
|
||||
$command.= $opt_changelog if $opt_changelog ne "";
|
||||
$command.= ".." if ($opt_changelog ne "" && !$opt_revision);
|
||||
|
@ -282,7 +282,7 @@ if ($opt_stage <= 3)
|
||||
{
|
||||
my $flags= "";
|
||||
log_timestamp();
|
||||
log_system("rm -fr mysql-3* mysql-4* $pwd/$host/*.tar.gz");
|
||||
log_system("rm -fr mysql-{3,4,5}* $pwd/$host/mysql*.t*gz");
|
||||
# No need to add the debug symbols, if the binaries are not stripped (saves space)
|
||||
unless ($opt_with_debug || $opt_no_strip)
|
||||
{
|
||||
@ -291,7 +291,7 @@ if ($opt_stage <= 3)
|
||||
|
||||
$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");
|
||||
safe_system("mv mysql*.tar.gz $pwd/$host");
|
||||
safe_system("mv mysql*.t*gz $pwd/$host");
|
||||
if (-f "client/.libs/mysqladmin")
|
||||
{
|
||||
safe_system("cp client/.libs/mysqladmin $pwd/$host/bin");
|
||||
@ -303,11 +303,8 @@ if ($opt_stage <= 3)
|
||||
safe_system("$make clean") if ($opt_with_small_disk);
|
||||
}
|
||||
|
||||
$tar_file=<$pwd/$host/*.tar.gz>;
|
||||
if (!defined($tar_file))
|
||||
{
|
||||
$tar_file=<$pwd/$host/*.tgz>;
|
||||
}
|
||||
$tar_file=<$pwd/$host/mysql*.t*gz>;
|
||||
abort ("Could not find tarball!") unless ($tar_file);
|
||||
|
||||
#
|
||||
# Unpack the binary distribution
|
||||
@ -320,7 +317,7 @@ if ($opt_stage <= 4 && !$opt_no_test)
|
||||
safe_system("gunzip < $tar_file | $tar xf -");
|
||||
}
|
||||
|
||||
$tar_file =~ /(mysql[^\/]*)\.tar/;
|
||||
$tar_file =~ /(mysql[^\/]*)\.(tar\.gz|tgz)/;
|
||||
$ver=$1;
|
||||
$test_dir="$pwd/$host/test/$ver";
|
||||
$ENV{"LD_LIBRARY_PATH"}= ("$test_dir/lib" .
|
||||
|
@ -61,6 +61,12 @@ else
|
||||
}
|
||||
|
||||
$PM= "/Developer/Applications/PackageMaker.app/Contents/MacOS/PackageMaker";
|
||||
# Try another location on 10.3.3
|
||||
unless (-e "$PM")
|
||||
{
|
||||
$PM= "/Developer/Applications/Utilities/PackageMaker.app/Contents/MacOS/PackageMaker";
|
||||
}
|
||||
|
||||
$TMP= $ENV{TMPDIR};
|
||||
$TMP eq "" ? $TMP= $TMP . "/PKGBUILD.$$": $TMP= "/tmp/PKGBUILD.$$";
|
||||
$PKGROOT= "$TMP/PMROOT";
|
||||
@ -79,6 +85,9 @@ $BUILDDIR= "$PWD/$HOST";
|
||||
$SRCBASEDIR= <$BUILDDIR/mysql*-$VERSION>;
|
||||
$SUPFILEDIR= <$SRCBASEDIR/support-files/MacOSX>;
|
||||
$TAR= <$BUILDDIR/$NAME-apple-darwin*-powerpc.tar.gz>;
|
||||
$TAR =~ /.*\/$NAME(.*)\.tar\.gz$/;
|
||||
$ARCH= $1;
|
||||
$NAME= $NAME . $ARCH;
|
||||
$INFO= <$SUPFILEDIR/Info.plist>;
|
||||
$DESC= <$SUPFILEDIR/Description.plist>;
|
||||
$SI_INFO= <$SUPFILEDIR/StartupItem.Info.plist>;
|
||||
@ -167,7 +176,7 @@ unless (-f "$RESOURCE_DIR/License.txt");
|
||||
&logger("Extracting $TAR to $PKGROOT");
|
||||
&run_command("gnutar zxf $TAR -C $PKGROOT", "Unable to extract $TAR!");
|
||||
&run_command("cd $PKGROOT ; ln -s mysql* ./mysql", "Unable to create symlink!");
|
||||
&run_command("chown -R root.wheel $PKGROOT/*", "Cannot chown $PKGROOT!");
|
||||
&run_command("chown -R root:wheel $PKGROOT/*", "Cannot chown $PKGROOT!");
|
||||
|
||||
# Now build the PGK using PackageMaker
|
||||
# The "|| true" is a nasty hack to work around a problem with Package Maker
|
||||
@ -196,7 +205,7 @@ unless ($opt_skip_si)
|
||||
copy("$SI_PARAMS", "$PKGROOT/MySQL/")
|
||||
or &abort("Error copying $SI_PARAMS!");
|
||||
chmod(0644, "$PKGROOT/MySQL/" . basename("$SI_PARAMS"));
|
||||
&run_command("chown -R root.wheel $PKGROOT/*", "Cannot chown $PKGROOT!");
|
||||
&run_command("chown -R root:wheel $PKGROOT/*", "Cannot chown $PKGROOT!");
|
||||
copy("$SI_POST", "$RESOURCE_DIR/postinstall")
|
||||
or &abort("Error copying $SI_POST!");
|
||||
chmod(0644, "$RESOURCE_DIR/postinstall");
|
||||
|
@ -115,10 +115,12 @@ if (defined $opt_log)
|
||||
if (-x "/usr/bin/rpmbuild")
|
||||
{
|
||||
$RPM= "/usr/bin/rpmbuild";
|
||||
$RMSOURCE= "--rmsource --rmspec";
|
||||
}
|
||||
else
|
||||
{
|
||||
$RPM= "/bin/rpm";
|
||||
$RMSOURCE= "--rmspec";
|
||||
}
|
||||
|
||||
if ($RPM)
|
||||
@ -177,7 +179,7 @@ $ENV{MYSQL_BUILD_CXX}=$opt_cxx if ($opt_cxx);
|
||||
$command= "$RPM";
|
||||
$command.= " -v" if ($opt_verbose);
|
||||
$command.= " -ba";
|
||||
$command.= " --clean" if $opt_clean;
|
||||
$command.= " --clean $RMSOURCE" if $opt_clean;
|
||||
$command.= " $SPECDIR/";
|
||||
$command.= basename($SPECFILE);
|
||||
&logger("Building RPM.");
|
||||
@ -188,7 +190,7 @@ $command.= basename($SPECFILE);
|
||||
#
|
||||
$command= "mv";
|
||||
$command.= " -v " if ($opt_verbose);
|
||||
$command.= "$SRCRPMDIR/MySQL*$VERSION*.src.rpm $PWD";
|
||||
$command.= " $SRCRPMDIR/MySQL*$VERSION*.src.rpm $PWD";
|
||||
&logger("Moving source RPM to current dir.");
|
||||
&run_command($command, "Error moving source RPM!");
|
||||
|
||||
@ -198,19 +200,6 @@ $command.= " $RPMDIR/$RPMARCH/MySQL*$VERSION*.$RPMARCH.rpm $PWD";
|
||||
&logger("Moving binary RPMs to current dir.");
|
||||
&run_command($command, "Error moving binary RPMs!");
|
||||
|
||||
#
|
||||
# Clean up
|
||||
#
|
||||
if ($opt_clean)
|
||||
{
|
||||
&logger("Removing spec file and source package");
|
||||
unless ($opt_dry_run)
|
||||
{
|
||||
unlink("$SPECDIR/" . basename($SPECFILE));
|
||||
unlink("$SOURCEDIR/$SOURCEFILE");
|
||||
}
|
||||
}
|
||||
|
||||
&logger("SUCCESS: RPM files successfully created.") unless ($opt_dry_run);
|
||||
exit 0;
|
||||
|
||||
|
124
Build-tools/Do-win-build
Executable file
124
Build-tools/Do-win-build
Executable file
@ -0,0 +1,124 @@
|
||||
#!/usr/bin/perl -w
|
||||
|
||||
use Getopt::Long;
|
||||
|
||||
$opt_help=0;
|
||||
$opt_tarball=$opt_builddir=$opt_suffix="";
|
||||
|
||||
GetOptions(
|
||||
"help",
|
||||
"tarball=s",
|
||||
"builddir=s",
|
||||
"suffix=s"
|
||||
) || print_help();
|
||||
|
||||
print_help() if ($opt_help);
|
||||
|
||||
chomp($MSDEV=`which msdev`);
|
||||
|
||||
if (!$opt_builddir) {
|
||||
$opt_builddir = "/cygdrive/c/mysql-win-build";
|
||||
}
|
||||
|
||||
$opt_tarball =~ /(mysql[^\/]*)-win-src\.tar/;
|
||||
$mysqlver=$1;
|
||||
$basedir = "$opt_builddir/$mysqlver";
|
||||
$scriptdir = `pwd`;
|
||||
|
||||
# Make sure build dir exists
|
||||
mkdir($opt_builddir);
|
||||
# Clean out any previous build
|
||||
system("rm -rf $basedir");
|
||||
|
||||
# Unpack in the script directory
|
||||
system("tar -zxvf $opt_tarball");
|
||||
# Move to the build directory
|
||||
system("mv $mysqlver $opt_builddir");
|
||||
|
||||
if (!chdir($basedir))
|
||||
{
|
||||
print "Do-win-build error: Could not change to $basedir";
|
||||
exit 1;
|
||||
}
|
||||
|
||||
# Check whether this is a classic edition build
|
||||
if ($opt_suffix =~ /-classic/)
|
||||
{
|
||||
# Blank out ha_innodb.cpp
|
||||
chmod 0644, 'sql/ha_innodb.cpp';
|
||||
open(OUT, '>', 'sql/ha_innodb.cpp');
|
||||
close(OUT);
|
||||
|
||||
# Remove HAVE_INNOBASE_DB from the requisite project files
|
||||
for $dspfile ('libmysqld/libmysqld.dsp', 'mysqldemb/mysqldemb.dsp', 'mysqlserver/mysqlserver.dsp', 'sql/mysqld.dsp', 'sql/mysqldmax.dsp')
|
||||
{
|
||||
open(IN, '<', $dspfile);
|
||||
open(OUT, '>', "$dspfile.tmp");
|
||||
while (readline IN)
|
||||
{
|
||||
s/\D \"HAVE_INNOBASE_DB\" //g;
|
||||
print OUT $_;
|
||||
}
|
||||
close(IN);
|
||||
close(OUT);
|
||||
unlink $dspfile;
|
||||
rename "$dspfile.tmp", $dspfile;
|
||||
}
|
||||
}
|
||||
|
||||
# Perform compilation
|
||||
system("\"$MSDEV\" mysql.dsw /MAKE \"ALL\" /OUT $mysqlver-build.log");
|
||||
|
||||
# Package binary
|
||||
system("./scripts/make_win_binary_distribution --suffix=$opt_suffix");
|
||||
|
||||
# Copy log back to script directory
|
||||
system("cp $mysqlver$suffix-build.log $scriptdir");
|
||||
|
||||
# Move binary package to script directory
|
||||
system("mv *.zip $scriptdir");
|
||||
|
||||
#
|
||||
# Print a help text message
|
||||
#
|
||||
sub print_help
|
||||
{
|
||||
print <<EOF;
|
||||
Usage: Do-compile-win [options] source-tarball
|
||||
|
||||
Unpacks a Windows source distribution on the local machine and
|
||||
compiles it using VC++ 6.0.
|
||||
|
||||
This script is intended for Cygwin Perl. You must have a working
|
||||
MSDEV.EXE in your path for compilation, as well as the following:
|
||||
|
||||
sed
|
||||
tar (GNU tar)
|
||||
which
|
||||
|
||||
|
||||
Options:
|
||||
|
||||
--help
|
||||
Print this text.
|
||||
|
||||
--builddir=<dir>
|
||||
Set the Cygwin path to build under; the tarball will actually
|
||||
be moved to <builddir>/mysql-<version>/tarball and extracted under
|
||||
<builddir>/mysql-<version>/build.
|
||||
Default: /cygdrive/c/mysql-win-build
|
||||
|
||||
--suffix=<suffix>
|
||||
If specified, the resulting binary will have the specified suffix
|
||||
in its name. If the suffix is "-classic", the project files will
|
||||
be stripped of all occurrences of HAVE_INNOBASE_DB and
|
||||
ha_innodb.cpp will be blanked out, to create classic edition
|
||||
server binaries.
|
||||
|
||||
--tarball=<file>
|
||||
Windows source tarball to use for this build. Must be of the form
|
||||
mysql[com]-x.x.x-win-src.tar.gz (REQUIRED)
|
||||
|
||||
EOF
|
||||
exit 1;
|
||||
}
|
@ -101,8 +101,12 @@ sub main
|
||||
unlink("$destdir/PUBLIC", "$destdir/README");
|
||||
copy("$WD/Docs/MySQLEULA.txt", "$destdir");
|
||||
|
||||
# remove readline subdir
|
||||
`rm -rf $destdir/cmd-line-utils/readline`;
|
||||
# remove readline subdir and update configure accordingly
|
||||
system("rm -rf $destdir/cmd-line-utils/readline");
|
||||
unlink ("$destdir/configure") or die "Can't delete $destdir/configure: $!\n";
|
||||
`(cd $destdir ; sed -e 's!\ cmd-line-utils\/readline\/Makefile\ dnl!!g' < configure.in > configure.in.new)`;
|
||||
rename ("$destdir/configure.in.new","$destdir/configure.in") or die "Can't rename $destdir/configure.in.new: $!\n";;
|
||||
`(cd $destdir ; autoconf)`;
|
||||
|
||||
# fix file copyrights
|
||||
&fix_usage_copyright();
|
||||
|
0
Docs/README.1st
Executable file → Normal file
0
Docs/README.1st
Executable file → Normal file
38699
Docs/manual.ja.texi
38699
Docs/manual.ja.texi
File diff suppressed because it is too large
Load Diff
@ -1,9 +0,0 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Place holder for manual_toc.html</title>
|
||||
</head>
|
||||
<body>
|
||||
This is just a place holder for the autogenerated manual_toc.html
|
||||
to make "make dist" happy.
|
||||
</body>
|
||||
</html>
|
@ -1,880 +0,0 @@
|
||||
@c FIX AGL 20011108 Extracted from manual.texi.
|
||||
@c Contains links to MySQL related info (books, articles). To web portals!
|
||||
|
||||
|
||||
@node MySQL-Books, General-SQL, Questions, MySQL Information Sources
|
||||
@subsection Books About MySQL
|
||||
|
||||
For the latest book information, with user comments, please visit
|
||||
@uref{http://www.mysql.com/portal/books/html/}.
|
||||
|
||||
While this manual is still the right place for up to date technical
|
||||
information, its primary goal is to contain everything there is to know
|
||||
about MySQL. It is sometimes nice to have a bound book to read
|
||||
in bed or while you travel. Here is a list of books about MySQL and
|
||||
related subjects (in English).
|
||||
|
||||
By purchasing a book through these hyperlinks provided herein, you are
|
||||
contributing to the development of MySQL.
|
||||
|
||||
@emph{MySQL}
|
||||
@multitable @columnfractions .3 .7
|
||||
@item Available @tab @uref{http://service.bfast.com/bfast/click?bfmid=2181&sourceid=34233559&bfpid=0735709211&bfmtype=book} (Barnes and Noble)
|
||||
@item Publisher @tab New Riders
|
||||
@item Author @tab Paul DuBois
|
||||
@item Pub Date @tab 1st Edition December 1999
|
||||
@item ISBN @tab 0735709211
|
||||
@item Pages @tab 800
|
||||
@item Price @tab $49.99 US
|
||||
@item Downloadable examples @tab
|
||||
@uref{http://www.kitebird.com/mysql-book/} (@code{samp_db} distribution)
|
||||
@item Errata @tab
|
||||
@uref{http://www.kitebird.com/mysql-book/errata.html}
|
||||
@end multitable
|
||||
|
||||
Foreword by Michael ``Monty'' Widenius, MySQL Moderator.
|
||||
@*
|
||||
|
||||
In @emph{MySQL}, Paul DuBois provides you with a comprehensive guide to
|
||||
one of the most popular relational database systems. Paul has
|
||||
contributed to the online documentation for MySQL and is an
|
||||
active member of the MySQL community. The principal MySQL
|
||||
developer, Monty Widenius, and a network of his fellow developers
|
||||
reviewed the manuscript, and provided Paul with the kind of insight
|
||||
no one else could supply.
|
||||
@*
|
||||
|
||||
Instead of merely giving you a general overview of MySQL, Paul
|
||||
teaches you how to make the most of its capabilities. Through two
|
||||
sample database applications that run throughout the book, he
|
||||
gives you solutions to problems you're sure to face. He helps you
|
||||
integrate MySQL efficiently with third-party tools, such as PHP
|
||||
and Perl, enabling you to generate dynamic Web pages through
|
||||
database queries. He teaches you to write programs that access
|
||||
MySQL databases, and also provides a comprehensive set of
|
||||
references to column types, operators, functions, SQL syntax,
|
||||
MySQL programming, C API, Perl @code{DBI}, and PHP API.
|
||||
@emph{MySQL} simply gives you the kind of information you won't find
|
||||
anywhere else.
|
||||
@*
|
||||
|
||||
If you use MySQL, this book provides you with:
|
||||
@itemize @bullet
|
||||
@item
|
||||
An introduction to MySQL and SQL.
|
||||
@item
|
||||
Coverage of MySQL's data types and how to use them.
|
||||
@item
|
||||
Thorough treatment of how to write client programs in C.
|
||||
@item
|
||||
A guide to using the Perl @code{DBI} and PHP APIs for developing
|
||||
command-line and Web-based applications.
|
||||
@item
|
||||
Tips on administrative issues such as user accounts, backup,
|
||||
crash recovery, and security.
|
||||
@item
|
||||
Help in choosing an ISP for MySQL access.
|
||||
@item
|
||||
A comprehensive reference for MySQL's data types, operators,
|
||||
functions, and SQL statements and utilities.
|
||||
@item
|
||||
Complete reference guides for MySQL's C API, the Perl @code{DBI} API,
|
||||
and PHP's MySQL-related functions.
|
||||
@end itemize
|
||||
@*
|
||||
|
||||
@emph{MySQL & mSQL}
|
||||
@multitable @columnfractions .3 .7
|
||||
@item Available @tab @uref{http://service.bfast.com/bfast/click?bfmid=2181&sourceid=34233559&bfpid=1565924347&bfmtype=book} (Barnes and Noble)
|
||||
@item Publisher @tab O'Reilly
|
||||
@item Authors @tab Randy Jay Yarger, George Reese & Tim King
|
||||
@item Pub Date @tab 1st Edition July 1999
|
||||
@item ISBN @tab 1-56592-434-7, Order Number: 4347
|
||||
@item Pages @tab 506
|
||||
@item Price @tab $34.95
|
||||
@end multitable
|
||||
|
||||
This book teaches you how to use MySQL and @code{mSQL}, two popular
|
||||
and robust database products that support key subsets of SQL on both Linux
|
||||
and Unix systems. Anyone who knows basic C, Java, Perl, or Python can
|
||||
write a program to interact with a database, either as a stand-alone
|
||||
application or through a Web page. This book takes you through the
|
||||
whole process, from installation and configuration to programming
|
||||
interfaces and basic administration. Includes plenty of tutorial
|
||||
material.
|
||||
@*
|
||||
|
||||
@emph{Sams' Teach Yourself MySQL in 21 Days}
|
||||
@multitable @columnfractions .3 .7
|
||||
@item Available @tab @uref{http://service.bfast.com/bfast/click?bfmid=2181&sourceid=34233559&bfpid=0672319144&bfmtype=book} (Barnes and Noble)
|
||||
@item Publisher @tab Sams
|
||||
@item Authors @tab Mark Maslakowski and Tony Butcher
|
||||
@item Pub Date @tab June 2000
|
||||
@item ISBN @tab 0672319144
|
||||
@item Pages @tab 650
|
||||
@item Price @tab $39.99
|
||||
@end multitable
|
||||
|
||||
Sams' @emph{Teach Yourself MySQL in 21 Days} is for intermediate Linux users
|
||||
who want to move into databases. A large share of the audience is Web
|
||||
developers who need a database to store large amounts of information that
|
||||
can be retrieved via the Web.
|
||||
|
||||
Sams' @emph{Teach Yourself MySQL in 21 Days} is a practical, step-by-step
|
||||
tutorial. The reader will learn to design and employ this open source
|
||||
database technology into his or her website using practical, hands-on
|
||||
examples to follow.
|
||||
@*
|
||||
|
||||
@emph{E-Commerce Solutions with MySQL}
|
||||
@multitable @columnfractions .3 .7
|
||||
@item Available @tab @uref{http://service.bfast.com/bfast/click?bfmid=2181&sourceid=34233559&bfpid=0761524452&bfmtype=book} (Barnes and Noble)
|
||||
@item Publisher @tab Prima Communications, Inc.
|
||||
@item Authors @tab N/A
|
||||
@item Pub Date @tab January 2000
|
||||
@item ISBN @tab 0761524452
|
||||
@item Pages @tab 500
|
||||
@item Price @tab $39.99
|
||||
@end multitable
|
||||
|
||||
No description available.
|
||||
@*
|
||||
|
||||
@emph{MySQL and PHP from Scratch}
|
||||
@multitable @columnfractions .3 .7
|
||||
@item Available @tab @uref{http://service.bfast.com/bfast/click?bfmid=2181&sourceid=34233559&bfpid=0789724405&bfmtype=book} (Barnes and Noble)
|
||||
@item Publisher @tab Que
|
||||
@item Authors @tab N/A
|
||||
@item Pub Date @tab September 2000
|
||||
@item ISBN @tab 0789724405
|
||||
@item Pages @tab 550
|
||||
@item Price @tab $34.99
|
||||
@end multitable
|
||||
|
||||
This book puts together information on installing, setting up, and
|
||||
troubleshooting Apache, MySQL, PHP3, and IMP into one complete
|
||||
volume. You also learn how each piece is part of a whole by learning,
|
||||
step-by-step, how to create a web-based e-mail system. Learn to run
|
||||
the equivalent of Active Server Pages (ASP) using PHP3, set up an
|
||||
e-commerce site using a database and the Apache web server, and create
|
||||
a data entry system (such as sales, product quality tracking, customer
|
||||
preferences, etc) that no installation in the PC.
|
||||
@*
|
||||
|
||||
@emph{Professional MySQL Programming}
|
||||
@multitable @columnfractions .3 .7
|
||||
@item Available @tab @uref{http://shop.barnesandnoble.com/bookSearch/isbnInquiry.asp?isbn=1861005164} (Barnes and Noble)
|
||||
@item Publisher @tab Wrox Press, Inc.
|
||||
@item Authors @tab N/A
|
||||
@item Pub Date @tab Late 2001
|
||||
@item ISBN @tab 1861005164
|
||||
@item Pages @tab 1000
|
||||
@item Price @tab $49.99
|
||||
@end multitable
|
||||
|
||||
No description available.
|
||||
@*
|
||||
|
||||
@emph{Professional Linux Programming}
|
||||
@multitable @columnfractions .3 .7
|
||||
@item Available @tab @uref{http://service.bfast.com/bfast/click?bfmid=2181&sourceid=34233559&bfpid=1861003013&bfmtype=book} (Barnes and Noble)
|
||||
@item Publisher @tab Wrox Press, Inc.
|
||||
@item Authors @tab N/A
|
||||
@item Pub Date @tab September 2000
|
||||
@item ISBN @tab 1861003013
|
||||
@item Pages @tab 1155
|
||||
@item Price @tab $47.99
|
||||
@end multitable
|
||||
|
||||
In this follow-up to the best-selling @emph{Beginning Linux Programming},
|
||||
you will learn from the authors' real-world knowledge and experience of
|
||||
developing software for Linux; you'll be taken through the development
|
||||
of a sample 'DVD Store' application, with 'theme' chapters addressing
|
||||
different aspects of its implementation. Meanwhile, individual
|
||||
``take-a-break'' chapters cover important topics that go beyond the
|
||||
bounds of the central theme. All focus on the practical aspects of
|
||||
programming, showing how crucial it is to choose the right tools for
|
||||
the job, use them as they should be used, and get things right first
|
||||
time.
|
||||
@*
|
||||
|
||||
@emph{PHP and MySQL Web Development}
|
||||
@multitable @columnfractions .3 .7
|
||||
@item Available @tab @uref{http://service.bfast.com/bfast/click?bfmid=2181&sourceid=34233559&bfpid=0672317842&bfmtype=book} (Barnes and Noble)
|
||||
@item Publisher @tab Sams
|
||||
@item Authors @tab Luke Welling, Laura Thomson
|
||||
@item Pub Date @tab March 2001
|
||||
@item ISBN @tab 0672317842
|
||||
@item Pages @tab 700
|
||||
@item Price @tab $49.99
|
||||
@end multitable
|
||||
|
||||
@emph{PHP and MySQL Web Development} introduces you to the advantages
|
||||
of implementing both MySQL and PHP. These advantages are detailed
|
||||
through the provision of both statistics and several case studies. A
|
||||
practical web application is developed throughout the book, providing
|
||||
you with the tools necessary to implement a functional online
|
||||
database. Each function is developed separately, allowing you the
|
||||
choice to incorporate only those parts that you would like to
|
||||
implement. Programming concepts of the PHP language are highlighted,
|
||||
including functions which tie MySQL support into a PHP script and
|
||||
advanced topics regarding table manipulation.
|
||||
@*
|
||||
|
||||
@strong{Books recommended by the MySQL Developers}
|
||||
|
||||
@emph{SQL-99 Complete, Really}
|
||||
@multitable @columnfractions .3 .7
|
||||
@item Available @tab @uref{http://service.bfast.com/bfast/click?bfmid=2181&sourceid=34233559&bfpid=0879305681&bfmtype=book} (Barnes and Noble)
|
||||
@item Publisher @tab CMP Books
|
||||
@item Authors @tab Peter Gulutzan, Trudy Pelzer
|
||||
@item Pub Date @tab April 1999
|
||||
@item ISBN @tab 0879305681
|
||||
@item Pages @tab 1104
|
||||
@item Price @tab $55.96
|
||||
@end multitable
|
||||
|
||||
This book contains complete descriptions of the new standards for
|
||||
syntax, data structures, and retrieval processes of SQL databases. As
|
||||
an example-based reference manual, it includes all of the CLI
|
||||
functions, information, schema tables, and status codes, as well as a
|
||||
working SQL database provided on the companion disk.
|
||||
@*
|
||||
|
||||
@emph{C, A reference manual}
|
||||
@multitable @columnfractions .3 .7
|
||||
@item Available @tab @uref{http://service.bfast.com/bfast/click?bfmid=2181&sourceid=34233559&bfpid=0133262243&bfmtype=book} (Barnes and Noble)
|
||||
@item Publisher @tab Prentice Hall
|
||||
@item Authors @tab Samuel P. Harbison, Guy L. Steele
|
||||
@item Pub Date @tab September 1994
|
||||
@item ISBN @tab 0133262243
|
||||
@item Pages @tab 480
|
||||
@item Price @tab $35.99
|
||||
@end multitable
|
||||
|
||||
A new and improved revision of the bestselling C language
|
||||
reference. This manual introduces the notion of "Clean C", writing C
|
||||
code that can be compiled as a C++ program, C programming style that
|
||||
emphasizes correctness, portability, maintainability, and
|
||||
incorporates the ISO C Amendment 1 (1994) which specifies new
|
||||
facilities for writing portable, international programs in C.
|
||||
@*
|
||||
|
||||
@emph{C++ for Real Programmers}
|
||||
@multitable @columnfractions .3 .7
|
||||
@item Available @tab @uref{http://service.bfast.com/bfast/click?bfmid=2181&sourceid=34233559&bfpid=0120499428&bfmtype=book} (Barnes and Noble)
|
||||
@item Publisher @tab Academic Press, Incorporated
|
||||
@item Authors @tab Jeff Alger, Jim Keogh
|
||||
@item Pub Date @tab February 1998
|
||||
@item ISBN @tab 0120499428
|
||||
@item Pages @tab 388
|
||||
@item Price @tab $39.95
|
||||
@end multitable
|
||||
|
||||
@emph{C++ For Real Programmers} bridges the gap between C++ as described
|
||||
in beginner and intermediate-level books and C++ as it is practiced by
|
||||
experts. Numerous valuable techniques are described, organised into
|
||||
three simple themes: indirection, class hierarchies, and memory
|
||||
management. It also provides in-depth coverage of template creation,
|
||||
exception handling, pointers and optimisation techniques. The focus of
|
||||
the book is on ANSI C++ and, as such, is compiler independent.
|
||||
|
||||
@emph{C++ For Real Programmers} is a revision of
|
||||
@emph{Secrets of the C++ Masters} and includes a new appendix comparing C++
|
||||
with Java. The book comes with a 3.5" disk for Windows with source code.
|
||||
@*
|
||||
|
||||
@emph{Algorithms in C}
|
||||
@multitable @columnfractions .3 .7
|
||||
@item Available @tab @uref{http://service.bfast.com/bfast/click?bfmid=2181&sourceid=34233559&bfpid=0201514257&bfmtype=book} (Barnes and Noble)
|
||||
@item Publisher @tab Addison Wesley Longman, Inc.
|
||||
@item Authors @tab Robert Sedgewick
|
||||
@item Pub Date @tab April 1990
|
||||
@item ISBN @tab 0201514257
|
||||
@item Pages @tab 648
|
||||
@item Price @tab $45.75
|
||||
@end multitable
|
||||
|
||||
@emph{Algorithms in C} describes a variety of algorithms in a number of
|
||||
areas of interest, including: sorting, searching, string-processing, and
|
||||
geometric, graph and mathematical algorithms. The book emphasizes
|
||||
fundamental techniques, providing readers with the tools to confidently
|
||||
implement, run, and debug useful algorithms.
|
||||
@*
|
||||
|
||||
@emph{Multithreaded Programming with Pthreads}
|
||||
@multitable @columnfractions .3 .7
|
||||
@item Available @tab @uref{http://service.bfast.com/bfast/click?bfmid=2181&sourceid=34233559&bfpid=0136807291&bfmtype=book} (Barnes and Noble)
|
||||
@item Publisher @tab Prentice Hall
|
||||
@item Authors @tab Bil Lewis, Daniel J. Berg
|
||||
@item Pub Date @tab October 1997
|
||||
@item ISBN @tab 0136807291
|
||||
@item Pages @tab 432
|
||||
@item Price @tab $34.95
|
||||
@end multitable
|
||||
|
||||
Based on the best-selling @emph{Threads Primer},
|
||||
@emph{Multithreaded Programming with Pthreads} gives you a solid
|
||||
understanding of Posix threads: what they are, how they work, when to use
|
||||
them, and how to optimise them. It retains the clarity and humor of
|
||||
@emph{Threads Primer}, but includes expanded comparisons to Win32 and OS/2
|
||||
implementations. Code examples tested on all of the major UNIX platforms
|
||||
are featured along with detailed explanations of how and why they use threads.
|
||||
@*
|
||||
|
||||
@emph{Programming the PERL DBI: Database Programming with PERL}
|
||||
@multitable @columnfractions .3 .7
|
||||
@item Available @tab @uref{http://service.bfast.com/bfast/click?bfmid=2181&sourceid=34233559&bfpid=1565926994&bfmtype=book} (Barnes and Noble)
|
||||
@item Publisher @tab O'Reilly & Associates, Incorporated
|
||||
@item Authors @tab Alligator Descartes, Tim Bunce
|
||||
@item Pub Date @tab February 2000
|
||||
@item ISBN @tab 1565926994
|
||||
@item Pages @tab 400
|
||||
@item Price @tab $27.96
|
||||
@end multitable
|
||||
|
||||
@emph{Programming the Perl DBI} is coauthored by Alligator Descartes, one
|
||||
of the most active members of the DBI community, and by Tim Bunce, the
|
||||
inventor of DBI. For the uninitiated, the book explains the architecture
|
||||
of DBI and shows you how to write DBI-based programs. For the experienced
|
||||
DBI dabbler, this book explains DBI's nuances and the peculiarities of each
|
||||
individual DBD.
|
||||
|
||||
The book includes:
|
||||
@itemize @bullet
|
||||
@item
|
||||
An introduction to DBI and its design.
|
||||
@item
|
||||
How to construct queries and bind parameters.
|
||||
@item
|
||||
Working with database, driver, and statement handles.
|
||||
@item
|
||||
Debugging techniques.
|
||||
@item
|
||||
Coverage of each existing DBD.
|
||||
@item
|
||||
A complete reference to DBI.
|
||||
@end itemize
|
||||
@*
|
||||
|
||||
|
||||
@node General-SQL, Useful Links, MySQL-Books, MySQL Information Sources
|
||||
@subsection General SQL Information and Tutorials
|
||||
|
||||
The MySQL book portal is split into different sections to make it easy
|
||||
to locate books for various purposes.
|
||||
@uref{http://www.mysql.com/portal/books/html/}
|
||||
|
||||
Tutorials can be found at:
|
||||
@uref{http://www.mysql.com/portal/development/html/development-61-1.html}
|
||||
|
||||
@node Useful Links, , General-SQL, MySQL Information Sources
|
||||
@subsection Useful MySQL-related Links
|
||||
|
||||
The MySQL development portal is the ultimate source of MySQL related
|
||||
links. @uref{http://www.mysql.com/portal/development/html/}
|
||||
|
||||
Apart from the following links, you can find and download a lot of
|
||||
MySQL programs, tools and APIs in the Contrib directory
|
||||
(@uref{http://www.mysql.com/Downloads/Contrib/}).
|
||||
@cindex @code{Contrib} directory
|
||||
|
||||
@cindex URLs to MySQL information
|
||||
@cindex MySQL related information URLs
|
||||
@subheading Tutorials and Manuals
|
||||
|
||||
@table @asis
|
||||
@item @uref{http://michael.bacarella.com/research/mysqlmyths.html} (MySQL Myths Debunked)
|
||||
MySQL used in the real world.
|
||||
|
||||
@item @uref{http://www.4t2.com/mysql/}
|
||||
Information about the German MySQL mailing list.
|
||||
|
||||
@item @uref{http://www2.rent-a-database.de/mysql/}
|
||||
MySQL handbook in German.
|
||||
|
||||
@item @uref{http://www.bitmover.com:8888/home/bk/mysql/}
|
||||
Web access to the MySQL BitKeeper repository.
|
||||
|
||||
@item @uref{http://www.analysisandsolutions.com/code/mybasic.htm}
|
||||
Beginners MySQL Tutorial on how to install and set up
|
||||
MySQL on a Windows machine.
|
||||
|
||||
@item @uref{http://www.devshed.com/Server_Side/MySQL/}
|
||||
A lot of MySQL tutorials.
|
||||
|
||||
@item @uref{http://mysql.hitstar.com/}
|
||||
MySQL manual in Chinese.
|
||||
|
||||
@item @uref{http://www.linuxplanet.com/linuxplanet/tutorials/1046/1/}
|
||||
Setting Up a MySQL-based website.
|
||||
|
||||
@item @uref{http://www.hotwired.com/webmonkey/backend/tutorials/tutorial1.html}
|
||||
MySQL-Perl tutorial.
|
||||
|
||||
@item @uref{http://www.iserver.com/support/contrib/perl5/modules.html}
|
||||
Installing new Perl modules that require locally installed modules.
|
||||
|
||||
@item @uref{http://www.hotwired.com/webmonkey/databases/tutorials/tutorial4.html}
|
||||
PHP/MySQL Tutorial.
|
||||
|
||||
@item @uref{http://www.useractive.com/}
|
||||
Hands on tutorial for MySQL.
|
||||
@end table
|
||||
|
||||
@subheading MySQL Discussion Forums
|
||||
|
||||
@table @asis
|
||||
@item @uref{http://www.weberdev.com/}
|
||||
Examples using MySQL; (check Top 20)
|
||||
|
||||
@item @uref{http://futurerealm.com/forum/futureforum.htm}
|
||||
FutureForum Web Discussion Software.
|
||||
@end table
|
||||
|
||||
@subheading Porting MySQL/Using MySQL on Different Systems
|
||||
|
||||
@table @asis
|
||||
@item @uref{http://www.entropy.ch/software/macosx/mysql/}
|
||||
Binary of MySQL for Mac OS X Client. Includes information of how to
|
||||
build and use MySQL on Mac OS X.
|
||||
|
||||
@item @uref{http://xclave.macnn.com/MySQL/}
|
||||
The Mac OS Xclave. Running MySQL on Mac OS X.
|
||||
|
||||
@item @uref{http://www.prnet.de/RegEx/mysql.html}
|
||||
MySQL for Mac OS X Server.
|
||||
|
||||
@item @uref{http://www.latencyzero.com/macosx/mysql.html}
|
||||
Building MySQL for Mac OS X.
|
||||
|
||||
@item @uref{http://www.essencesw.com/Software/mysqllib.html}
|
||||
New Client libraries for the Mac OS Classic (Macintosh).
|
||||
|
||||
@item @uref{http://www.lilback.com/macsql/}
|
||||
Client libraries for Mac OS Classic (Macintosh).
|
||||
|
||||
@item @uref{http://sixk.maniasys.com/index_en.html}
|
||||
MySQL for Amiga
|
||||
@end table
|
||||
|
||||
@subheading Perl-related Links
|
||||
|
||||
@table @asis
|
||||
@item @uref{http://dbimysql.photoflux.com/}
|
||||
Perl DBI with MySQL FAQ.
|
||||
@end table
|
||||
|
||||
@c FIX We should get longer descriptions for things in this category!
|
||||
@subheading Commercial Applications that Support MySQL
|
||||
|
||||
@table @asis
|
||||
@item @uref{http://www.supportwizard.com/}
|
||||
SupportWizard; Interactive helpdesk on the Web. This product includes a
|
||||
licensed copy of MySQL.
|
||||
|
||||
@item @uref{http://www.sonork.com/}
|
||||
Sonork, Instant Messenger that is not only Internet oriented. It's
|
||||
focused on private networks and on small to medium companies. Client
|
||||
is free, server is free for up to 5 seats.
|
||||
|
||||
@item @uref{http://www.stweb.org/}
|
||||
StWeb - Stratos Web and Application server - An easy-to-use, cross
|
||||
platform, Internet/Intranet development and deployment system for
|
||||
development of web-enabled applications. The standard version of StWeb
|
||||
has a native interface to MySQL database.
|
||||
|
||||
@item @uref{http://www.rightnowtech.com/}
|
||||
Right Now Web; Web automation for customer service.
|
||||
|
||||
@item @uref{http://www.icaap.org/Bazaar/}
|
||||
Bazaar; Interactive Discussion Forums with Web interface.
|
||||
|
||||
@cindex PhoneSweep
|
||||
@item @uref{http://www.phonesweep.com/}
|
||||
PhoneSweepT is the world's first commercial Telephone Scanner. Many break-ins
|
||||
in recent years have come not through the Internet, but through unauthorised
|
||||
dial-up modems. PhoneSweep lets you find these modems by repeatedly placing
|
||||
phone calls to every phone number that your organisation
|
||||
controls. PhoneSweep has a built-in expert system that can recognise
|
||||
more than 250 different kinds of remote-access programs, including
|
||||
Carbon Copy(TM), pcANYWHERE(TM), and Windows NT RAS. All information is stored
|
||||
in the SQL database. It then generates a comprehensive report detailing
|
||||
which services were discovered on which dial-up numbers in your organisation.
|
||||
@end table
|
||||
|
||||
@subheading SQL Clients and Report Writers
|
||||
|
||||
@table @asis
|
||||
@item @uref{http://www.urbanresearch.com/software/utils/urbsql/} (urSQL)
|
||||
SQL Editor and Query Utility. Custom syntax highlighting, editable
|
||||
results grid, exportable result-sets, basic MySQL admin functions,
|
||||
Etc.. For Windows.
|
||||
|
||||
@item @uref{http://www.edatanew.com/} (MySQL Data Manager)
|
||||
MySQL Data Manager * is platform independent web client
|
||||
(written in perl) for MySQL server over TCP/IP.
|
||||
|
||||
@item @uref{http://ksql.sourceforge.net/}
|
||||
KDE MySQL client.
|
||||
|
||||
@item @uref{http://www.ecker-software.de/}
|
||||
A Windows GUI client by David Ecker.
|
||||
|
||||
@item @uref{http://www.icaap.org/software/kiosk/}
|
||||
Kiosk; a MySQL client for database management. Written in Perl.
|
||||
Will be a part of Bazaar.
|
||||
|
||||
@item @uref{http://www.casestudio.com/}
|
||||
Db design tool that supports MySQL 3.23.
|
||||
|
||||
@item @uref{http://home.skif.net/~voland/zeos/eng/}
|
||||
Zeos - A client that supports MySQL, Interbase and PostgreSQL.
|
||||
|
||||
@item @uref{http://www.geocities.com/SiliconValley/Ridge/4280/GenericReportWriter/grwhome.html}
|
||||
A free report writer in Java
|
||||
|
||||
@item @uref{http://www.javaframework.de/}
|
||||
MySQLExport - Export of MySQL create statements and data in a lot of
|
||||
different formats (SQL, HTML, CVS, text, ZIP, GZIP...).
|
||||
|
||||
@item @uref{http://dlabs.4t2.com/}
|
||||
M2D, a MySQL Administration client for Windows. M2D supports
|
||||
administration of MySQL databases, creation of new databases and
|
||||
tables, editing, and more.
|
||||
|
||||
@item @uref{http://dlabs.4t2.com/}
|
||||
Dexter, a small server written in Perl which can be used as a proxy server for
|
||||
MySQL or as a database extender.
|
||||
|
||||
@item @uref{http://www.scibit.com/Products/Software/Utils/Mascon.asp}
|
||||
Mascon is a powerful Win32 GUI for administering MySQL databases.
|
||||
|
||||
@item @uref{http://www.rtlabs.com/}
|
||||
MacSQL Monitor. GUI for MySQL, ODBC, and JDBC databases for the Mac OS.
|
||||
@end table
|
||||
|
||||
@subheading Distributions that Include MySQL
|
||||
|
||||
@c FIX add the rest (at least a couple more Linuxes)
|
||||
|
||||
@table @asis
|
||||
@item @uref{http://www.suse.com/}
|
||||
SuSE Linux (6.1 and above)
|
||||
|
||||
@item @uref{http://www.redhat.com/}
|
||||
RedHat Linux (7.0 and above)
|
||||
|
||||
@item @uref{http://distro.conectiva.com.br/}
|
||||
Conectiva Linux (4.0 and above)
|
||||
@end table
|
||||
|
||||
@subheading Web Development Tools that Support MySQL
|
||||
|
||||
@table @asis
|
||||
@item @uref{http://www.php.net/}
|
||||
PHP: A server-side HTML-embedded scripting language.
|
||||
|
||||
@item @uref{http://www.midgard-project.org/}
|
||||
The Midgard Application Server; a powerful Web development environment
|
||||
based on MySQL and PHP.
|
||||
|
||||
@cindex dbServ
|
||||
@item @uref{http://www.dbServ.de/}
|
||||
dbServ is an extension to a web server to integrate database output into
|
||||
your HTML code. You may use any HTML function in your output. Only the
|
||||
client will stop you. It works as standalone server or as Java servlet.
|
||||
|
||||
@item @uref{http://www.chilisoft.com/}
|
||||
Platform independent ASP from Chili!Soft
|
||||
|
||||
@item @uref{http://www.voicenet.com/~zellert/tjFM/}
|
||||
A JDBC driver for MySQL.
|
||||
|
||||
@item @uref{http://www.wernhart.priv.at/php/}
|
||||
MySQL + PHP demos.
|
||||
|
||||
@item @uref{http://www.dbwww.com/}
|
||||
ForwardSQL: HTML interface to manipulate MySQL databases.
|
||||
|
||||
@item @uref{http://www.daa.com.au/~james/www-sql/}
|
||||
WWW-SQL: Display database information.
|
||||
|
||||
@item @uref{http://www.heitml.com/}
|
||||
HeiTML: A server-side extension of HTML and a 4GL language at the same time.
|
||||
|
||||
@item @uref{http://hawkeye.net/}
|
||||
Hawkeye Internet Server Suite.
|
||||
|
||||
@item @uref{http://www.webgroove.com/}
|
||||
WebGroove Script: HTML compiler and server-side scripting language.
|
||||
|
||||
@item @uref{http://www.ihtml.com/}
|
||||
A server-side website scripting language.
|
||||
|
||||
@item @uref{ftp://ftp.igc.apc.org/pub/myodbc/README}
|
||||
How to use MySQL with ColdFusion on Solaris.
|
||||
|
||||
@item @uref{http://calistra.com/MySQL/}
|
||||
Calistra's ODBC MySQL Administrator.
|
||||
|
||||
@item @uref{http://phpclub.net/}
|
||||
PHPclub - Tips and tricks for PHP.
|
||||
|
||||
@item @uref{http://www.widgetchuck.com/}
|
||||
The Widgetchuck; Website Tools and Gadgets
|
||||
|
||||
@item @uref{http://www.adcycle.com/}
|
||||
AdCycle - advertising management software.
|
||||
|
||||
@cindex pwPage
|
||||
@item @uref{http://sourceforge.net/projects/pwpage/}
|
||||
pwPage - provides an extremely fast and simple approach to the creation
|
||||
of database forms. That is, if a database table exists and an HTML page
|
||||
has been constructed using a few simple guidelines, pwPage can be
|
||||
immediately used for table data selections, insertions, updates, deletions
|
||||
and selectable table content reviewing.
|
||||
|
||||
@item @uref{http://www.omnis-software.com/products/studio/studio.html}
|
||||
OMNIS Studio is a rapid application development (RAD) tool.
|
||||
@end table
|
||||
|
||||
@subheading Database Design Tools with MySQL Support
|
||||
|
||||
@table @asis
|
||||
@item @uref{http://www.mysql.com/documentation/dezign/}
|
||||
"DeZign for databases" is a database development tool that uses an
|
||||
entity relationship diagram (ERD).
|
||||
@end table
|
||||
|
||||
@subheading Web Servers with MySQL Tools
|
||||
|
||||
@table @asis
|
||||
@item @uref{ftp://ftp.kcilink.com/pub/}
|
||||
mod_auth_mysql, An Apache authentication module.
|
||||
|
||||
@item @uref{http://www.roxen.com/}
|
||||
The Roxen Challenger Web server.
|
||||
@end table
|
||||
|
||||
@subheading Extensions for Other Programs
|
||||
|
||||
@table @asis
|
||||
@item @uref{http://www.seawood.org/msql_bind/}
|
||||
MySQL support for BIND (The Internet Domain Name Server).
|
||||
|
||||
@item @uref{http://www.inet-interactive.com/sendmail/}
|
||||
MySQL support for Sendmail and Procmail.
|
||||
@end table
|
||||
|
||||
@subheading Using MySQL with Other Programs
|
||||
|
||||
@table @asis
|
||||
@item @uref{http://www.iserver.com/support/addonhelp/database/mysql/msaccess.html}
|
||||
Using MySQL with Access.
|
||||
|
||||
@item @uref{http://www.iserver.com/support/contrib/perl5/modules.html}
|
||||
Installing new Perl modules that require locally installed modules.
|
||||
@end table
|
||||
|
||||
@subheading ODBC-related Links
|
||||
|
||||
@table @asis
|
||||
@item @uref{http://www.iodbc.org/}
|
||||
Popular iODBC Driver Manager (libiodbc) now available as Open Source.
|
||||
|
||||
@item @uref{http://users.ids.net/~bjepson/freeODBC/}
|
||||
The FreeODBC Pages.
|
||||
|
||||
@item @uref{http://genix.net/unixODBC/}
|
||||
The unixODBC Project goals are to develop and promote unixODBC to be the
|
||||
definitive standard for ODBC on the Linux platform. This is to include GUI
|
||||
support for KDE.
|
||||
|
||||
@item @uref{http://www.sw-soft.com/products/BtrieveODBC/}
|
||||
A MySQL-based ODBC driver for Btrieve.
|
||||
@end table
|
||||
|
||||
@subheading @strong{API}-related Links
|
||||
|
||||
@table @asis
|
||||
@item @uref{http://www.jppp.com/}
|
||||
Partially implemented TDataset-compatible components for MySQL.
|
||||
|
||||
@item @uref{http://www.riverstyx.net/qpopmysql/}
|
||||
qpopmysql - A patch to allow POP3 authentication from a MySQL
|
||||
database. There's also a link to Paul Khavkine's patch for Procmail to
|
||||
allow any MTA to deliver to users in a MySQL database.
|
||||
|
||||
@item @uref{http://www.essencesw.com/Software/mysqllib.html}
|
||||
New Client libraries for the Mac OS Classic (Macintosh).
|
||||
|
||||
@item @uref{http://www.lilback.com/macsql/}
|
||||
Client libraries for the Macintosh.
|
||||
|
||||
@item @uref{http://www.essencesw.com/Plugins/mysqlplug.html}
|
||||
Plugin for REALbasic (for Macintosh)
|
||||
|
||||
@item @uref{http://www.iis.ee.ethz.ch/~neeri/macintosh/gusi-qa.html}
|
||||
A library that emulates BSD sockets and pthreads on Macintosh. This can
|
||||
be used if you want to compile the MySQL client library on Mac.
|
||||
It could probably even be sued to port MySQL to Macintosh, but we
|
||||
don't know of anyone that has tried that.
|
||||
|
||||
@cindex SCMDB
|
||||
@item @uref{http://www.dedecker.net/jessie/scmdb/}
|
||||
SCMDB - an add-on for SCM that ports the MySQL C library to scheme
|
||||
(SCM). With this library scheme developers can make connections to a
|
||||
MySQL database and use embedded SQL in their programs.
|
||||
@end table
|
||||
|
||||
@subheading Other MySQL-related Links
|
||||
|
||||
@table @asis
|
||||
@item @uref{http://www.satisoft.com/} (SAT)
|
||||
The Small Application Toolkit (SAT) is a collection of utilities
|
||||
intended to simplify the development of small, multi-user, GUI based
|
||||
applications in a (Microsoft -or- X) Windows Client / Unix Server
|
||||
environment.
|
||||
|
||||
@item @uref{http://www.wix.com/mysql-hosting/}
|
||||
Registry of Web providers who support MySQL.
|
||||
|
||||
@item @uref{http://www.softagency.co.jp/mysql/index.en.html}
|
||||
Links about using MySQL in Japan/Asia.
|
||||
|
||||
@item @uref{http://abattoir.cc.ndsu.nodak.edu/~nem/mysql/udf/}
|
||||
MySQL UDF Registry.
|
||||
|
||||
@item @uref{http://www.open.com.au/products.html}
|
||||
Commercial Web defect tracking system.
|
||||
|
||||
@item @uref{http://www.stonekeep.com/pts/}
|
||||
PTS: Project Tracking System.
|
||||
|
||||
@item @uref{http://tomato.nvgc.vt.edu/~hroberts/mot/}
|
||||
Job and software tracking system.
|
||||
|
||||
@item @uref{http://www.cynergi.net/exportsql/}
|
||||
ExportSQL: A script to export data from Access95+.
|
||||
|
||||
@item @uref{http://SAL.KachinaTech.COM/H/1/MYSQL.html}
|
||||
SAL (Scientific Applications on Linux) MySQL entry.
|
||||
|
||||
@item @uref{http://www.infotech-nj.com/itech/index.shtml}
|
||||
A consulting company which mentions MySQL in the right company.
|
||||
|
||||
@item @uref{http://www.pmpcs.com/}
|
||||
PMP Computer Solutions. Database developers using MySQL and
|
||||
@code{mSQL}.
|
||||
|
||||
@item @uref{http://www.dedserius.com/y2kmatrix/}
|
||||
Y2K tester.
|
||||
@end table
|
||||
|
||||
@subheading SQL and Database Interfaces
|
||||
|
||||
@table @asis
|
||||
@item @uref{http://java.sun.com/products/jdbc/}
|
||||
The JDBC database access API.
|
||||
|
||||
@item @uref{http://www.gagme.com/mysql/}
|
||||
Patch for @code{mSQL} Tcl.
|
||||
|
||||
@item @uref{http://www.amsoft.ru/easysql/}
|
||||
EasySQL: An ODBC-like driver manager.
|
||||
|
||||
@item @uref{http://www.lightlink.com/hessling/rexxsql.html}
|
||||
A REXX interface to SQL databases.
|
||||
|
||||
@c @item @uref{http://www.mytcl.cx/}
|
||||
@c Tcl interface based on tcl-sql with many bugfixes.
|
||||
|
||||
@item @uref{http://www.binevolve.com/~tdarugar/tcl-sql/}
|
||||
Tcl interface for MySQL.
|
||||
|
||||
@item @uref{http://www.contrib.andrew.cmu.edu/~shadow/sql.html}
|
||||
SQL Reference Page with a lot of interesting links.
|
||||
|
||||
@end table
|
||||
|
||||
@subheading Examples of MySQL Use
|
||||
|
||||
@table @asis
|
||||
@c Added 990601
|
||||
@c EMAIL: thuss@little6.com (Todd Huss)
|
||||
@item @uref{http://www.little6.com/about/linux/}
|
||||
Little6 Inc., An online contract and job finding site that is powered by
|
||||
MySQL, PHP3, and Linux.
|
||||
|
||||
@c Added 990521
|
||||
@c EMAIL: info@worldrecords.com (Jim Rota)
|
||||
@item @uref{http://www.worldrecords.com/}
|
||||
World Records - A search engine for information about music that uses
|
||||
MySQL and PHP.
|
||||
|
||||
@item @uref{http://www.webtechniques.com/archives/1998/01/note/}
|
||||
A Contact Database using MySQL and PHP.
|
||||
|
||||
@item @uref{http://modems.rosenet.net/mysql/}
|
||||
Web based interface and Community Calendar with PHP.
|
||||
|
||||
@item @uref{http://www.odbsoft.com/cook/sources.htm}
|
||||
Perl package to generate html from a SQL table structure and for generating
|
||||
SQL statements from an html form.
|
||||
|
||||
@item @uref{http://www.gusnet.cx/proj/telsql/}
|
||||
Basic telephone database using @code{DBI}/@code{DBD}.
|
||||
|
||||
@item @uref{http://tecfa.unige.ch/guides/java/staf2x/ex/jdbc/coffee-break/}
|
||||
JDBC examples by Daniel K. Schneider.
|
||||
|
||||
@item @uref{http://www.ooc.com/}
|
||||
Object Oriented Concepts Inc; CORBA applications with examples in source.
|
||||
|
||||
@c EMAIL: paul@sword.damocles.com (Paul Bannister)
|
||||
@item @uref{http://www.stopbit.com/}
|
||||
Stopbit - A technology news site using MySQL and PHP.
|
||||
|
||||
@item @uref{http://www.penguinservices.com/scripts/}
|
||||
Online shopping cart system.
|
||||
|
||||
@c Added 990928 from editor@city-gallery.com
|
||||
@cindex Old Photo Album
|
||||
@item @uref{http://www.city-gallery.com/album/}
|
||||
Old Photo Album - The album is a collaborative popular history of photography
|
||||
project that generates all pages from data stored in a MySQL
|
||||
database. Pages are dynamically generated through a php3 interface to the
|
||||
database content. Users contribute images and descriptions. Contributed
|
||||
images are stored on the web server to avoid storing them in the database
|
||||
as BLOBs. All other information is stored on the shared MySQL server.
|
||||
@end table
|
||||
|
||||
@subheading General Database Links
|
||||
|
||||
@table @asis
|
||||
@item @uref{http://black.hole-in-the.net/guy/webdb/}
|
||||
Homepage of the webdb-l (Web Databases) mailing list.
|
||||
|
||||
@item @uref{http://www.symbolstone.org/technology/perl/DBI/}
|
||||
Perl @code{DBI}/@code{DBD} modules homepage.
|
||||
|
||||
@item @uref{http://www.student.uni-koeln.de/cygwin/}
|
||||
Cygwin tools. Unix on top of Windows.
|
||||
|
||||
@cindex Tek-Tips forums
|
||||
@cindex forums, Tek-Tips
|
||||
@item @uref{http://www.tek-tips.com/}
|
||||
Tek-Tips Forums are 800+ independent peer-to-peer non-commercial support
|
||||
forums for Computer Professionals. Features include automatic e-mail
|
||||
notification of responses, a links library, and member confidentiality
|
||||
guaranteed.
|
||||
|
||||
@item @uref{http://www.public.asu.edu/~peterjn/btree/}
|
||||
B-Trees: Balanced Tree Data Structures.
|
||||
|
||||
@item @uref{http://www.fit.qut.edu.au/~maire/baobab/lecture/sld001.htm}
|
||||
A lecture about B-Trees.
|
||||
@end table
|
||||
|
||||
|
@ -1,31 +0,0 @@
|
||||
@c FIX AGL 20011108 Extracted from manual.texi.
|
||||
@c Should only be on website with new submits by webform.
|
||||
|
||||
|
||||
@node MySQL Testimonials, Contrib, Users, Top
|
||||
@appendix MySQL Testimonials
|
||||
|
||||
@cindex MySQL Testimonials
|
||||
|
||||
The section 'MySQL Users' contains a lot of different links to
|
||||
MySQL users but doesn't provide that much information about how
|
||||
they are using MySQL. @xref{Users}. This section gives you an idea
|
||||
of how other MySQL users are using MySQL to solve their problems.
|
||||
|
||||
Please note that all new stories are added on the MySQL website,
|
||||
@uref{http://www.mysql.com/}.
|
||||
Do let us know about @emph{your} success story too!
|
||||
|
||||
@itemize @bullet
|
||||
@item
|
||||
@strong{Peter Zaitsev of Spylog.ru} writes:
|
||||
I think you might be interested in my database size. The whole database
|
||||
is currently on 15 servers and I think it's about 60.000 of tables
|
||||
containing about 5.000.000.000 of rows. My mostly loaded server
|
||||
currently holds about 10.000 of tables with 1.000.000.000 of rows in it.
|
||||
Hugest tables have about 50.000.000 of rows, and this value will raise
|
||||
as soon as I'll move to 2.4 kernel with large files. Currently I have to
|
||||
delete much of logs for large sites to hold table sizes in 2Gb.
|
||||
|
||||
@item
|
||||
|
@ -1,414 +0,0 @@
|
||||
@c FIX AGL 20011108 Extracted from manual.texi.
|
||||
@c Should only be on website.
|
||||
|
||||
|
||||
@node Users, Contrib, Problems, Top
|
||||
@appendix MySQL Users
|
||||
|
||||
@cindex users, of MySQL
|
||||
@cindex news sites
|
||||
|
||||
This appendix lists users of MySQL that have given us permission
|
||||
to list them in our documentation. It is by far not a complete list, but
|
||||
should give you a general idea of who uses MySQL and what it can
|
||||
be used for.
|
||||
|
||||
@appendixsec General News Sites
|
||||
|
||||
@itemize @bullet
|
||||
|
||||
@item @uref{http://www.yahoo.com/} (Yahoo!)
|
||||
|
||||
@item @uref{http://slashdot.org/} (Slashdot: A pro-Linux/tech news and comment/discussion site)
|
||||
|
||||
@item @uref{http://www.linux.com/} (All about Linux)
|
||||
|
||||
@item @uref{http://www.linuxtoday.com/} (Linuxtoday)
|
||||
|
||||
@item @uref{http://www.32bitsonline.com/} (32Bits Online: because there's
|
||||
more than one way to compute)
|
||||
|
||||
@item @uref{http://www.freshmeat.net/} (Freshmeat: News about new versions of computer-related stuff)
|
||||
|
||||
@end itemize
|
||||
|
||||
@cindex search engines, web
|
||||
@cindex web search engines
|
||||
@appendixsec Web Search Engines
|
||||
|
||||
@itemize @bullet
|
||||
|
||||
@item @uref{http://www.aaa.com.au/} (AAA Matilda Web Search)
|
||||
@item @uref{http://www.whatsnu.com/} (What's New)
|
||||
@item @uref{http://www.aladin.de/} (Aladin)
|
||||
@item @uref{http://www.columbus-finder.de/} (Columbus Finder)
|
||||
@item @uref{http://www.spider.de/} (Spider)
|
||||
@item @uref{http://www.blitzsuche.de/} (Blitzsuche)
|
||||
@item @uref{http://www.indoseek.co.id/} (Indoseek Indonesia)
|
||||
@item @uref{http://www.yaboo.dk/} (Yaboo - Yet Another BOOkmarker)
|
||||
@item @uref{http://www.ozsearch.com.au/} (OzSearch Internet Guide)
|
||||
@item @uref{http://www.splatsearch.com/} (Splat! Search)
|
||||
@item @uref{http://osdls.library.arizona.edu/} (The Open Source Digital Library System Project)
|
||||
@end itemize
|
||||
|
||||
@appendixsec Information Search Engines Specialising in a Particular Area
|
||||
|
||||
@itemize @bullet
|
||||
|
||||
@item @uref{http://www.spylog.ru/} (SpyLOG ; A very popular Web counter site)
|
||||
|
||||
@item @uref{http://www.tucows.com/} (TuCows Network; Free Software archive)
|
||||
|
||||
@item @uref{http://www.jobvertise.com/} (Jobvertise: Post and search for jobs)
|
||||
|
||||
@item @uref{http://www.musicdatabase.com/} (The Music Database)
|
||||
|
||||
@item @uref{http://www.soccersearch.com/} (Football -Soccer- search page)
|
||||
|
||||
@item @uref{http://www.headrush.net/takedown} (TAKEDOWN - wrestling)
|
||||
|
||||
@item @uref{http://www.lyrics.net/} (The International Lyrics Network)
|
||||
|
||||
@item @uref{http://TheMatrix.com/~matrix/band_search.phtml} (Musicians looking for other musicians; free service)
|
||||
|
||||
@item @uref{http://www.addall.com/AddBooks/Stores.html} (AddALL books searching and price comparison)
|
||||
|
||||
@item @uref{http://www.herbaria.harvard.edu/Data/Gray/gray.html} (Harvard's Gray Herbarium Index of Plant Names)
|
||||
|
||||
@item @uref{http://www.game-developer.com/} (The Game Development Search Engine)
|
||||
|
||||
@item @uref{http://www.theinnkeeper.com/} (The Innkeeper Vacation Guides)
|
||||
|
||||
@item @uref{http://www.macgamedatabase.com/} (The Mac Game Database uses PHP and MySQL)
|
||||
@c From: Marc Antony Vose <suzerain@suzerain.com>
|
||||
|
||||
@item @uref{http://www.csse.monash.edu.au/publications/} (Research
|
||||
Publications at Monash University in Australia)
|
||||
|
||||
@item @uref{http://www.ipielle.emr.it/bts/}
|
||||
(Occupational Health & Safety Website database; a project for the ECC)
|
||||
@c c.presutti@ipielle.emr.it
|
||||
|
||||
@item @uref{http://data.mch.mcgill.ca/} (Bioinformatics databases at the
|
||||
Montreal Children's Hospital using MySQL)
|
||||
@c saeed@www.debelle.mcgill.ca
|
||||
@end itemize
|
||||
|
||||
@cindex online magazines
|
||||
@cindex magazines, online
|
||||
@appendixsec Online Magazines
|
||||
|
||||
@itemize @bullet
|
||||
@item @uref{http://www.spoiler.com/} (Spoiler Webzine)
|
||||
An online magazine featuring music, literature, arts, and design content.
|
||||
@item @uref{http://www.linux-magazin.de/newsflash/} (Daily news about Linux in German language)
|
||||
@item @uref{http://www.betazine.com/} (Betazine - The Ultimate Online Beta Tester's Magazine)
|
||||
@item @uref{http://www.currents.net/ccinfo/aboutcc.html} (Computer Currents Magazine)
|
||||
@end itemize
|
||||
|
||||
@cindex websites
|
||||
@appendixsec Websites that Use MySQL as a Backend
|
||||
|
||||
@itemize @bullet
|
||||
|
||||
@item @uref{http://liftoff.msfc.nasa.gov/} (NASA)
|
||||
@item @uref{http://kids.msfc.nasa.gov/} (NASA KIDS)
|
||||
@item @uref{http://science.nasa.gov/} (Sience@@NASA)
|
||||
|
||||
@item @uref{http://www.handy.de/} (handy.de)
|
||||
|
||||
@item @uref{http://lindev.jmc.tju.edu/qwor/} (Qt Widget and Object Repository)
|
||||
|
||||
@item @uref{http://www.samba-choro.com.br/} (Brazilian samba site; in Portuguese)
|
||||
|
||||
@item @uref{http://pgss.iss.uw.edu.pl/en_index.ISS} (Polish General Social Survey)
|
||||
|
||||
@item @uref{http://www.expo2000.com/} Expo2000 - world-wide distribution of
|
||||
tickets for this event is implemented using MySQL and Tcl/Tk. More than
|
||||
5000 travel agencies all over the world have access to it.
|
||||
|
||||
@item @uref{http://www.freevote.com/} FreeVote.com is a free voting
|
||||
service with millions of users.
|
||||
|
||||
@item @uref{http://f1.tauzero.se/} (Forza Motorsport)
|
||||
|
||||
@item @uref{http://www.dreamhost.com/} (DreamHost Web Hosting)
|
||||
|
||||
@end itemize
|
||||
|
||||
@cindex services
|
||||
@appendixsec Domain/Internet/Web and Related Services
|
||||
|
||||
@itemize @bullet
|
||||
|
||||
@item @uref{http://www.wix.com/mysql-hosting/} (Registry of Web providers that
|
||||
support MySQL)
|
||||
|
||||
@item @uref{http://www.yi.org/} (Dynamic DNS Services)
|
||||
|
||||
@item @uref{http://www.dynodns.net/} (Dynamic domain name service)
|
||||
|
||||
@item @uref{http://www.ods.org/} (Open DNS Project; free dynamic DNS service)
|
||||
|
||||
@c @item @uref{http://dynodns.net/} (Free dynamic DNS implementation)
|
||||
@c EMAIL: A Moore <amoore@mooresystems.com>
|
||||
|
||||
@item @uref{http://www.hn.org/} (Hammernode; Public DNS Servers)
|
||||
|
||||
@item @uref{http://www.fdns.net/} (Free 3rd level domains)
|
||||
|
||||
@item @uref{http://worldcommunity.com/} (Online Database)
|
||||
|
||||
@item @uref{http://www.bigbiz.com/} (BigBiz Internet Services)
|
||||
|
||||
@item @uref{http://virt.circle.net/} (The Virt Gazette)
|
||||
|
||||
@item @uref{http://www.california.com/} (Global InfoNet Inc)
|
||||
|
||||
@item @uref{http://www.webhosters.com/} (WebHosters - A Guide to WWW Providers)
|
||||
|
||||
@item @uref{http://online.dn.ru/} (Internet information server)
|
||||
|
||||
@item @uref{http://www.worldnetla.net/} (WorldNet Communications - An Internet Services Provider)
|
||||
|
||||
@item @uref{http://www.netizen.com.au/} (Netizen: Australian-based Web consultancy)
|
||||
|
||||
@item @uref{http://www.trainingpages.co.uk/} (Search site for training courses in the UK)
|
||||
|
||||
@item @uref{http://chat.nitco.com/} (Gannon Chat; GPL. Written in Perl and Javascript)
|
||||
|
||||
@item @uref{http://www.addurls.com/} (A general links directory)
|
||||
|
||||
@item @uref{http://www.bookmarktracker.com/} (A Web-based bookmark management service)
|
||||
|
||||
@item @uref{http://www.cdrom.com/} (Walnut Creek CDROM)
|
||||
|
||||
@item @uref{http://www.wwwthreads.org/} (WWWThreads; Interactive discussion Forums)
|
||||
|
||||
@item @uref{http://pvmon.portici.enea.it/Meteo/} (In Italian; Storage data from meteo station)
|
||||
|
||||
@item @uref{http://www.buysell.net/} (Online "Person To Person" Auction)
|
||||
|
||||
@item @uref{http://tips.pair.com/} (Tips on Web development)
|
||||
|
||||
@item @uref{http://www.mailfriends.com/} (Mailfriends.com is a FREE service for
|
||||
everybody who wants to find friends over the internet)
|
||||
|
||||
@item @uref{http://www.uninova.com/cgi-bin/wctelnets?list} (Web Page Telnet BBS List)
|
||||
|
||||
@item @uref{http://www.uninova.com/cnc.html} (UniNova Digital Postcards)
|
||||
|
||||
@c @item @uref{http://cabinboy.powersurfr.com/} (An Internet RFC search engine)
|
||||
|
||||
@item @uref{http://www.dslreports.com/} (DSL-provider search with reviews)
|
||||
Made with MySQL and Modperl, all pages are generated dynamically out of
|
||||
the MySQL database
|
||||
@end itemize
|
||||
|
||||
@cindex PHP, websites
|
||||
@appendixsec Websites that Use @code{PHP} and MySQL
|
||||
|
||||
@itemize @bullet
|
||||
@c @item @uref{http://www.wh200th.com/} (White House 200th Anniversary site)
|
||||
|
||||
@item @uref{http://support.jgaa.com/} (Jgaa's Internet - Official Support Site)
|
||||
|
||||
@item @uref{http://io.incluso.com/} (Ionline - online publication) MySQL,
|
||||
PHP, Java, Web programming, DB development
|
||||
|
||||
@item @uref{http://www.baboo.com/} (BaBoo - Browse and Bookmark. Free Web-based bookmark manager and Calendar)
|
||||
|
||||
@item @uref{http://www.courses.pjc.cc.fl.us/Schedule/}
|
||||
(Course Schedule System at Pensacola Junior College)
|
||||
|
||||
@item @uref{http://www.fccj.org/} (Florida Community College at Jacksonville)
|
||||
|
||||
@item @uref{http://www.32bit.com/} (32bit.com; An extensive shareware / freeware archive)
|
||||
|
||||
@item @uref{http://www.jokes2000.com/} (Jokes 2000)
|
||||
@c Added 990604; EMAIL: ah@dybdahl.dk
|
||||
|
||||
@item @uref{http://www.burken.nu/}
|
||||
Burken is a webhotel that provides scripts, among other things,
|
||||
for remote users, like counters, guestbooks etc.
|
||||
@c Added 990608; EMAIL: spacedmp@SpaceDump.Burken.NU (Anders Olausson)
|
||||
|
||||
@item @uref{http://tips.pair.com/}
|
||||
Contains tips on html, javascript, 2d/3d graphics, and PHP3/MySQL.
|
||||
All pages are generated from a database.
|
||||
@c Added 990614; EMAIL: downey@image.dk (Rune Madsen)
|
||||
|
||||
@item @uref{http://www.softwarezrus.com/}
|
||||
Ecommerce site that is selling computers.
|
||||
@end itemize
|
||||
|
||||
@cindex consultants, list of
|
||||
@appendixsec MySQL Consultants
|
||||
|
||||
@itemize @bullet
|
||||
|
||||
@item @uref{http://www.ayni.com/} (Ayni AG)
|
||||
|
||||
@item @uref{http://worldcommunity.com/} (Online Database)
|
||||
|
||||
@item @uref{http://www2.dataguard.no/} (DataGuard; Uses MySQL and PHP)
|
||||
|
||||
@item @uref{http://wwits.net/programs/mysql.phtml} (WWITS; uses MySQL and PHP)
|
||||
|
||||
@item @uref{http://www.worldcommunity.com/} (WCN - The World Community Network)
|
||||
|
||||
@item @uref{http://www.chipcastle.com/} (Chip Castle Dot Com Inc)
|
||||
@c Added 990603 EMAIL: chip@chipcastle.com (Chip Castle)
|
||||
|
||||
@item @uref{http://www.cyber.com.au/} (Cybersource Pty. Ltd)
|
||||
|
||||
@item @uref{http://www.spring.de/} (Spring infotainment gmbh & co. kg)
|
||||
@c added 990905 "Oliver Pischke" <opischke@spring.de>
|
||||
|
||||
@item @uref{http://www.wamdesign.com/} (Wam Design develops websites using MySQL)
|
||||
@c Added 990905; max@wamdesign.com
|
||||
|
||||
@item @uref{http://www.berkeleyconsultants.com/} (Berkeley Consultants Group)
|
||||
|
||||
@item @uref{http://www.jammconsulting.com/} (JAMM Consulting Inc)
|
||||
|
||||
@end itemize
|
||||
|
||||
@c Commented out by Arjen 011018, section is empty!
|
||||
@c appendixsec Programming
|
||||
|
||||
@cindex web pages, miscellaneous
|
||||
@appendixsec Uncategorised Pages
|
||||
|
||||
@itemize @bullet
|
||||
|
||||
@item @uref{http://www.feature-showcase.com/htmls/demo_mysql.sql} (AZC.COM's Feature Showcase)
|
||||
|
||||
@item @uref{http://www.teach.org.uk/subjects/trainingcourse/g.html} (Course Search)
|
||||
|
||||
@item @uref{http://www.northerbys.com/} (Northerbys Online Auctions)
|
||||
|
||||
@item @uref{http://www.schiphol.nl/flights/home.htm} (Amsterdam Airport Schiphol)
|
||||
|
||||
@item @uref{http://TheMatrix.com/seventhsin/query.phtml} (CD database)
|
||||
|
||||
@item @uref{http://TheMatrix.com/~flmm/GEAR.html} (Used Audio Gear Database)
|
||||
|
||||
@item @uref{http://www.kiss.de/musik-mueller/} (Musical note-sheets)
|
||||
|
||||
@item @uref{http://www.bagism.com/} (Bagism; A John Lennon fan page)
|
||||
|
||||
@item @uref{http://www.selftaught.com/} (US Folk art broker)
|
||||
|
||||
@item @uref{http://organizer.net/} (Mail reading on the Web)
|
||||
|
||||
@item @uref{http://www.mypage.org/} (Free home pages on www.somecoolname.mypage.org)
|
||||
|
||||
@item @uref{http://www.schulweb.de/} (Der Server f@"ur Schulen im Web - in German)
|
||||
|
||||
@item @uref{http://www.ald.net/} (Auldhaefen Online Services)
|
||||
|
||||
@item @uref{http://www.cary.net/} (CaryNET Information Center)
|
||||
|
||||
@item @uref{http://www.dataden.com/} (Dataden Computer Systems)
|
||||
|
||||
@item @uref{http://andree.grm.se/} (Andr@'emuseet; in Swedish)
|
||||
|
||||
@item @uref{http://www.him.net/} (HOMESITE Internet Marketing)
|
||||
|
||||
@item @uref{http://www.jade-v.com/techinfo.html} (Jade-V Network Services)
|
||||
|
||||
@item @uref{http://ww2010.atmos.uiuc.edu/(Gl)/abt/aknw/tech.rxml}
|
||||
Weather World 2010 Technical Credits
|
||||
|
||||
@item @uref{http://gimp.foebud.org/registry/doc/}
|
||||
About The Gimp plugin registry
|
||||
|
||||
@item @uref{http://www.fast-inc.com/Products/Archiver/database.html}
|
||||
Java tool; archiver technical detail (Slightly optimistic about MySQL
|
||||
ANSI-92 compliance)
|
||||
|
||||
@item @uref{http://www.gamesdomain.com/cheats/usrcheat.phtml} (Games Domain Cheats Database)
|
||||
|
||||
@item @uref{http://www.kcilink.com/poweredby/} (The "Powered By" Page; Kcilink)
|
||||
|
||||
@item @uref{http://www.netcasting.net/index.whtml} (Netcasting)
|
||||
|
||||
@item @uref{http://homepages.tig.com.au/~mjj/nbltips} (NBL: Australian National Basketball League; tipping)
|
||||
|
||||
@item @uref{http://www.cgishop.com/} (CGI shop)
|
||||
|
||||
@item @uref{http://www.whirlycott.com/} (Whirlycott: Website Design)
|
||||
|
||||
@item @uref{http://www.mtp.dk/} (Museum Tusculanum Press)
|
||||
|
||||
@item @uref{http://csdgi.historie.ku.dk/biblio/} (Centro Siciliano di Documentazione)
|
||||
|
||||
@item @uref{http://caribou.dyn.ml.org:8000/} (Quake statistics database)
|
||||
|
||||
@item @uref{http://www.astroforum.ch/} (Astroforum: Astrologie and related things; in German)
|
||||
|
||||
@item @uref{http://www.opendebate.com/} (OpenDebate - Interactive Polls & Open Discussion)
|
||||
|
||||
@item @uref{http://vermeer.organik.uni-erlangen.de/dissertationen/} (Online chemical dissertation server)
|
||||
|
||||
@item @uref{http://www.freschinfo.com/} (FreSch! The Free Scholarship Search Service)
|
||||
|
||||
@item @uref{http://www.nada.kth.se/~staffanu/pinball/} (Stockholm Pinball Locator)
|
||||
|
||||
@item @uref{http://www.hek.com/} (HEK - a construction company)
|
||||
|
||||
@item @uref{http://www.ebi.nl/} (Elsevier Business Information)
|
||||
|
||||
@item @uref{http://vaccination.medicallink.se/} (Medical Links; using ColdFusion and MySQL)
|
||||
|
||||
@item @uref{http://www.joblink-usa.com/} (Search for jobs & people at JobLink-USA)
|
||||
|
||||
@item @uref{http://www.skydive.net/competfs/} (Competition Formation Skydiving)
|
||||
|
||||
@item @uref{http://www.galaxy-net.net/} (Galaxy-NET Telecommunications; E-commerce and internal accounting)
|
||||
|
||||
@item @uref{http://www.borsen.dk/} (Denmark's leading business daily newspaper B@o{}rsen)
|
||||
|
||||
@item @uref{http://tmmm.simplenet.com/indb/} (The Internet NES Database)
|
||||
|
||||
@item @uref{http://www.russia.cz/} (Travel agency in Prague in 3 languages)
|
||||
|
||||
@item @uref{http://www.linkstation.de/} (Linkstation)
|
||||
|
||||
@item @uref{http://www.peoplestaff.com/} (Searchable online database at Peoplestaff)
|
||||
|
||||
@item @uref{http://www.dreamhorse.com/} (A searchable database system for horse classified ads)
|
||||
|
||||
@item @uref{http://pootpoot.com/} (The Poot site)
|
||||
|
||||
@item @uref{http://grateful.net/hw_html/} ("Playin' in the LAN"; a network monitoring suite)
|
||||
|
||||
@c Update from Christopher Milton <cmilton@bwn.net> 1999-12-21
|
||||
@item @uref{http://www.usapa.army.mil/} (U.S. Army Publishing Agency)
|
||||
|
||||
@item @uref{http://www.nekretnine.co.yu/} (Realestate handling in Yugoslavia)
|
||||
|
||||
@item @uref{http://demo.cpsoft.com/pims/devFAQ.html} (PIMS; a Patient Information Management System)
|
||||
|
||||
@item @uref{http://cpsoft.com/} (Pilkington Software Inc)
|
||||
|
||||
@item @uref{http://www.no-quarter.org/} (A Vietnam Veteran's Memorial - The Wall - database)
|
||||
|
||||
@item @uref{http://www.gamers-union.com/} (Gamer's Union specializes in auctions of used & out-of-print gaming material)
|
||||
|
||||
@item @uref{http://www.montereyhigh.com/office/dbul.php3} (A daily bulletin at Monterey High school)
|
||||
|
||||
@item @uref{http://www.myEastside.com/} (Community-owned site serving Lake
|
||||
Washington's Eastside residents and businesses)
|
||||
|
||||
@item @uref{http://bowling-france.net/} (French bowling site)
|
||||
@end itemize
|
||||
|
||||
Send any additions to this list to @email{webmaster@@mysql.com}.
|
||||
|
||||
@page
|
||||
|
||||
|
||||
|
||||
|
@ -15,6 +15,7 @@ file7=C:\mysql\bin\mysqlc.exe
|
||||
file8=C:\mysql\bin\mysqlcheck.exe
|
||||
file9=C:\mysql\bin\mysqldump.exe
|
||||
file20=C:\mysql\bin\winmysqladmin.exe
|
||||
file21=C:\mysql\bin\myisam_ftdump.exe
|
||||
file10=C:\mysql\bin\mysqlimport.exe
|
||||
fulldirectory=
|
||||
file11=C:\mysql\bin\mysqlshow.exe
|
||||
|
@ -219,6 +219,7 @@ file32=C:\mysql\scripts\mysqlbug.sh
|
||||
file21=C:\mysql\scripts\mysql_setpermission
|
||||
file10=C:\mysql\scripts\mysql_find_rows
|
||||
fulldirectory=
|
||||
file44=C:\mysql\scripts\mysql_fix_privilege_tables.sql
|
||||
file33=C:\mysql\scripts\mysqld_multi
|
||||
file22=C:\mysql\scripts\mysql_setpermission.pl
|
||||
file11=C:\mysql\scripts\mysql_find_rows.pl
|
||||
|
@ -135,6 +135,7 @@ file1=C:\mysql\my-large.cnf
|
||||
file2=C:\mysql\my-medium.cnf
|
||||
file3=C:\mysql\my-small.cnf
|
||||
file4=C:\mysql\MySQLEULA.txt
|
||||
file5=C:\mysql\README.txt
|
||||
SubDir0=bin
|
||||
SubDir1=share
|
||||
SubDir2=Embedded
|
||||
|
641
VC++Files/InstallShield/4.0.XX-classic/Script Files/setup.rul
Executable file
641
VC++Files/InstallShield/4.0.XX-classic/Script Files/setup.rul
Executable file
@ -0,0 +1,641 @@
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IIIIIII SSSSSS
|
||||
// II SS InstallShield (R)
|
||||
// II SSSSSS (c) 1996-1997, InstallShield Software Corporation
|
||||
// II SS (c) 1990-1996, InstallShield Corporation
|
||||
// IIIIIII SSSSSS All Rights Reserved.
|
||||
//
|
||||
//
|
||||
// This code is generated as a starting setup template. You should
|
||||
// modify it to provide all necessary steps for your setup.
|
||||
//
|
||||
//
|
||||
// File Name: Setup.rul
|
||||
//
|
||||
// Description: InstallShield script
|
||||
//
|
||||
// Comments: This template script performs a basic setup on a
|
||||
// Windows 95 or Windows NT 4.0 platform. With minor
|
||||
// modifications, this template can be adapted to create
|
||||
// new, customized setups.
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
// Include header file
|
||||
#include "sdlang.h"
|
||||
#include "sddialog.h"
|
||||
|
||||
////////////////////// string defines ////////////////////////////
|
||||
|
||||
#define UNINST_LOGFILE_NAME "Uninst.isu"
|
||||
|
||||
//////////////////// installation declarations ///////////////////
|
||||
|
||||
// ----- DLL prototypes -----
|
||||
|
||||
|
||||
// your DLL prototypes
|
||||
|
||||
|
||||
// ---- script prototypes -----
|
||||
|
||||
// generated
|
||||
prototype ShowDialogs();
|
||||
prototype MoveFileData();
|
||||
prototype HandleMoveDataError( NUMBER );
|
||||
prototype ProcessBeforeDataMove();
|
||||
prototype ProcessAfterDataMove();
|
||||
prototype SetupRegistry();
|
||||
prototype SetupFolders();
|
||||
prototype CleanUpInstall();
|
||||
prototype SetupInstall();
|
||||
prototype SetupScreen();
|
||||
prototype CheckRequirements();
|
||||
prototype DialogShowSdWelcome();
|
||||
prototype DialogShowSdShowInfoList();
|
||||
prototype DialogShowSdAskDestPath();
|
||||
prototype DialogShowSdSetupType();
|
||||
prototype DialogShowSdComponentDialog2();
|
||||
prototype DialogShowSdFinishReboot();
|
||||
|
||||
// your prototypes
|
||||
|
||||
|
||||
// ----- global variables ------
|
||||
|
||||
// generated
|
||||
BOOL bWinNT, bIsShellExplorer, bInstallAborted, bIs32BitSetup;
|
||||
STRING svDir;
|
||||
STRING svName, svCompany, svSerial;
|
||||
STRING szAppPath;
|
||||
STRING svSetupType;
|
||||
|
||||
|
||||
// your global variables
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// MAIN PROGRAM
|
||||
//
|
||||
// The setup begins here by hiding the visible setup
|
||||
// window. This is done to allow all the titles, images, etc. to
|
||||
// be established before showing the main window. The following
|
||||
// logic then performs the setup in a series of steps.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
program
|
||||
Disable( BACKGROUND );
|
||||
|
||||
CheckRequirements();
|
||||
|
||||
SetupInstall();
|
||||
|
||||
SetupScreen();
|
||||
|
||||
if (ShowDialogs()<0) goto end_install;
|
||||
|
||||
if (ProcessBeforeDataMove()<0) goto end_install;
|
||||
|
||||
if (MoveFileData()<0) goto end_install;
|
||||
|
||||
if (ProcessAfterDataMove()<0) goto end_install;
|
||||
|
||||
if (SetupRegistry()<0) goto end_install;
|
||||
|
||||
if (SetupFolders()<0) goto end_install;
|
||||
|
||||
|
||||
end_install:
|
||||
|
||||
CleanUpInstall();
|
||||
|
||||
// If an unrecoverable error occurred, clean up the partial installation.
|
||||
// Otherwise, exit normally.
|
||||
|
||||
if (bInstallAborted) then
|
||||
abort;
|
||||
endif;
|
||||
|
||||
endprogram
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Function: ShowDialogs //
|
||||
// //
|
||||
// Purpose: This function manages the display and navigation //
|
||||
// the standard dialogs that exist in a setup. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function ShowDialogs()
|
||||
NUMBER nResult;
|
||||
begin
|
||||
|
||||
Dlg_Start:
|
||||
// beginning of dialogs label
|
||||
|
||||
Dlg_SdWelcome:
|
||||
nResult = DialogShowSdWelcome();
|
||||
if (nResult = BACK) goto Dlg_Start;
|
||||
|
||||
Dlg_SdShowInfoList:
|
||||
nResult = DialogShowSdShowInfoList();
|
||||
if (nResult = BACK) goto Dlg_SdWelcome;
|
||||
|
||||
Dlg_SdAskDestPath:
|
||||
nResult = DialogShowSdAskDestPath();
|
||||
if (nResult = BACK) goto Dlg_SdShowInfoList;
|
||||
|
||||
Dlg_SdSetupType:
|
||||
nResult = DialogShowSdSetupType();
|
||||
if (nResult = BACK) goto Dlg_SdAskDestPath;
|
||||
|
||||
Dlg_SdComponentDialog2:
|
||||
if ((nResult = BACK) && (svSetupType != "Custom") && (svSetupType != "")) then
|
||||
goto Dlg_SdSetupType;
|
||||
endif;
|
||||
nResult = DialogShowSdComponentDialog2();
|
||||
if (nResult = BACK) goto Dlg_SdSetupType;
|
||||
|
||||
return 0;
|
||||
|
||||
end;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Function: ProcessBeforeDataMove //
|
||||
// //
|
||||
// Purpose: This function performs any necessary operations prior to the //
|
||||
// actual data move operation. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function ProcessBeforeDataMove()
|
||||
STRING svLogFile;
|
||||
NUMBER nResult;
|
||||
begin
|
||||
|
||||
InstallationInfo( @COMPANY_NAME, @PRODUCT_NAME, @PRODUCT_VERSION, @PRODUCT_KEY );
|
||||
|
||||
svLogFile = UNINST_LOGFILE_NAME;
|
||||
|
||||
nResult = DeinstallStart( svDir, svLogFile, @UNINST_KEY, 0 );
|
||||
if (nResult < 0) then
|
||||
MessageBox( @ERROR_UNINSTSETUP, WARNING );
|
||||
endif;
|
||||
|
||||
szAppPath = TARGETDIR; // TODO : if your application .exe is in a subdir of TARGETDIR then add subdir
|
||||
|
||||
if ((bIs32BitSetup) && (bIsShellExplorer)) then
|
||||
// RegDBSetItem( REGDB_APPPATH, szAppPath );
|
||||
// RegDBSetItem( REGDB_APPPATH_DEFAULT, szAppPath ^ @PRODUCT_KEY );
|
||||
RegDBSetItem( REGDB_UNINSTALL_NAME, @UNINST_DISPLAY_NAME );
|
||||
endif;
|
||||
|
||||
// TODO : update any items you want to process before moving the data
|
||||
//
|
||||
|
||||
return 0;
|
||||
end;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Function: MoveFileData //
|
||||
// //
|
||||
// Purpose: This function handles the data movement for //
|
||||
// the setup. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function MoveFileData()
|
||||
NUMBER nResult, nDisk;
|
||||
begin
|
||||
|
||||
nDisk = 1;
|
||||
SetStatusWindow( 0, "" );
|
||||
Disable( DIALOGCACHE );
|
||||
Enable( STATUS );
|
||||
StatusUpdate( ON, 100 );
|
||||
nResult = ComponentMoveData( MEDIA, nDisk, 0 );
|
||||
|
||||
HandleMoveDataError( nResult );
|
||||
|
||||
Disable( STATUS );
|
||||
|
||||
return nResult;
|
||||
|
||||
end;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Function: HandleMoveDataError //
|
||||
// //
|
||||
// Purpose: This function handles the error (if any) during the move data //
|
||||
// operation. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function HandleMoveDataError( nResult )
|
||||
STRING szErrMsg, svComponent , svFileGroup , svFile;
|
||||
begin
|
||||
|
||||
svComponent = "";
|
||||
svFileGroup = "";
|
||||
svFile = "";
|
||||
|
||||
switch (nResult)
|
||||
case 0:
|
||||
return 0;
|
||||
default:
|
||||
ComponentError ( MEDIA , svComponent , svFileGroup , svFile , nResult );
|
||||
szErrMsg = @ERROR_MOVEDATA + "\n\n" +
|
||||
@ERROR_COMPONENT + " " + svComponent + "\n" +
|
||||
@ERROR_FILEGROUP + " " + svFileGroup + "\n" +
|
||||
@ERROR_FILE + " " + svFile;
|
||||
SprintfBox( SEVERE, @TITLE_CAPTIONBAR, szErrMsg, nResult );
|
||||
bInstallAborted = TRUE;
|
||||
return nResult;
|
||||
endswitch;
|
||||
|
||||
end;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Function: ProcessAfterDataMove //
|
||||
// //
|
||||
// Purpose: This function performs any necessary operations needed after //
|
||||
// all data has been moved. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function ProcessAfterDataMove()
|
||||
begin
|
||||
|
||||
// TODO : update self-registered files and other processes that
|
||||
// should be performed after the data has been moved.
|
||||
|
||||
|
||||
return 0;
|
||||
end;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Function: SetupRegistry //
|
||||
// //
|
||||
// Purpose: This function makes the registry entries for this setup. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function SetupRegistry()
|
||||
NUMBER nResult;
|
||||
|
||||
begin
|
||||
|
||||
// TODO : Add all your registry entry keys here
|
||||
//
|
||||
//
|
||||
// RegDBCreateKeyEx, RegDBSetKeyValueEx....
|
||||
//
|
||||
|
||||
nResult = CreateRegistrySet( "" );
|
||||
|
||||
return nResult;
|
||||
end;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Function: SetupFolders
|
||||
//
|
||||
// Purpose: This function creates all the folders and shortcuts for the
|
||||
// setup. This includes program groups and items for Windows 3.1.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function SetupFolders()
|
||||
NUMBER nResult;
|
||||
|
||||
begin
|
||||
|
||||
|
||||
// TODO : Add all your folder (program group) along with shortcuts (program items)
|
||||
//
|
||||
//
|
||||
// CreateProgramFolder, AddFolderIcon....
|
||||
//
|
||||
|
||||
nResult = CreateShellObjects( "" );
|
||||
|
||||
return nResult;
|
||||
end;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Function: CleanUpInstall //
|
||||
// //
|
||||
// Purpose: This cleans up the setup. Anything that should //
|
||||
// be released or deleted at the end of the setup should //
|
||||
// be done here. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function CleanUpInstall()
|
||||
begin
|
||||
|
||||
|
||||
if (bInstallAborted) then
|
||||
return 0;
|
||||
endif;
|
||||
|
||||
DialogShowSdFinishReboot();
|
||||
|
||||
if (BATCH_INSTALL) then // ensure locked files are properly written
|
||||
CommitSharedFiles(0);
|
||||
endif;
|
||||
|
||||
return 0;
|
||||
end;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Function: SetupInstall //
|
||||
// //
|
||||
// Purpose: This will setup the installation. Any general initialization //
|
||||
// needed for the installation should be performed here. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function SetupInstall()
|
||||
begin
|
||||
|
||||
Enable( CORECOMPONENTHANDLING );
|
||||
|
||||
bInstallAborted = FALSE;
|
||||
|
||||
if (bIs32BitSetup) then
|
||||
svDir = "C:\\mysql"; //PROGRAMFILES ^ @COMPANY_NAME ^ @PRODUCT_NAME;
|
||||
else
|
||||
svDir = "C:\\mysql"; //PROGRAMFILES ^ @COMPANY_NAME16 ^ @PRODUCT_NAME16; // use shorten names
|
||||
endif;
|
||||
|
||||
TARGETDIR = svDir;
|
||||
|
||||
SdProductName( @PRODUCT_NAME );
|
||||
|
||||
Enable( DIALOGCACHE );
|
||||
|
||||
return 0;
|
||||
end;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Function: SetupScreen //
|
||||
// //
|
||||
// Purpose: This function establishes the screen look. This includes //
|
||||
// colors, fonts, and text to be displayed. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function SetupScreen()
|
||||
begin
|
||||
|
||||
Enable( FULLWINDOWMODE );
|
||||
Enable( INDVFILESTATUS );
|
||||
SetTitle( @TITLE_MAIN, 24, WHITE );
|
||||
|
||||
SetTitle( @TITLE_CAPTIONBAR, 0, BACKGROUNDCAPTION ); // Caption bar text.
|
||||
|
||||
Enable( BACKGROUND );
|
||||
|
||||
Delay( 1 );
|
||||
end;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Function: CheckRequirements //
|
||||
// //
|
||||
// Purpose: This function checks all minimum requirements for the //
|
||||
// application being installed. If any fail, then the user //
|
||||
// is informed and the setup is terminated. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function CheckRequirements()
|
||||
NUMBER nvDx, nvDy, nvResult;
|
||||
STRING svResult;
|
||||
|
||||
begin
|
||||
|
||||
bWinNT = FALSE;
|
||||
bIsShellExplorer = FALSE;
|
||||
|
||||
// Check screen resolution.
|
||||
GetExtents( nvDx, nvDy );
|
||||
|
||||
if (nvDy < 480) then
|
||||
MessageBox( @ERROR_VGARESOLUTION, WARNING );
|
||||
abort;
|
||||
endif;
|
||||
|
||||
// set 'setup' operation mode
|
||||
bIs32BitSetup = TRUE;
|
||||
GetSystemInfo( ISTYPE, nvResult, svResult );
|
||||
if (nvResult = 16) then
|
||||
bIs32BitSetup = FALSE; // running 16-bit setup
|
||||
return 0; // no additional information required
|
||||
endif;
|
||||
|
||||
// --- 32-bit testing after this point ---
|
||||
|
||||
// Determine the target system's operating system.
|
||||
GetSystemInfo( OS, nvResult, svResult );
|
||||
|
||||
if (nvResult = IS_WINDOWSNT) then
|
||||
// Running Windows NT.
|
||||
bWinNT = TRUE;
|
||||
|
||||
// Check to see if the shell being used is EXPLORER shell.
|
||||
if (GetSystemInfo( OSMAJOR, nvResult, svResult ) = 0) then
|
||||
if (nvResult >= 4) then
|
||||
bIsShellExplorer = TRUE;
|
||||
endif;
|
||||
endif;
|
||||
|
||||
elseif (nvResult = IS_WINDOWS95 ) then
|
||||
bIsShellExplorer = TRUE;
|
||||
|
||||
endif;
|
||||
|
||||
end;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Function: DialogShowSdWelcome //
|
||||
// //
|
||||
// Purpose: This function handles the standard welcome dialog. //
|
||||
// //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function DialogShowSdWelcome()
|
||||
NUMBER nResult;
|
||||
STRING szTitle, szMsg;
|
||||
begin
|
||||
|
||||
szTitle = "";
|
||||
szMsg = "";
|
||||
nResult = SdWelcome( szTitle, szMsg );
|
||||
|
||||
return nResult;
|
||||
end;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Function: DialogShowSdShowInfoList //
|
||||
// //
|
||||
// Purpose: This function displays the general information list dialog. //
|
||||
// //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function DialogShowSdShowInfoList()
|
||||
NUMBER nResult;
|
||||
LIST list;
|
||||
STRING szTitle, szMsg, szFile;
|
||||
begin
|
||||
|
||||
szFile = SUPPORTDIR ^ "infolist.txt";
|
||||
|
||||
list = ListCreate( STRINGLIST );
|
||||
ListReadFromFile( list, szFile );
|
||||
szTitle = "";
|
||||
szMsg = " ";
|
||||
nResult = SdShowInfoList( szTitle, szMsg, list );
|
||||
|
||||
ListDestroy( list );
|
||||
|
||||
return nResult;
|
||||
end;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Function: DialogShowSdAskDestPath //
|
||||
// //
|
||||
// Purpose: This function asks the user for the destination directory. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function DialogShowSdAskDestPath()
|
||||
NUMBER nResult;
|
||||
STRING szTitle, szMsg;
|
||||
begin
|
||||
|
||||
szTitle = "";
|
||||
szMsg = "";
|
||||
nResult = SdAskDestPath( szTitle, szMsg, svDir, 0 );
|
||||
|
||||
TARGETDIR = svDir;
|
||||
|
||||
return nResult;
|
||||
end;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Function: DialogShowSdSetupType //
|
||||
// //
|
||||
// Purpose: This function displays the standard setup type dialog. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function DialogShowSdSetupType()
|
||||
NUMBER nResult, nType;
|
||||
STRING szTitle, szMsg;
|
||||
begin
|
||||
|
||||
switch (svSetupType)
|
||||
case "Typical":
|
||||
nType = TYPICAL;
|
||||
case "Custom":
|
||||
nType = CUSTOM;
|
||||
case "Compact":
|
||||
nType = COMPACT;
|
||||
case "":
|
||||
svSetupType = "Typical";
|
||||
nType = TYPICAL;
|
||||
endswitch;
|
||||
|
||||
szTitle = "";
|
||||
szMsg = "";
|
||||
nResult = SetupType( szTitle, szMsg, "", nType, 0 );
|
||||
|
||||
switch (nResult)
|
||||
case COMPACT:
|
||||
svSetupType = "Compact";
|
||||
case TYPICAL:
|
||||
svSetupType = "Typical";
|
||||
case CUSTOM:
|
||||
svSetupType = "Custom";
|
||||
endswitch;
|
||||
|
||||
return nResult;
|
||||
end;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Function: DialogShowSdComponentDialog2 //
|
||||
// //
|
||||
// Purpose: This function displays the custom component dialog. //
|
||||
// //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function DialogShowSdComponentDialog2()
|
||||
NUMBER nResult;
|
||||
STRING szTitle, szMsg;
|
||||
begin
|
||||
|
||||
if ((svSetupType != "Custom") && (svSetupType != "")) then
|
||||
return 0;
|
||||
endif;
|
||||
|
||||
szTitle = "";
|
||||
szMsg = "";
|
||||
nResult = SdComponentDialog2( szTitle, szMsg, svDir, "" );
|
||||
|
||||
return nResult;
|
||||
end;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Function: DialogShowSdFinishReboot //
|
||||
// //
|
||||
// Purpose: This function will show the last dialog of the product. //
|
||||
// It will allow the user to reboot and/or show some readme text. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function DialogShowSdFinishReboot()
|
||||
NUMBER nResult, nDefOptions;
|
||||
STRING szTitle, szMsg1, szMsg2, szOption1, szOption2;
|
||||
NUMBER bOpt1, bOpt2;
|
||||
begin
|
||||
|
||||
if (!BATCH_INSTALL) then
|
||||
bOpt1 = FALSE;
|
||||
bOpt2 = FALSE;
|
||||
szMsg1 = "";
|
||||
szMsg2 = "";
|
||||
szOption1 = "";
|
||||
szOption2 = "";
|
||||
nResult = SdFinish( szTitle, szMsg1, szMsg2, szOption1, szOption2, bOpt1, bOpt2 );
|
||||
return 0;
|
||||
endif;
|
||||
|
||||
nDefOptions = SYS_BOOTMACHINE;
|
||||
szTitle = "";
|
||||
szMsg1 = "";
|
||||
szMsg2 = "";
|
||||
nResult = SdFinishReboot( szTitle, szMsg1, nDefOptions, szMsg2, 0 );
|
||||
|
||||
return nResult;
|
||||
end;
|
||||
|
||||
// --- include script file section ---
|
||||
|
||||
#include "sddialog.rul"
|
||||
|
||||
|
||||
|
@ -15,6 +15,7 @@ file7=C:\mysql\bin\mysqlc.exe
|
||||
file8=C:\mysql\bin\mysqlcheck.exe
|
||||
file9=C:\mysql\bin\mysqldump.exe
|
||||
file20=C:\mysql\bin\winmysqladmin.exe
|
||||
file21=C:\mysql\bin\myisam_ftdump.exe
|
||||
file10=C:\mysql\bin\mysqlimport.exe
|
||||
fulldirectory=
|
||||
file11=C:\mysql\bin\mysqlshow.exe
|
||||
|
@ -220,6 +220,7 @@ file32=C:\mysql\scripts\mysqlbug.sh
|
||||
file21=C:\mysql\scripts\mysql_setpermission
|
||||
file10=C:\mysql\scripts\mysql_find_rows
|
||||
fulldirectory=
|
||||
file44=C:\mysql\scripts\mysql_fix_privilege_tables.sql
|
||||
file33=C:\mysql\scripts\mysqld_multi
|
||||
file22=C:\mysql\scripts\mysql_setpermission.pl
|
||||
file11=C:\mysql\scripts\mysql_find_rows.pl
|
||||
|
@ -132,12 +132,12 @@ file1=C:\mysql\share\greek\errmsg.txt
|
||||
fulldirectory=
|
||||
|
||||
[TopDir]
|
||||
file0=C:\mysql\Readme
|
||||
file1=C:\mysql\mysqlbug.txt
|
||||
file2=C:\mysql\my-huge.cnf
|
||||
file3=C:\mysql\my-large.cnf
|
||||
file4=C:\mysql\my-medium.cnf
|
||||
file5=C:\mysql\my-small.cnf
|
||||
file0=C:\mysql\mysqlbug.txt
|
||||
file1=C:\mysql\my-huge.cnf
|
||||
file2=C:\mysql\my-large.cnf
|
||||
file3=C:\mysql\my-medium.cnf
|
||||
file4=C:\mysql\my-small.cnf
|
||||
file5=C:\mysql\README.txt
|
||||
SubDir0=bin
|
||||
SubDir1=share
|
||||
SubDir2=Embedded
|
||||
|
641
VC++Files/InstallShield/4.0.XX-gpl/Script Files/setup.rul
Executable file
641
VC++Files/InstallShield/4.0.XX-gpl/Script Files/setup.rul
Executable file
@ -0,0 +1,641 @@
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IIIIIII SSSSSS
|
||||
// II SS InstallShield (R)
|
||||
// II SSSSSS (c) 1996-1997, InstallShield Software Corporation
|
||||
// II SS (c) 1990-1996, InstallShield Corporation
|
||||
// IIIIIII SSSSSS All Rights Reserved.
|
||||
//
|
||||
//
|
||||
// This code is generated as a starting setup template. You should
|
||||
// modify it to provide all necessary steps for your setup.
|
||||
//
|
||||
//
|
||||
// File Name: Setup.rul
|
||||
//
|
||||
// Description: InstallShield script
|
||||
//
|
||||
// Comments: This template script performs a basic setup on a
|
||||
// Windows 95 or Windows NT 4.0 platform. With minor
|
||||
// modifications, this template can be adapted to create
|
||||
// new, customized setups.
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
// Include header file
|
||||
#include "sdlang.h"
|
||||
#include "sddialog.h"
|
||||
|
||||
////////////////////// string defines ////////////////////////////
|
||||
|
||||
#define UNINST_LOGFILE_NAME "Uninst.isu"
|
||||
|
||||
//////////////////// installation declarations ///////////////////
|
||||
|
||||
// ----- DLL prototypes -----
|
||||
|
||||
|
||||
// your DLL prototypes
|
||||
|
||||
|
||||
// ---- script prototypes -----
|
||||
|
||||
// generated
|
||||
prototype ShowDialogs();
|
||||
prototype MoveFileData();
|
||||
prototype HandleMoveDataError( NUMBER );
|
||||
prototype ProcessBeforeDataMove();
|
||||
prototype ProcessAfterDataMove();
|
||||
prototype SetupRegistry();
|
||||
prototype SetupFolders();
|
||||
prototype CleanUpInstall();
|
||||
prototype SetupInstall();
|
||||
prototype SetupScreen();
|
||||
prototype CheckRequirements();
|
||||
prototype DialogShowSdWelcome();
|
||||
prototype DialogShowSdShowInfoList();
|
||||
prototype DialogShowSdAskDestPath();
|
||||
prototype DialogShowSdSetupType();
|
||||
prototype DialogShowSdComponentDialog2();
|
||||
prototype DialogShowSdFinishReboot();
|
||||
|
||||
// your prototypes
|
||||
|
||||
|
||||
// ----- global variables ------
|
||||
|
||||
// generated
|
||||
BOOL bWinNT, bIsShellExplorer, bInstallAborted, bIs32BitSetup;
|
||||
STRING svDir;
|
||||
STRING svName, svCompany, svSerial;
|
||||
STRING szAppPath;
|
||||
STRING svSetupType;
|
||||
|
||||
|
||||
// your global variables
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// MAIN PROGRAM
|
||||
//
|
||||
// The setup begins here by hiding the visible setup
|
||||
// window. This is done to allow all the titles, images, etc. to
|
||||
// be established before showing the main window. The following
|
||||
// logic then performs the setup in a series of steps.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
program
|
||||
Disable( BACKGROUND );
|
||||
|
||||
CheckRequirements();
|
||||
|
||||
SetupInstall();
|
||||
|
||||
SetupScreen();
|
||||
|
||||
if (ShowDialogs()<0) goto end_install;
|
||||
|
||||
if (ProcessBeforeDataMove()<0) goto end_install;
|
||||
|
||||
if (MoveFileData()<0) goto end_install;
|
||||
|
||||
if (ProcessAfterDataMove()<0) goto end_install;
|
||||
|
||||
if (SetupRegistry()<0) goto end_install;
|
||||
|
||||
if (SetupFolders()<0) goto end_install;
|
||||
|
||||
|
||||
end_install:
|
||||
|
||||
CleanUpInstall();
|
||||
|
||||
// If an unrecoverable error occurred, clean up the partial installation.
|
||||
// Otherwise, exit normally.
|
||||
|
||||
if (bInstallAborted) then
|
||||
abort;
|
||||
endif;
|
||||
|
||||
endprogram
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Function: ShowDialogs //
|
||||
// //
|
||||
// Purpose: This function manages the display and navigation //
|
||||
// the standard dialogs that exist in a setup. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function ShowDialogs()
|
||||
NUMBER nResult;
|
||||
begin
|
||||
|
||||
Dlg_Start:
|
||||
// beginning of dialogs label
|
||||
|
||||
Dlg_SdWelcome:
|
||||
nResult = DialogShowSdWelcome();
|
||||
if (nResult = BACK) goto Dlg_Start;
|
||||
|
||||
Dlg_SdShowInfoList:
|
||||
nResult = DialogShowSdShowInfoList();
|
||||
if (nResult = BACK) goto Dlg_SdWelcome;
|
||||
|
||||
Dlg_SdAskDestPath:
|
||||
nResult = DialogShowSdAskDestPath();
|
||||
if (nResult = BACK) goto Dlg_SdShowInfoList;
|
||||
|
||||
Dlg_SdSetupType:
|
||||
nResult = DialogShowSdSetupType();
|
||||
if (nResult = BACK) goto Dlg_SdAskDestPath;
|
||||
|
||||
Dlg_SdComponentDialog2:
|
||||
if ((nResult = BACK) && (svSetupType != "Custom") && (svSetupType != "")) then
|
||||
goto Dlg_SdSetupType;
|
||||
endif;
|
||||
nResult = DialogShowSdComponentDialog2();
|
||||
if (nResult = BACK) goto Dlg_SdSetupType;
|
||||
|
||||
return 0;
|
||||
|
||||
end;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Function: ProcessBeforeDataMove //
|
||||
// //
|
||||
// Purpose: This function performs any necessary operations prior to the //
|
||||
// actual data move operation. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function ProcessBeforeDataMove()
|
||||
STRING svLogFile;
|
||||
NUMBER nResult;
|
||||
begin
|
||||
|
||||
InstallationInfo( @COMPANY_NAME, @PRODUCT_NAME, @PRODUCT_VERSION, @PRODUCT_KEY );
|
||||
|
||||
svLogFile = UNINST_LOGFILE_NAME;
|
||||
|
||||
nResult = DeinstallStart( svDir, svLogFile, @UNINST_KEY, 0 );
|
||||
if (nResult < 0) then
|
||||
MessageBox( @ERROR_UNINSTSETUP, WARNING );
|
||||
endif;
|
||||
|
||||
szAppPath = TARGETDIR; // TODO : if your application .exe is in a subdir of TARGETDIR then add subdir
|
||||
|
||||
if ((bIs32BitSetup) && (bIsShellExplorer)) then
|
||||
// RegDBSetItem( REGDB_APPPATH, szAppPath );
|
||||
// RegDBSetItem( REGDB_APPPATH_DEFAULT, szAppPath ^ @PRODUCT_KEY );
|
||||
RegDBSetItem( REGDB_UNINSTALL_NAME, @UNINST_DISPLAY_NAME );
|
||||
endif;
|
||||
|
||||
// TODO : update any items you want to process before moving the data
|
||||
//
|
||||
|
||||
return 0;
|
||||
end;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Function: MoveFileData //
|
||||
// //
|
||||
// Purpose: This function handles the data movement for //
|
||||
// the setup. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function MoveFileData()
|
||||
NUMBER nResult, nDisk;
|
||||
begin
|
||||
|
||||
nDisk = 1;
|
||||
SetStatusWindow( 0, "" );
|
||||
Disable( DIALOGCACHE );
|
||||
Enable( STATUS );
|
||||
StatusUpdate( ON, 100 );
|
||||
nResult = ComponentMoveData( MEDIA, nDisk, 0 );
|
||||
|
||||
HandleMoveDataError( nResult );
|
||||
|
||||
Disable( STATUS );
|
||||
|
||||
return nResult;
|
||||
|
||||
end;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Function: HandleMoveDataError //
|
||||
// //
|
||||
// Purpose: This function handles the error (if any) during the move data //
|
||||
// operation. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function HandleMoveDataError( nResult )
|
||||
STRING szErrMsg, svComponent , svFileGroup , svFile;
|
||||
begin
|
||||
|
||||
svComponent = "";
|
||||
svFileGroup = "";
|
||||
svFile = "";
|
||||
|
||||
switch (nResult)
|
||||
case 0:
|
||||
return 0;
|
||||
default:
|
||||
ComponentError ( MEDIA , svComponent , svFileGroup , svFile , nResult );
|
||||
szErrMsg = @ERROR_MOVEDATA + "\n\n" +
|
||||
@ERROR_COMPONENT + " " + svComponent + "\n" +
|
||||
@ERROR_FILEGROUP + " " + svFileGroup + "\n" +
|
||||
@ERROR_FILE + " " + svFile;
|
||||
SprintfBox( SEVERE, @TITLE_CAPTIONBAR, szErrMsg, nResult );
|
||||
bInstallAborted = TRUE;
|
||||
return nResult;
|
||||
endswitch;
|
||||
|
||||
end;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Function: ProcessAfterDataMove //
|
||||
// //
|
||||
// Purpose: This function performs any necessary operations needed after //
|
||||
// all data has been moved. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function ProcessAfterDataMove()
|
||||
begin
|
||||
|
||||
// TODO : update self-registered files and other processes that
|
||||
// should be performed after the data has been moved.
|
||||
|
||||
|
||||
return 0;
|
||||
end;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Function: SetupRegistry //
|
||||
// //
|
||||
// Purpose: This function makes the registry entries for this setup. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function SetupRegistry()
|
||||
NUMBER nResult;
|
||||
|
||||
begin
|
||||
|
||||
// TODO : Add all your registry entry keys here
|
||||
//
|
||||
//
|
||||
// RegDBCreateKeyEx, RegDBSetKeyValueEx....
|
||||
//
|
||||
|
||||
nResult = CreateRegistrySet( "" );
|
||||
|
||||
return nResult;
|
||||
end;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Function: SetupFolders
|
||||
//
|
||||
// Purpose: This function creates all the folders and shortcuts for the
|
||||
// setup. This includes program groups and items for Windows 3.1.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function SetupFolders()
|
||||
NUMBER nResult;
|
||||
|
||||
begin
|
||||
|
||||
|
||||
// TODO : Add all your folder (program group) along with shortcuts (program items)
|
||||
//
|
||||
//
|
||||
// CreateProgramFolder, AddFolderIcon....
|
||||
//
|
||||
|
||||
nResult = CreateShellObjects( "" );
|
||||
|
||||
return nResult;
|
||||
end;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Function: CleanUpInstall //
|
||||
// //
|
||||
// Purpose: This cleans up the setup. Anything that should //
|
||||
// be released or deleted at the end of the setup should //
|
||||
// be done here. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function CleanUpInstall()
|
||||
begin
|
||||
|
||||
|
||||
if (bInstallAborted) then
|
||||
return 0;
|
||||
endif;
|
||||
|
||||
DialogShowSdFinishReboot();
|
||||
|
||||
if (BATCH_INSTALL) then // ensure locked files are properly written
|
||||
CommitSharedFiles(0);
|
||||
endif;
|
||||
|
||||
return 0;
|
||||
end;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Function: SetupInstall //
|
||||
// //
|
||||
// Purpose: This will setup the installation. Any general initialization //
|
||||
// needed for the installation should be performed here. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function SetupInstall()
|
||||
begin
|
||||
|
||||
Enable( CORECOMPONENTHANDLING );
|
||||
|
||||
bInstallAborted = FALSE;
|
||||
|
||||
if (bIs32BitSetup) then
|
||||
svDir = "C:\\mysql"; //PROGRAMFILES ^ @COMPANY_NAME ^ @PRODUCT_NAME;
|
||||
else
|
||||
svDir = "C:\\mysql"; //PROGRAMFILES ^ @COMPANY_NAME16 ^ @PRODUCT_NAME16; // use shorten names
|
||||
endif;
|
||||
|
||||
TARGETDIR = svDir;
|
||||
|
||||
SdProductName( @PRODUCT_NAME );
|
||||
|
||||
Enable( DIALOGCACHE );
|
||||
|
||||
return 0;
|
||||
end;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Function: SetupScreen //
|
||||
// //
|
||||
// Purpose: This function establishes the screen look. This includes //
|
||||
// colors, fonts, and text to be displayed. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function SetupScreen()
|
||||
begin
|
||||
|
||||
Enable( FULLWINDOWMODE );
|
||||
Enable( INDVFILESTATUS );
|
||||
SetTitle( @TITLE_MAIN, 24, WHITE );
|
||||
|
||||
SetTitle( @TITLE_CAPTIONBAR, 0, BACKGROUNDCAPTION ); // Caption bar text.
|
||||
|
||||
Enable( BACKGROUND );
|
||||
|
||||
Delay( 1 );
|
||||
end;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Function: CheckRequirements //
|
||||
// //
|
||||
// Purpose: This function checks all minimum requirements for the //
|
||||
// application being installed. If any fail, then the user //
|
||||
// is informed and the setup is terminated. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function CheckRequirements()
|
||||
NUMBER nvDx, nvDy, nvResult;
|
||||
STRING svResult;
|
||||
|
||||
begin
|
||||
|
||||
bWinNT = FALSE;
|
||||
bIsShellExplorer = FALSE;
|
||||
|
||||
// Check screen resolution.
|
||||
GetExtents( nvDx, nvDy );
|
||||
|
||||
if (nvDy < 480) then
|
||||
MessageBox( @ERROR_VGARESOLUTION, WARNING );
|
||||
abort;
|
||||
endif;
|
||||
|
||||
// set 'setup' operation mode
|
||||
bIs32BitSetup = TRUE;
|
||||
GetSystemInfo( ISTYPE, nvResult, svResult );
|
||||
if (nvResult = 16) then
|
||||
bIs32BitSetup = FALSE; // running 16-bit setup
|
||||
return 0; // no additional information required
|
||||
endif;
|
||||
|
||||
// --- 32-bit testing after this point ---
|
||||
|
||||
// Determine the target system's operating system.
|
||||
GetSystemInfo( OS, nvResult, svResult );
|
||||
|
||||
if (nvResult = IS_WINDOWSNT) then
|
||||
// Running Windows NT.
|
||||
bWinNT = TRUE;
|
||||
|
||||
// Check to see if the shell being used is EXPLORER shell.
|
||||
if (GetSystemInfo( OSMAJOR, nvResult, svResult ) = 0) then
|
||||
if (nvResult >= 4) then
|
||||
bIsShellExplorer = TRUE;
|
||||
endif;
|
||||
endif;
|
||||
|
||||
elseif (nvResult = IS_WINDOWS95 ) then
|
||||
bIsShellExplorer = TRUE;
|
||||
|
||||
endif;
|
||||
|
||||
end;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Function: DialogShowSdWelcome //
|
||||
// //
|
||||
// Purpose: This function handles the standard welcome dialog. //
|
||||
// //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function DialogShowSdWelcome()
|
||||
NUMBER nResult;
|
||||
STRING szTitle, szMsg;
|
||||
begin
|
||||
|
||||
szTitle = "";
|
||||
szMsg = "";
|
||||
nResult = SdWelcome( szTitle, szMsg );
|
||||
|
||||
return nResult;
|
||||
end;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Function: DialogShowSdShowInfoList //
|
||||
// //
|
||||
// Purpose: This function displays the general information list dialog. //
|
||||
// //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function DialogShowSdShowInfoList()
|
||||
NUMBER nResult;
|
||||
LIST list;
|
||||
STRING szTitle, szMsg, szFile;
|
||||
begin
|
||||
|
||||
szFile = SUPPORTDIR ^ "infolist.txt";
|
||||
|
||||
list = ListCreate( STRINGLIST );
|
||||
ListReadFromFile( list, szFile );
|
||||
szTitle = "";
|
||||
szMsg = " ";
|
||||
nResult = SdShowInfoList( szTitle, szMsg, list );
|
||||
|
||||
ListDestroy( list );
|
||||
|
||||
return nResult;
|
||||
end;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Function: DialogShowSdAskDestPath //
|
||||
// //
|
||||
// Purpose: This function asks the user for the destination directory. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function DialogShowSdAskDestPath()
|
||||
NUMBER nResult;
|
||||
STRING szTitle, szMsg;
|
||||
begin
|
||||
|
||||
szTitle = "";
|
||||
szMsg = "";
|
||||
nResult = SdAskDestPath( szTitle, szMsg, svDir, 0 );
|
||||
|
||||
TARGETDIR = svDir;
|
||||
|
||||
return nResult;
|
||||
end;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Function: DialogShowSdSetupType //
|
||||
// //
|
||||
// Purpose: This function displays the standard setup type dialog. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function DialogShowSdSetupType()
|
||||
NUMBER nResult, nType;
|
||||
STRING szTitle, szMsg;
|
||||
begin
|
||||
|
||||
switch (svSetupType)
|
||||
case "Typical":
|
||||
nType = TYPICAL;
|
||||
case "Custom":
|
||||
nType = CUSTOM;
|
||||
case "Compact":
|
||||
nType = COMPACT;
|
||||
case "":
|
||||
svSetupType = "Typical";
|
||||
nType = TYPICAL;
|
||||
endswitch;
|
||||
|
||||
szTitle = "";
|
||||
szMsg = "";
|
||||
nResult = SetupType( szTitle, szMsg, "", nType, 0 );
|
||||
|
||||
switch (nResult)
|
||||
case COMPACT:
|
||||
svSetupType = "Compact";
|
||||
case TYPICAL:
|
||||
svSetupType = "Typical";
|
||||
case CUSTOM:
|
||||
svSetupType = "Custom";
|
||||
endswitch;
|
||||
|
||||
return nResult;
|
||||
end;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Function: DialogShowSdComponentDialog2 //
|
||||
// //
|
||||
// Purpose: This function displays the custom component dialog. //
|
||||
// //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function DialogShowSdComponentDialog2()
|
||||
NUMBER nResult;
|
||||
STRING szTitle, szMsg;
|
||||
begin
|
||||
|
||||
if ((svSetupType != "Custom") && (svSetupType != "")) then
|
||||
return 0;
|
||||
endif;
|
||||
|
||||
szTitle = "";
|
||||
szMsg = "";
|
||||
nResult = SdComponentDialog2( szTitle, szMsg, svDir, "" );
|
||||
|
||||
return nResult;
|
||||
end;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Function: DialogShowSdFinishReboot //
|
||||
// //
|
||||
// Purpose: This function will show the last dialog of the product. //
|
||||
// It will allow the user to reboot and/or show some readme text. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function DialogShowSdFinishReboot()
|
||||
NUMBER nResult, nDefOptions;
|
||||
STRING szTitle, szMsg1, szMsg2, szOption1, szOption2;
|
||||
NUMBER bOpt1, bOpt2;
|
||||
begin
|
||||
|
||||
if (!BATCH_INSTALL) then
|
||||
bOpt1 = FALSE;
|
||||
bOpt2 = FALSE;
|
||||
szMsg1 = "";
|
||||
szMsg2 = "";
|
||||
szOption1 = "";
|
||||
szOption2 = "";
|
||||
nResult = SdFinish( szTitle, szMsg1, szMsg2, szOption1, szOption2, bOpt1, bOpt2 );
|
||||
return 0;
|
||||
endif;
|
||||
|
||||
nDefOptions = SYS_BOOTMACHINE;
|
||||
szTitle = "";
|
||||
szMsg1 = "";
|
||||
szMsg2 = "";
|
||||
nResult = SdFinishReboot( szTitle, szMsg1, nDefOptions, szMsg2, 0 );
|
||||
|
||||
return nResult;
|
||||
end;
|
||||
|
||||
// --- include script file section ---
|
||||
|
||||
#include "sddialog.rul"
|
||||
|
||||
|
||||
|
@ -15,6 +15,7 @@ file7=C:\mysql\bin\mysqlc.exe
|
||||
file8=C:\mysql\bin\mysqlcheck.exe
|
||||
file9=C:\mysql\bin\mysqldump.exe
|
||||
file20=C:\mysql\bin\winmysqladmin.exe
|
||||
file21=C:\mysql\bin\myisam_ftdump.exe
|
||||
file10=C:\mysql\bin\mysqlimport.exe
|
||||
fulldirectory=
|
||||
file11=C:\mysql\bin\mysqlshow.exe
|
||||
|
@ -219,6 +219,7 @@ file32=C:\mysql\scripts\mysqlbug.sh
|
||||
file21=C:\mysql\scripts\mysql_setpermission
|
||||
file10=C:\mysql\scripts\mysql_find_rows
|
||||
fulldirectory=
|
||||
file44=C:\mysql\scripts\mysql_fix_privilege_tables.sql
|
||||
file33=C:\mysql\scripts\mysqld_multi
|
||||
file22=C:\mysql\scripts\mysql_setpermission.pl
|
||||
file11=C:\mysql\scripts\mysql_find_rows.pl
|
||||
|
@ -135,6 +135,7 @@ file1=C:\mysql\my-large.cnf
|
||||
file2=C:\mysql\my-medium.cnf
|
||||
file3=C:\mysql\my-small.cnf
|
||||
file4=C:\mysql\MySQLEULA.txt
|
||||
file5=C:\mysql\README.txt
|
||||
SubDir0=bin
|
||||
SubDir1=share
|
||||
SubDir2=Embedded
|
||||
|
641
VC++Files/InstallShield/4.0.XX-pro/Script Files/setup.rul
Executable file
641
VC++Files/InstallShield/4.0.XX-pro/Script Files/setup.rul
Executable file
@ -0,0 +1,641 @@
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// IIIIIII SSSSSS
|
||||
// II SS InstallShield (R)
|
||||
// II SSSSSS (c) 1996-1997, InstallShield Software Corporation
|
||||
// II SS (c) 1990-1996, InstallShield Corporation
|
||||
// IIIIIII SSSSSS All Rights Reserved.
|
||||
//
|
||||
//
|
||||
// This code is generated as a starting setup template. You should
|
||||
// modify it to provide all necessary steps for your setup.
|
||||
//
|
||||
//
|
||||
// File Name: Setup.rul
|
||||
//
|
||||
// Description: InstallShield script
|
||||
//
|
||||
// Comments: This template script performs a basic setup on a
|
||||
// Windows 95 or Windows NT 4.0 platform. With minor
|
||||
// modifications, this template can be adapted to create
|
||||
// new, customized setups.
|
||||
//
|
||||
////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
// Include header file
|
||||
#include "sdlang.h"
|
||||
#include "sddialog.h"
|
||||
|
||||
////////////////////// string defines ////////////////////////////
|
||||
|
||||
#define UNINST_LOGFILE_NAME "Uninst.isu"
|
||||
|
||||
//////////////////// installation declarations ///////////////////
|
||||
|
||||
// ----- DLL prototypes -----
|
||||
|
||||
|
||||
// your DLL prototypes
|
||||
|
||||
|
||||
// ---- script prototypes -----
|
||||
|
||||
// generated
|
||||
prototype ShowDialogs();
|
||||
prototype MoveFileData();
|
||||
prototype HandleMoveDataError( NUMBER );
|
||||
prototype ProcessBeforeDataMove();
|
||||
prototype ProcessAfterDataMove();
|
||||
prototype SetupRegistry();
|
||||
prototype SetupFolders();
|
||||
prototype CleanUpInstall();
|
||||
prototype SetupInstall();
|
||||
prototype SetupScreen();
|
||||
prototype CheckRequirements();
|
||||
prototype DialogShowSdWelcome();
|
||||
prototype DialogShowSdShowInfoList();
|
||||
prototype DialogShowSdAskDestPath();
|
||||
prototype DialogShowSdSetupType();
|
||||
prototype DialogShowSdComponentDialog2();
|
||||
prototype DialogShowSdFinishReboot();
|
||||
|
||||
// your prototypes
|
||||
|
||||
|
||||
// ----- global variables ------
|
||||
|
||||
// generated
|
||||
BOOL bWinNT, bIsShellExplorer, bInstallAborted, bIs32BitSetup;
|
||||
STRING svDir;
|
||||
STRING svName, svCompany, svSerial;
|
||||
STRING szAppPath;
|
||||
STRING svSetupType;
|
||||
|
||||
|
||||
// your global variables
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// MAIN PROGRAM
|
||||
//
|
||||
// The setup begins here by hiding the visible setup
|
||||
// window. This is done to allow all the titles, images, etc. to
|
||||
// be established before showing the main window. The following
|
||||
// logic then performs the setup in a series of steps.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
program
|
||||
Disable( BACKGROUND );
|
||||
|
||||
CheckRequirements();
|
||||
|
||||
SetupInstall();
|
||||
|
||||
SetupScreen();
|
||||
|
||||
if (ShowDialogs()<0) goto end_install;
|
||||
|
||||
if (ProcessBeforeDataMove()<0) goto end_install;
|
||||
|
||||
if (MoveFileData()<0) goto end_install;
|
||||
|
||||
if (ProcessAfterDataMove()<0) goto end_install;
|
||||
|
||||
if (SetupRegistry()<0) goto end_install;
|
||||
|
||||
if (SetupFolders()<0) goto end_install;
|
||||
|
||||
|
||||
end_install:
|
||||
|
||||
CleanUpInstall();
|
||||
|
||||
// If an unrecoverable error occurred, clean up the partial installation.
|
||||
// Otherwise, exit normally.
|
||||
|
||||
if (bInstallAborted) then
|
||||
abort;
|
||||
endif;
|
||||
|
||||
endprogram
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Function: ShowDialogs //
|
||||
// //
|
||||
// Purpose: This function manages the display and navigation //
|
||||
// the standard dialogs that exist in a setup. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function ShowDialogs()
|
||||
NUMBER nResult;
|
||||
begin
|
||||
|
||||
Dlg_Start:
|
||||
// beginning of dialogs label
|
||||
|
||||
Dlg_SdWelcome:
|
||||
nResult = DialogShowSdWelcome();
|
||||
if (nResult = BACK) goto Dlg_Start;
|
||||
|
||||
Dlg_SdShowInfoList:
|
||||
nResult = DialogShowSdShowInfoList();
|
||||
if (nResult = BACK) goto Dlg_SdWelcome;
|
||||
|
||||
Dlg_SdAskDestPath:
|
||||
nResult = DialogShowSdAskDestPath();
|
||||
if (nResult = BACK) goto Dlg_SdShowInfoList;
|
||||
|
||||
Dlg_SdSetupType:
|
||||
nResult = DialogShowSdSetupType();
|
||||
if (nResult = BACK) goto Dlg_SdAskDestPath;
|
||||
|
||||
Dlg_SdComponentDialog2:
|
||||
if ((nResult = BACK) && (svSetupType != "Custom") && (svSetupType != "")) then
|
||||
goto Dlg_SdSetupType;
|
||||
endif;
|
||||
nResult = DialogShowSdComponentDialog2();
|
||||
if (nResult = BACK) goto Dlg_SdSetupType;
|
||||
|
||||
return 0;
|
||||
|
||||
end;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Function: ProcessBeforeDataMove //
|
||||
// //
|
||||
// Purpose: This function performs any necessary operations prior to the //
|
||||
// actual data move operation. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function ProcessBeforeDataMove()
|
||||
STRING svLogFile;
|
||||
NUMBER nResult;
|
||||
begin
|
||||
|
||||
InstallationInfo( @COMPANY_NAME, @PRODUCT_NAME, @PRODUCT_VERSION, @PRODUCT_KEY );
|
||||
|
||||
svLogFile = UNINST_LOGFILE_NAME;
|
||||
|
||||
nResult = DeinstallStart( svDir, svLogFile, @UNINST_KEY, 0 );
|
||||
if (nResult < 0) then
|
||||
MessageBox( @ERROR_UNINSTSETUP, WARNING );
|
||||
endif;
|
||||
|
||||
szAppPath = TARGETDIR; // TODO : if your application .exe is in a subdir of TARGETDIR then add subdir
|
||||
|
||||
if ((bIs32BitSetup) && (bIsShellExplorer)) then
|
||||
// RegDBSetItem( REGDB_APPPATH, szAppPath );
|
||||
// RegDBSetItem( REGDB_APPPATH_DEFAULT, szAppPath ^ @PRODUCT_KEY );
|
||||
RegDBSetItem( REGDB_UNINSTALL_NAME, @UNINST_DISPLAY_NAME );
|
||||
endif;
|
||||
|
||||
// TODO : update any items you want to process before moving the data
|
||||
//
|
||||
|
||||
return 0;
|
||||
end;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Function: MoveFileData //
|
||||
// //
|
||||
// Purpose: This function handles the data movement for //
|
||||
// the setup. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function MoveFileData()
|
||||
NUMBER nResult, nDisk;
|
||||
begin
|
||||
|
||||
nDisk = 1;
|
||||
SetStatusWindow( 0, "" );
|
||||
Disable( DIALOGCACHE );
|
||||
Enable( STATUS );
|
||||
StatusUpdate( ON, 100 );
|
||||
nResult = ComponentMoveData( MEDIA, nDisk, 0 );
|
||||
|
||||
HandleMoveDataError( nResult );
|
||||
|
||||
Disable( STATUS );
|
||||
|
||||
return nResult;
|
||||
|
||||
end;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Function: HandleMoveDataError //
|
||||
// //
|
||||
// Purpose: This function handles the error (if any) during the move data //
|
||||
// operation. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function HandleMoveDataError( nResult )
|
||||
STRING szErrMsg, svComponent , svFileGroup , svFile;
|
||||
begin
|
||||
|
||||
svComponent = "";
|
||||
svFileGroup = "";
|
||||
svFile = "";
|
||||
|
||||
switch (nResult)
|
||||
case 0:
|
||||
return 0;
|
||||
default:
|
||||
ComponentError ( MEDIA , svComponent , svFileGroup , svFile , nResult );
|
||||
szErrMsg = @ERROR_MOVEDATA + "\n\n" +
|
||||
@ERROR_COMPONENT + " " + svComponent + "\n" +
|
||||
@ERROR_FILEGROUP + " " + svFileGroup + "\n" +
|
||||
@ERROR_FILE + " " + svFile;
|
||||
SprintfBox( SEVERE, @TITLE_CAPTIONBAR, szErrMsg, nResult );
|
||||
bInstallAborted = TRUE;
|
||||
return nResult;
|
||||
endswitch;
|
||||
|
||||
end;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Function: ProcessAfterDataMove //
|
||||
// //
|
||||
// Purpose: This function performs any necessary operations needed after //
|
||||
// all data has been moved. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function ProcessAfterDataMove()
|
||||
begin
|
||||
|
||||
// TODO : update self-registered files and other processes that
|
||||
// should be performed after the data has been moved.
|
||||
|
||||
|
||||
return 0;
|
||||
end;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Function: SetupRegistry //
|
||||
// //
|
||||
// Purpose: This function makes the registry entries for this setup. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function SetupRegistry()
|
||||
NUMBER nResult;
|
||||
|
||||
begin
|
||||
|
||||
// TODO : Add all your registry entry keys here
|
||||
//
|
||||
//
|
||||
// RegDBCreateKeyEx, RegDBSetKeyValueEx....
|
||||
//
|
||||
|
||||
nResult = CreateRegistrySet( "" );
|
||||
|
||||
return nResult;
|
||||
end;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// Function: SetupFolders
|
||||
//
|
||||
// Purpose: This function creates all the folders and shortcuts for the
|
||||
// setup. This includes program groups and items for Windows 3.1.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function SetupFolders()
|
||||
NUMBER nResult;
|
||||
|
||||
begin
|
||||
|
||||
|
||||
// TODO : Add all your folder (program group) along with shortcuts (program items)
|
||||
//
|
||||
//
|
||||
// CreateProgramFolder, AddFolderIcon....
|
||||
//
|
||||
|
||||
nResult = CreateShellObjects( "" );
|
||||
|
||||
return nResult;
|
||||
end;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Function: CleanUpInstall //
|
||||
// //
|
||||
// Purpose: This cleans up the setup. Anything that should //
|
||||
// be released or deleted at the end of the setup should //
|
||||
// be done here. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function CleanUpInstall()
|
||||
begin
|
||||
|
||||
|
||||
if (bInstallAborted) then
|
||||
return 0;
|
||||
endif;
|
||||
|
||||
DialogShowSdFinishReboot();
|
||||
|
||||
if (BATCH_INSTALL) then // ensure locked files are properly written
|
||||
CommitSharedFiles(0);
|
||||
endif;
|
||||
|
||||
return 0;
|
||||
end;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Function: SetupInstall //
|
||||
// //
|
||||
// Purpose: This will setup the installation. Any general initialization //
|
||||
// needed for the installation should be performed here. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function SetupInstall()
|
||||
begin
|
||||
|
||||
Enable( CORECOMPONENTHANDLING );
|
||||
|
||||
bInstallAborted = FALSE;
|
||||
|
||||
if (bIs32BitSetup) then
|
||||
svDir = "C:\\mysql"; //PROGRAMFILES ^ @COMPANY_NAME ^ @PRODUCT_NAME;
|
||||
else
|
||||
svDir = "C:\\mysql"; //PROGRAMFILES ^ @COMPANY_NAME16 ^ @PRODUCT_NAME16; // use shorten names
|
||||
endif;
|
||||
|
||||
TARGETDIR = svDir;
|
||||
|
||||
SdProductName( @PRODUCT_NAME );
|
||||
|
||||
Enable( DIALOGCACHE );
|
||||
|
||||
return 0;
|
||||
end;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Function: SetupScreen //
|
||||
// //
|
||||
// Purpose: This function establishes the screen look. This includes //
|
||||
// colors, fonts, and text to be displayed. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function SetupScreen()
|
||||
begin
|
||||
|
||||
Enable( FULLWINDOWMODE );
|
||||
Enable( INDVFILESTATUS );
|
||||
SetTitle( @TITLE_MAIN, 24, WHITE );
|
||||
|
||||
SetTitle( @TITLE_CAPTIONBAR, 0, BACKGROUNDCAPTION ); // Caption bar text.
|
||||
|
||||
Enable( BACKGROUND );
|
||||
|
||||
Delay( 1 );
|
||||
end;
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Function: CheckRequirements //
|
||||
// //
|
||||
// Purpose: This function checks all minimum requirements for the //
|
||||
// application being installed. If any fail, then the user //
|
||||
// is informed and the setup is terminated. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function CheckRequirements()
|
||||
NUMBER nvDx, nvDy, nvResult;
|
||||
STRING svResult;
|
||||
|
||||
begin
|
||||
|
||||
bWinNT = FALSE;
|
||||
bIsShellExplorer = FALSE;
|
||||
|
||||
// Check screen resolution.
|
||||
GetExtents( nvDx, nvDy );
|
||||
|
||||
if (nvDy < 480) then
|
||||
MessageBox( @ERROR_VGARESOLUTION, WARNING );
|
||||
abort;
|
||||
endif;
|
||||
|
||||
// set 'setup' operation mode
|
||||
bIs32BitSetup = TRUE;
|
||||
GetSystemInfo( ISTYPE, nvResult, svResult );
|
||||
if (nvResult = 16) then
|
||||
bIs32BitSetup = FALSE; // running 16-bit setup
|
||||
return 0; // no additional information required
|
||||
endif;
|
||||
|
||||
// --- 32-bit testing after this point ---
|
||||
|
||||
// Determine the target system's operating system.
|
||||
GetSystemInfo( OS, nvResult, svResult );
|
||||
|
||||
if (nvResult = IS_WINDOWSNT) then
|
||||
// Running Windows NT.
|
||||
bWinNT = TRUE;
|
||||
|
||||
// Check to see if the shell being used is EXPLORER shell.
|
||||
if (GetSystemInfo( OSMAJOR, nvResult, svResult ) = 0) then
|
||||
if (nvResult >= 4) then
|
||||
bIsShellExplorer = TRUE;
|
||||
endif;
|
||||
endif;
|
||||
|
||||
elseif (nvResult = IS_WINDOWS95 ) then
|
||||
bIsShellExplorer = TRUE;
|
||||
|
||||
endif;
|
||||
|
||||
end;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Function: DialogShowSdWelcome //
|
||||
// //
|
||||
// Purpose: This function handles the standard welcome dialog. //
|
||||
// //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function DialogShowSdWelcome()
|
||||
NUMBER nResult;
|
||||
STRING szTitle, szMsg;
|
||||
begin
|
||||
|
||||
szTitle = "";
|
||||
szMsg = "";
|
||||
nResult = SdWelcome( szTitle, szMsg );
|
||||
|
||||
return nResult;
|
||||
end;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Function: DialogShowSdShowInfoList //
|
||||
// //
|
||||
// Purpose: This function displays the general information list dialog. //
|
||||
// //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function DialogShowSdShowInfoList()
|
||||
NUMBER nResult;
|
||||
LIST list;
|
||||
STRING szTitle, szMsg, szFile;
|
||||
begin
|
||||
|
||||
szFile = SUPPORTDIR ^ "infolist.txt";
|
||||
|
||||
list = ListCreate( STRINGLIST );
|
||||
ListReadFromFile( list, szFile );
|
||||
szTitle = "";
|
||||
szMsg = " ";
|
||||
nResult = SdShowInfoList( szTitle, szMsg, list );
|
||||
|
||||
ListDestroy( list );
|
||||
|
||||
return nResult;
|
||||
end;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Function: DialogShowSdAskDestPath //
|
||||
// //
|
||||
// Purpose: This function asks the user for the destination directory. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function DialogShowSdAskDestPath()
|
||||
NUMBER nResult;
|
||||
STRING szTitle, szMsg;
|
||||
begin
|
||||
|
||||
szTitle = "";
|
||||
szMsg = "";
|
||||
nResult = SdAskDestPath( szTitle, szMsg, svDir, 0 );
|
||||
|
||||
TARGETDIR = svDir;
|
||||
|
||||
return nResult;
|
||||
end;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Function: DialogShowSdSetupType //
|
||||
// //
|
||||
// Purpose: This function displays the standard setup type dialog. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function DialogShowSdSetupType()
|
||||
NUMBER nResult, nType;
|
||||
STRING szTitle, szMsg;
|
||||
begin
|
||||
|
||||
switch (svSetupType)
|
||||
case "Typical":
|
||||
nType = TYPICAL;
|
||||
case "Custom":
|
||||
nType = CUSTOM;
|
||||
case "Compact":
|
||||
nType = COMPACT;
|
||||
case "":
|
||||
svSetupType = "Typical";
|
||||
nType = TYPICAL;
|
||||
endswitch;
|
||||
|
||||
szTitle = "";
|
||||
szMsg = "";
|
||||
nResult = SetupType( szTitle, szMsg, "", nType, 0 );
|
||||
|
||||
switch (nResult)
|
||||
case COMPACT:
|
||||
svSetupType = "Compact";
|
||||
case TYPICAL:
|
||||
svSetupType = "Typical";
|
||||
case CUSTOM:
|
||||
svSetupType = "Custom";
|
||||
endswitch;
|
||||
|
||||
return nResult;
|
||||
end;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Function: DialogShowSdComponentDialog2 //
|
||||
// //
|
||||
// Purpose: This function displays the custom component dialog. //
|
||||
// //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function DialogShowSdComponentDialog2()
|
||||
NUMBER nResult;
|
||||
STRING szTitle, szMsg;
|
||||
begin
|
||||
|
||||
if ((svSetupType != "Custom") && (svSetupType != "")) then
|
||||
return 0;
|
||||
endif;
|
||||
|
||||
szTitle = "";
|
||||
szMsg = "";
|
||||
nResult = SdComponentDialog2( szTitle, szMsg, svDir, "" );
|
||||
|
||||
return nResult;
|
||||
end;
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Function: DialogShowSdFinishReboot //
|
||||
// //
|
||||
// Purpose: This function will show the last dialog of the product. //
|
||||
// It will allow the user to reboot and/or show some readme text. //
|
||||
// //
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
function DialogShowSdFinishReboot()
|
||||
NUMBER nResult, nDefOptions;
|
||||
STRING szTitle, szMsg1, szMsg2, szOption1, szOption2;
|
||||
NUMBER bOpt1, bOpt2;
|
||||
begin
|
||||
|
||||
if (!BATCH_INSTALL) then
|
||||
bOpt1 = FALSE;
|
||||
bOpt2 = FALSE;
|
||||
szMsg1 = "";
|
||||
szMsg2 = "";
|
||||
szOption1 = "";
|
||||
szOption2 = "";
|
||||
nResult = SdFinish( szTitle, szMsg1, szMsg2, szOption1, szOption2, bOpt1, bOpt2 );
|
||||
return 0;
|
||||
endif;
|
||||
|
||||
nDefOptions = SYS_BOOTMACHINE;
|
||||
szTitle = "";
|
||||
szMsg1 = "";
|
||||
szMsg2 = "";
|
||||
nResult = SdFinishReboot( szTitle, szMsg1, nDefOptions, szMsg2, 0 );
|
||||
|
||||
return nResult;
|
||||
end;
|
||||
|
||||
// --- include script file section ---
|
||||
|
||||
#include "sddialog.rul"
|
||||
|
||||
|
||||
|
@ -7,25 +7,25 @@
|
||||
CFG=mysqlclient - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "mysqlclient.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "mysqlclient.mak" CFG="mysqlclient - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE "mysqlclient - Win32 Release" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "mysqlclient - Win32 Debug" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=xicl6.exe
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "mysqlclient - Win32 Release"
|
||||
@ -48,7 +48,7 @@ RSC=rc.exe
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=xilink6.exe -lib
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo /out:"..\lib_release\mysqlclient.lib"
|
||||
|
||||
@ -72,11 +72,11 @@ LIB32=xilink6.exe -lib
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=xilink6.exe -lib
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo /out:"..\lib_debug\mysqlclient.lib"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
@ -252,7 +252,7 @@ SOURCE=..\mysys\mf_iocache2.c
|
||||
|
||||
# ADD CPP /Od
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -310,6 +310,10 @@ SOURCE=..\mysys\my_error.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\mysys\my_file.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\mysys\my_fopen.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -486,6 +490,10 @@ SOURCE=..\strings\strnmov.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\strings\strtod.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\strings\strtoll.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -7,24 +7,24 @@
|
||||
CFG=comp_err - Win32 Release
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "comp_err.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "comp_err.mak" CFG="comp_err - Win32 Release"
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE "comp_err - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=xicl6.exe
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
@ -45,9 +45,9 @@ RSC=rc.exe
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=xilink6.exe
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\lib_release\mysys.lib wsock32.lib ..\lib_release\strings.lib ..\lib_release\dbug.lib /nologo /subsystem:console /machine:I386 /nodefaultlib:"LIBC.lib" /out:"Release/comp-err.exe"
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ..\lib_release\mysys.lib wsock32.lib ..\lib_release\strings.lib ..\lib_release\dbug.lib /nologo /subsystem:console /machine:I386 /nodefaultlib:"LIBC.lib" /out:"../client_release/comp-err.exe"
|
||||
# Begin Target
|
||||
|
||||
# Name "comp_err - Win32 Release"
|
||||
|
@ -168,14 +168,6 @@ SOURCE=.\buf\buf0rea.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\com\com0com.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\com\com0shm.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\data\data0data.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -280,10 +272,6 @@ SOURCE=.\mtr\mtr0mtr.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\odbc\odbc0odbc.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\os\os0file.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -1,94 +0,0 @@
|
||||
LIBRARY LIBMYSQL
|
||||
DESCRIPTION 'MySQL 3.23 Client Library'
|
||||
VERSION 2.5
|
||||
EXPORTS
|
||||
mysql_affected_rows
|
||||
mysql_close
|
||||
mysql_connect
|
||||
mysql_create_db
|
||||
mysql_data_seek
|
||||
mysql_debug
|
||||
mysql_drop_db
|
||||
mysql_dump_debug_info
|
||||
mysql_eof
|
||||
mysql_errno
|
||||
mysql_error
|
||||
mysql_escape_string
|
||||
mysql_fetch_field
|
||||
mysql_fetch_field_direct
|
||||
mysql_fetch_fields
|
||||
mysql_fetch_lengths
|
||||
mysql_fetch_row
|
||||
mysql_field_count
|
||||
mysql_field_seek
|
||||
mysql_field_tell
|
||||
mysql_free_result
|
||||
mysql_get_client_info
|
||||
mysql_get_host_info
|
||||
mysql_get_proto_info
|
||||
mysql_get_server_info
|
||||
mysql_info
|
||||
mysql_init
|
||||
mysql_insert_id
|
||||
mysql_kill
|
||||
mysql_list_dbs
|
||||
mysql_list_fields
|
||||
mysql_list_processes
|
||||
mysql_list_tables
|
||||
mysql_num_fields
|
||||
mysql_num_rows
|
||||
mysql_odbc_escape_string
|
||||
mysql_options
|
||||
mysql_ping
|
||||
mysql_query
|
||||
mysql_real_connect
|
||||
mysql_real_query
|
||||
mysql_refresh
|
||||
mysql_row_seek
|
||||
mysql_row_tell
|
||||
mysql_select_db
|
||||
mysql_shutdown
|
||||
mysql_stat
|
||||
mysql_store_result
|
||||
mysql_thread_id
|
||||
mysql_use_result
|
||||
bmove_upp
|
||||
delete_dynamic
|
||||
_dig_vec
|
||||
init_dynamic_array
|
||||
insert_dynamic
|
||||
int2str
|
||||
is_prefix
|
||||
list_add
|
||||
list_delete
|
||||
max_allowed_packet
|
||||
my_casecmp
|
||||
my_init
|
||||
my_end
|
||||
my_strdup
|
||||
my_malloc
|
||||
my_memdup
|
||||
my_no_flags_free
|
||||
my_realloc
|
||||
my_thread_end
|
||||
my_thread_init
|
||||
net_buffer_length
|
||||
set_dynamic
|
||||
strcend
|
||||
strdup_root
|
||||
strfill
|
||||
strinstr
|
||||
strmake
|
||||
strmov
|
||||
strxmov
|
||||
myodbc_remove_escape
|
||||
mysql_thread_safe
|
||||
mysql_character_set_name
|
||||
mysql_change_user
|
||||
mysql_send_query
|
||||
mysql_read_query_result
|
||||
mysql_real_escape_string
|
||||
load_defaults
|
||||
free_defaults
|
||||
|
||||
|
@ -487,6 +487,10 @@ SOURCE=..\strings\strnmov.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\strings\strtod.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\strings\strtoll.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -495,6 +499,10 @@ SOURCE=..\strings\strxmov.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\strings\strxnmov.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\mysys\thr_mutex.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -43,7 +43,7 @@ RSC=rc.exe
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBMYSQLD_EXPORTS" /YX /FD /c
|
||||
# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../sql" /I "../regex" /I "../bdb/build_win32" /I "../zlib" /D "NDEBUG" /D "DBUG_OFF" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "USE_SYMDIR" /D "SIGNAL_WITH_VIO_CLOSE" /D "HAVE_DLOPEN" /D "EMBEDDED_LIBRARY" /D "MYSQL_SERVER" /D "HAVE_INNOBASE_DB" /D "USE_TLS" /D "__WIN__" /FD /c
|
||||
# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../sql" /I "../regex" /I "../bdb/build_win32" /I "../zlib" /I "../libmysqld" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "USE_SYMDIR" /D "SIGNAL_WITH_VIO_CLOSE" /D "HAVE_DLOPEN" /D "EMBEDDED_LIBRARY" /D "MYSQL_SERVER" /D "HAVE_INNOBASE_DB" /D "DBUG_OFF" /D "USE_TLS" /D "__WIN__" /FD /c
|
||||
# SUBTRACT CPP /WX /Fr
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
|
||||
@ -70,7 +70,7 @@ LINK32=xilink6.exe
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "LIBMYSQLD_EXPORTS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MT /W3 /Z7 /Od /I "../include" /I "../sql" /I "../regex" /I "../bdb/build_win32" /I "../zlib" /D "_DEBUG" /D "HAVE_BERKELEY_DB" /D "MYSQL_SERVER" /D "WIN32" /D "_WINDOWS" /D "_MBCS" /D "USE_SYMDIR" /D "SIGNAL_WITH_VIO_CLOSE" /D "HAVE_DLOPEN" /D "EMBEDDED_LIBRARY" /D "HAVE_INNOBASE_DB" /D "USE_TLS" /D "__WIN__" /FD /GZ /c
|
||||
# ADD CPP /nologo /MT /W3 /Z7 /Od /I "../include" /I "../sql" /I "../regex" /I "../bdb/build_win32" /I "../zlib" /I "libmysqld" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "HAVE_BERKELEY_DB" /D "USE_SYMDIR" /D "SIGNAL_WITH_VIO_CLOSE" /D "HAVE_DLOPEN" /D "EMBEDDED_LIBRARY" /D "MYSQL_SERVER" /D "HAVE_INNOBASE_DB" /D "USE_TLS" /D "__WIN__" /FD /GZ /c
|
||||
# SUBTRACT CPP /Fr
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||
@ -271,10 +271,6 @@ SOURCE=..\sql\net_serv.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\sql\opt_ft.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\sql\opt_range.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -7,25 +7,25 @@
|
||||
CFG=my_print_defaults - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "my_print_defaults.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "my_print_defaults.mak" CFG="my_print_defaults - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE "my_print_defaults - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "my_print_defaults - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=xicl6.exe
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "my_print_defaults - Win32 Release"
|
||||
@ -39,6 +39,7 @@ RSC=rc.exe
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "release"
|
||||
# PROP Intermediate_Dir "release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
@ -47,9 +48,9 @@ RSC=rc.exe
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=xilink6.exe
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:console /machine:I386 /out:"../client_release/my_print_defaults.exe"
|
||||
|
||||
!ELSEIF "$(CFG)" == "my_print_defaults - Win32 Debug"
|
||||
|
||||
@ -71,11 +72,11 @@ LINK32=xilink6.exe
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=xilink6.exe
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:console /debug /machine:I386 /nodefaultlib:"LIBCMTD.lib" /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib /nologo /subsystem:console /debug /machine:I386 /nodefaultlib:"LIBCMTD.lib" /out:"../client_debug/my_print_defaults.exe" /pdbtype:sept
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
|
103
VC++Files/myisam_ftdump/myisam_ftdump.dsp
Executable file
103
VC++Files/myisam_ftdump/myisam_ftdump.dsp
Executable file
@ -0,0 +1,103 @@
|
||||
# Microsoft Developer Studio Project File - Name="myisam_ftdump" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=myisam_ftdump - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "myisam_ftdump.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "myisam_ftdump.mak" CFG="myisam_ftdump - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "myisam_ftdump - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "myisam_ftdump - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "myisam_ftdump - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "release"
|
||||
# PROP Intermediate_Dir "release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../myisam" /D "NDEBUG" /D "DBUG_OFF" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FR /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib uuid.lib setargv.obj /nologo /subsystem:console /machine:I386 /out:"../client_release/myisam_ftdump.exe"
|
||||
|
||||
!ELSEIF "$(CFG)" == "myisam_ftdump - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "debug"
|
||||
# PROP Intermediate_Dir "debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /G6 /MTd /W3 /Z7 /Od /I "../include" /I "../myisam" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_CONSOLE" /D "_MBCS" /D "_WINDOWS" /FD /c
|
||||
# SUBTRACT CPP /Fr
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib wsock32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib setargv.obj /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"../client_debug/myisam_ftdump.exe" /pdbtype:sept
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "myisam_ftdump - Win32 Release"
|
||||
# Name "myisam_ftdump - Win32 Debug"
|
||||
# Begin Group "Source Files"
|
||||
|
||||
# PROP Default_Filter "cpp;c;cxx;rc;def;r;odl;idl;hpj;bat"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\myisam\myisam_ftdump.c
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "Header Files"
|
||||
|
||||
# PROP Default_Filter "h;hpp;hxx;hm;inl"
|
||||
# End Group
|
||||
# Begin Group "Resource Files"
|
||||
|
||||
# PROP Default_Filter "ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe"
|
||||
# End Group
|
||||
# End Target
|
||||
# End Project
|
@ -7,19 +7,19 @@
|
||||
CFG=myisampack - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "myisampack.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "myisampack.mak" CFG="myisampack - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE "myisampack - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "myisampack - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
@ -51,7 +51,7 @@ BSC32=bscmake.exe
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=xilink6.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib uuid.lib setargv.obj /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib uuid.lib setargv.obj /nologo /subsystem:console /machine:I386 /out:"../client_release/myisampack.exe"
|
||||
|
||||
!ELSEIF "$(CFG)" == "myisampack - Win32 Debug"
|
||||
|
||||
@ -76,9 +76,9 @@ BSC32=bscmake.exe
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=xilink6.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib wsock32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib setargv.obj /nologo /subsystem:console /incremental:no /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib wsock32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib setargv.obj /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"../client_debug/myisampack.exe" /pdbtype:sept
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
|
@ -38,6 +38,9 @@ Package=<5>
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name mysys
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
@ -231,6 +234,30 @@ Package=<4>
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "myisam_ftdump"=".\myisam_ftdump\myisam_ftdump.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name dbug
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name myisam
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name mysys
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name strings
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "myisamchk"=".\myisamchk\myisamchk.dsp" - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
@ -797,3 +824,4 @@ Package=<3>
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
|
@ -41,7 +41,7 @@ RSC=rc.exe
|
||||
# PROP Intermediate_Dir "release"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /O2 /I "../include" /I "../regex" /I "../sql" /I "../bdb/build_win32" /I "../zlib" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "USE_SYMDIR" /D "SIGNAL_WITH_VIO_CLOSE" /D "HAVE_DLOPEN" /D "EMBEDDED_LIBRARY" /D "MYSQL_SERVER" /D "HAVE_INNOBASE_DB" /D "DBUG_OFF" /D "USE_TLS" /D "__WIN__" /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /O2 /I "../include" /I "../regex" /I "../sql" /I "../bdb/build_win32" /I "../zlib" /I "../libmysqld" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "USE_SYMDIR" /D "SIGNAL_WITH_VIO_CLOSE" /D "HAVE_DLOPEN" /D "EMBEDDED_LIBRARY" /D "MYSQL_SERVER" /D "HAVE_INNOBASE_DB" /D "DBUG_OFF" /D "USE_TLS" /D "__WIN__" /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE RSC /l 0x416 /d "NDEBUG"
|
||||
# ADD RSC /l 0x416 /d "NDEBUG"
|
||||
@ -65,7 +65,7 @@ LIB32=xilink6.exe -lib
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MTd /W3 /Z7 /Od /I "../zlib" /I "../include" /I "../regex" /I "../sql" /I "../bdb/build_win32" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "USE_SYMDIR" /D "SIGNAL_WITH_VIO_CLOSE" /D "HAVE_DLOPEN" /D "EMBEDDED_LIBRARY" /D "MYSQL_SERVER" /D "HAVE_INNOBASE_DB" /D "USE_TLS" /D "__WIN__" /FD /GZ /c
|
||||
# ADD CPP /nologo /MTd /W3 /Z7 /Od /I "../zlib" /I "../include" /I "../regex" /I "../sql" /I "../bdb/build_win32" /I "../libmysqld" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "USE_SYMDIR" /D "SIGNAL_WITH_VIO_CLOSE" /D "HAVE_DLOPEN" /D "EMBEDDED_LIBRARY" /D "MYSQL_SERVER" /D "HAVE_INNOBASE_DB" /D "USE_TLS" /D "__WIN__" /FD /GZ /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE RSC /l 0x416 /d "_DEBUG"
|
||||
# ADD RSC /l 0x416 /d "_DEBUG"
|
||||
@ -220,10 +220,6 @@ SOURCE=..\sql\net_serv.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\sql\opt_ft.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\sql\opt_range.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -41,7 +41,7 @@ RSC=rc.exe
|
||||
# PROP Intermediate_Dir "release"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /O2 /I "../include" /I "../regex" /I "../sql" /I "../bdb/build_win32" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "HAVE_BERKELEY_DB" /D "USE_SYMDIR" /D "SIGNAL_WITH_VIO_CLOSE" /D "HAVE_DLOPEN" /D "EMBEDDED_LIBRARY" /D "HAVE_INNOBASE_DB" /D "DBUG_OFF" /D "USE_TLS" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /O2 /I "../include" /I "../regex" /I "../sql" /I "../bdb/build_win32" /I "../libmysqld" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "HAVE_BERKELEY_DB" /D "USE_SYMDIR" /D "SIGNAL_WITH_VIO_CLOSE" /D "HAVE_DLOPEN" /D "EMBEDDED_LIBRARY" /D "HAVE_INNOBASE_DB" /D "DBUG_OFF" /D "USE_TLS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x416 /d "NDEBUG"
|
||||
# ADD RSC /l 0x416 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
@ -64,7 +64,7 @@ LIB32=xilink6.exe -lib
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MTd /W3 /Z7 /Od /I "../include" /I "../regex" /I "../sql" /I "../bdb/build_win32" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "HAVE_BERKELEY_DB" /D "USE_SYMDIR" /D "SIGNAL_WITH_VIO_CLOSE" /D "HAVE_DLOPEN" /D "EMBEDDED_LIBRARY" /D "HAVE_INNOBASE_DB" /D "USE_TLS" /YX /FD /GZ /c
|
||||
# ADD CPP /nologo /MTd /W3 /Z7 /Od /I "../include" /I "../regex" /I "../sql" /I "../bdb/build_win32" /I "libmysqld" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "HAVE_BERKELEY_DB" /D "USE_SYMDIR" /D "SIGNAL_WITH_VIO_CLOSE" /D "HAVE_DLOPEN" /D "EMBEDDED_LIBRARY" /D "HAVE_INNOBASE_DB" /D "USE_TLS" /YX /FD /GZ /c
|
||||
# ADD BASE RSC /l 0x416 /d "_DEBUG"
|
||||
# ADD RSC /l 0x416 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
|
@ -7,26 +7,26 @@
|
||||
CFG=mysys - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "mysys.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "mysys.mak" CFG="mysys - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE "mysys - Win32 Release" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "mysys - Win32 Debug" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "mysys - Win32 Max" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=xicl6.exe
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "mysys - Win32 Release"
|
||||
@ -42,14 +42,14 @@ RSC=rc.exe
|
||||
# PROP Intermediate_Dir "release"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../zlib" /D "NDEBUG" /D "DBUG_OFF" /D "_WINDOWS" /FD /c
|
||||
# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../zlib" /D "NDEBUG" /D "DBUG_OFF" /D "_WINDOWS" /D "USE_SYMLINK" /FD /c
|
||||
# SUBTRACT CPP /WX /Fr /YX
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=xilink6.exe -lib
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo /out:"..\lib_release\mysys.lib"
|
||||
|
||||
@ -66,14 +66,14 @@ LIB32=xilink6.exe -lib
|
||||
# PROP Intermediate_Dir "debug"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /G6 /MTd /W3 /Z7 /Od /I "../include" /I "../zlib" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_WINDOWS" /D "USE_SYMDIR" /FD /c
|
||||
# ADD CPP /nologo /G6 /MTd /W3 /Z7 /Od /I "../include" /I "../zlib" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_WINDOWS" /D "USE_SYMDIR" /D "USE_SYMLINK" /FD /c
|
||||
# SUBTRACT CPP /Fr
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=xilink6.exe -lib
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo /out:"..\lib_debug\mysys.lib"
|
||||
|
||||
@ -91,18 +91,18 @@ LIB32=xilink6.exe -lib
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /G6 /MT /W3 /O2 /I "../include" /D "NDEBUG" /D "DBUG_OFF" /D "_WINDOWS" /FD /c
|
||||
# SUBTRACT BASE CPP /YX
|
||||
# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../zlib" /D "NDEBUG" /D "DBUG_OFF" /D "_WINDOWS" /D "USE_SYMDIR" /FD /c
|
||||
# ADD CPP /nologo /G6 /MT /W3 /O2 /I "../include" /I "../zlib" /D "NDEBUG" /D "DBUG_OFF" /D "_WINDOWS" /D "USE_SYMDIR" /D "USE_SYMLINK" /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=xilink6.exe -lib
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo /out:"..\lib_release\mysys.lib"
|
||||
# ADD LIB32 /nologo /out:"..\lib_release\mysys-max.lib"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
@ -121,7 +121,7 @@ SOURCE=.\array.c
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysys - Win32 Max"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -330,10 +330,18 @@ SOURCE=.\my_gethostbyname.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\my_gethwaddr.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\my_getopt.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\my_getsystime.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\my_getwd.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -390,6 +398,10 @@ SOURCE=.\my_open.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\my_file.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\my_pread.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -516,7 +528,7 @@ SOURCE=.\thr_lock.c
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysys - Win32 Max"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -7,28 +7,28 @@
|
||||
CFG=mysqld - Win32 Release
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "mysqld.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "mysqld.mak" CFG="mysqld - Win32 Release"
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
!MESSAGE "mysqld - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "mysqld - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "mysqld - Win32 nt" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "mysqld - Win32 Max nt" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "mysqld - Win32 Max" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=xicl6.exe
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "mysqld - Win32 Release"
|
||||
@ -52,7 +52,7 @@ RSC=rc.exe
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=xilink6.exe
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Wsock32.lib ..\lib_release\vio.lib ..\lib_release\isam.lib ..\lib_release\merge.lib ..\lib_release\mysys.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"../client_release/mysqld-opt.exe"
|
||||
# SUBTRACT LINK32 /debug
|
||||
@ -78,7 +78,7 @@ LINK32=xilink6.exe
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=xilink6.exe
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Wsock32.lib ..\lib_debug\dbug.lib ..\lib_debug\vio.lib ..\lib_debug\isam.lib ..\lib_debug\merge.lib ..\lib_debug\mysys.lib ..\lib_debug\strings.lib ..\lib_debug\regex.lib ..\lib_debug\heap.lib ..\lib_debug\bdb.lib ..\lib_debug\innodb.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"../client_debug/mysqld.exe" /pdbtype:sept
|
||||
|
||||
@ -105,7 +105,7 @@ LINK32=xilink6.exe
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=xilink6.exe
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Wsock32.lib ..\lib_release\dbug.lib ..\lib_release\isam.lib ..\lib_release\merge.lib ..\lib_release\mysys.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap.lib /nologo /subsystem:console /debug /machine:I386
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Wsock32.lib ..\lib_release\vio.lib ..\lib_release\isam.lib ..\lib_release\merge.lib ..\lib_release\myisam.lib ..\lib_release\myisammrg.lib ..\lib_release\mysys.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap.lib ..\lib_release\innodb.lib ..\lib_release\zlib.lib /nologo /subsystem:console /map /machine:I386 /out:"../client_release/mysqld-nt.exe"
|
||||
# SUBTRACT LINK32 /pdb:none /debug
|
||||
@ -133,7 +133,7 @@ LINK32=xilink6.exe
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=xilink6.exe
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Wsock32.lib ..\lib_release\isam.lib ..\lib_release\merge.lib ..\lib_release\myisam.lib ..\lib_release\myisammrg.lib ..\lib_release\mysys.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap.lib ..\lib_release\zlib.lib /nologo /subsystem:console /map /machine:I386 /out:"../client_release/mysqld-nt.exe"
|
||||
# SUBTRACT BASE LINK32 /pdb:none /debug
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Wsock32.lib ..\lib_release\vio.lib ..\lib_release\isam.lib ..\lib_release\merge.lib ..\lib_release\myisam.lib ..\lib_release\myisammrg.lib ..\lib_release\mysys-max.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap.lib ..\lib_release\zlib.lib ..\lib_release\innodb.lib ..\lib_release\bdb.lib /nologo /subsystem:console /map /machine:I386 /out:"../client_release/mysqld-max-nt.exe"
|
||||
@ -162,12 +162,12 @@ LINK32=xilink6.exe
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=xilink6.exe
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Wsock32.lib ..\lib_release\isam.lib ..\lib_release\merge.lib ..\lib_release\mysys.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /out:"../client_release/mysqld-opt.exe"
|
||||
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib Wsock32.lib ..\lib_release\vio.lib ..\lib_release\isam.lib ..\lib_release\merge.lib ..\lib_release\myisam.lib ..\lib_release\myisammrg.lib ..\lib_release\mysys-max.lib ..\lib_release\strings.lib ..\lib_release\regex.lib ..\lib_release\heap.lib ..\lib_release\innodb.lib ..\lib_release\bdb.lib ..\lib_release\zlib.lib /nologo /subsystem:console /pdb:none /machine:I386 /out:"../client_release/mysqld-max.exe"
|
||||
# SUBTRACT LINK32 /debug
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
@ -193,7 +193,7 @@ SOURCE=.\client.c
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -213,7 +213,7 @@ SOURCE=.\derror.cpp
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -237,7 +237,7 @@ SOURCE=.\field.cpp
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -257,7 +257,7 @@ SOURCE=.\field_conv.cpp
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -277,7 +277,7 @@ SOURCE=.\filesort.cpp
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -329,7 +329,7 @@ SOURCE=.\handler.cpp
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -348,7 +348,7 @@ SOURCE=.\hash_filo.cpp
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -371,7 +371,7 @@ SOURCE=.\hostname.cpp
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -391,7 +391,7 @@ SOURCE=.\init.cpp
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -411,7 +411,7 @@ SOURCE=.\item.cpp
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -431,7 +431,7 @@ SOURCE=.\item_buff.cpp
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -451,7 +451,7 @@ SOURCE=.\item_cmpfunc.cpp
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -503,7 +503,7 @@ SOURCE=.\item_strfunc.cpp
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -527,7 +527,7 @@ SOURCE=.\item_sum.cpp
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -546,7 +546,7 @@ SOURCE=.\item_timefunc.cpp
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -566,7 +566,7 @@ SOURCE=.\item_uniq.cpp
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -586,7 +586,7 @@ SOURCE=.\key.cpp
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -606,7 +606,7 @@ SOURCE=.\lock.cpp
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -626,7 +626,7 @@ SOURCE=.\log.cpp
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -649,7 +649,7 @@ SOURCE=.\mf_iocache.cpp
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -673,7 +673,7 @@ SOURCE=.\mysqld.cpp
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -696,7 +696,7 @@ SOURCE=.\nt_servc.cpp
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -705,10 +705,6 @@ SOURCE=.\nt_servc.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\opt_ft.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\opt_range.cpp
|
||||
|
||||
!IF "$(CFG)" == "mysqld - Win32 Release"
|
||||
@ -723,7 +719,7 @@ SOURCE=.\opt_range.cpp
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -754,7 +750,7 @@ SOURCE=.\password.c
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -774,7 +770,7 @@ SOURCE=.\procedure.cpp
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -802,7 +798,7 @@ SOURCE=.\records.cpp
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -858,7 +854,7 @@ SOURCE=.\sql_acl.cpp
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -882,7 +878,7 @@ SOURCE=.\sql_base.cpp
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -938,7 +934,7 @@ SOURCE=.\sql_db.cpp
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -958,7 +954,7 @@ SOURCE=.\sql_delete.cpp
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -998,7 +994,7 @@ SOURCE=.\sql_insert.cpp
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -1018,7 +1014,7 @@ SOURCE=.\sql_lex.cpp
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -1038,7 +1034,7 @@ SOURCE=.\sql_list.cpp
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -1058,7 +1054,7 @@ SOURCE=.\sql_load.cpp
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -1082,7 +1078,7 @@ SOURCE=.\sql_map.cpp
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -1102,7 +1098,7 @@ SOURCE=.\sql_parse.cpp
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -1134,7 +1130,7 @@ SOURCE=.\sql_select.cpp
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -1154,7 +1150,7 @@ SOURCE=.\sql_show.cpp
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -1178,7 +1174,7 @@ SOURCE=.\sql_string.cpp
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -1198,7 +1194,7 @@ SOURCE=.\sql_table.cpp
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -1218,7 +1214,7 @@ SOURCE=.\sql_test.cpp
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -1246,7 +1242,7 @@ SOURCE=.\sql_update.cpp
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -1266,7 +1262,7 @@ SOURCE=.\sql_yacc.cpp
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -1310,7 +1306,7 @@ SOURCE=.\thr_malloc.cpp
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -1330,7 +1326,7 @@ SOURCE=.\time.cpp
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -1354,7 +1350,7 @@ SOURCE=.\unireg.cpp
|
||||
|
||||
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
|
||||
|
||||
!ENDIF
|
||||
!ENDIF
|
||||
|
||||
# End Source File
|
||||
# End Target
|
||||
|
@ -84,10 +84,6 @@ LIB32=link.exe -lib
|
||||
# Name "strings - Win32 Debug"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\atof.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\bchange.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -160,6 +156,10 @@ SOURCE=.\str2int.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\strnlen.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\Strings.asm
|
||||
|
||||
!IF "$(CFG)" == "strings - Win32 Release"
|
||||
@ -191,6 +191,10 @@ InputName=Strings
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\strtod.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\strtol.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -25,7 +25,7 @@ CFG=strings - Win32 Debug
|
||||
# PROP AllowPerConfigDependencies 0
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
CPP=xicl6.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "strings - Win32 Release"
|
||||
@ -48,7 +48,7 @@ RSC=rc.exe
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
LIB32=xilink6.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo /out:"..\lib_release\strings.lib"
|
||||
|
||||
@ -65,14 +65,14 @@ LIB32=link.exe -lib
|
||||
# PROP Intermediate_Dir "debug"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /G6 /MTd /W3 /Z7 /Od /Gf /I "../include" /D "_DEBUG" /D "SAFEMALLOC" /D "_WINDOWS" /FD /c
|
||||
# ADD CPP /nologo /G6 /MTd /W3 /Z7 /Od /Gf /I "../include" /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_WINDOWS" /FD /c
|
||||
# SUBTRACT CPP /YX
|
||||
# ADD BASE RSC /l 0x409
|
||||
# ADD RSC /l 0x409
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
LIB32=xilink6.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo /out:"..\lib_debug\strings.lib"
|
||||
|
||||
@ -84,10 +84,6 @@ LIB32=link.exe -lib
|
||||
# Name "strings - Win32 Debug"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\atof.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\bchange.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -100,10 +96,6 @@ SOURCE=.\bfill.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\bmove.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\bmove512.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -116,6 +108,10 @@ SOURCE=".\ctype-big5.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\ctype-bin.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\ctype-czech.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -124,6 +120,10 @@ SOURCE=".\ctype-euc_kr.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\ctype-extra.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\ctype-gb2312.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -132,7 +132,15 @@ SOURCE=".\ctype-gbk.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\ctype-latin1_de.c"
|
||||
SOURCE=".\ctype-latin1.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\ctype-mb.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\ctype-simple.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
@ -144,10 +152,22 @@ SOURCE=".\ctype-tis620.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\ctype-ucs2.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\ctype-ujis.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\ctype-utf8.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=".\ctype-win1250ch.c"
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\ctype.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -168,6 +188,14 @@ SOURCE=.\longlong2str.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\my_strtoll10.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\my_vsnprintf.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\r_strinstr.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -176,18 +204,10 @@ SOURCE=.\str2int.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\strappend.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\strcend.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\strcont.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\strend.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -196,10 +216,6 @@ SOURCE=.\strfill.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\strinstr.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\strmake.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -208,15 +224,11 @@ SOURCE=.\strmov.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\strnlen.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\strnmov.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\strstr.c
|
||||
SOURCE=.\strtod.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
@ -242,5 +254,9 @@ SOURCE=.\strxmov.c
|
||||
|
||||
SOURCE=.\strxnmov.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\xml.c
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
|
@ -84,10 +84,6 @@ LIB32=xilink6.exe -lib
|
||||
# Name "strings - Win32 Debug"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\atof.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\bchange.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -192,6 +188,10 @@ SOURCE=.\longlong2str.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\strnlen.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\my_strtoll10.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@ -232,6 +232,10 @@ SOURCE=.\strnmov.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\strtod.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\strtol.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
@ -1252,7 +1252,6 @@ dnl Some libs are listed several times, in order for gcc to sort out
|
||||
dnl circular references.
|
||||
innodb_libs="\
|
||||
\$(top_builddir)/innobase/usr/libusr.a\
|
||||
\$(top_builddir)/innobase/odbc/libodbc.a\
|
||||
\$(top_builddir)/innobase/srv/libsrv.a\
|
||||
\$(top_builddir)/innobase/dict/libdict.a\
|
||||
\$(top_builddir)/innobase/que/libque.a\
|
||||
@ -1276,7 +1275,6 @@ dnl circular references.
|
||||
\$(top_builddir)/innobase/page/libpage.a\
|
||||
\$(top_builddir)/innobase/rem/librem.a\
|
||||
\$(top_builddir)/innobase/thr/libthr.a\
|
||||
\$(top_builddir)/innobase/com/libcom.a\
|
||||
\$(top_builddir)/innobase/sync/libsync.a\
|
||||
\$(top_builddir)/innobase/data/libdata.a\
|
||||
\$(top_builddir)/innobase/mach/libmach.a\
|
||||
|
@ -19,7 +19,8 @@
|
||||
#AUTOMAKE_OPTIONS = nostdinc
|
||||
INCLUDES = -I$(top_srcdir)/include $(openssl_includes)
|
||||
LIBS = @CLIENT_LIBS@
|
||||
LDADD = @CLIENT_EXTRA_LDFLAGS@ ../libmysql/libmysqlclient.la
|
||||
DEPLIB= ../libmysql/libmysqlclient.la
|
||||
LDADD = @CLIENT_EXTRA_LDFLAGS@ $(DEPLIB)
|
||||
bin_PROGRAMS = mysql mysqladmin mysqlcheck mysqlshow \
|
||||
mysqldump mysqlimport mysqltest mysqlbinlog mysqlmanagerc mysqlmanager-pwgen
|
||||
noinst_HEADERS = sql_string.h completion_hash.h my_readline.h \
|
||||
@ -27,18 +28,18 @@ noinst_HEADERS = sql_string.h completion_hash.h my_readline.h \
|
||||
mysql_SOURCES = mysql.cc readline.cc sql_string.cc completion_hash.cc
|
||||
mysql_LDADD = @readline_link@ @TERMCAP_LIB@ $(LDADD) $(CXXLDFLAGS)
|
||||
mysqlbinlog_LDADD = $(LDADD) $(CXXLDFLAGS)
|
||||
mysql_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES)
|
||||
mysqladmin_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES)
|
||||
mysqlcheck_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES)
|
||||
mysqlshow_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES)
|
||||
mysqldump_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES)
|
||||
mysqlimport_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES)
|
||||
mysql_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) $(DEPLIB)
|
||||
mysqladmin_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) $(DEPLIB)
|
||||
mysqlcheck_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) $(DEPLIB)
|
||||
mysqlshow_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) $(DEPLIB)
|
||||
mysqldump_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) $(DEPLIB)
|
||||
mysqlimport_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) $(DEPLIB)
|
||||
mysqltest_SOURCES= mysqltest.c
|
||||
mysqltest_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES)
|
||||
mysqltest_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) $(DEPLIB)
|
||||
mysqlbinlog_SOURCES = mysqlbinlog.cc ../mysys/mf_tempdir.c
|
||||
mysqlbinlog_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES)
|
||||
mysqlbinlog_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) $(DEPLIB)
|
||||
mysqlmanagerc_SOURCES = mysqlmanagerc.c
|
||||
mysqlmanagerc_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES)
|
||||
mysqlmanagerc_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) $(DEPLIB)
|
||||
sql_src=log_event.h mysql_priv.h log_event.cc
|
||||
|
||||
# Fix for mit-threads
|
||||
|
@ -43,4 +43,5 @@ enum options_client
|
||||
OPT_PROMPT, OPT_IGN_LINES,OPT_TRANSACTION,OPT_MYSQL_PROTOCOL,
|
||||
OPT_SHARED_MEMORY_BASE_NAME, OPT_FRM, OPT_SKIP_OPTIMIZATION,
|
||||
OPT_COMPATIBLE, OPT_RECONNECT, OPT_DELIMITER, OPT_SECURE_AUTH,
|
||||
OPT_OPEN_FILES_LIMIT, OPT_SET_CHARSET
|
||||
};
|
||||
|
117
client/mysql.cc
117
client/mysql.cc
@ -25,7 +25,7 @@
|
||||
* Matt Wagner <matt@mysql.com>
|
||||
* Jeremy Cole <jcole@mysql.com>
|
||||
* Tonu Samuel <tonu@mysql.com>
|
||||
* Harrison Fisk <hcfisk@buffalo.edu>
|
||||
* Harrison Fisk <harrison@mysql.com>
|
||||
*
|
||||
**/
|
||||
|
||||
@ -289,10 +289,25 @@ static const char *server_default_groups[]=
|
||||
{ "server", "embedded", "mysql_SERVER", 0 };
|
||||
|
||||
#ifdef HAVE_READLINE
|
||||
/*
|
||||
HIST_ENTRY is defined for libedit, but not for the real readline
|
||||
Need to redefine it for real readline to find it
|
||||
*/
|
||||
#if !defined(USE_LIBEDIT_INTERFACE)
|
||||
typedef struct _hist_entry {
|
||||
const char *line;
|
||||
const char *data;
|
||||
} HIST_ENTRY;
|
||||
#endif
|
||||
|
||||
extern "C" int add_history(const char *command); /* From readline directory */
|
||||
extern "C" int read_history(const char *command);
|
||||
extern "C" int write_history(const char *command);
|
||||
extern "C" HIST_ENTRY *history_get(int num);
|
||||
extern "C" int history_length;
|
||||
static int not_in_history(const char *line);
|
||||
static void initialize_readline (char *name);
|
||||
static void fix_history(String *final_command);
|
||||
#endif
|
||||
|
||||
static COMMANDS *find_command (char *name,char cmd_name);
|
||||
@ -410,8 +425,9 @@ int main(int argc,char *argv[])
|
||||
}
|
||||
#endif
|
||||
sprintf(buff, "%s",
|
||||
#ifndef NOT_YET
|
||||
"Type 'help;' or '\\h' for help. Type '\\c' to clear the buffer.\n");
|
||||
#ifdef NOT_YET
|
||||
#else
|
||||
"Type 'help [[%]function name[%]]' to get help on usage of function.\n");
|
||||
#endif
|
||||
put_info(buff,INFO_INFO);
|
||||
@ -604,10 +620,10 @@ static struct my_option my_long_options[] =
|
||||
(gptr*) ¤t_user, 0, GET_STR_ALLOC, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"safe-updates", 'U', "Only allow UPDATE and DELETE that uses keys.",
|
||||
(gptr*) &safe_updates, (gptr*) &safe_updates, 0, GET_BOOL, OPT_ARG, 0, 0,
|
||||
(gptr*) &safe_updates, (gptr*) &safe_updates, 0, GET_BOOL, NO_ARG, 0, 0,
|
||||
0, 0, 0, 0},
|
||||
{"i-am-a-dummy", 'U', "Synonym for option --safe-updates, -U.",
|
||||
(gptr*) &safe_updates, (gptr*) &safe_updates, 0, GET_BOOL, OPT_ARG, 0, 0,
|
||||
(gptr*) &safe_updates, (gptr*) &safe_updates, 0, GET_BOOL, NO_ARG, 0, 0,
|
||||
0, 0, 0, 0},
|
||||
{"verbose", 'v', "Write more. (-v -v -v gives the table output format).", 0,
|
||||
0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
@ -937,7 +953,7 @@ static int read_lines(bool execute_commands)
|
||||
if (glob_buffer.is_empty()) // If buffer was emptied
|
||||
in_string=0;
|
||||
#ifdef HAVE_READLINE
|
||||
if (status.add_to_history)
|
||||
if (status.add_to_history && not_in_history(line))
|
||||
add_history(line);
|
||||
#endif
|
||||
continue;
|
||||
@ -1014,7 +1030,7 @@ static bool add_line(String &buffer,char *line,char *in_string,
|
||||
if (!line[0] && buffer.is_empty())
|
||||
return 0;
|
||||
#ifdef HAVE_READLINE
|
||||
if (status.add_to_history && line[0])
|
||||
if (status.add_to_history && line[0] && not_in_history(line))
|
||||
add_history(line);
|
||||
#endif
|
||||
#ifdef USE_MB
|
||||
@ -1169,6 +1185,75 @@ int no_completion()
|
||||
return 0; /* No filename completion */
|
||||
}
|
||||
|
||||
/* glues pieces of history back together if in pieces */
|
||||
static void fix_history(String *final_command)
|
||||
{
|
||||
int total_lines = 1;
|
||||
char *ptr = final_command->c_ptr();
|
||||
String fixed_buffer; /* Converted buffer */
|
||||
char str_char = '\0'; /* Character if we are in a string or not */
|
||||
|
||||
/* find out how many lines we have and remove newlines */
|
||||
while (*ptr != '\0')
|
||||
{
|
||||
switch (*ptr) {
|
||||
/* string character */
|
||||
case '"':
|
||||
case '\'':
|
||||
case '`':
|
||||
if (str_char == '\0') /* open string */
|
||||
str_char = *ptr;
|
||||
else if (str_char == *ptr) /* close string */
|
||||
str_char = '\0';
|
||||
fixed_buffer.append(ptr,1);
|
||||
break;
|
||||
case '\n':
|
||||
/*
|
||||
not in string, change to space
|
||||
if in string, leave it alone
|
||||
*/
|
||||
fixed_buffer.append(str_char == '\0' ? " " : "\n");
|
||||
total_lines++;
|
||||
break;
|
||||
case '\\':
|
||||
fixed_buffer.append('\\');
|
||||
/* need to see if the backslash is escaping anything */
|
||||
if (str_char)
|
||||
{
|
||||
ptr++;
|
||||
/* special characters that need escaping */
|
||||
if (*ptr == '\'' || *ptr == '"' || *ptr == '\\')
|
||||
fixed_buffer.append(ptr,1);
|
||||
else
|
||||
ptr--;
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
fixed_buffer.append(ptr,1);
|
||||
}
|
||||
ptr++;
|
||||
}
|
||||
if (total_lines > 1)
|
||||
add_history(fixed_buffer.ptr());
|
||||
}
|
||||
|
||||
/*
|
||||
returns 0 if line matches the previous history entry
|
||||
returns 1 if the line doesn't match the previous history entry
|
||||
*/
|
||||
static int not_in_history(const char *line)
|
||||
{
|
||||
HIST_ENTRY *oldhist = history_get(history_length);
|
||||
int num;
|
||||
|
||||
if (oldhist == 0)
|
||||
return 1;
|
||||
if (strcmp(oldhist->line,line) == 0)
|
||||
return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void initialize_readline (char *name)
|
||||
{
|
||||
/* Allow conditional parsing of the ~/.inputrc file. */
|
||||
@ -1631,6 +1716,10 @@ com_help(String *buffer __attribute__((unused)),
|
||||
static int
|
||||
com_clear(String *buffer,char *line __attribute__((unused)))
|
||||
{
|
||||
#ifdef HAVE_READLINE
|
||||
if (status.add_to_history)
|
||||
fix_history(buffer);
|
||||
#endif
|
||||
buffer->length(0);
|
||||
return 0;
|
||||
}
|
||||
@ -1690,6 +1779,16 @@ com_go(String *buffer,char *line __attribute__((unused)))
|
||||
timer=start_timer();
|
||||
|
||||
error= mysql_real_query_for_lazy(buffer->ptr(),buffer->length());
|
||||
|
||||
#ifdef HAVE_READLINE
|
||||
if (status.add_to_history)
|
||||
{
|
||||
buffer->append(vertical ? "\\G" : delimiter);
|
||||
/* Append final command onto history */
|
||||
fix_history(buffer);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (error)
|
||||
{
|
||||
buffer->length(0); // Remove query on error
|
||||
@ -3088,6 +3187,8 @@ static const char* construct_prompt()
|
||||
processed_prompt.append(' ');
|
||||
break;
|
||||
case 'R':
|
||||
if (t->tm_hour < 10)
|
||||
processed_prompt.append('0');
|
||||
add_int_to_prompt(t->tm_hour);
|
||||
break;
|
||||
case 'r':
|
||||
@ -3095,6 +3196,8 @@ static const char* construct_prompt()
|
||||
getHour = t->tm_hour % 12;
|
||||
if (getHour == 0)
|
||||
getHour=12;
|
||||
if (getHour < 10)
|
||||
processed_prompt.append('0');
|
||||
add_int_to_prompt(getHour);
|
||||
break;
|
||||
case 'm':
|
||||
@ -3120,6 +3223,8 @@ static const char* construct_prompt()
|
||||
processed_prompt.append(strtok(dateTime,"\n"));
|
||||
break;
|
||||
case 's':
|
||||
if (t->tm_sec < 10)
|
||||
processed_prompt.append('0');
|
||||
add_int_to_prompt(t->tm_sec);
|
||||
break;
|
||||
case 'w':
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* Copyright (C) 2000 MySQL AB
|
||||
/* Copyright (C) 2000-2004 MySQL AB
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
@ -140,7 +140,7 @@ static struct my_option my_long_options[] =
|
||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
#endif
|
||||
{"port", 'P', "Port number to use for connection.", (gptr*) &tcp_port,
|
||||
(gptr*) &tcp_port, 0, GET_UINT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
(gptr*) &tcp_port, 0, GET_UINT, REQUIRED_ARG, MYSQL_PORT, 0, 0, 0, 0, 0},
|
||||
{"protocol", OPT_MYSQL_PROTOCOL, "The protocol of connection (tcp,socket,pipe,memory).",
|
||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"relative", 'r',
|
||||
@ -440,6 +440,7 @@ static my_bool sql_connect(MYSQL *mysql, uint wait)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Execute a command.
|
||||
Return 0 on ok
|
||||
@ -450,6 +451,14 @@ static my_bool sql_connect(MYSQL *mysql, uint wait)
|
||||
static int execute_commands(MYSQL *mysql,int argc, char **argv)
|
||||
{
|
||||
const char *status;
|
||||
/*
|
||||
MySQL documentation relies on the fact that mysqladmin will
|
||||
execute commands in the order specified, e.g.
|
||||
mysqladmin -u root flush-privileges password "newpassword"
|
||||
to reset a lost root password.
|
||||
If this behaviour is ever changed, Docs should be notified.
|
||||
*/
|
||||
|
||||
struct rand_struct rand_st;
|
||||
|
||||
for (; argc > 0 ; argv++,argc--)
|
||||
@ -787,9 +796,26 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
|
||||
}
|
||||
if (mysql_query(mysql,buff))
|
||||
{
|
||||
my_printf_error(0,"unable to change password; error: '%s'",
|
||||
MYF(ME_BELL),mysql_error(mysql));
|
||||
return -1;
|
||||
if (mysql_errno(mysql)!=1290)
|
||||
{
|
||||
my_printf_error(0,"unable to change password; error: '%s'",
|
||||
MYF(ME_BELL),mysql_error(mysql));
|
||||
return -1;
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
We don't try to execute 'update mysql.user set..'
|
||||
because we can't perfectly find out the host
|
||||
*/
|
||||
my_printf_error(0,"\n"
|
||||
"You cannot use 'password' command as mysqld runs\n"
|
||||
" with grant tables disabled (was started with"
|
||||
" --skip-grant-tables).\n"
|
||||
"Use: \"mysqladmin flush-privileges password '*'\""
|
||||
" instead", MYF(ME_BELL));
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
argc--; argv++;
|
||||
break;
|
||||
|
@ -37,12 +37,13 @@
|
||||
** 10 Jun 2003: SET NAMES and --no-set-names by Alexander Barkov
|
||||
*/
|
||||
|
||||
#define DUMP_VERSION "10.5"
|
||||
#define DUMP_VERSION "10.6"
|
||||
|
||||
#include <my_global.h>
|
||||
#include <my_sys.h>
|
||||
#include <m_string.h>
|
||||
#include <m_ctype.h>
|
||||
#include <assert.h>
|
||||
|
||||
#include "client_priv.h"
|
||||
#include "mysql.h"
|
||||
@ -63,7 +64,6 @@
|
||||
#define SHOW_NULL 2
|
||||
#define SHOW_DEFAULT 4
|
||||
#define SHOW_EXTRA 5
|
||||
#define QUOTE_CHAR '`'
|
||||
|
||||
/* Size of buffer for dump's select query */
|
||||
#define QUERY_LENGTH 1536
|
||||
@ -78,17 +78,19 @@ static my_bool verbose=0,tFlag=0,cFlag=0,dFlag=0,quick= 1, extended_insert= 1,
|
||||
lock_tables=1,ignore_errors=0,flush_logs=0,replace=0,
|
||||
ignore=0,opt_drop=1,opt_keywords=0,opt_lock=1,opt_compress=0,
|
||||
opt_delayed=0,create_options=1,opt_quoted=0,opt_databases=0,
|
||||
opt_alldbs=0,opt_create_db=0,opt_first_slave=0,opt_set_names=0,
|
||||
opt_autocommit=0,opt_master_data,opt_disable_keys=1,opt_xml=0,
|
||||
opt_delete_master_logs=0, tty_password=0,
|
||||
opt_alldbs=0,opt_create_db=0,opt_first_slave=0,opt_set_charset,
|
||||
opt_autocommit=0,opt_master_data,opt_disable_keys=1,opt_xml=0,
|
||||
opt_delete_master_logs=0, tty_password=0,
|
||||
opt_single_transaction=0, opt_comments= 0, opt_compact= 0;
|
||||
static MYSQL mysql_connection,*sock=0;
|
||||
|
||||
static MYSQL mysql_connection,*sock=0;
|
||||
static char insert_pat[12 * 1024],*opt_password=0,*current_user=0,
|
||||
*current_host=0,*path=0,*fields_terminated=0,
|
||||
*lines_terminated=0, *enclosed=0, *opt_enclosed=0, *escaped=0,
|
||||
*where=0,
|
||||
*opt_compatible_mode_str= 0,
|
||||
*err_ptr= 0;
|
||||
static char compatible_mode_normal_str[255];
|
||||
static char *default_charset= (char*) MYSQL_UNIVERSAL_CLIENT_CHARSET;
|
||||
static ulong opt_compatible_mode= 0;
|
||||
static uint opt_mysql_port= 0, err_len= 0;
|
||||
@ -111,6 +113,15 @@ const char *compatible_mode_names[]=
|
||||
"ANSI",
|
||||
NullS
|
||||
};
|
||||
#define MASK_ANSI_QUOTES \
|
||||
(\
|
||||
(1<<2) | /* POSTGRESQL */\
|
||||
(1<<3) | /* ORACLE */\
|
||||
(1<<4) | /* MSSQL */\
|
||||
(1<<5) | /* DB2 */\
|
||||
(1<<6) | /* MAXDB */\
|
||||
(1<<10) /* ANSI */\
|
||||
)
|
||||
TYPELIB compatible_mode_typelib= {array_elements(compatible_mode_names) - 1,
|
||||
"", compatible_mode_names};
|
||||
|
||||
@ -162,7 +173,7 @@ static struct my_option my_long_options[] =
|
||||
(gptr*) &opt_delayed, (gptr*) &opt_delayed, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
||||
0, 0},
|
||||
{"delete-master-logs", OPT_DELETE_MASTER_LOGS,
|
||||
"Delete logs on master after backup. This will automagically enable --first-slave.",
|
||||
"Delete logs on master after backup. This automatically enables --first-slave.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"disable-keys", 'K',
|
||||
"'/*!40000 ALTER TABLE tb_name DISABLE KEYS */; and '/*!40000 ALTER TABLE tb_name ENABLE KEYS */; will be put in the output.", (gptr*) &opt_disable_keys,
|
||||
@ -181,11 +192,14 @@ static struct my_option my_long_options[] =
|
||||
"Fields in the i.file are opt. enclosed by ...", (gptr*) &opt_enclosed,
|
||||
(gptr*) &opt_enclosed, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0 ,0, 0},
|
||||
{"fields-escaped-by", OPT_ESC, "Fields in the i.file are escaped by ...",
|
||||
(gptr*) &escaped, (gptr*) &escaped, 0, GET_STR, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
(gptr*) &escaped, (gptr*) &escaped, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"first-slave", 'x', "Locks all tables across all databases.",
|
||||
(gptr*) &opt_first_slave, (gptr*) &opt_first_slave, 0, GET_BOOL, NO_ARG,
|
||||
0, 0, 0, 0, 0, 0},
|
||||
{"flush-logs", 'F', "Flush logs file in server before starting dump.",
|
||||
{"flush-logs", 'F', "Flush logs file in server before starting dump. "
|
||||
"Note that if you dump many databases at once (using the option "
|
||||
"--databases= or --all-databases), the logs will be flushed for "
|
||||
"each database dumped.",
|
||||
(gptr*) &flush_logs, (gptr*) &flush_logs, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
||||
0, 0},
|
||||
{"force", 'f', "Continue even if we get an sql-error.",
|
||||
@ -201,7 +215,7 @@ static struct my_option my_long_options[] =
|
||||
{"lock-tables", 'l', "Lock all tables for read.", (gptr*) &lock_tables,
|
||||
(gptr*) &lock_tables, 0, GET_BOOL, NO_ARG, 1, 0, 0, 0, 0, 0},
|
||||
{"master-data", OPT_MASTER_DATA,
|
||||
"This will cause the master position and filename to be appended to your output. This will automagically enable --first-slave.",
|
||||
"This causes the master position and filename to be appended to your output. This automatically enables --first-slave.",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"no-autocommit", OPT_AUTOCOMMIT,
|
||||
"Wrap tables with autocommit/commit statements.",
|
||||
@ -220,9 +234,12 @@ static struct my_option my_long_options[] =
|
||||
{"no-data", 'd', "No row information.", (gptr*) &dFlag, (gptr*) &dFlag, 0,
|
||||
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"no-set-names", 'N',
|
||||
"'SET NAMES charset_name' will not be put in the output.",
|
||||
(gptr*) &opt_set_names, (gptr*) &opt_set_names, 0, GET_BOOL, NO_ARG, 0, 0,
|
||||
0, 0, 0, 0},
|
||||
"'SET NAMES charset_name' will not be put in the output. Deprecated, use --set-charset or --skip-set-charset to enable/disable charset settings instead",
|
||||
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"set-charset", OPT_SET_CHARSET,
|
||||
"'SET NAMES charset_name' will be put in the output",
|
||||
(gptr*) &opt_set_charset, (gptr*) &opt_set_charset, 0, GET_BOOL, NO_ARG, 1,
|
||||
0, 0, 0, 0, 0},
|
||||
{"set-variable", 'O',
|
||||
"Change the value of a variable. Please note that this option is deprecated; you can set variables directly with --variable-name=value.",
|
||||
0, 0, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
@ -364,15 +381,20 @@ static void write_header(FILE *sql_file, char *db_name)
|
||||
fprintf(sql_file, "-- Server version\t%s\n",
|
||||
mysql_get_server_info(&mysql_connection));
|
||||
}
|
||||
if (!opt_set_names)
|
||||
if (opt_set_charset)
|
||||
fprintf(sql_file,"\n/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT, CHARACTER_SET_CLIENT=%s */;\n",default_charset);
|
||||
fprintf(md_result_file,"\
|
||||
if (!path)
|
||||
{
|
||||
fprintf(md_result_file,"\
|
||||
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n\
|
||||
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n\
|
||||
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE=NO_AUTO_VALUE_ON_ZERO */;\n\
|
||||
");
|
||||
}
|
||||
fprintf(sql_file,
|
||||
"/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE=\"%s%s%s\" */;\n",
|
||||
path?"":"NO_AUTO_VALUE_ON_ZERO",compatible_mode_normal_str[0]==0?"":",",
|
||||
compatible_mode_normal_str);
|
||||
}
|
||||
return;
|
||||
} /* write_header */
|
||||
|
||||
|
||||
@ -382,12 +404,15 @@ static void write_footer(FILE *sql_file)
|
||||
fputs("</mysqldump>\n", sql_file);
|
||||
else if (!opt_compact)
|
||||
{
|
||||
fprintf(md_result_file,"\n\
|
||||
/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;\n\
|
||||
fprintf(sql_file,"\n/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;\n");
|
||||
if (!path)
|
||||
{
|
||||
fprintf(md_result_file,"\
|
||||
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;\n\
|
||||
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;\n");
|
||||
if (!opt_set_names)
|
||||
fprintf(md_result_file,
|
||||
}
|
||||
if (opt_set_charset)
|
||||
fprintf(sql_file,
|
||||
"/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n");
|
||||
fputs("\n", sql_file);
|
||||
}
|
||||
@ -431,6 +456,9 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
opt_protocol = MYSQL_PROTOCOL_PIPE;
|
||||
#endif
|
||||
break;
|
||||
case 'N':
|
||||
opt_set_charset= 0;
|
||||
break;
|
||||
case 'T':
|
||||
opt_disable_keys=0;
|
||||
break;
|
||||
@ -450,7 +478,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
exit(0);
|
||||
case (int) OPT_OPTIMIZE:
|
||||
extended_insert= opt_drop= opt_lock= quick= create_options=
|
||||
opt_disable_keys= lock_tables= 1;
|
||||
opt_disable_keys= lock_tables= opt_set_charset= 1;
|
||||
if (opt_single_transaction) lock_tables=0;
|
||||
break;
|
||||
case (int) OPT_SKIP_OPTIMIZATION:
|
||||
@ -461,7 +489,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
if (opt_compact)
|
||||
{
|
||||
opt_comments= opt_drop= opt_disable_keys= opt_lock= 0;
|
||||
opt_set_names= 1;
|
||||
opt_set_charset= 0;
|
||||
}
|
||||
case (int) OPT_TABLES:
|
||||
opt_databases=0;
|
||||
@ -469,9 +497,12 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
case (int) OPT_COMPATIBLE:
|
||||
{
|
||||
char buff[255];
|
||||
char *end= compatible_mode_normal_str;
|
||||
int i;
|
||||
ulong mode;
|
||||
|
||||
opt_quoted= 1;
|
||||
opt_set_names= 1;
|
||||
opt_set_charset= 0;
|
||||
opt_compatible_mode_str= argument;
|
||||
opt_compatible_mode= find_set(&compatible_mode_typelib,
|
||||
argument, strlen(argument),
|
||||
@ -482,6 +513,27 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||
fprintf(stderr, "Invalid mode to --compatible: %s\n", buff);
|
||||
exit(1);
|
||||
}
|
||||
#if !defined(DBUG_OFF)
|
||||
{
|
||||
uint size_for_sql_mode= 0;
|
||||
const char **ptr;
|
||||
for (ptr= compatible_mode_names; *ptr; ptr++)
|
||||
size_for_sql_mode+= strlen(*ptr);
|
||||
size_for_sql_mode+= sizeof(compatible_mode_names)-1;
|
||||
DBUG_ASSERT(sizeof(compatible_mode_normal_str)>=size_for_sql_mode);
|
||||
}
|
||||
#endif
|
||||
mode= opt_compatible_mode;
|
||||
for (i= 0, mode= opt_compatible_mode; mode; mode>>= 1, i++)
|
||||
{
|
||||
if (mode & 1)
|
||||
{
|
||||
end= strmov(end, compatible_mode_names[i]);
|
||||
end= strmov(end, ",");
|
||||
}
|
||||
}
|
||||
if (end!=compatible_mode_normal_str)
|
||||
end[-1]= 0;
|
||||
break;
|
||||
}
|
||||
case (int) OPT_MYSQL_PROTOCOL:
|
||||
@ -583,6 +635,7 @@ static void safe_exit(int error)
|
||||
*/
|
||||
static int dbConnect(char *host, char *user,char *passwd)
|
||||
{
|
||||
char buff[20+FN_REFLEN];
|
||||
DBUG_ENTER("dbConnect");
|
||||
if (verbose)
|
||||
{
|
||||
@ -602,7 +655,7 @@ static int dbConnect(char *host, char *user,char *passwd)
|
||||
if (shared_memory_base_name)
|
||||
mysql_options(&mysql_connection,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name);
|
||||
#endif
|
||||
if (!opt_set_names)
|
||||
if (opt_set_charset)
|
||||
mysql_options(&mysql_connection, MYSQL_SET_CHARSET_NAME, default_charset);
|
||||
if (!(sock= mysql_real_connect(&mysql_connection,host,user,passwd,
|
||||
NULL,opt_mysql_port,opt_mysql_unix_port,
|
||||
@ -611,6 +664,16 @@ static int dbConnect(char *host, char *user,char *passwd)
|
||||
DBerror(&mysql_connection, "when trying to connect");
|
||||
return 1;
|
||||
}
|
||||
sprintf(buff, "/*!40100 SET @@SQL_MODE=\"%s\" */",
|
||||
compatible_mode_normal_str);
|
||||
if (mysql_query(sock, buff))
|
||||
{
|
||||
fprintf(stderr, "%s: Can't set the compatible mode %s (error %s)\n",
|
||||
my_progname, compatible_mode_normal_str, mysql_error(sock));
|
||||
mysql_close(sock);
|
||||
safe_exit(EX_MYSQLERR);
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
} /* dbConnect */
|
||||
|
||||
@ -659,17 +722,19 @@ static my_bool test_if_special_chars(const char *str)
|
||||
static char *quote_name(const char *name, char *buff, my_bool force)
|
||||
{
|
||||
char *to= buff;
|
||||
char qtype= (opt_compatible_mode & MASK_ANSI_QUOTES) ? '\"' : '`';
|
||||
|
||||
if (!force && !opt_quoted && !test_if_special_chars(name))
|
||||
return (char*) name;
|
||||
*to++= QUOTE_CHAR;
|
||||
*to++= qtype;
|
||||
while (*name)
|
||||
{
|
||||
if (*name == QUOTE_CHAR)
|
||||
*to++= QUOTE_CHAR;
|
||||
if (*name == qtype)
|
||||
*to++= qtype;
|
||||
*to++= *name++;
|
||||
}
|
||||
to[0]=QUOTE_CHAR;
|
||||
to[1]=0;
|
||||
to[0]= qtype;
|
||||
to[1]= 0;
|
||||
return buff;
|
||||
} /* quote_name */
|
||||
|
||||
@ -842,31 +907,6 @@ static uint getTableStructure(char *table, char* db)
|
||||
/* Make an sql-file, if path was given iow. option -T was given */
|
||||
char buff[20+FN_REFLEN];
|
||||
|
||||
if (opt_compatible_mode)
|
||||
{
|
||||
char *end;
|
||||
uint i;
|
||||
|
||||
sprintf(buff, "/*!40100 SET @@sql_mode=\"");
|
||||
end= strend(buff);
|
||||
for (i= 0; opt_compatible_mode; opt_compatible_mode>>= 1, i++)
|
||||
{
|
||||
if (opt_compatible_mode & 1)
|
||||
{
|
||||
end= strmov(end, compatible_mode_names[i]);
|
||||
end= strmov(end, ",");
|
||||
}
|
||||
}
|
||||
end= strmov(end-1, "\" */");
|
||||
if (mysql_query(sock, buff))
|
||||
{
|
||||
fprintf(stderr, "%s: Can't set the compatible mode '%s' (%s)\n",
|
||||
my_progname, table, mysql_error(sock));
|
||||
safe_exit(EX_MYSQLERR);
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
}
|
||||
|
||||
sprintf(buff,"show create table %s", result_table);
|
||||
if (mysql_query(sock, buff))
|
||||
{
|
||||
@ -1153,7 +1193,11 @@ static uint getTableStructure(char *table, char* db)
|
||||
strpos=strmov(strpos,"(");
|
||||
}
|
||||
if (sql_file != md_result_file)
|
||||
{
|
||||
fputs("\n", sql_file);
|
||||
write_footer(sql_file);
|
||||
my_fclose(sql_file, MYF(MY_WME));
|
||||
}
|
||||
DBUG_RETURN(numFields);
|
||||
} /* getTableStructure */
|
||||
|
||||
@ -1709,7 +1753,7 @@ static int dump_selected_tables(char *db, char **table_names, int tables)
|
||||
if (opt_xml)
|
||||
fputs("</database>\n", md_result_file);
|
||||
if (lock_tables)
|
||||
mysql_query(sock,"UNLOCK_TABLES");
|
||||
mysql_query(sock,"UNLOCK TABLES");
|
||||
return 0;
|
||||
} /* dump_selected_tables */
|
||||
|
||||
@ -1843,6 +1887,7 @@ int main(int argc, char **argv)
|
||||
{
|
||||
MYSQL_ROW row;
|
||||
MYSQL_RES *master;
|
||||
compatible_mode_normal_str[0]= 0;
|
||||
|
||||
MY_INIT(argv[0]);
|
||||
if (get_options(&argc, &argv))
|
||||
@ -1940,7 +1985,8 @@ MASTER_LOG_POS=%s ;\n",row[0],row[1]);
|
||||
}
|
||||
}
|
||||
dbDisconnect(current_host);
|
||||
write_footer(md_result_file);
|
||||
if (!path)
|
||||
write_footer(md_result_file);
|
||||
if (md_result_file != stdout)
|
||||
my_fclose(md_result_file, MYF(0));
|
||||
my_free(opt_password, MYF(MY_ALLOW_ZERO_PTR));
|
||||
|
@ -109,6 +109,7 @@ MYSQL_MANAGER* manager=0;
|
||||
|
||||
static char **default_argv;
|
||||
static const char *load_default_groups[]= { "mysqltest","client",0 };
|
||||
static char line_buffer[MAX_DELIMITER], *line_buffer_pos= line_buffer;;
|
||||
|
||||
static FILE* file_stack[MAX_INCLUDE_DEPTH];
|
||||
static FILE** cur_file;
|
||||
@ -128,6 +129,8 @@ static CHARSET_INFO *charset_info= &my_charset_latin1;
|
||||
static int embedded_server_arg_count=0;
|
||||
static char *embedded_server_args[MAX_SERVER_ARGS];
|
||||
|
||||
static my_bool display_result_vertically= FALSE, display_metadata= FALSE;
|
||||
|
||||
static const char *embedded_server_groups[] = {
|
||||
"server",
|
||||
"embedded",
|
||||
@ -212,7 +215,10 @@ Q_WAIT_FOR_SLAVE_TO_STOP,
|
||||
Q_REQUIRE_VERSION,
|
||||
Q_ENABLE_WARNINGS, Q_DISABLE_WARNINGS,
|
||||
Q_ENABLE_INFO, Q_DISABLE_INFO,
|
||||
Q_ENABLE_METADATA, Q_DISABLE_METADATA,
|
||||
Q_EXEC, Q_DELIMITER,
|
||||
Q_DISPLAY_VERTICAL_RESULTS, Q_DISPLAY_HORIZONTAL_RESULTS,
|
||||
Q_QUERY_VERTICAL, Q_QUERY_HORIZONTAL,
|
||||
|
||||
Q_UNKNOWN, /* Unknown command. */
|
||||
Q_COMMENT, /* Comments, ignored. */
|
||||
@ -284,8 +290,14 @@ const char *command_names[]=
|
||||
"disable_warnings",
|
||||
"enable_info",
|
||||
"disable_info",
|
||||
"enable_metadata",
|
||||
"disable_metadata",
|
||||
"exec",
|
||||
"delimiter",
|
||||
"vertical_results",
|
||||
"horizontal_results",
|
||||
"query_vertical",
|
||||
"query_horizontal",
|
||||
0
|
||||
};
|
||||
|
||||
@ -441,10 +453,10 @@ static void free_used_memory()
|
||||
my_free((gptr) (*q),MYF(0));
|
||||
}
|
||||
for (i=0; i < 10; i++)
|
||||
{
|
||||
if (var_reg[i].alloced_len)
|
||||
my_free(var_reg[i].str_val, MYF(MY_WME));
|
||||
}
|
||||
{
|
||||
if (var_reg[i].alloced_len)
|
||||
my_free(var_reg[i].str_val, MYF(MY_WME));
|
||||
}
|
||||
while (embedded_server_arg_count > 1)
|
||||
my_free(embedded_server_args[--embedded_server_arg_count],MYF(0));
|
||||
delete_dynamic(&q_lines);
|
||||
@ -862,44 +874,59 @@ int do_exec(struct st_query* q)
|
||||
char buf[1024];
|
||||
FILE *res_file;
|
||||
char *cmd= q->first_argument;
|
||||
DBUG_ENTER("do_exec");
|
||||
|
||||
while (*cmd && my_isspace(charset_info, *cmd))
|
||||
cmd++;
|
||||
if (!*cmd)
|
||||
die("Missing argument in exec\n");
|
||||
|
||||
if (q->record_file[0])
|
||||
{
|
||||
init_dynamic_string(&ds_tmp, "", 16384, 65536);
|
||||
ds= &ds_tmp;
|
||||
}
|
||||
else
|
||||
ds= &ds_res;
|
||||
DBUG_PRINT("info", ("Executing '%s'", cmd));
|
||||
|
||||
if (!(res_file= popen(cmd, "r")) && q->abort_on_error)
|
||||
die("popen() failed\n");
|
||||
while (fgets(buf, sizeof(buf), res_file))
|
||||
replace_dynstr_append_mem(ds, buf, strlen(buf));
|
||||
|
||||
if (disable_result_log)
|
||||
{
|
||||
while (fgets(buf, sizeof(buf), res_file))
|
||||
{
|
||||
buf[strlen(buf)-1]=0;
|
||||
DBUG_PRINT("exec_result",("%s", buf));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (q->record_file[0])
|
||||
{
|
||||
init_dynamic_string(&ds_tmp, "", 16384, 65536);
|
||||
ds= &ds_tmp;
|
||||
}
|
||||
else
|
||||
ds= &ds_res;
|
||||
|
||||
while (fgets(buf, sizeof(buf), res_file))
|
||||
replace_dynstr_append_mem(ds, buf, strlen(buf));
|
||||
|
||||
if (glob_replace)
|
||||
free_replace();
|
||||
|
||||
if (record)
|
||||
{
|
||||
if (!q->record_file[0] && !result_file)
|
||||
die("At line %u: Missing result file", start_lineno);
|
||||
if (!result_file)
|
||||
str_to_file(q->record_file, ds->str, ds->length);
|
||||
}
|
||||
else if (q->record_file[0])
|
||||
{
|
||||
error= check_result(ds, q->record_file, q->require_file);
|
||||
}
|
||||
if (ds == &ds_tmp)
|
||||
dynstr_free(&ds_tmp);
|
||||
}
|
||||
pclose(res_file);
|
||||
|
||||
if (glob_replace)
|
||||
free_replace();
|
||||
|
||||
if (record)
|
||||
{
|
||||
if (!q->record_file[0] && !result_file)
|
||||
die("At line %u: Missing result file", start_lineno);
|
||||
if (!result_file)
|
||||
str_to_file(q->record_file, ds->str, ds->length);
|
||||
}
|
||||
else if (q->record_file[0])
|
||||
{
|
||||
error= check_result(ds, q->record_file, q->require_file);
|
||||
}
|
||||
if (ds == &ds_tmp)
|
||||
dynstr_free(&ds_tmp);
|
||||
|
||||
return error;
|
||||
DBUG_RETURN(error);
|
||||
}
|
||||
|
||||
int var_query_set(VAR* v, const char* p, const char** p_end)
|
||||
@ -1034,7 +1061,7 @@ int do_system(struct st_query* q)
|
||||
eval_expr(&v, p, 0); /* NULL terminated */
|
||||
if (v.str_val_len)
|
||||
{
|
||||
char expr_buf[512];
|
||||
char expr_buf[1024];
|
||||
if ((uint)v.str_val_len > sizeof(expr_buf) - 1)
|
||||
v.str_val_len = sizeof(expr_buf) - 1;
|
||||
memcpy(expr_buf, v.str_val, v.str_val_len);
|
||||
@ -1628,24 +1655,49 @@ int do_while(struct st_query* q)
|
||||
}
|
||||
|
||||
|
||||
my_bool end_of_query(int c, char* p)
|
||||
/*
|
||||
Read characters from line buffer or file. This is needed to allow
|
||||
my_ungetc() to buffer MAX_DELIMITER characters for a file
|
||||
|
||||
NOTE:
|
||||
This works as long as one doesn't change files (with 'source file_name')
|
||||
when there is things pushed into the buffer. This should however not
|
||||
happen for any tests in the test suite.
|
||||
*/
|
||||
|
||||
int my_getc(FILE *file)
|
||||
{
|
||||
uint i, j;
|
||||
int tmp[MAX_DELIMITER]= {0};
|
||||
if (line_buffer_pos == line_buffer)
|
||||
return fgetc(file);
|
||||
return *--line_buffer_pos;
|
||||
}
|
||||
|
||||
for (i= 0; c == *(delimiter + i) && i < delimiter_length;
|
||||
i++, c= fgetc(*cur_file))
|
||||
void my_ungetc(int c)
|
||||
{
|
||||
*line_buffer_pos++= (char) c;
|
||||
}
|
||||
|
||||
|
||||
my_bool end_of_query(int c)
|
||||
{
|
||||
uint i;
|
||||
char tmp[MAX_DELIMITER];
|
||||
|
||||
if (c != *delimiter)
|
||||
return 0;
|
||||
|
||||
for (i= 1; i < delimiter_length &&
|
||||
(c= my_getc(*cur_file)) == *(delimiter + i);
|
||||
i++)
|
||||
tmp[i]= c;
|
||||
tmp[i]= c;
|
||||
|
||||
for (j= i; j > 0 && i != delimiter_length; j--)
|
||||
ungetc(tmp[j], *cur_file);
|
||||
if (i == delimiter_length)
|
||||
{
|
||||
ungetc(tmp[i], *cur_file);
|
||||
*p= 0;
|
||||
return 1;
|
||||
}
|
||||
return 1; /* Found delimiter */
|
||||
|
||||
/* didn't find delimiter, push back things that we read */
|
||||
my_ungetc(c);
|
||||
while (i > 1)
|
||||
my_ungetc(tmp[--i]);
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1663,7 +1715,7 @@ int read_line(char* buf, int size)
|
||||
for (; p < buf_end ;)
|
||||
{
|
||||
no_save= 0;
|
||||
c= fgetc(*cur_file);
|
||||
c= my_getc(*cur_file);
|
||||
if (feof(*cur_file))
|
||||
{
|
||||
if ((*cur_file) != stdin)
|
||||
@ -1678,8 +1730,11 @@ int read_line(char* buf, int size)
|
||||
switch(state) {
|
||||
case R_NORMAL:
|
||||
/* Only accept '{' in the beginning of a line */
|
||||
if (end_of_query(c, p))
|
||||
if (end_of_query(c))
|
||||
{
|
||||
*p= 0;
|
||||
return 0;
|
||||
}
|
||||
else if (c == '\'')
|
||||
state = R_Q1;
|
||||
else if (c == '"')
|
||||
@ -1715,7 +1770,7 @@ int read_line(char* buf, int size)
|
||||
*buf= 0;
|
||||
return 0;
|
||||
}
|
||||
else if (end_of_query(c, p) || c == '{')
|
||||
else if (end_of_query(c) || c == '{')
|
||||
{
|
||||
*p= 0;
|
||||
return 0;
|
||||
@ -1735,8 +1790,11 @@ int read_line(char* buf, int size)
|
||||
state= R_ESC_SLASH_Q1;
|
||||
break;
|
||||
case R_ESC_Q_Q1:
|
||||
if (end_of_query(c, p))
|
||||
if (end_of_query(c))
|
||||
{
|
||||
*p= 0;
|
||||
return 0;
|
||||
}
|
||||
if (c != '\'')
|
||||
state= R_NORMAL;
|
||||
else
|
||||
@ -1753,8 +1811,11 @@ int read_line(char* buf, int size)
|
||||
state= R_ESC_SLASH_Q2;
|
||||
break;
|
||||
case R_ESC_Q_Q2:
|
||||
if (end_of_query(c, p))
|
||||
if (end_of_query(c))
|
||||
{
|
||||
*p= 0;
|
||||
return 0;
|
||||
}
|
||||
if (c != '"')
|
||||
state= R_NORMAL;
|
||||
else
|
||||
@ -1772,6 +1833,7 @@ int read_line(char* buf, int size)
|
||||
return feof(*cur_file);
|
||||
}
|
||||
|
||||
|
||||
static char read_query_buf[MAX_QUERY];
|
||||
|
||||
int read_query(struct st_query** q_ptr)
|
||||
@ -1779,11 +1841,12 @@ int read_query(struct st_query** q_ptr)
|
||||
char *p = read_query_buf, * p1 ;
|
||||
int expected_errno;
|
||||
struct st_query* q;
|
||||
DBUG_ENTER("read_query");
|
||||
|
||||
if (parser.current_line < parser.read_lines)
|
||||
{
|
||||
get_dynamic(&q_lines, (gptr) q_ptr, parser.current_line) ;
|
||||
return 0;
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
if (!(*q_ptr= q= (struct st_query*) my_malloc(sizeof(*q), MYF(MY_WME))) ||
|
||||
insert_dynamic(&q_lines, (gptr) &q))
|
||||
@ -1795,14 +1858,14 @@ int read_query(struct st_query** q_ptr)
|
||||
memcpy((gptr) q->expected_errno, (gptr) global_expected_errno,
|
||||
sizeof(global_expected_errno));
|
||||
q->expected_errors= global_expected_errors;
|
||||
q->abort_on_error= global_expected_errno[0] == 0;
|
||||
q->abort_on_error= global_expected_errors == 0;
|
||||
bzero((gptr) global_expected_errno, sizeof(global_expected_errno));
|
||||
global_expected_errors=0;
|
||||
|
||||
q->type = Q_UNKNOWN;
|
||||
q->query_buf= q->query= 0;
|
||||
if (read_line(read_query_buf, sizeof(read_query_buf)))
|
||||
return 1;
|
||||
DBUG_RETURN(1);
|
||||
|
||||
if (*p == '#')
|
||||
{
|
||||
@ -1856,7 +1919,7 @@ int read_query(struct st_query** q_ptr)
|
||||
q->first_argument= p;
|
||||
q->end= strend(q->query);
|
||||
parser.read_lines++;
|
||||
return 0;
|
||||
DBUG_RETURN(0);
|
||||
}
|
||||
|
||||
|
||||
@ -1894,7 +1957,7 @@ static struct my_option my_long_options[] =
|
||||
{"password", 'p', "Password to use when connecting to server.",
|
||||
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"port", 'P', "Port number to use for connection.", (gptr*) &port,
|
||||
(gptr*) &port, 0, GET_INT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||
(gptr*) &port, 0, GET_INT, REQUIRED_ARG, MYSQL_PORT, 0, 0, 0, 0, 0},
|
||||
{"quiet", 's', "Suppress all normal output.", (gptr*) &silent,
|
||||
(gptr*) &silent, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||
{"record", 'r', "Record output of test_file into result file.",
|
||||
@ -2110,6 +2173,7 @@ static void append_result(DYNAMIC_STRING *ds, MYSQL_RES *res)
|
||||
{
|
||||
MYSQL_ROW row;
|
||||
uint num_fields= mysql_num_fields(res);
|
||||
MYSQL_FIELD *fields= !display_result_vertically ? 0 : mysql_fetch_fields(res);
|
||||
unsigned long *lengths;
|
||||
while ((row = mysql_fetch_row(res)))
|
||||
{
|
||||
@ -2130,11 +2194,22 @@ static void append_result(DYNAMIC_STRING *ds, MYSQL_RES *res)
|
||||
val= "NULL";
|
||||
len= 4;
|
||||
}
|
||||
if (i)
|
||||
if (!display_result_vertically)
|
||||
{
|
||||
if (i)
|
||||
dynstr_append_mem(ds, "\t", 1);
|
||||
replace_dynstr_append_mem(ds, val, len);
|
||||
}
|
||||
else
|
||||
{
|
||||
dynstr_append(ds, fields[i].name);
|
||||
dynstr_append_mem(ds, "\t", 1);
|
||||
replace_dynstr_append_mem(ds, val, len);
|
||||
replace_dynstr_append_mem(ds, val, len);
|
||||
dynstr_append_mem(ds, "\n", 1);
|
||||
}
|
||||
}
|
||||
dynstr_append_mem(ds, "\n", 1);
|
||||
if (!display_result_vertically)
|
||||
dynstr_append_mem(ds, "\n", 1);
|
||||
}
|
||||
free_replace_column();
|
||||
}
|
||||
@ -2149,7 +2224,8 @@ static void append_result(DYNAMIC_STRING *ds, MYSQL_RES *res)
|
||||
int run_query(MYSQL* mysql, struct st_query* q, int flags)
|
||||
{
|
||||
MYSQL_RES* res= 0;
|
||||
int i, error= 0, err= 0, counter= 0;
|
||||
uint i;
|
||||
int error= 0, err= 0, counter= 0;
|
||||
DYNAMIC_STRING *ds;
|
||||
DYNAMIC_STRING ds_tmp;
|
||||
DYNAMIC_STRING eval_query;
|
||||
@ -2233,7 +2309,8 @@ int run_query(MYSQL* mysql, struct st_query* q, int flags)
|
||||
goto end; /* Ok */
|
||||
}
|
||||
}
|
||||
DBUG_PRINT("info",("i: %d expected_errors: %d", i, q->expected_errors));
|
||||
DBUG_PRINT("info",("i: %d expected_errors: %d", i,
|
||||
q->expected_errors));
|
||||
dynstr_append_mem(ds, "ERROR ",6);
|
||||
replace_dynstr_append_mem(ds, mysql_sqlstate(mysql),
|
||||
strlen(mysql_sqlstate(mysql)));
|
||||
@ -2276,16 +2353,65 @@ int run_query(MYSQL* mysql, struct st_query* q, int flags)
|
||||
{
|
||||
if (res)
|
||||
{
|
||||
int num_fields= mysql_num_fields(res);
|
||||
MYSQL_FIELD *fields= mysql_fetch_fields(res);
|
||||
MYSQL_FIELD *field, *field_end;
|
||||
uint num_fields= mysql_num_fields(res);
|
||||
|
||||
for (i = 0; i < num_fields; i++)
|
||||
if (display_metadata)
|
||||
{
|
||||
if (i)
|
||||
dynstr_append(ds,"Catalog\tDatabase\tTable\tTable_alias\tColumn\tColumn_alias\tName\tType\tLength\tMax length\tIs_null\tFlags\tDecimals\tCharsetnr\n");
|
||||
for (field= mysql_fetch_fields(res), field_end= field+num_fields ;
|
||||
field < field_end ;
|
||||
field++)
|
||||
{
|
||||
char buff[22];
|
||||
dynstr_append_mem(ds, field->catalog, field->catalog_length);
|
||||
dynstr_append_mem(ds, "\t", 1);
|
||||
dynstr_append(ds, fields[i].name);
|
||||
dynstr_append_mem(ds, field->db, field->db_length);
|
||||
dynstr_append_mem(ds, "\t", 1);
|
||||
dynstr_append_mem(ds, field->org_table, field->org_table_length);
|
||||
dynstr_append_mem(ds, "\t", 1);
|
||||
dynstr_append_mem(ds, field->table, field->table_length);
|
||||
dynstr_append_mem(ds, "\t", 1);
|
||||
dynstr_append_mem(ds, field->org_name, field->org_name_length);
|
||||
dynstr_append_mem(ds, "\t", 1);
|
||||
dynstr_append_mem(ds, field->name, field->name_length);
|
||||
dynstr_append_mem(ds, "\t", 1);
|
||||
int10_to_str((int) field->type, buff, 10);
|
||||
dynstr_append(ds, buff);
|
||||
dynstr_append_mem(ds, "\t", 1);
|
||||
int10_to_str((int) field->length, buff, 10);
|
||||
dynstr_append(ds, buff);
|
||||
dynstr_append_mem(ds, "\t", 1);
|
||||
int10_to_str((int) field->max_length, buff, 10);
|
||||
dynstr_append(ds, buff);
|
||||
dynstr_append_mem(ds, "\t", 1);
|
||||
dynstr_append_mem(ds, (char*) (IS_NOT_NULL(field->flags) ?
|
||||
"N" : "Y"), 1);
|
||||
dynstr_append_mem(ds, "\t", 1);
|
||||
|
||||
int10_to_str((int) field->flags, buff, 10);
|
||||
dynstr_append(ds, buff);
|
||||
dynstr_append_mem(ds, "\t", 1);
|
||||
int10_to_str((int) field->decimals, buff, 10);
|
||||
dynstr_append(ds, buff);
|
||||
dynstr_append_mem(ds, "\t", 1);
|
||||
int10_to_str((int) field->charsetnr, buff, 10);
|
||||
dynstr_append(ds, buff);
|
||||
dynstr_append_mem(ds, "\n", 1);
|
||||
}
|
||||
}
|
||||
if (!display_result_vertically)
|
||||
{
|
||||
field= mysql_fetch_fields(res);
|
||||
for (i = 0; i < num_fields; i++)
|
||||
{
|
||||
if (i)
|
||||
dynstr_append_mem(ds, "\t", 1);
|
||||
replace_dynstr_append_mem(ds, field[i].name,
|
||||
strlen(field[i].name));
|
||||
}
|
||||
dynstr_append_mem(ds, "\n", 1);
|
||||
}
|
||||
dynstr_append_mem(ds, "\n", 1);
|
||||
append_result(ds, res);
|
||||
}
|
||||
|
||||
@ -2308,17 +2434,20 @@ int run_query(MYSQL* mysql, struct st_query* q, int flags)
|
||||
mysql_free_result(warn_res);
|
||||
}
|
||||
}
|
||||
if (!disable_info && mysql_info(mysql))
|
||||
if (!disable_info)
|
||||
{
|
||||
dynstr_append(ds, "info: ");
|
||||
dynstr_append(ds, mysql_info(mysql));
|
||||
dynstr_append_mem(ds, "\n", 1);
|
||||
char buf[40];
|
||||
sprintf(buf,"affected rows: %lu\n",(ulong) mysql_affected_rows(mysql));
|
||||
dynstr_append(ds, buf);
|
||||
if (mysql_info(mysql))
|
||||
{
|
||||
dynstr_append(ds, "info: ");
|
||||
dynstr_append(ds, mysql_info(mysql));
|
||||
dynstr_append_mem(ds, "\n", 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (glob_replace)
|
||||
free_replace();
|
||||
|
||||
if (record)
|
||||
{
|
||||
if (!q->record_file[0] && !result_file)
|
||||
@ -2339,6 +2468,7 @@ int run_query(MYSQL* mysql, struct st_query* q, int flags)
|
||||
mysql_error(mysql);
|
||||
|
||||
end:
|
||||
free_replace();
|
||||
last_result=0;
|
||||
if (ds == &ds_tmp)
|
||||
dynstr_free(&ds_tmp);
|
||||
@ -2352,10 +2482,12 @@ void get_query_type(struct st_query* q)
|
||||
{
|
||||
char save;
|
||||
uint type;
|
||||
DBUG_ENTER("get_query_type");
|
||||
|
||||
if (*q->query == '}')
|
||||
{
|
||||
q->type = Q_END_BLOCK;
|
||||
return;
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
if (q->type != Q_COMMENT_WITH_COMMAND)
|
||||
q->type = Q_QUERY;
|
||||
@ -2366,8 +2498,10 @@ void get_query_type(struct st_query* q)
|
||||
q->query[q->first_word_len]=save;
|
||||
if (type > 0)
|
||||
q->type=(enum enum_commands) type; /* Found command */
|
||||
DBUG_VOID_RETURN;
|
||||
}
|
||||
|
||||
|
||||
static byte *get_var_key(const byte* var, uint* len,
|
||||
my_bool __attribute__((unused)) t)
|
||||
{
|
||||
@ -2539,6 +2673,8 @@ int main(int argc, char **argv)
|
||||
case Q_DISABLE_WARNINGS: disable_warnings=1; break;
|
||||
case Q_ENABLE_INFO: disable_info=0; break;
|
||||
case Q_DISABLE_INFO: disable_info=1; break;
|
||||
case Q_ENABLE_METADATA: display_metadata=1; break;
|
||||
case Q_DISABLE_METADATA: display_metadata=0; break;
|
||||
case Q_SOURCE: do_source(q); break;
|
||||
case Q_SLEEP: do_sleep(q, 0); break;
|
||||
case Q_REAL_SLEEP: do_sleep(q, 1); break;
|
||||
@ -2557,12 +2693,33 @@ int main(int argc, char **argv)
|
||||
strmake(delimiter, q->first_argument, sizeof(delimiter) - 1);
|
||||
delimiter_length= strlen(delimiter);
|
||||
break;
|
||||
case Q_DISPLAY_VERTICAL_RESULTS: display_result_vertically= TRUE; break;
|
||||
case Q_DISPLAY_HORIZONTAL_RESULTS:
|
||||
display_result_vertically= FALSE; break;
|
||||
case Q_LET: do_let(q); break;
|
||||
case Q_EVAL_RESULT: eval_result = 1; break;
|
||||
case Q_EVAL:
|
||||
if (q->query == q->query_buf)
|
||||
q->query= q->first_argument;
|
||||
/* fall through */
|
||||
case Q_QUERY_VERTICAL:
|
||||
case Q_QUERY_HORIZONTAL:
|
||||
{
|
||||
my_bool old_display_result_vertically= display_result_vertically;
|
||||
if (!q->query[q->first_word_len])
|
||||
{
|
||||
/* This happens when we use 'query_..' on it's own line */
|
||||
q_send_flag=1;
|
||||
break;
|
||||
}
|
||||
/* fix up query pointer if this is * first iteration for this line */
|
||||
if (q->query == q->query_buf)
|
||||
q->query += q->first_word_len + 1;
|
||||
display_result_vertically= (q->type==Q_QUERY_VERTICAL);
|
||||
error |= run_query(&cur_con->mysql, q, QUERY_REAP|QUERY_SEND);
|
||||
display_result_vertically= old_display_result_vertically;
|
||||
break;
|
||||
}
|
||||
case Q_QUERY:
|
||||
case Q_REAP:
|
||||
{
|
||||
|
554
config.guess
vendored
554
config.guess
vendored
@ -1,9 +1,9 @@
|
||||
#! /bin/sh
|
||||
# Attempt to guess a canonical system name.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||
# Free Software Foundation, Inc.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2001-08-21'
|
||||
timestamp='2003-07-02'
|
||||
|
||||
# This file is free software; you can redistribute it and/or modify it
|
||||
# under the terms of the GNU General Public License as published by
|
||||
@ -24,8 +24,9 @@ timestamp='2001-08-21'
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Written by Per Bothner <bothner@cygnus.com>.
|
||||
# Please send patches to <config-patches@gnu.org>.
|
||||
# Originally written by Per Bothner <per@bothner.com>.
|
||||
# Please send patches to <config-patches@gnu.org>. Submit a context
|
||||
# diff and a properly formatted ChangeLog entry.
|
||||
#
|
||||
# This script attempts to guess a canonical system name similar to
|
||||
# config.sub. If it succeeds, it prints the system name on stdout, and
|
||||
@ -87,30 +88,42 @@ if test $# != 0; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
trap 'exit 1' 1 2 15
|
||||
|
||||
dummy=dummy-$$
|
||||
trap 'rm -f $dummy.c $dummy.o $dummy.rel $dummy; exit 1' 1 2 15
|
||||
# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
|
||||
# compiler to aid in system detection is discouraged as it requires
|
||||
# temporary files to be created and, as you can see below, it is a
|
||||
# headache to deal with in a portable fashion.
|
||||
|
||||
# CC_FOR_BUILD -- compiler used by this script.
|
||||
# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
|
||||
# use `HOST_CC' if defined, but it is deprecated.
|
||||
|
||||
set_cc_for_build='case $CC_FOR_BUILD,$HOST_CC,$CC in
|
||||
,,) echo "int dummy(){}" > $dummy.c ;
|
||||
for c in cc gcc c89 ; do
|
||||
($c $dummy.c -c -o $dummy.o) >/dev/null 2>&1 ;
|
||||
if test $? = 0 ; then
|
||||
# Portable tmp directory creation inspired by the Autoconf team.
|
||||
|
||||
set_cc_for_build='
|
||||
trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
|
||||
trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
|
||||
: ${TMPDIR=/tmp} ;
|
||||
{ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
|
||||
{ test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
|
||||
{ tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
|
||||
{ echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
|
||||
dummy=$tmp/dummy ;
|
||||
tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
|
||||
case $CC_FOR_BUILD,$HOST_CC,$CC in
|
||||
,,) echo "int x;" > $dummy.c ;
|
||||
for c in cc gcc c89 c99 ; do
|
||||
if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
|
||||
CC_FOR_BUILD="$c"; break ;
|
||||
fi ;
|
||||
done ;
|
||||
rm -f $dummy.c $dummy.o $dummy.rel ;
|
||||
if test x"$CC_FOR_BUILD" = x ; then
|
||||
CC_FOR_BUILD=no_compiler_found ;
|
||||
fi
|
||||
;;
|
||||
,,*) CC_FOR_BUILD=$CC ;;
|
||||
,*,*) CC_FOR_BUILD=$HOST_CC ;;
|
||||
esac'
|
||||
esac ;'
|
||||
|
||||
# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
|
||||
# (ghazi@noc.rutgers.edu 1994-08-24)
|
||||
@ -136,29 +149,30 @@ esac
|
||||
|
||||
case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
*:NetBSD:*:*)
|
||||
# Netbsd (nbsd) targets should (where applicable) match one or
|
||||
# NetBSD (nbsd) targets should (where applicable) match one or
|
||||
# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
|
||||
# *-*-netbsdecoff* and *-*-netbsd*. For targets that recently
|
||||
# switched to ELF, *-*-netbsd* would select the old
|
||||
# object file format. This provides both forward
|
||||
# compatibility and a consistent mechanism for selecting the
|
||||
# object file format.
|
||||
# Determine the machine/vendor (is the vendor relevant).
|
||||
case "${UNAME_MACHINE}" in
|
||||
amiga) machine=m68k-unknown ;;
|
||||
arm32) machine=arm-unknown ;;
|
||||
atari*) machine=m68k-atari ;;
|
||||
sun3*) machine=m68k-sun ;;
|
||||
mac68k) machine=m68k-apple ;;
|
||||
macppc) machine=powerpc-apple ;;
|
||||
hp3[0-9][05]) machine=m68k-hp ;;
|
||||
ibmrt|romp-ibm) machine=romp-ibm ;;
|
||||
*) machine=${UNAME_MACHINE}-unknown ;;
|
||||
#
|
||||
# Note: NetBSD doesn't particularly care about the vendor
|
||||
# portion of the name. We always set it to "unknown".
|
||||
sysctl="sysctl -n hw.machine_arch"
|
||||
UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
|
||||
/usr/sbin/$sysctl 2>/dev/null || echo unknown)`
|
||||
case "${UNAME_MACHINE_ARCH}" in
|
||||
armeb) machine=armeb-unknown ;;
|
||||
arm*) machine=arm-unknown ;;
|
||||
sh3el) machine=shl-unknown ;;
|
||||
sh3eb) machine=sh-unknown ;;
|
||||
*) machine=${UNAME_MACHINE_ARCH}-unknown ;;
|
||||
esac
|
||||
# The Operating System including object format, if it has switched
|
||||
# to ELF recently, or will in the future.
|
||||
case "${UNAME_MACHINE}" in
|
||||
i386|sparc|amiga|arm*|hp300|mvme68k|vax|atari|luna68k|mac68k|news68k|next68k|pc532|sun3*|x68k)
|
||||
case "${UNAME_MACHINE_ARCH}" in
|
||||
arm*|i386|m68k|ns32k|sh3*|sparc|vax)
|
||||
eval $set_cc_for_build
|
||||
if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
|
||||
| grep __ELF__ >/dev/null
|
||||
@ -175,75 +189,112 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
||||
;;
|
||||
esac
|
||||
# The OS release
|
||||
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
||||
# Debian GNU/NetBSD machines have a different userland, and
|
||||
# thus, need a distinct triplet. However, they do not need
|
||||
# kernel version information, so it can be replaced with a
|
||||
# suitable tag, in the style of linux-gnu.
|
||||
case "${UNAME_VERSION}" in
|
||||
Debian*)
|
||||
release='-gnu'
|
||||
;;
|
||||
*)
|
||||
release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
||||
;;
|
||||
esac
|
||||
# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
|
||||
# contains redundant information, the shorter form:
|
||||
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
|
||||
echo "${machine}-${os}${release}"
|
||||
exit 0 ;;
|
||||
amiga:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
arc:OpenBSD:*:*)
|
||||
echo mipsel-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
hp300:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mac68k:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
macppc:OpenBSD:*:*)
|
||||
echo powerpc-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mvme68k:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mvme88k:OpenBSD:*:*)
|
||||
echo m88k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mvmeppc:OpenBSD:*:*)
|
||||
echo powerpc-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
pmax:OpenBSD:*:*)
|
||||
echo mipsel-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sgi:OpenBSD:*:*)
|
||||
echo mipseb-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sun3:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
wgrisc:OpenBSD:*:*)
|
||||
echo mipsel-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:OpenBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
alpha:OSF1:*:*)
|
||||
if test $UNAME_RELEASE = "V4.0"; then
|
||||
UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
|
||||
fi
|
||||
# According to Compaq, /usr/sbin/psrinfo has been available on
|
||||
# OSF/1 and Tru64 systems produced since 1995. I hope that
|
||||
# covers most systems running today. This code pipes the CPU
|
||||
# types through head -n 1, so we only detect the type of CPU 0.
|
||||
ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1`
|
||||
case "$ALPHA_CPU_TYPE" in
|
||||
"EV4 (21064)")
|
||||
UNAME_MACHINE="alpha" ;;
|
||||
"EV4.5 (21064)")
|
||||
UNAME_MACHINE="alpha" ;;
|
||||
"LCA4 (21066/21068)")
|
||||
UNAME_MACHINE="alpha" ;;
|
||||
"EV5 (21164)")
|
||||
UNAME_MACHINE="alphaev5" ;;
|
||||
"EV5.6 (21164A)")
|
||||
UNAME_MACHINE="alphaev56" ;;
|
||||
"EV5.6 (21164PC)")
|
||||
UNAME_MACHINE="alphapca56" ;;
|
||||
"EV5.7 (21164PC)")
|
||||
UNAME_MACHINE="alphapca57" ;;
|
||||
"EV6 (21264)")
|
||||
UNAME_MACHINE="alphaev6" ;;
|
||||
"EV6.7 (21264A)")
|
||||
UNAME_MACHINE="alphaev67" ;;
|
||||
"EV6.8CB (21264C)")
|
||||
UNAME_MACHINE="alphaev68" ;;
|
||||
"EV6.8AL (21264B)")
|
||||
UNAME_MACHINE="alphaev68" ;;
|
||||
"EV6.8CX (21264D)")
|
||||
UNAME_MACHINE="alphaev68" ;;
|
||||
"EV6.9A (21264/EV69A)")
|
||||
UNAME_MACHINE="alphaev69" ;;
|
||||
"EV7 (21364)")
|
||||
UNAME_MACHINE="alphaev7" ;;
|
||||
"EV7.9 (21364A)")
|
||||
UNAME_MACHINE="alphaev79" ;;
|
||||
esac
|
||||
# A Vn.n version is a released version.
|
||||
# A Tn.n version is a released field test version.
|
||||
# A Xn.n version is an unreleased experimental baselevel.
|
||||
# 1.2 uses "1.2" for uname -r.
|
||||
cat <<EOF >$dummy.s
|
||||
.data
|
||||
\$Lformat:
|
||||
.byte 37,100,45,37,120,10,0 # "%d-%x\n"
|
||||
|
||||
.text
|
||||
.globl main
|
||||
.align 4
|
||||
.ent main
|
||||
main:
|
||||
.frame \$30,16,\$26,0
|
||||
ldgp \$29,0(\$27)
|
||||
.prologue 1
|
||||
.long 0x47e03d80 # implver \$0
|
||||
lda \$2,-1
|
||||
.long 0x47e20c21 # amask \$2,\$1
|
||||
lda \$16,\$Lformat
|
||||
mov \$0,\$17
|
||||
not \$1,\$18
|
||||
jsr \$26,printf
|
||||
ldgp \$29,0(\$26)
|
||||
mov 0,\$16
|
||||
jsr \$26,exit
|
||||
.end main
|
||||
EOF
|
||||
eval $set_cc_for_build
|
||||
$CC_FOR_BUILD $dummy.s -o $dummy 2>/dev/null
|
||||
if test "$?" = 0 ; then
|
||||
case `./$dummy` in
|
||||
0-0)
|
||||
UNAME_MACHINE="alpha"
|
||||
;;
|
||||
1-0)
|
||||
UNAME_MACHINE="alphaev5"
|
||||
;;
|
||||
1-1)
|
||||
UNAME_MACHINE="alphaev56"
|
||||
;;
|
||||
1-101)
|
||||
UNAME_MACHINE="alphapca56"
|
||||
;;
|
||||
2-303)
|
||||
UNAME_MACHINE="alphaev6"
|
||||
;;
|
||||
2-307)
|
||||
UNAME_MACHINE="alphaev67"
|
||||
;;
|
||||
2-1307)
|
||||
UNAME_MACHINE="alphaev68"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
rm -f $dummy.s $dummy
|
||||
echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||
exit 0 ;;
|
||||
Alpha*:OpenVMS:*:*)
|
||||
echo alpha-hp-vms
|
||||
exit 0 ;;
|
||||
Alpha\ *:Windows_NT*:*)
|
||||
# How do we know it's Interix rather than the generic POSIX subsystem?
|
||||
# Should we change UNAME_MACHINE based on the output of uname instead
|
||||
@ -256,29 +307,11 @@ EOF
|
||||
Amiga*:UNIX_System_V:4.0:*)
|
||||
echo m68k-unknown-sysv4
|
||||
exit 0;;
|
||||
amiga:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:[Aa]miga[Oo][Ss]:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-amigaos
|
||||
exit 0 ;;
|
||||
arc64:OpenBSD:*:*)
|
||||
echo mips64el-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
arc:OpenBSD:*:*)
|
||||
echo mipsel-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
hkmips:OpenBSD:*:*)
|
||||
echo mips-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
pmax:OpenBSD:*:*)
|
||||
echo mipsel-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sgi:OpenBSD:*:*)
|
||||
echo mips-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
wgrisc:OpenBSD:*:*)
|
||||
echo mipsel-unknown-openbsd${UNAME_RELEASE}
|
||||
*:[Mm]orph[Oo][Ss]:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-morphos
|
||||
exit 0 ;;
|
||||
*:OS/390:*:*)
|
||||
echo i370-ibm-openedition
|
||||
@ -300,6 +333,13 @@ EOF
|
||||
NILE*:*:*:dcosx)
|
||||
echo pyramid-pyramid-svr4
|
||||
exit 0 ;;
|
||||
DRS?6000:unix:4.0:6*)
|
||||
echo sparc-icl-nx6
|
||||
exit 0 ;;
|
||||
DRS?6000:UNIX_SV:4.2*:7*)
|
||||
case `/usr/bin/uname -p` in
|
||||
sparc) echo sparc-icl-nx7 && exit 0 ;;
|
||||
esac ;;
|
||||
sun4H:SunOS:5.*:*)
|
||||
echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
|
||||
exit 0 ;;
|
||||
@ -328,7 +368,7 @@ EOF
|
||||
echo m68k-sun-sunos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sun*:*:4.2BSD:*)
|
||||
UNAME_RELEASE=`(head -1 /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
|
||||
UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
|
||||
test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
|
||||
case "`/bin/arch`" in
|
||||
sun3)
|
||||
@ -342,12 +382,6 @@ EOF
|
||||
aushp:SunOS:*:*)
|
||||
echo sparc-auspex-sunos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sparc*:NetBSD:*)
|
||||
echo `uname -p`-unknown-netbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
atari*:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
# The situation for MiNT is a little confusing. The machine name
|
||||
# can be virtually everything (everything which is not
|
||||
# "atarist" or "atariste" at least should have a processor
|
||||
@ -374,18 +408,6 @@ EOF
|
||||
*:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
|
||||
echo m68k-unknown-mint${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
sun3*:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mac68k:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mvme68k:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mvme88k:OpenBSD:*:*)
|
||||
echo m88k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
powerpc:machten:*:*)
|
||||
echo powerpc-apple-machten${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
@ -402,6 +424,7 @@ EOF
|
||||
echo clipper-intergraph-clix${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
mips:*:*:UMIPS | mips:*:*:RISCos)
|
||||
eval $set_cc_for_build
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#ifdef __cplusplus
|
||||
#include <stdio.h> /* for printf() prototype */
|
||||
@ -423,16 +446,20 @@ EOF
|
||||
exit (-1);
|
||||
}
|
||||
EOF
|
||||
eval $set_cc_for_build
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy \
|
||||
&& ./$dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
|
||||
&& rm -f $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
$CC_FOR_BUILD -o $dummy $dummy.c \
|
||||
&& $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
|
||||
&& exit 0
|
||||
echo mips-mips-riscos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
Motorola:PowerMAX_OS:*:*)
|
||||
echo powerpc-motorola-powermax
|
||||
exit 0 ;;
|
||||
Motorola:*:4.3:PL8-*)
|
||||
echo powerpc-harris-powermax
|
||||
exit 0 ;;
|
||||
Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
|
||||
echo powerpc-harris-powermax
|
||||
exit 0 ;;
|
||||
Night_Hawk:Power_UNIX:*:*)
|
||||
echo powerpc-harris-powerunix
|
||||
exit 0 ;;
|
||||
@ -493,6 +520,7 @@ EOF
|
||||
exit 0 ;;
|
||||
*:AIX:2:3)
|
||||
if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
|
||||
eval $set_cc_for_build
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#include <sys/systemcfg.h>
|
||||
|
||||
@ -504,9 +532,7 @@ EOF
|
||||
exit(0);
|
||||
}
|
||||
EOF
|
||||
eval $set_cc_for_build
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
|
||||
echo rs6000-ibm-aix3.2.5
|
||||
elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
|
||||
echo rs6000-ibm-aix3.2.4
|
||||
@ -515,7 +541,7 @@ EOF
|
||||
fi
|
||||
exit 0 ;;
|
||||
*:AIX:*:[45])
|
||||
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | head -1 | awk '{ print $1 }'`
|
||||
IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
|
||||
if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
|
||||
IBM_ARCH=rs6000
|
||||
else
|
||||
@ -555,10 +581,8 @@ EOF
|
||||
9000/31? ) HP_ARCH=m68000 ;;
|
||||
9000/[34]?? ) HP_ARCH=m68k ;;
|
||||
9000/[678][0-9][0-9])
|
||||
case "${HPUX_REV}" in
|
||||
11.[0-9][0-9])
|
||||
if [ -x /usr/bin/getconf ]; then
|
||||
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
|
||||
if [ -x /usr/bin/getconf ]; then
|
||||
sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
|
||||
sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
|
||||
case "${sc_cpu_version}" in
|
||||
523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
|
||||
@ -567,12 +591,13 @@ EOF
|
||||
case "${sc_kernel_bits}" in
|
||||
32) HP_ARCH="hppa2.0n" ;;
|
||||
64) HP_ARCH="hppa2.0w" ;;
|
||||
'') HP_ARCH="hppa2.0" ;; # HP-UX 10.20
|
||||
esac ;;
|
||||
esac
|
||||
fi ;;
|
||||
esac
|
||||
if [ "${HP_ARCH}" = "" ]; then
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
fi
|
||||
if [ "${HP_ARCH}" = "" ]; then
|
||||
eval $set_cc_for_build
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
|
||||
#define _HPUX_SOURCE
|
||||
#include <stdlib.h>
|
||||
@ -605,12 +630,21 @@ EOF
|
||||
exit (0);
|
||||
}
|
||||
EOF
|
||||
eval $set_cc_for_build
|
||||
(CCOPTS= $CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null ) && HP_ARCH=`./$dummy`
|
||||
if test -z "$HP_ARCH"; then HP_ARCH=hppa; fi
|
||||
rm -f $dummy.c $dummy
|
||||
fi ;;
|
||||
(CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
|
||||
test -z "$HP_ARCH" && HP_ARCH=hppa
|
||||
fi ;;
|
||||
esac
|
||||
if [ ${HP_ARCH} = "hppa2.0w" ]
|
||||
then
|
||||
# avoid double evaluation of $set_cc_for_build
|
||||
test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
|
||||
if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
|
||||
then
|
||||
HP_ARCH="hppa2.0w"
|
||||
else
|
||||
HP_ARCH="hppa64"
|
||||
fi
|
||||
fi
|
||||
echo ${HP_ARCH}-hp-hpux${HPUX_REV}
|
||||
exit 0 ;;
|
||||
ia64:HP-UX:*:*)
|
||||
@ -618,6 +652,7 @@ EOF
|
||||
echo ia64-hp-hpux${HPUX_REV}
|
||||
exit 0 ;;
|
||||
3050*:HI-UX:*:*)
|
||||
eval $set_cc_for_build
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#include <unistd.h>
|
||||
int
|
||||
@ -643,9 +678,7 @@ EOF
|
||||
exit (0);
|
||||
}
|
||||
EOF
|
||||
eval $set_cc_for_build
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy && ./$dummy && rm -f $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
|
||||
echo unknown-hitachi-hiuxwe2
|
||||
exit 0 ;;
|
||||
9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
|
||||
@ -673,9 +706,6 @@ EOF
|
||||
parisc*:Lites*:*:*)
|
||||
echo hppa1.1-hp-lites
|
||||
exit 0 ;;
|
||||
hppa*:OpenBSD:*:*)
|
||||
echo hppa-unknown-openbsd
|
||||
exit 0 ;;
|
||||
C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
|
||||
echo c1-convex-bsd
|
||||
exit 0 ;;
|
||||
@ -694,9 +724,6 @@ EOF
|
||||
C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
|
||||
echo c4-convex-bsd
|
||||
exit 0 ;;
|
||||
CRAY*X-MP:*:*:*)
|
||||
echo xmp-cray-unicos
|
||||
exit 0 ;;
|
||||
CRAY*Y-MP:*:*:*)
|
||||
echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
@ -709,27 +736,21 @@ EOF
|
||||
CRAY*TS:*:*:*)
|
||||
echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
CRAY*T3D:*:*:*)
|
||||
echo alpha-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
CRAY*T3E:*:*:*)
|
||||
echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
CRAY*SV1:*:*:*)
|
||||
echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
CRAY-2:*:*:*)
|
||||
echo cray2-cray-unicos
|
||||
exit 0 ;;
|
||||
*:UNICOS/mp:*:*)
|
||||
echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
|
||||
exit 0 ;;
|
||||
F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
|
||||
FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
|
||||
FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
|
||||
FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
|
||||
echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
|
||||
exit 0 ;;
|
||||
hp300:OpenBSD:*:*)
|
||||
echo m68k-unknown-openbsd${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
@ -739,11 +760,22 @@ EOF
|
||||
*:BSD/OS:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:FreeBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
|
||||
exit 0 ;;
|
||||
*:OpenBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-openbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
|
||||
*:FreeBSD:*:*|*:GNU/FreeBSD:*:*)
|
||||
# Determine whether the default compiler uses glibc.
|
||||
eval $set_cc_for_build
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#include <features.h>
|
||||
#if __GLIBC__ >= 2
|
||||
LIBC=gnu
|
||||
#else
|
||||
LIBC=
|
||||
#endif
|
||||
EOF
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
|
||||
# GNU/FreeBSD systems have a "k" prefix to indicate we are using
|
||||
# FreeBSD's kernel, but not the complete OS.
|
||||
case ${LIBC} in gnu) kernel_only='k' ;; esac
|
||||
echo ${UNAME_MACHINE}-unknown-${kernel_only}freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
|
||||
exit 0 ;;
|
||||
i*:CYGWIN*:*)
|
||||
echo ${UNAME_MACHINE}-pc-cygwin
|
||||
@ -754,11 +786,17 @@ EOF
|
||||
i*:PW*:*)
|
||||
echo ${UNAME_MACHINE}-pc-pw32
|
||||
exit 0 ;;
|
||||
x86:Interix*:[34]*)
|
||||
echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
|
||||
exit 0 ;;
|
||||
[345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
|
||||
echo i${UNAME_MACHINE}-pc-mks
|
||||
exit 0 ;;
|
||||
i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
|
||||
# How do we know it's Interix rather than the generic POSIX subsystem?
|
||||
# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
|
||||
# UNAME_MACHINE based on the output of uname instead of i386?
|
||||
echo i386-pc-interix
|
||||
echo i586-pc-interix
|
||||
exit 0 ;;
|
||||
i*:UWIN*:*)
|
||||
echo ${UNAME_MACHINE}-pc-uwin
|
||||
@ -778,6 +816,9 @@ EOF
|
||||
arm*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-${VENDOR}-linux
|
||||
exit 0 ;;
|
||||
cris:Linux:*:*)
|
||||
echo cris-axis-linux
|
||||
exit 0 ;;
|
||||
ia64:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-${VENDOR}-linux
|
||||
exit 0 ;;
|
||||
@ -785,19 +826,48 @@ EOF
|
||||
echo ${UNAME_MACHINE}-${VENDOR}-linux
|
||||
exit 0 ;;
|
||||
mips:Linux:*:*)
|
||||
case `sed -n '/^byte/s/^.*: \(.*\) endian/\1/p' < /proc/cpuinfo` in
|
||||
big) echo mips-${VENDOR}-linux && exit 0 ;;
|
||||
little) echo mipsel-${VENDOR}-linux && exit 0 ;;
|
||||
esac
|
||||
case `sed -n '/^system type/s/^.*: \([^ ]*\).*/\1/p' < /proc/cpuinfo` in
|
||||
SGI|sgi) echo mips-${VENDOR}-linux-gnu && exit 0 ;;
|
||||
esac
|
||||
eval $set_cc_for_build
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#undef CPU
|
||||
#undef mips
|
||||
#undef mipsel
|
||||
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
|
||||
CPU=mipsel
|
||||
#else
|
||||
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
|
||||
CPU=mips
|
||||
#else
|
||||
CPU=
|
||||
#endif
|
||||
#endif
|
||||
EOF
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
|
||||
test x"${CPU}" != x && echo "${CPU}-${VENDOR}-linux" && exit 0
|
||||
;;
|
||||
ppc:Linux:*:*|ppc64:Linux:*:*)
|
||||
mips64:Linux:*:*)
|
||||
eval $set_cc_for_build
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#undef CPU
|
||||
#undef mips64
|
||||
#undef mips64el
|
||||
#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
|
||||
CPU=mips64el
|
||||
#else
|
||||
#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
|
||||
CPU=mips64
|
||||
#else
|
||||
CPU=
|
||||
#endif
|
||||
#endif
|
||||
EOF
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
|
||||
test x"${CPU}" != x && echo "${CPU}-${VENDOR}-linux" && exit 0
|
||||
;;
|
||||
ppc:Linux:*:*)
|
||||
echo powerpc-${VENDOR}-linux
|
||||
exit 0 ;;
|
||||
ppc64:Linux:*:*)
|
||||
echo powerpc64-unknown-linux-gnu
|
||||
echo powerpc64-${VENDOR}-linux
|
||||
exit 0 ;;
|
||||
alpha:Linux:*:*)
|
||||
case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
|
||||
@ -810,7 +880,7 @@ EOF
|
||||
EV68*) UNAME_MACHINE=alphaev68 ;;
|
||||
esac
|
||||
objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
|
||||
if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
|
||||
if test "$?" = 0 ; then LIBC="-libc1" ; else LIBC="" ; fi
|
||||
echo ${UNAME_MACHINE}-${VENDOR}-linux${LIBC}
|
||||
exit 0 ;;
|
||||
parisc:Linux:*:* | hppa:Linux:*:*)
|
||||
@ -827,6 +897,9 @@ EOF
|
||||
s390:Linux:*:* | s390x:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-ibm-linux
|
||||
exit 0 ;;
|
||||
sh64*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-${VENDOR}-linux
|
||||
exit 0 ;;
|
||||
sh*:Linux:*:*)
|
||||
echo ${UNAME_MACHINE}-${VENDOR}-linux
|
||||
exit 0 ;;
|
||||
@ -840,7 +913,8 @@ EOF
|
||||
# The BFD linker knows what the default object file format is, so
|
||||
# first see if it will tell us. cd to the root directory to prevent
|
||||
# problems with other programs or directories called `ld' in the path.
|
||||
ld_supported_targets=`cd /; ld --help 2>&1 \
|
||||
# Set LC_ALL=C to ensure ld outputs messages in English.
|
||||
ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
|
||||
| sed -ne '/supported targets:/!d
|
||||
s/[ ][ ]*/ /g
|
||||
s/.*supported targets: *//
|
||||
@ -852,7 +926,7 @@ EOF
|
||||
;;
|
||||
a.out-i386-linux)
|
||||
echo "${UNAME_MACHINE}-${VENDOR}-linuxaout"
|
||||
exit 0 ;;
|
||||
exit 0 ;;
|
||||
coff-i386)
|
||||
echo "${UNAME_MACHINE}-${VENDOR}-linuxcoff"
|
||||
exit 0 ;;
|
||||
@ -863,33 +937,29 @@ EOF
|
||||
exit 0 ;;
|
||||
esac
|
||||
# Determine whether the default compiler is a.out or elf
|
||||
cat >$dummy.c <<EOF
|
||||
#include <features.h>
|
||||
#ifdef __cplusplus
|
||||
#include <stdio.h> /* for printf() prototype */
|
||||
int main (int argc, char *argv[]) {
|
||||
#else
|
||||
int main (argc, argv) int argc; char *argv[]; {
|
||||
#endif
|
||||
#ifdef __ELF__
|
||||
# ifdef __GLIBC__
|
||||
# if __GLIBC__ >= 2
|
||||
printf ("%s-${VENDOR}-linux\n", argv[1]);
|
||||
# else
|
||||
printf ("%s-${VENDOR}-linuxlibc1\n", argv[1]);
|
||||
# endif
|
||||
# else
|
||||
printf ("%s-${VENDOR}-linuxlibc1\n", argv[1]);
|
||||
# endif
|
||||
#else
|
||||
printf ("%s-${VENDOR}-linuxaout\n", argv[1]);
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
EOF
|
||||
eval $set_cc_for_build
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy "${UNAME_MACHINE}" && rm -f $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
sed 's/^ //' << EOF >$dummy.c
|
||||
#include <features.h>
|
||||
#ifdef __ELF__
|
||||
# ifdef __GLIBC__
|
||||
# if __GLIBC__ >= 2
|
||||
LIBC=gnu
|
||||
# else
|
||||
LIBC=gnulibc1
|
||||
# endif
|
||||
# else
|
||||
LIBC=gnulibc1
|
||||
# endif
|
||||
#else
|
||||
#ifdef __INTEL_COMPILER
|
||||
LIBC=gnu
|
||||
#else
|
||||
LIBC=gnuaout
|
||||
#endif
|
||||
#endif
|
||||
EOF
|
||||
eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
|
||||
test x"${LIBC}" != x && echo "${UNAME_MACHINE}-${VENDOR}-linux-${LIBC}" | sed 's/linux-gnu/linux/' && exit 0
|
||||
test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
|
||||
;;
|
||||
i*86:DYNIX/ptx:4*:*)
|
||||
@ -906,6 +976,23 @@ EOF
|
||||
# Use sysv4.2uw... so that sysv4* matches it.
|
||||
echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
|
||||
exit 0 ;;
|
||||
i*86:OS/2:*:*)
|
||||
# If we were able to find `uname', then EMX Unix compatibility
|
||||
# is probably installed.
|
||||
echo ${UNAME_MACHINE}-pc-os2-emx
|
||||
exit 0 ;;
|
||||
i*86:XTS-300:*:STOP)
|
||||
echo ${UNAME_MACHINE}-unknown-stop
|
||||
exit 0 ;;
|
||||
i*86:atheos:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-atheos
|
||||
exit 0 ;;
|
||||
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
|
||||
echo i386-unknown-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
i*86:*DOS:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-msdosdjgpp
|
||||
exit 0 ;;
|
||||
i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
|
||||
UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
|
||||
if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
|
||||
@ -927,22 +1014,19 @@ EOF
|
||||
UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
|
||||
echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
|
||||
elif /bin/uname -X 2>/dev/null >/dev/null ; then
|
||||
UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
|
||||
(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
|
||||
(/bin/uname -X|egrep '^Machine.*Pentium' >/dev/null) \
|
||||
UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
|
||||
(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
|
||||
(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
|
||||
&& UNAME_MACHINE=i586
|
||||
(/bin/uname -X|egrep '^Machine.*Pent ?II' >/dev/null) \
|
||||
(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
|
||||
&& UNAME_MACHINE=i686
|
||||
(/bin/uname -X|egrep '^Machine.*Pentium Pro' >/dev/null) \
|
||||
(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
|
||||
&& UNAME_MACHINE=i686
|
||||
echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
|
||||
else
|
||||
echo ${UNAME_MACHINE}-pc-sysv32
|
||||
fi
|
||||
exit 0 ;;
|
||||
i*86:*DOS:*:*)
|
||||
echo ${UNAME_MACHINE}-pc-msdosdjgpp
|
||||
exit 0 ;;
|
||||
pc:*:*:*)
|
||||
# Left here for compatibility:
|
||||
# uname -m prints for DJGPP always 'pc', but it prints nothing about
|
||||
@ -966,9 +1050,15 @@ EOF
|
||||
# "miniframe"
|
||||
echo m68010-convergent-sysv
|
||||
exit 0 ;;
|
||||
mc68k:UNIX:SYSTEM5:3.51m)
|
||||
echo m68k-convergent-sysv
|
||||
exit 0 ;;
|
||||
M680?0:D-NIX:5.3:*)
|
||||
echo m68k-diab-dnix
|
||||
exit 0 ;;
|
||||
M68*:*:R3V[567]*:*)
|
||||
test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
|
||||
3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 4850:*:4.0:3.0)
|
||||
3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0)
|
||||
OS_REL=''
|
||||
test -r /etc/.relid \
|
||||
&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
|
||||
@ -985,9 +1075,6 @@ EOF
|
||||
mc68030:UNIX_System_V:4.*:*)
|
||||
echo m68k-atari-sysv4
|
||||
exit 0 ;;
|
||||
i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
|
||||
echo i386-unknown-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
TSUNAMI:LynxOS:2.*:*)
|
||||
echo sparc-unknown-lynxos${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
@ -1059,6 +1146,9 @@ EOF
|
||||
SX-5:SUPER-UX:*:*)
|
||||
echo sx5-nec-superux${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
SX-6:SUPER-UX:*:*)
|
||||
echo sx6-nec-superux${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
Power*:Rhapsody:*:*)
|
||||
echo powerpc-apple-rhapsody${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
@ -1066,18 +1156,24 @@ EOF
|
||||
echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:Darwin:*:*)
|
||||
echo `uname -p`-apple-darwin${UNAME_RELEASE}
|
||||
case `uname -p` in
|
||||
*86) UNAME_PROCESSOR=i686 ;;
|
||||
powerpc) UNAME_PROCESSOR=powerpc ;;
|
||||
esac
|
||||
echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:procnto*:*:* | *:QNX:[0123456789]*:*)
|
||||
if test "${UNAME_MACHINE}" = "x86pc"; then
|
||||
UNAME_PROCESSOR=`uname -p`
|
||||
if test "$UNAME_PROCESSOR" = "x86"; then
|
||||
UNAME_PROCESSOR=i386
|
||||
UNAME_MACHINE=pc
|
||||
fi
|
||||
echo `uname -p`-${UNAME_MACHINE}-nto-qnx
|
||||
echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:QNX:*:4*)
|
||||
echo i386-pc-qnx
|
||||
exit 0 ;;
|
||||
NSR-[KW]:NONSTOP_KERNEL:*:*)
|
||||
NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
|
||||
echo nsr-tandem-nsk${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
*:NonStop-UX:*:*)
|
||||
@ -1100,11 +1196,6 @@ EOF
|
||||
fi
|
||||
echo ${UNAME_MACHINE}-unknown-plan9
|
||||
exit 0 ;;
|
||||
i*86:OS/2:*:*)
|
||||
# If we were able to find `uname', then EMX Unix compatibility
|
||||
# is probably installed.
|
||||
echo ${UNAME_MACHINE}-pc-os2-emx
|
||||
exit 0 ;;
|
||||
*:TOPS-10:*:*)
|
||||
echo pdp10-unknown-tops10
|
||||
exit 0 ;;
|
||||
@ -1123,14 +1214,15 @@ EOF
|
||||
*:ITS:*:*)
|
||||
echo pdp10-unknown-its
|
||||
exit 0 ;;
|
||||
i*86:XTS-300:*:STOP)
|
||||
echo ${UNAME_MACHINE}-unknown-stop
|
||||
SEI:*:*:SEIUX)
|
||||
echo mips-sei-seiux${UNAME_RELEASE}
|
||||
exit 0 ;;
|
||||
esac
|
||||
|
||||
#echo '(No uname command or uname output not recognized.)' 1>&2
|
||||
#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
|
||||
|
||||
eval $set_cc_for_build
|
||||
cat >$dummy.c <<EOF
|
||||
#ifdef _SEQUENT_
|
||||
# include <sys/types.h>
|
||||
@ -1245,9 +1337,7 @@ main ()
|
||||
}
|
||||
EOF
|
||||
|
||||
eval $set_cc_for_build
|
||||
$CC_FOR_BUILD $dummy.c -o $dummy 2>/dev/null && ./$dummy && rm -f $dummy.c $dummy && exit 0
|
||||
rm -f $dummy.c $dummy
|
||||
$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
|
||||
|
||||
# Apollos put the system type in the environment.
|
||||
|
||||
|
303
config.sub
vendored
303
config.sub
vendored
@ -1,9 +1,9 @@
|
||||
#! /bin/sh
|
||||
# Configuration validation subroutine script.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
|
||||
# Free Software Foundation, Inc.
|
||||
# Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
|
||||
# 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
|
||||
|
||||
timestamp='2001-08-13'
|
||||
timestamp='2003-07-04'
|
||||
|
||||
# This file is (in principle) common to ALL GNU software.
|
||||
# The presence of a machine in this file suggests that SOME GNU software
|
||||
@ -29,7 +29,8 @@ timestamp='2001-08-13'
|
||||
# configuration script generated by Autoconf, you may include it under
|
||||
# the same distribution terms that you use for the rest of that program.
|
||||
|
||||
# Please send patches to <config-patches@gnu.org>.
|
||||
# Please send patches to <config-patches@gnu.org>. Submit a context
|
||||
# diff and a properly formatted ChangeLog entry.
|
||||
#
|
||||
# Configuration subroutine to validate and canonicalize a configuration type.
|
||||
# Supply the specified configuration type as an argument.
|
||||
@ -117,7 +118,7 @@ esac
|
||||
# Here we must recognize all the valid KERNEL-OS combinations.
|
||||
maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
|
||||
case $maybe_os in
|
||||
nto-qnx* | linux-gnu* | storm-chaos* | os2-emx* | windows32-*)
|
||||
nto-qnx* | linux-gnu* | kfreebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
|
||||
os=-$maybe_os
|
||||
basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
|
||||
;;
|
||||
@ -226,31 +227,44 @@ case $basic_machine in
|
||||
1750a | 580 \
|
||||
| a29k \
|
||||
| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
|
||||
| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
|
||||
| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
|
||||
| c4x | clipper \
|
||||
| d10v | d30v | dsp16xx \
|
||||
| fr30 \
|
||||
| d10v | d30v | dlx | dsp16xx \
|
||||
| fr30 | frv \
|
||||
| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
|
||||
| i370 | i860 | i960 | ia64 \
|
||||
| ip2k \
|
||||
| m32r | m68000 | m68k | m88k | mcore \
|
||||
| mips16 | mips64 | mips64el | mips64orion | mips64orionel \
|
||||
| mips64vr4100 | mips64vr4100el | mips64vr4300 \
|
||||
| mips64vr4300el | mips64vr5000 | mips64vr5000el \
|
||||
| mipsbe | mipsel | mipsle | mipstx39 | mipstx39el \
|
||||
| mips | mipsbe | mipseb | mipsel | mipsle \
|
||||
| mips16 \
|
||||
| mips64 | mips64el \
|
||||
| mips64vr | mips64vrel \
|
||||
| mips64orion | mips64orionel \
|
||||
| mips64vr4100 | mips64vr4100el \
|
||||
| mips64vr4300 | mips64vr4300el \
|
||||
| mips64vr5000 | mips64vr5000el \
|
||||
| mipsisa32 | mipsisa32el \
|
||||
| mipsisa32r2 | mipsisa32r2el \
|
||||
| mipsisa64 | mipsisa64el \
|
||||
| mipsisa64sb1 | mipsisa64sb1el \
|
||||
| mipsisa64sr71k | mipsisa64sr71kel \
|
||||
| mipstx39 | mipstx39el \
|
||||
| mn10200 | mn10300 \
|
||||
| msp430 \
|
||||
| ns16k | ns32k \
|
||||
| openrisc \
|
||||
| openrisc | or32 \
|
||||
| pdp10 | pdp11 | pj | pjl \
|
||||
| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
|
||||
| pyramid \
|
||||
| s390 | s390x \
|
||||
| sh | sh[34] | sh[34]eb | shbe | shle \
|
||||
| sparc | sparc64 | sparclet | sparclite | sparcv9 | sparcv9b \
|
||||
| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
|
||||
| sh64 | sh64le \
|
||||
| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
|
||||
| strongarm \
|
||||
| tahoe | thumb | tic80 | tron \
|
||||
| v850 \
|
||||
| tahoe | thumb | tic4x | tic80 | tron \
|
||||
| v850 | v850e \
|
||||
| we32k \
|
||||
| x86 | xscale \
|
||||
| x86 | xscale | xstormy16 | xtensa \
|
||||
| z8k)
|
||||
basic_machine=$basic_machine-unknown
|
||||
;;
|
||||
@ -277,38 +291,55 @@ case $basic_machine in
|
||||
580-* \
|
||||
| a29k-* \
|
||||
| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
|
||||
| alphapca5[67]-* | arc-* \
|
||||
| arm-* | armbe-* | armle-* | armv*-* \
|
||||
| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
|
||||
| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
|
||||
| arm-* | armbe-* | armle-* | armeb-* | armv*-* \
|
||||
| avr-* \
|
||||
| bs2000-* \
|
||||
| c[123]* | c30-* | [cjt]90-* | c54x-* \
|
||||
| clipper-* | cray2-* | cydra-* \
|
||||
| d10v-* | d30v-* \
|
||||
| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
|
||||
| clipper-* | cydra-* \
|
||||
| d10v-* | d30v-* | dlx-* \
|
||||
| elxsi-* \
|
||||
| f30[01]-* | f700-* | fr30-* | fx80-* \
|
||||
| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
|
||||
| h8300-* | h8500-* \
|
||||
| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
|
||||
| i*86-* | i860-* | i960-* | ia64-* \
|
||||
| ip2k-* \
|
||||
| m32r-* \
|
||||
| m68000-* | m680[01234]0-* | m68360-* | m683?2-* | m68k-* \
|
||||
| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
|
||||
| m88110-* | m88k-* | mcore-* \
|
||||
| mips-* | mips16-* | mips64-* | mips64el-* | mips64orion-* \
|
||||
| mips64orionel-* | mips64vr4100-* | mips64vr4100el-* \
|
||||
| mips64vr4300-* | mips64vr4300el-* | mipsbe-* | mipsel-* \
|
||||
| mipsle-* | mipstx39-* | mipstx39el-* \
|
||||
| none-* | np1-* | ns16k-* | ns32k-* \
|
||||
| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
|
||||
| mips16-* \
|
||||
| mips64-* | mips64el-* \
|
||||
| mips64vr-* | mips64vrel-* \
|
||||
| mips64orion-* | mips64orionel-* \
|
||||
| mips64vr4100-* | mips64vr4100el-* \
|
||||
| mips64vr4300-* | mips64vr4300el-* \
|
||||
| mips64vr5000-* | mips64vr5000el-* \
|
||||
| mipsisa32-* | mipsisa32el-* \
|
||||
| mipsisa32r2-* | mipsisa32r2el-* \
|
||||
| mipsisa64-* | mipsisa64el-* \
|
||||
| mipsisa64sb1-* | mipsisa64sb1el-* \
|
||||
| mipsisa64sr71k-* | mipsisa64sr71kel-* \
|
||||
| mipstx39-* | mipstx39el-* \
|
||||
| msp430-* \
|
||||
| none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
|
||||
| orion-* \
|
||||
| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
|
||||
| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
|
||||
| pyramid-* \
|
||||
| romp-* | rs6000-* \
|
||||
| s390-* | s390x-* \
|
||||
| sh-* | sh[34]-* | sh[34]eb-* | shbe-* | shle-* \
|
||||
| sparc-* | sparc64-* | sparc86x-* | sparclite-* \
|
||||
| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* \
|
||||
| t3e-* | tahoe-* | thumb-* | tic30-* | tic54x-* | tic80-* | tron-* \
|
||||
| v850-* | vax-* \
|
||||
| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
|
||||
| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
|
||||
| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
|
||||
| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
|
||||
| tahoe-* | thumb-* \
|
||||
| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
|
||||
| tron-* \
|
||||
| v850-* | v850e-* | vax-* \
|
||||
| we32k-* \
|
||||
| x86-* | x86_64-* | xmp-* | xps100-* | xscale-* \
|
||||
| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
|
||||
| xtensa-* \
|
||||
| ymp-* \
|
||||
| z8k-*)
|
||||
;;
|
||||
@ -342,6 +373,9 @@ case $basic_machine in
|
||||
basic_machine=a29k-none
|
||||
os=-bsd
|
||||
;;
|
||||
amd64)
|
||||
basic_machine=x86_64-pc
|
||||
;;
|
||||
amdahl)
|
||||
basic_machine=580-amdahl
|
||||
os=-sysv
|
||||
@ -373,6 +407,10 @@ case $basic_machine in
|
||||
basic_machine=ns32k-sequent
|
||||
os=-dynix
|
||||
;;
|
||||
c90)
|
||||
basic_machine=c90-cray
|
||||
os=-unicos
|
||||
;;
|
||||
convex-c1)
|
||||
basic_machine=c1-convex
|
||||
os=-bsd
|
||||
@ -393,16 +431,8 @@ case $basic_machine in
|
||||
basic_machine=c38-convex
|
||||
os=-bsd
|
||||
;;
|
||||
cray | ymp)
|
||||
basic_machine=ymp-cray
|
||||
os=-unicos
|
||||
;;
|
||||
cray2)
|
||||
basic_machine=cray2-cray
|
||||
os=-unicos
|
||||
;;
|
||||
[cjt]90)
|
||||
basic_machine=${basic_machine}-cray
|
||||
cray | j90)
|
||||
basic_machine=j90-cray
|
||||
os=-unicos
|
||||
;;
|
||||
crds | unos)
|
||||
@ -417,6 +447,14 @@ case $basic_machine in
|
||||
decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
|
||||
basic_machine=mips-dec
|
||||
;;
|
||||
decsystem10* | dec10*)
|
||||
basic_machine=pdp10-dec
|
||||
os=-tops10
|
||||
;;
|
||||
decsystem20* | dec20*)
|
||||
basic_machine=pdp10-dec
|
||||
os=-tops20
|
||||
;;
|
||||
delta | 3300 | motorola-3300 | motorola-delta \
|
||||
| 3300-motorola | delta-motorola)
|
||||
basic_machine=m68k-motorola
|
||||
@ -597,12 +635,6 @@ case $basic_machine in
|
||||
basic_machine=m68k-atari
|
||||
os=-mint
|
||||
;;
|
||||
mipsel*-linux*)
|
||||
basic_machine=mipsel-unknown
|
||||
;;
|
||||
mips*-linux*)
|
||||
basic_machine=mips-unknown
|
||||
;;
|
||||
mips3*-*)
|
||||
basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
|
||||
;;
|
||||
@ -617,6 +649,10 @@ case $basic_machine in
|
||||
basic_machine=m68k-rom68k
|
||||
os=-coff
|
||||
;;
|
||||
morphos)
|
||||
basic_machine=powerpc-unknown
|
||||
os=-morphos
|
||||
;;
|
||||
msdos)
|
||||
basic_machine=i386-pc
|
||||
os=-msdos
|
||||
@ -689,6 +725,10 @@ case $basic_machine in
|
||||
np1)
|
||||
basic_machine=np1-gould
|
||||
;;
|
||||
nv1)
|
||||
basic_machine=nv1-cray
|
||||
os=-unicosmp
|
||||
;;
|
||||
nsr-tandem)
|
||||
basic_machine=nsr-tandem
|
||||
;;
|
||||
@ -696,6 +736,10 @@ case $basic_machine in
|
||||
basic_machine=hppa1.1-oki
|
||||
os=-proelf
|
||||
;;
|
||||
or32 | or32-*)
|
||||
basic_machine=or32-unknown
|
||||
os=-coff
|
||||
;;
|
||||
OSE68000 | ose68000)
|
||||
basic_machine=m68000-ericsson
|
||||
os=-ose
|
||||
@ -718,51 +762,55 @@ case $basic_machine in
|
||||
pbb)
|
||||
basic_machine=m68k-tti
|
||||
;;
|
||||
pc532 | pc532-*)
|
||||
pc532 | pc532-*)
|
||||
basic_machine=ns32k-pc532
|
||||
;;
|
||||
pentium | p5 | k5 | k6 | nexgen)
|
||||
pentium | p5 | k5 | k6 | nexgen | viac3)
|
||||
basic_machine=i586-pc
|
||||
;;
|
||||
pentiumpro | p6 | 6x86 | athlon)
|
||||
pentiumpro | p6 | 6x86 | athlon | athlon_*)
|
||||
basic_machine=i686-pc
|
||||
;;
|
||||
pentiumii | pentium2)
|
||||
pentiumii | pentium2 | pentiumiii | pentium3)
|
||||
basic_machine=i686-pc
|
||||
;;
|
||||
pentium-* | p5-* | k5-* | k6-* | nexgen-*)
|
||||
pentium4)
|
||||
basic_machine=i786-pc
|
||||
;;
|
||||
pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
|
||||
basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pentiumpro-* | p6-* | 6x86-* | athlon-*)
|
||||
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pentiumii-* | pentium2-*)
|
||||
pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
|
||||
basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pentium4-*)
|
||||
basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
pn)
|
||||
basic_machine=pn-gould
|
||||
;;
|
||||
power) basic_machine=power-ibm
|
||||
;;
|
||||
ppc) basic_machine=powerpc-unknown
|
||||
;;
|
||||
ppc64) basic_machine=powerpc-unknown
|
||||
;;
|
||||
ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
ppcle | powerpclittle | ppc-le | powerpc-little)
|
||||
basic_machine=powerpcle-unknown
|
||||
;;
|
||||
;;
|
||||
ppcle-* | powerpclittle-*)
|
||||
basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
ppc64) basic_machine=powerpc64-unknown
|
||||
;;
|
||||
;;
|
||||
ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
ppc64le | powerpc64little | ppc64-le | powerpc64-little)
|
||||
basic_machine=powerpc64le-unknown
|
||||
;;
|
||||
;;
|
||||
ppc64le-* | powerpc64little-*)
|
||||
basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
|
||||
;;
|
||||
@ -783,10 +831,26 @@ case $basic_machine in
|
||||
rtpc | rtpc-*)
|
||||
basic_machine=romp-ibm
|
||||
;;
|
||||
s390 | s390-*)
|
||||
basic_machine=s390-ibm
|
||||
;;
|
||||
s390x | s390x-*)
|
||||
basic_machine=s390x-ibm
|
||||
;;
|
||||
sa29200)
|
||||
basic_machine=a29k-amd
|
||||
os=-udi
|
||||
;;
|
||||
sb1)
|
||||
basic_machine=mipsisa64sb1-unknown
|
||||
;;
|
||||
sb1el)
|
||||
basic_machine=mipsisa64sb1el-unknown
|
||||
;;
|
||||
sei)
|
||||
basic_machine=mips-sei
|
||||
os=-seiux
|
||||
;;
|
||||
sequent)
|
||||
basic_machine=i386-sequent
|
||||
;;
|
||||
@ -794,7 +858,10 @@ case $basic_machine in
|
||||
basic_machine=sh-hitachi
|
||||
os=-hms
|
||||
;;
|
||||
sparclite-wrs)
|
||||
sh64)
|
||||
basic_machine=sh64-unknown
|
||||
;;
|
||||
sparclite-wrs | simso-wrs)
|
||||
basic_machine=sparclite-wrs
|
||||
os=-vxworks
|
||||
;;
|
||||
@ -861,19 +928,35 @@ case $basic_machine in
|
||||
os=-dynix
|
||||
;;
|
||||
t3e)
|
||||
basic_machine=t3e-cray
|
||||
basic_machine=alphaev5-cray
|
||||
os=-unicos
|
||||
;;
|
||||
t90)
|
||||
basic_machine=t90-cray
|
||||
os=-unicos
|
||||
;;
|
||||
tic54x | c54x*)
|
||||
basic_machine=tic54x-unknown
|
||||
os=-coff
|
||||
;;
|
||||
tic55x | c55x*)
|
||||
basic_machine=tic55x-unknown
|
||||
os=-coff
|
||||
;;
|
||||
tic6x | c6x*)
|
||||
basic_machine=tic6x-unknown
|
||||
os=-coff
|
||||
;;
|
||||
tx39)
|
||||
basic_machine=mipstx39-unknown
|
||||
;;
|
||||
tx39el)
|
||||
basic_machine=mipstx39el-unknown
|
||||
;;
|
||||
toad1)
|
||||
basic_machine=pdp10-xkl
|
||||
os=-tops20
|
||||
;;
|
||||
tower | tower-32)
|
||||
basic_machine=m68k-ncr
|
||||
;;
|
||||
@ -898,8 +981,8 @@ case $basic_machine in
|
||||
os=-vms
|
||||
;;
|
||||
vpp*|vx|vx-*)
|
||||
basic_machine=f301-fujitsu
|
||||
;;
|
||||
basic_machine=f301-fujitsu
|
||||
;;
|
||||
vxworks960)
|
||||
basic_machine=i960-wrs
|
||||
os=-vxworks
|
||||
@ -920,17 +1003,13 @@ case $basic_machine in
|
||||
basic_machine=hppa1.1-winbond
|
||||
os=-proelf
|
||||
;;
|
||||
windows32)
|
||||
basic_machine=i386-pc
|
||||
os=-windows32-msvcrt
|
||||
;;
|
||||
xmp)
|
||||
basic_machine=xmp-cray
|
||||
os=-unicos
|
||||
;;
|
||||
xps | xps100)
|
||||
xps | xps100)
|
||||
basic_machine=xps100-honeywell
|
||||
;;
|
||||
ymp)
|
||||
basic_machine=ymp-cray
|
||||
os=-unicos
|
||||
;;
|
||||
z8k-*-coff)
|
||||
basic_machine=z8k-unknown
|
||||
os=-sim
|
||||
@ -951,16 +1030,6 @@ case $basic_machine in
|
||||
op60c)
|
||||
basic_machine=hppa1.1-oki
|
||||
;;
|
||||
mips)
|
||||
case $os in
|
||||
linux*)
|
||||
basic_machine=mips-unknown
|
||||
;;
|
||||
*)
|
||||
basic_machine=mips-mips
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
romp)
|
||||
basic_machine=romp-ibm
|
||||
;;
|
||||
@ -980,13 +1049,16 @@ case $basic_machine in
|
||||
we32k)
|
||||
basic_machine=we32k-att
|
||||
;;
|
||||
sh3 | sh4 | sh3eb | sh4eb)
|
||||
sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
|
||||
basic_machine=sh-unknown
|
||||
;;
|
||||
sh64)
|
||||
basic_machine=sh64-unknown
|
||||
;;
|
||||
sparc | sparcv9 | sparcv9b)
|
||||
basic_machine=sparc-sun
|
||||
;;
|
||||
cydra)
|
||||
cydra)
|
||||
basic_machine=cydra-cydrome
|
||||
;;
|
||||
orion)
|
||||
@ -1001,10 +1073,6 @@ case $basic_machine in
|
||||
pmac | pmac-mpw)
|
||||
basic_machine=powerpc-apple
|
||||
;;
|
||||
c4x*)
|
||||
basic_machine=c4x-none
|
||||
os=-coff
|
||||
;;
|
||||
*-unknown)
|
||||
# Make sure to match an already-canonicalized machine name.
|
||||
;;
|
||||
@ -1060,17 +1128,19 @@ case $os in
|
||||
| -aos* \
|
||||
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
|
||||
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
|
||||
| -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
|
||||
| -hiux* | -386bsd* | -netbsd* | -openbsd* | -kfreebsd* | -freebsd* | -riscix* \
|
||||
| -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
|
||||
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
|
||||
| -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
|
||||
| -chorusos* | -chorusrdb* \
|
||||
| -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
|
||||
| -mingw32* | -linux* | -uxpv* | -beos* | -mpeix* | -udk* \
|
||||
| -interix* | -uwin* | -rhapsody* | -darwin* | -opened* \
|
||||
| -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
|
||||
| -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
|
||||
| -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
|
||||
| -os2* | -vos*)
|
||||
| -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
|
||||
| -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
|
||||
| -powermax* | -dnix* | -nx6 | -nx7 | -sei*)
|
||||
# Remember, each alternative MUST END IN *, to match a version number.
|
||||
;;
|
||||
-qnx*)
|
||||
@ -1082,8 +1152,10 @@ case $os in
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
-nto-qnx*)
|
||||
;;
|
||||
-nto*)
|
||||
os=-nto-qnx
|
||||
os=`echo $os | sed -e 's|nto|nto-qnx|'`
|
||||
;;
|
||||
-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
|
||||
| -windows* | -osx | -abug | -netware* | -os9* | -beos* \
|
||||
@ -1119,14 +1191,20 @@ case $os in
|
||||
-acis*)
|
||||
os=-aos
|
||||
;;
|
||||
-atheos*)
|
||||
os=-atheos
|
||||
;;
|
||||
-386bsd)
|
||||
os=-bsd
|
||||
;;
|
||||
-ctix* | -uts*)
|
||||
os=-sysv
|
||||
;;
|
||||
-nova*)
|
||||
os=-rtmk-nova
|
||||
;;
|
||||
-ns2 )
|
||||
os=-nextstep2
|
||||
os=-nextstep2
|
||||
;;
|
||||
-nsk*)
|
||||
os=-nsk
|
||||
@ -1165,8 +1243,14 @@ case $os in
|
||||
-xenix)
|
||||
os=-xenix
|
||||
;;
|
||||
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
|
||||
os=-mint
|
||||
-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
|
||||
os=-mint
|
||||
;;
|
||||
-aros*)
|
||||
os=-aros
|
||||
;;
|
||||
-kaos*)
|
||||
os=-kaos
|
||||
;;
|
||||
-none)
|
||||
;;
|
||||
@ -1199,10 +1283,14 @@ case $basic_machine in
|
||||
arm*-semi)
|
||||
os=-aout
|
||||
;;
|
||||
c4x-* | tic4x-*)
|
||||
os=-coff
|
||||
;;
|
||||
# This must come before the *-dec entry.
|
||||
pdp10-*)
|
||||
os=-tops20
|
||||
;;
|
||||
pdp11-*)
|
||||
pdp11-*)
|
||||
os=-none
|
||||
;;
|
||||
*-dec | vax-*)
|
||||
@ -1229,6 +1317,9 @@ case $basic_machine in
|
||||
mips*-*)
|
||||
os=-elf
|
||||
;;
|
||||
or32-*)
|
||||
os=-coff
|
||||
;;
|
||||
*-tti) # must be before sparc entry or we get the wrong os.
|
||||
os=-sysv3
|
||||
;;
|
||||
@ -1292,19 +1383,19 @@ case $basic_machine in
|
||||
*-next)
|
||||
os=-nextstep3
|
||||
;;
|
||||
*-gould)
|
||||
*-gould)
|
||||
os=-sysv
|
||||
;;
|
||||
*-highlevel)
|
||||
*-highlevel)
|
||||
os=-bsd
|
||||
;;
|
||||
*-encore)
|
||||
os=-bsd
|
||||
;;
|
||||
*-sgi)
|
||||
*-sgi)
|
||||
os=-irix
|
||||
;;
|
||||
*-siemens)
|
||||
*-siemens)
|
||||
os=-sysv4
|
||||
;;
|
||||
*-masscomp)
|
||||
@ -1376,7 +1467,7 @@ case $basic_machine in
|
||||
-ptx*)
|
||||
vendor=sequent
|
||||
;;
|
||||
-vxsim* | -vxworks*)
|
||||
-vxsim* | -vxworks* | -windiss*)
|
||||
vendor=wrs
|
||||
;;
|
||||
-aux*)
|
||||
|
83
configure.in
83
configure.in
@ -192,6 +192,11 @@ AC_PROG_RANLIB
|
||||
#AC_LIBTOOL_WIN32_DLL
|
||||
AC_PROG_LIBTOOL
|
||||
|
||||
# Ensure that we have --preserve-dup-deps defines, otherwise we get link
|
||||
# problems of 'mysql' with CXX=g++
|
||||
LIBTOOL="$LIBTOOL --preserve-dup-deps"
|
||||
AC_SUBST(LIBTOOL)dnl
|
||||
|
||||
#AC_LIBTOOL_DLOPEN AC_LIBTOOL_WIN32_DLL AC_DISABLE_FAST_INSTALL AC_DISABLE_SHARED AC_DISABLE_STATIC
|
||||
|
||||
# AC_PROG_INSTALL
|
||||
@ -346,7 +351,7 @@ AC_SUBST(CXXFLAGS)
|
||||
AC_SUBST(LD)
|
||||
AC_SUBST(INSTALL_SCRIPT)
|
||||
|
||||
export CC CFLAGS LD LDFLAGS
|
||||
export CC CXX CFLAGS LD LDFLAGS AR
|
||||
|
||||
if test "$GXX" = "yes"
|
||||
then
|
||||
@ -1008,7 +1013,7 @@ case $SYSTEM_TYPE in
|
||||
*darwin5*)
|
||||
if test "$ac_cv_prog_gcc" = "yes"
|
||||
then
|
||||
FLAGS="-traditional-cpp -DHAVE_DARWIN_THREADS -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DHAVE_BROKEN_REALPATH -DFN_NO_CASE_SENCE"
|
||||
FLAGS="-traditional-cpp -DHAVE_DARWIN_THREADS -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DHAVE_BROKEN_REALPATH"
|
||||
CFLAGS="$CFLAGS $FLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $FLAGS"
|
||||
MAX_C_OPTIMIZE="-O"
|
||||
@ -1018,7 +1023,16 @@ case $SYSTEM_TYPE in
|
||||
*darwin6*)
|
||||
if test "$ac_cv_prog_gcc" = "yes"
|
||||
then
|
||||
FLAGS="-DHAVE_DARWIN_THREADS -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DHAVE_BROKEN_REALPATH -DFN_NO_CASE_SENCE"
|
||||
FLAGS="-DHAVE_DARWIN_THREADS -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ -DHAVE_BROKEN_REALPATH"
|
||||
CFLAGS="$CFLAGS $FLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $FLAGS"
|
||||
MAX_C_OPTIMIZE="-O"
|
||||
fi
|
||||
;;
|
||||
*darwin7*)
|
||||
if test "$ac_cv_prog_gcc" = "yes"
|
||||
then
|
||||
FLAGS="-DHAVE_DARWIN_THREADS -D_P1003_1B_VISIBLE -DSIGNAL_WITH_VIO_CLOSE -DSIGNALS_DONT_BREAK_READ"
|
||||
CFLAGS="$CFLAGS $FLAGS"
|
||||
CXXFLAGS="$CXXFLAGS $FLAGS"
|
||||
MAX_C_OPTIMIZE="-O"
|
||||
@ -1054,7 +1068,7 @@ case $SYSTEM_TYPE in
|
||||
echo "Using --with-named-thread=-lpthread"
|
||||
with_named_thread="-lpthread"
|
||||
fi
|
||||
CXXFLAGS="-D_BOOL"
|
||||
CXXFLAGS="$CXXFLAGS -D_BOOL"
|
||||
;;
|
||||
*aix4.3*)
|
||||
echo "Adding defines for AIX"
|
||||
@ -1821,29 +1835,32 @@ AC_TYPE_SIGNAL
|
||||
MYSQL_TYPE_QSORT
|
||||
AC_FUNC_UTIME_NULL
|
||||
AC_FUNC_VPRINTF
|
||||
AC_CHECK_FUNCS(alarm bmove \
|
||||
chsize ftruncate rint finite isnan fpsetmask fpresetsticky\
|
||||
cuserid fcntl fconvert poll \
|
||||
getrusage getpwuid getcwd getrlimit getwd index stpcpy locking longjmp \
|
||||
perror pread realpath readlink rename \
|
||||
socket strnlen madvise mallinfo mkstemp \
|
||||
strtol strtoul strtoll strtoull snprintf tempnam thr_setconcurrency \
|
||||
gethostbyaddr_r gethostbyname_r getpwnam \
|
||||
bfill bzero bcmp strstr strpbrk strerror \
|
||||
tell atod memcpy memmove \
|
||||
setupterm strcasecmp sighold vidattr lrand48 localtime_r gmtime_r \
|
||||
sigset sigthreadmask pthread_sigmask pthread_setprio pthread_setprio_np \
|
||||
pthread_setschedparam pthread_attr_setprio pthread_attr_setschedparam \
|
||||
pthread_attr_create pthread_getsequence_np pthread_attr_setstacksize \
|
||||
pthread_attr_getstacksize \
|
||||
pthread_condattr_create rwlock_init pthread_rwlock_rdlock \
|
||||
fsync fdatasync fchmod getpass getpassphrase initgroups mlockall)
|
||||
|
||||
AC_CHECK_FUNCS(alarm bcmp bfill bmove bzero chsize cuserid fchmod fcntl \
|
||||
fconvert fdatasync finite fpresetsticky fpsetmask fsync ftruncate \
|
||||
getcwd gethostbyaddr_r gethostbyname_r getpass getpassphrase getpwnam \
|
||||
getpwuid getrlimit getrusage getwd gmtime_r index initgroups isnan \
|
||||
localtime_r locking longjmp lrand48 madvise mallinfo memcpy memmove \
|
||||
mkstemp mlockall perror poll pread pthread_attr_create clock_gettime \
|
||||
pthread_attr_getstacksize pthread_attr_setprio pthread_attr_setschedparam \
|
||||
pthread_attr_setstacksize pthread_condattr_create pthread_getsequence_np \
|
||||
pthread_key_delete pthread_rwlock_rdlock pthread_setprio \
|
||||
pthread_setprio_np pthread_setschedparam pthread_sigmask readlink \
|
||||
realpath rename rint rwlock_init setupterm sighold sigset sigthreadmask \
|
||||
snprintf socket stpcpy strcasecmp strerror strnlen strpbrk strstr strtol \
|
||||
strtoll strtoul strtoull tell tempnam thr_setconcurrency vidattr)
|
||||
|
||||
# isinf() could be a function or a macro (HPUX)
|
||||
AC_MSG_CHECKING(for isinf with <math.h>)
|
||||
AC_TRY_LINK([#include <math.h>], [float f = 0.0; isinf(f)],
|
||||
AC_MSG_RESULT(yes) AC_DEFINE(HAVE_ISINF,,[isinf() macro or function]),
|
||||
AC_MSG_RESULT(no))
|
||||
|
||||
CFLAGS="$ORG_CFLAGS"
|
||||
|
||||
# Sanity check: We chould not have any fseeko symbol unless
|
||||
# large_file_support=yes
|
||||
AC_CHECK_FUNCS(fseeko,
|
||||
AC_CHECK_FUNC(fseeko,
|
||||
[if test "$large_file_support" = no -a "$IS_LINUX" = "true";
|
||||
then
|
||||
AC_MSG_ERROR("Found fseeko symbol but large_file_support is not enabled!");
|
||||
@ -2691,7 +2708,7 @@ then
|
||||
esac
|
||||
(cd $bdb/build_unix && \
|
||||
sh $rel_srcdir/$bdb/dist/configure $bdb_conf_flags) || \
|
||||
AC_MSG_ERROR([could not configure Berkeley DB])
|
||||
AC_MSG_ERROR([could not configure Berkeley DB])
|
||||
|
||||
dnl echo "bdb = '$bdb'; inc = '$bdb_includes', lib = '$bdb_libs'"
|
||||
echo "END OF BERKELEY DB CONFIGURATION"
|
||||
@ -2730,25 +2747,7 @@ EOF
|
||||
then
|
||||
innodb_conf_flags=""
|
||||
sql_server_dirs="$sql_server_dirs innobase"
|
||||
echo "CONFIGURING FOR INNODB"
|
||||
if test ! -d "innobase"; then
|
||||
# This should only happen when doing a VPATH build
|
||||
echo "NOTICE: I have to make the Innobase directory: `pwd`/innobase"
|
||||
mkdir "innobase" || exit 1
|
||||
fi
|
||||
rel_srcdir=
|
||||
case "$srcdir" in
|
||||
/* ) rel_srcdir="$srcdir" ;;
|
||||
* ) rel_srcdir="../$srcdir" ;;
|
||||
esac
|
||||
if test "x$enable_dependency_tracking" == xno
|
||||
then
|
||||
innodb_conf_flags=--disable-dependency-tracking
|
||||
fi
|
||||
(cd innobase && sh $rel_srcdir/innobase/configure --host=$host $innodb_conf_flags) \
|
||||
|| AC_MSG_ERROR([could not configure INNODB])
|
||||
|
||||
echo "END OF INNODB CONFIGURATION"
|
||||
AC_CONFIG_SUBDIRS(innobase)
|
||||
fi
|
||||
#
|
||||
# END of configuration for optional table handlers
|
||||
|
@ -14,12 +14,16 @@
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */
|
||||
|
||||
/* Replace strings in textfile
|
||||
This program replace strings in a file or on stdin/stdout.
|
||||
It accepts a list of from-strings and to-strings and replaces all
|
||||
occurents of from-strings to to-strings.
|
||||
The first occurents of a found string is matched. If there are more than
|
||||
one possibly replace the longer from-string is replaced.
|
||||
/*
|
||||
Replace strings in textfile
|
||||
|
||||
This program replaces strings in files or from stdin to stdout.
|
||||
It accepts a list of from-string/to-string pairs and replaces
|
||||
each occurrence of a from-string with the corresponding to-string.
|
||||
The first occurrence of a found string is matched. If there is more
|
||||
than one possibility for the string to replace, longer matches
|
||||
are preferred before shorter matches.
|
||||
|
||||
Special characters in from string:
|
||||
\^ Match start of line.
|
||||
\$ Match end of line.
|
||||
@ -167,7 +171,7 @@ register char **argv[];
|
||||
break;
|
||||
case '#':
|
||||
DBUG_PUSH (++pos);
|
||||
pos= (char*) " "; /* Skipp rest of arguments */
|
||||
pos= (char*) " "; /* Skip rest of arguments */
|
||||
break;
|
||||
case 'V':
|
||||
version=1;
|
||||
@ -179,12 +183,13 @@ register char **argv[];
|
||||
if (version)
|
||||
break;
|
||||
puts("This software comes with ABSOLUTELY NO WARRANTY. This is free software,\nand you are welcome to modify and redistribute it under the GPL license\n");
|
||||
puts("This program replace strings in a file or on stdin/stdout.\n"
|
||||
"It accepts a list of from-strings and to-strings and replaces\n"
|
||||
"all occurents of from-strings to to-strings.\n"
|
||||
"The first occurents of a found string is matched. Longer matches\n"
|
||||
"are prefered before shorter matches.\n\n"
|
||||
"Special characters in from string:\n"
|
||||
puts("This program replaces strings in files or from stdin to stdout.\n"
|
||||
"It accepts a list of from-string/to-string pairs and replaces\n"
|
||||
"each occurrence of a from-string with the corresponding to-string.\n"
|
||||
"The first occurrence of a found string is matched. If there is\n"
|
||||
"more than one possibility for the string to replace, longer\n"
|
||||
"matches are preferred before shorter matches.\n\n"
|
||||
"A from-string can contain these special characters:\n"
|
||||
" \\^ Match start of line.\n"
|
||||
" \\$ Match end of line.\n"
|
||||
" \\b Match space-character, start of line or end of line.\n"
|
||||
@ -237,7 +242,7 @@ POINTER_ARRAY *from_array,*to_array;
|
||||
(*argv)++;
|
||||
}
|
||||
if (*argc)
|
||||
{ /* Skipp "--" argument */
|
||||
{ /* Skip "--" argument */
|
||||
(*argc)--;
|
||||
(*argv)++;
|
||||
}
|
||||
@ -949,9 +954,11 @@ static void free_buffer()
|
||||
}
|
||||
|
||||
|
||||
/* Fill the buffer retaining the last n bytes at the beginning of the
|
||||
newly filled buffer (for backward context). Returns the number of new
|
||||
bytes read from disk. */
|
||||
/*
|
||||
Fill the buffer retaining the last n bytes at the beginning of the
|
||||
newly filled buffer (for backward context). Returns the number of new
|
||||
bytes read from disk.
|
||||
*/
|
||||
|
||||
static int fill_buffer_retaining(fd,n)
|
||||
File fd;
|
||||
|
@ -60,13 +60,17 @@ err:
|
||||
DBUG_RETURN(my_errno);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
Remove one key from rb-tree
|
||||
Remove one key from rb-tree
|
||||
*/
|
||||
|
||||
int hp_rb_delete_key(HP_INFO *info, register HP_KEYDEF *keyinfo,
|
||||
const byte *record, byte *recpos, int flag)
|
||||
{
|
||||
heap_rb_param custom_arg;
|
||||
uint old_allocated;
|
||||
int res;
|
||||
|
||||
if (flag)
|
||||
info->last_pos= NULL; /* For heap_rnext/heap_rprev */
|
||||
@ -74,14 +78,31 @@ int hp_rb_delete_key(HP_INFO *info, register HP_KEYDEF *keyinfo,
|
||||
custom_arg.keyseg= keyinfo->seg;
|
||||
custom_arg.key_length= hp_rb_make_key(keyinfo, info->recbuf, record, recpos);
|
||||
custom_arg.search_flag= SEARCH_SAME;
|
||||
return tree_delete(&keyinfo->rb_tree, info->recbuf, &custom_arg);
|
||||
old_allocated= keyinfo->rb_tree.allocated;
|
||||
res= tree_delete(&keyinfo->rb_tree, info->recbuf, &custom_arg);
|
||||
info->s->index_length+= (keyinfo->rb_tree.allocated-old_allocated);
|
||||
return res;
|
||||
}
|
||||
|
||||
/* Remove one key from hash-table */
|
||||
/* Flag is set if we want's to correct info->current_ptr */
|
||||
|
||||
/*
|
||||
Remove one key from hash-table
|
||||
|
||||
SYNPOSIS
|
||||
hp_delete_key()
|
||||
info Hash handler
|
||||
keyinfo key definition of key that we want to delete
|
||||
record row data to be deleted
|
||||
recpos Pointer to heap record in memory
|
||||
flag Is set if we want's to correct info->current_ptr
|
||||
|
||||
RETURN
|
||||
0 ok
|
||||
# error number
|
||||
*/
|
||||
|
||||
int hp_delete_key(HP_INFO *info, register HP_KEYDEF *keyinfo,
|
||||
const byte *record, byte *recpos, int flag)
|
||||
const byte *record, byte *recpos, int flag)
|
||||
{
|
||||
ulong blength,pos2,pos_hashnr,lastpos_hashnr;
|
||||
HASH_INFO *lastpos,*gpos,*pos,*pos3,*empty,*last_ptr;
|
||||
|
@ -21,6 +21,10 @@
|
||||
|
||||
#include "heapdef.h"
|
||||
|
||||
static void heap_extra_keyflag(register HP_INFO *info,
|
||||
enum ha_extra_function function);
|
||||
|
||||
|
||||
/* set extra flags for database */
|
||||
|
||||
int heap_extra(register HP_INFO *info, enum ha_extra_function function)
|
||||
@ -41,8 +45,37 @@ int heap_extra(register HP_INFO *info, enum ha_extra_function function)
|
||||
case HA_EXTRA_READCHECK:
|
||||
info->opt_flag|= READ_CHECK_USED;
|
||||
break;
|
||||
case HA_EXTRA_CHANGE_KEY_TO_UNIQUE:
|
||||
case HA_EXTRA_CHANGE_KEY_TO_DUP:
|
||||
heap_extra_keyflag(info, function);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
DBUG_RETURN(0);
|
||||
} /* heap_extra */
|
||||
|
||||
|
||||
/*
|
||||
Start/Stop Inserting Duplicates Into a Table, WL#1648.
|
||||
*/
|
||||
static void heap_extra_keyflag(register HP_INFO *info,
|
||||
enum ha_extra_function function)
|
||||
{
|
||||
uint idx;
|
||||
|
||||
for (idx= 0; idx< info->s->keys; idx++)
|
||||
{
|
||||
switch (function) {
|
||||
case HA_EXTRA_CHANGE_KEY_TO_UNIQUE:
|
||||
info->s->keydef[idx].flag|= HA_NOSAME;
|
||||
break;
|
||||
case HA_EXTRA_CHANGE_KEY_TO_DUP:
|
||||
info->s->keydef[idx].flag&= ~(HA_NOSAME);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -20,6 +20,38 @@
|
||||
#include <m_ctype.h>
|
||||
#include <assert.h>
|
||||
|
||||
|
||||
|
||||
/*
|
||||
Find out how many rows there is in the given range
|
||||
|
||||
SYNOPSIS
|
||||
hp_rb_records_in_range()
|
||||
info HEAP handler
|
||||
inx Index to use
|
||||
start_key Start of range. Null pointer if from first key
|
||||
start_key_len Length of start key
|
||||
start_search_flag Flag if start key should be included or not
|
||||
end_key End of range. Null pointer if to last key
|
||||
end_key_len Length of end key
|
||||
end_search_flag Flag if start key should be included or not
|
||||
|
||||
NOTES
|
||||
start_search_flag can have one of the following values:
|
||||
HA_READ_KEY_EXACT Include the key in the range
|
||||
HA_READ_AFTER_KEY Don't include key in range
|
||||
|
||||
end_search_flag can have one of the following values:
|
||||
HA_READ_BEFORE_KEY Don't include key in range
|
||||
HA_READ_AFTER_KEY Include all 'end_key' values in the range
|
||||
|
||||
RETURN
|
||||
HA_POS_ERROR Something is wrong with the index tree.
|
||||
0 There is no matching keys in the given range
|
||||
number > 0 There is approximately 'number' matching rows in
|
||||
the range.
|
||||
*/
|
||||
|
||||
ha_rows hp_rb_records_in_range(HP_INFO *info, int inx, const byte *start_key,
|
||||
uint start_key_len,
|
||||
enum ha_rkey_function start_search_flag,
|
||||
@ -30,6 +62,7 @@ ha_rows hp_rb_records_in_range(HP_INFO *info, int inx, const byte *start_key,
|
||||
HP_KEYDEF *keyinfo= info->s->keydef + inx;
|
||||
TREE *rb_tree = &keyinfo->rb_tree;
|
||||
heap_rb_param custom_arg;
|
||||
DBUG_ENTER("hp_rb_records_in_range");
|
||||
|
||||
info->lastinx= inx;
|
||||
custom_arg.keyseg= keyinfo->seg;
|
||||
@ -59,10 +92,12 @@ ha_rows hp_rb_records_in_range(HP_INFO *info, int inx, const byte *start_key,
|
||||
end_pos= rb_tree->elements_in_tree + (ha_rows)1;
|
||||
}
|
||||
|
||||
DBUG_PRINT("info",("start_pos: %lu end_pos: %lu", (ulong) start_pos,
|
||||
(ulong) end_pos));
|
||||
if (start_pos == HA_POS_ERROR || end_pos == HA_POS_ERROR)
|
||||
return HA_POS_ERROR;
|
||||
return end_pos < start_pos ? (ha_rows) 0 :
|
||||
(end_pos == start_pos ? (ha_rows) 1 : end_pos - start_pos);
|
||||
DBUG_RETURN(HA_POS_ERROR);
|
||||
DBUG_RETURN(end_pos < start_pos ? (ha_rows) 0 :
|
||||
(end_pos == start_pos ? (ha_rows) 1 : end_pos - start_pos));
|
||||
}
|
||||
|
||||
/* Search after a record based on a key */
|
||||
|
@ -47,13 +47,13 @@ ulong heap_position_old(HP_INFO *info)
|
||||
int heap_info(reg1 HP_INFO *info,reg2 HEAPINFO *x, int flag )
|
||||
{
|
||||
DBUG_ENTER("heap_info");
|
||||
x->records = info->s->records;
|
||||
x->deleted = info->s->deleted;
|
||||
x->reclength = info->s->reclength;
|
||||
x->data_length = info->s->data_length;
|
||||
x->index_length= info->s->index_length;
|
||||
x->max_records = info->s->max_records;
|
||||
x->errkey = info->errkey;
|
||||
x->records = info->s->records;
|
||||
x->deleted = info->s->deleted;
|
||||
x->reclength = info->s->reclength;
|
||||
x->data_length = info->s->data_length;
|
||||
x->index_length = info->s->index_length;
|
||||
x->max_records = info->s->max_records;
|
||||
x->errkey = info->errkey;
|
||||
if (flag & HA_STATUS_AUTO)
|
||||
x->auto_increment= info->s->auto_increment + 1;
|
||||
DBUG_RETURN(0);
|
||||
|
@ -99,6 +99,7 @@ int hp_rb_write_key(HP_INFO *info, HP_KEYDEF *keyinfo, const byte *record,
|
||||
byte *recpos)
|
||||
{
|
||||
heap_rb_param custom_arg;
|
||||
uint old_allocated;
|
||||
|
||||
info->last_pos= NULL; /* For heap_rnext/heap_rprev */
|
||||
custom_arg.keyseg= keyinfo->seg;
|
||||
@ -113,12 +114,14 @@ int hp_rb_write_key(HP_INFO *info, HP_KEYDEF *keyinfo, const byte *record,
|
||||
custom_arg.search_flag= SEARCH_SAME;
|
||||
keyinfo->rb_tree.flag= 0;
|
||||
}
|
||||
old_allocated= keyinfo->rb_tree.allocated;
|
||||
if (!tree_insert(&keyinfo->rb_tree, (void*)info->recbuf,
|
||||
custom_arg.key_length, &custom_arg))
|
||||
{
|
||||
my_errno= HA_ERR_FOUND_DUPP_KEY;
|
||||
return 1;
|
||||
}
|
||||
info->s->index_length+= (keyinfo->rb_tree.allocated-old_allocated);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -95,6 +95,7 @@ functions */
|
||||
#define LONGLONG_MAX ((__int64) 0x7FFFFFFFFFFFFFFF)
|
||||
#define ULONGLONG_MAX ((unsigned __int64) 0xFFFFFFFFFFFFFFFF)
|
||||
#define LL(A) ((__int64) A)
|
||||
#define ULL(A) ((unsigned __int64) A)
|
||||
|
||||
/* Type information */
|
||||
|
||||
@ -323,7 +324,7 @@ inline double ulonglong2double(ulonglong value)
|
||||
#define FN_ROOTDIR "\\"
|
||||
#define FN_NETWORK_DRIVES /* Uses \\ to indicate network drives */
|
||||
#define FN_NO_CASE_SENCE /* Files are not case-sensitive */
|
||||
#define MY_NFILE 1024
|
||||
#define OS_FILE_LIMIT 2048
|
||||
|
||||
#define DO_NOT_REMOVE_THREAD_WRAPPERS
|
||||
#define thread_safe_increment(V,L) InterlockedIncrement((long*) &(V))
|
||||
|
@ -63,27 +63,30 @@ extern const char *client_errors[]; /* Error messages */
|
||||
#define CR_PROBE_MASTER_CONNECT 2025
|
||||
#define CR_SSL_CONNECTION_ERROR 2026
|
||||
#define CR_MALFORMED_PACKET 2027
|
||||
#define CR_WRONG_LICENSE 2028
|
||||
|
||||
/* new 4.1 error codes */
|
||||
#define CR_NULL_POINTER 2028
|
||||
#define CR_NO_PREPARE_STMT 2029
|
||||
#define CR_NOT_ALL_PARAMS_BOUND 2030
|
||||
#define CR_DATA_TRUNCATED 2031
|
||||
#define CR_NO_PARAMETERS_EXISTS 2032
|
||||
#define CR_INVALID_PARAMETER_NO 2033
|
||||
#define CR_INVALID_BUFFER_USE 2034
|
||||
#define CR_UNSUPPORTED_PARAM_TYPE 2035
|
||||
#define CR_NULL_POINTER 2029
|
||||
#define CR_NO_PREPARE_STMT 2030
|
||||
#define CR_PARAMS_NOT_BOUND 2031
|
||||
#define CR_DATA_TRUNCATED 2032
|
||||
#define CR_NO_PARAMETERS_EXISTS 2033
|
||||
#define CR_INVALID_PARAMETER_NO 2034
|
||||
#define CR_INVALID_BUFFER_USE 2035
|
||||
#define CR_UNSUPPORTED_PARAM_TYPE 2036
|
||||
|
||||
#define CR_SHARED_MEMORY_CONNECTION 2036
|
||||
#define CR_SHARED_MEMORY_CONNECT_REQUEST_ERROR 2037
|
||||
#define CR_SHARED_MEMORY_CONNECT_ANSWER_ERROR 2038
|
||||
#define CR_SHARED_MEMORY_CONNECT_FILE_MAP_ERROR 2039
|
||||
#define CR_SHARED_MEMORY_CONNECT_MAP_ERROR 2040
|
||||
#define CR_SHARED_MEMORY_FILE_MAP_ERROR 2041
|
||||
#define CR_SHARED_MEMORY_MAP_ERROR 2042
|
||||
#define CR_SHARED_MEMORY_EVENT_ERROR 2043
|
||||
#define CR_SHARED_MEMORY_CONNECT_ABANDODED_ERROR 2044
|
||||
#define CR_SHARED_MEMORY_CONNECT_SET_ERROR 2045
|
||||
#define CR_CONN_UNKNOW_PROTOCOL 2046
|
||||
#define CR_INVALID_CONN_HANDLE 2047
|
||||
#define CR_SECURE_AUTH 2048
|
||||
#define CR_SHARED_MEMORY_CONNECTION 2037
|
||||
#define CR_SHARED_MEMORY_CONNECT_REQUEST_ERROR 2038
|
||||
#define CR_SHARED_MEMORY_CONNECT_ANSWER_ERROR 2039
|
||||
#define CR_SHARED_MEMORY_CONNECT_FILE_MAP_ERROR 2040
|
||||
#define CR_SHARED_MEMORY_CONNECT_MAP_ERROR 2041
|
||||
#define CR_SHARED_MEMORY_FILE_MAP_ERROR 2042
|
||||
#define CR_SHARED_MEMORY_MAP_ERROR 2043
|
||||
#define CR_SHARED_MEMORY_EVENT_ERROR 2044
|
||||
#define CR_SHARED_MEMORY_CONNECT_ABANDODED_ERROR 2045
|
||||
#define CR_SHARED_MEMORY_CONNECT_SET_ERROR 2046
|
||||
#define CR_CONN_UNKNOW_PROTOCOL 2047
|
||||
#define CR_INVALID_CONN_HANDLE 2048
|
||||
#define CR_SECURE_AUTH 2049
|
||||
#define CR_FETCH_CANCELLED 2050
|
||||
#define CR_NO_DATA 2051
|
||||
|
@ -52,7 +52,7 @@ extern const char *ft_precompiled_stopwords[];
|
||||
extern ulong ft_min_word_len;
|
||||
extern ulong ft_max_word_len;
|
||||
extern ulong ft_query_expansion_limit;
|
||||
extern const char *ft_boolean_syntax;
|
||||
extern char ft_boolean_syntax[15];
|
||||
|
||||
int ft_init_stopwords(void);
|
||||
void ft_free_stopwords(void);
|
||||
@ -63,6 +63,7 @@ void ft_free_stopwords(void);
|
||||
#define FT_EXPAND 4 /* query expansion */
|
||||
|
||||
FT_INFO *ft_init_search(uint,void *, uint, byte *, uint, byte *);
|
||||
my_bool ft_boolean_check_syntax_string(const byte *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -138,6 +138,7 @@ typedef struct st_heap_info
|
||||
TREE_ELEMENT *parents[MAX_TREE_HEIGHT+1];
|
||||
TREE_ELEMENT **last_pos;
|
||||
uint lastkey_len;
|
||||
my_bool implicit_emptied;
|
||||
#ifdef THREAD
|
||||
THR_LOCK_DATA lock;
|
||||
#endif
|
||||
|
@ -111,7 +111,7 @@ typedef struct my_collation_handler_st
|
||||
uchar *, uint, const uchar *, uint);
|
||||
my_bool (*like_range)(struct charset_info_st *,
|
||||
const char *s, uint s_length,
|
||||
int w_prefix, int w_one, int w_many,
|
||||
pchar w_prefix, pchar w_one, pchar w_many,
|
||||
uint res_length,
|
||||
char *min_str, char *max_str,
|
||||
uint *min_len, uint *max_len);
|
||||
@ -135,6 +135,7 @@ typedef struct my_collation_handler_st
|
||||
extern MY_COLLATION_HANDLER my_collation_mb_bin_handler;
|
||||
extern MY_COLLATION_HANDLER my_collation_8bit_bin_handler;
|
||||
extern MY_COLLATION_HANDLER my_collation_8bit_simple_ci_handler;
|
||||
extern MY_COLLATION_HANDLER my_collation_ucs2_uca_handler;
|
||||
|
||||
|
||||
typedef struct my_charset_handler_st
|
||||
@ -144,7 +145,7 @@ typedef struct my_charset_handler_st
|
||||
int (*mbcharlen)(struct charset_info_st *, uint);
|
||||
uint (*numchars)(struct charset_info_st *, const char *b, const char *e);
|
||||
uint (*charpos)(struct charset_info_st *, const char *b, const char *e, uint pos);
|
||||
uint (*wellformedlen)(struct charset_info_st *,
|
||||
uint (*well_formed_len)(struct charset_info_st *,
|
||||
const char *b,const char *e, uint nchars);
|
||||
uint (*lengthsp)(struct charset_info_st *, const char *ptr, uint length);
|
||||
|
||||
@ -210,7 +211,8 @@ typedef struct charset_info_st
|
||||
uint strxfrm_multiply;
|
||||
uint mbminlen;
|
||||
uint mbmaxlen;
|
||||
char max_sort_char; /* For LIKE optimization */
|
||||
uint16 min_sort_char;
|
||||
uint16 max_sort_char; /* For LIKE optimization */
|
||||
|
||||
MY_CHARSET_HANDLER *cset;
|
||||
MY_COLLATION_HANDLER *coll;
|
||||
@ -237,13 +239,13 @@ extern CHARSET_INFO my_charset_tis620_thai_ci;
|
||||
extern CHARSET_INFO my_charset_tis620_bin;
|
||||
extern CHARSET_INFO my_charset_ucs2_general_ci;
|
||||
extern CHARSET_INFO my_charset_ucs2_bin;
|
||||
extern CHARSET_INFO my_charset_ucs2_general_uca;
|
||||
extern CHARSET_INFO my_charset_ujis_japanese_ci;
|
||||
extern CHARSET_INFO my_charset_ujis_bin;
|
||||
extern CHARSET_INFO my_charset_utf8_general_ci;
|
||||
extern CHARSET_INFO my_charset_utf8_bin;
|
||||
extern CHARSET_INFO my_charset_cp1250_czech_ci;
|
||||
|
||||
|
||||
/* declarations for simple charsets */
|
||||
extern int my_strnxfrm_simple(CHARSET_INFO *, uchar *, uint, const uchar *,
|
||||
uint);
|
||||
@ -300,11 +302,18 @@ void my_fill_8bit(CHARSET_INFO *cs, char* to, uint l, int fill);
|
||||
|
||||
my_bool my_like_range_simple(CHARSET_INFO *cs,
|
||||
const char *ptr, uint ptr_length,
|
||||
int escape, int w_one, int w_many,
|
||||
pbool escape, pbool w_one, pbool w_many,
|
||||
uint res_length,
|
||||
char *min_str, char *max_str,
|
||||
uint *min_length, uint *max_length);
|
||||
|
||||
my_bool my_like_range_ucs2(CHARSET_INFO *cs,
|
||||
const char *ptr, uint ptr_length,
|
||||
pbool escape, pbool w_one, pbool w_many,
|
||||
uint res_length,
|
||||
char *min_str, char *max_str,
|
||||
uint *min_length, uint *max_length);
|
||||
|
||||
|
||||
int my_wildcmp_8bit(CHARSET_INFO *,
|
||||
const char *str,const char *str_end,
|
||||
@ -313,7 +322,7 @@ int my_wildcmp_8bit(CHARSET_INFO *,
|
||||
|
||||
uint my_numchars_8bit(CHARSET_INFO *, const char *b, const char *e);
|
||||
uint my_charpos_8bit(CHARSET_INFO *, const char *b, const char *e, uint pos);
|
||||
uint my_wellformedlen_8bit(CHARSET_INFO *, const char *b, const char *e, uint pos);
|
||||
uint my_well_formed_len_8bit(CHARSET_INFO *, const char *b, const char *e, uint pos);
|
||||
int my_mbcharlen_8bit(CHARSET_INFO *, uint c);
|
||||
|
||||
|
||||
@ -330,7 +339,7 @@ int my_wildcmp_mb(CHARSET_INFO *,
|
||||
int escape, int w_one, int w_many);
|
||||
uint my_numchars_mb(CHARSET_INFO *, const char *b, const char *e);
|
||||
uint my_charpos_mb(CHARSET_INFO *, const char *b, const char *e, uint pos);
|
||||
uint my_wellformedlen_mb(CHARSET_INFO *, const char *b, const char *e, uint pos);
|
||||
uint my_well_formed_len_mb(CHARSET_INFO *, const char *b, const char *e, uint pos);
|
||||
uint my_instr_mb(struct charset_info_st *,
|
||||
const char *b, uint b_length,
|
||||
const char *s, uint s_length,
|
||||
@ -340,23 +349,14 @@ uint my_instr_mb(struct charset_info_st *,
|
||||
extern my_bool my_parse_charset_xml(const char *bug, uint len,
|
||||
int (*add)(CHARSET_INFO *cs));
|
||||
|
||||
#undef _U
|
||||
#undef _L
|
||||
#undef _NMR
|
||||
#undef _SPC
|
||||
#undef _PNT
|
||||
#undef _CTR
|
||||
#undef _B
|
||||
#undef _X
|
||||
|
||||
#define _U 01 /* Upper case */
|
||||
#define _L 02 /* Lower case */
|
||||
#define _NMR 04 /* Numeral (digit) */
|
||||
#define _SPC 010 /* Spacing character */
|
||||
#define _PNT 020 /* Punctuation */
|
||||
#define _CTR 040 /* Control character */
|
||||
#define _B 0100 /* Blank */
|
||||
#define _X 0200 /* heXadecimal digit */
|
||||
#define _MY_U 01 /* Upper case */
|
||||
#define _MY_L 02 /* Lower case */
|
||||
#define _MY_NMR 04 /* Numeral (digit) */
|
||||
#define _MY_SPC 010 /* Spacing character */
|
||||
#define _MY_PNT 020 /* Punctuation */
|
||||
#define _MY_CTR 040 /* Control character */
|
||||
#define _MY_B 0100 /* Blank */
|
||||
#define _MY_X 0200 /* heXadecimal digit */
|
||||
|
||||
|
||||
#define my_isascii(c) (!((c) & ~0177))
|
||||
@ -365,22 +365,23 @@ extern my_bool my_parse_charset_xml(const char *bug, uint len,
|
||||
#define my_toprint(c) ((c) | 64)
|
||||
#define my_toupper(s,c) (char) ((s)->to_upper[(uchar) (c)])
|
||||
#define my_tolower(s,c) (char) ((s)->to_lower[(uchar) (c)])
|
||||
#define my_isalpha(s, c) (((s)->ctype+1)[(uchar) (c)] & (_U | _L))
|
||||
#define my_isupper(s, c) (((s)->ctype+1)[(uchar) (c)] & _U)
|
||||
#define my_islower(s, c) (((s)->ctype+1)[(uchar) (c)] & _L)
|
||||
#define my_isdigit(s, c) (((s)->ctype+1)[(uchar) (c)] & _NMR)
|
||||
#define my_isxdigit(s, c) (((s)->ctype+1)[(uchar) (c)] & _X)
|
||||
#define my_isalnum(s, c) (((s)->ctype+1)[(uchar) (c)] & (_U | _L | _NMR))
|
||||
#define my_isspace(s, c) (((s)->ctype+1)[(uchar) (c)] & _SPC)
|
||||
#define my_ispunct(s, c) (((s)->ctype+1)[(uchar) (c)] & _PNT)
|
||||
#define my_isprint(s, c) (((s)->ctype+1)[(uchar) (c)] & (_PNT | _U | _L | _NMR | _B))
|
||||
#define my_isgraph(s, c) (((s)->ctype+1)[(uchar) (c)] & (_PNT | _U | _L | _NMR))
|
||||
#define my_iscntrl(s, c) (((s)->ctype+1)[(uchar) (c)] & _CTR)
|
||||
#define my_isalpha(s, c) (((s)->ctype+1)[(uchar) (c)] & (_MY_U | _MY_L))
|
||||
#define my_isupper(s, c) (((s)->ctype+1)[(uchar) (c)] & _MY_U)
|
||||
#define my_islower(s, c) (((s)->ctype+1)[(uchar) (c)] & _MY_L)
|
||||
#define my_isdigit(s, c) (((s)->ctype+1)[(uchar) (c)] & _MY_NMR)
|
||||
#define my_isxdigit(s, c) (((s)->ctype+1)[(uchar) (c)] & _MY_X)
|
||||
#define my_isalnum(s, c) (((s)->ctype+1)[(uchar) (c)] & (_MY_U | _MY_L | _MY_NMR))
|
||||
#define my_isspace(s, c) (((s)->ctype+1)[(uchar) (c)] & _MY_SPC)
|
||||
#define my_ispunct(s, c) (((s)->ctype+1)[(uchar) (c)] & _MY_PNT)
|
||||
#define my_isprint(s, c) (((s)->ctype+1)[(uchar) (c)] & (_MY_PNT | _MY_U | _MY_L | _MY_NMR | _MY_B))
|
||||
#define my_isgraph(s, c) (((s)->ctype+1)[(uchar) (c)] & (_MY_PNT | _MY_U | _MY_L | _MY_NMR))
|
||||
#define my_iscntrl(s, c) (((s)->ctype+1)[(uchar) (c)] & _MY_CTR)
|
||||
|
||||
/* Some macros that should be cleaned up a little */
|
||||
#define my_isvar(s,c) (my_isalnum(s,c) || (c) == '_')
|
||||
#define my_isvar_start(s,c) (my_isalpha(s,c) || (c) == '_')
|
||||
|
||||
#define my_binary_compare(s) ((s)->state & MY_CS_BINSORT)
|
||||
#define use_strnxfrm(s) ((s)->state & MY_CS_STRNXFRM)
|
||||
#define my_strnxfrm(s, a, b, c, d) ((s)->coll->strnxfrm((s), (a), (b), (c), (d)))
|
||||
#define my_strnncoll(s, a, b, c, d) ((s)->coll->strnncoll((s), (a), (b), (c), (d)))
|
||||
@ -391,7 +392,11 @@ extern my_bool my_parse_charset_xml(const char *bug, uint len,
|
||||
|
||||
#define use_mb(s) ((s)->cset->ismbchar != NULL)
|
||||
#define my_ismbchar(s, a, b) ((s)->cset->ismbchar((s), (a), (b)))
|
||||
#ifdef USE_MB
|
||||
#define my_mbcharlen(s, a) ((s)->cset->mbcharlen((s),(a)))
|
||||
#else
|
||||
#define my_mbcharlen(s, a) 1
|
||||
#endif
|
||||
|
||||
#define my_caseup(s, a, l) ((s)->cset->caseup((s), (a), (l)))
|
||||
#define my_casedn(s, a, l) ((s)->cset->casedn((s), (a), (l)))
|
||||
|
@ -125,8 +125,8 @@ extern void bmove_align(gptr dst,const gptr src,uint len);
|
||||
#ifdef HAVE_purify
|
||||
#include <assert.h>
|
||||
#define memcpy_overlap(A,B,C) \
|
||||
DBUG_ASSERT((A) == (B) || ((A)+(C)) <= (B) || ((B)+(C)) <= (A)); \
|
||||
bmove((byte*) key,(byte*) from,(size_t) length);
|
||||
DBUG_ASSERT((A) <= (B) || ((B)+(C)) <= (A)); \
|
||||
bmove((byte*) (A),(byte*) (B),(size_t) (C));
|
||||
#else
|
||||
#define memcpy_overlap(A,B,C) memcpy((A), (B), (C))
|
||||
#endif /* HAVE_purify */
|
||||
@ -201,7 +201,7 @@ extern int strcmp(const char *, const char *);
|
||||
extern size_t strlen(const char *);
|
||||
#endif
|
||||
#endif
|
||||
#ifndef HAVE_STRNLEN
|
||||
#ifndef HAVE_STRNLEN
|
||||
extern uint strnlen(const char *s, uint n);
|
||||
#endif
|
||||
|
||||
@ -215,7 +215,9 @@ extern char *strstr(const char *, const char *);
|
||||
#endif
|
||||
extern int is_prefix(const char *, const char *);
|
||||
|
||||
/* Conversion rutins */
|
||||
/* Conversion routines */
|
||||
double my_strtod(const char *str, char **end);
|
||||
double my_atof(const char *nptr);
|
||||
|
||||
#ifdef USE_MY_ITOA
|
||||
extern char *my_itoa(int val,char *dst,int radix);
|
||||
|
@ -28,6 +28,11 @@
|
||||
#include <my_sys.h>
|
||||
#include <m_string.h>
|
||||
#include <errno.h>
|
||||
|
||||
#ifndef EOVERFLOW
|
||||
#define EOVERFLOW 84
|
||||
#endif
|
||||
|
||||
#ifdef MSDOS
|
||||
#include <share.h> /* Neaded for sopen() */
|
||||
#endif
|
||||
@ -126,13 +131,22 @@ enum ha_extra_function {
|
||||
HA_EXTRA_IGNORE_DUP_KEY, /* Dup keys don't rollback everything*/
|
||||
HA_EXTRA_NO_IGNORE_DUP_KEY,
|
||||
/*
|
||||
Instructs InnoDB to retrieve all columns, not just those where
|
||||
field->query_id is the same as the current query id
|
||||
Instructs InnoDB to retrieve all columns (except in key read), not just
|
||||
those where field->query_id is the same as the current query id
|
||||
*/
|
||||
HA_EXTRA_RETRIEVE_ALL_COLS,
|
||||
/*
|
||||
Instructs InnoDB to retrieve at least all the primary key columns
|
||||
*/
|
||||
HA_EXTRA_RETRIEVE_PRIMARY_KEY,
|
||||
HA_EXTRA_PREPARE_FOR_DELETE,
|
||||
HA_EXTRA_PREPARE_FOR_UPDATE, /* Remove read cache if problems */
|
||||
HA_EXTRA_PRELOAD_BUFFER_SIZE /* Set buffer size for preloading */
|
||||
HA_EXTRA_PRELOAD_BUFFER_SIZE, /* Set buffer size for preloading */
|
||||
/*
|
||||
On-the-fly switching between unique and non-unique key inserting.
|
||||
*/
|
||||
HA_EXTRA_CHANGE_KEY_TO_UNIQUE,
|
||||
HA_EXTRA_CHANGE_KEY_TO_DUP
|
||||
};
|
||||
|
||||
/* The following is parameter to ha_panic() */
|
||||
|
@ -300,7 +300,9 @@ C_MODE_END
|
||||
#ifndef CONFIG_SMP
|
||||
#define CONFIG_SMP
|
||||
#endif
|
||||
C_MODE_START
|
||||
#include <asm/atomic.h>
|
||||
C_MODE_END
|
||||
#endif
|
||||
#include <errno.h> /* Recommended by debian */
|
||||
/* We need the following to go around a problem with openssl on solaris */
|
||||
@ -389,8 +391,8 @@ typedef unsigned short ushort;
|
||||
#define sgn(a) (((a) < 0) ? -1 : ((a) > 0) ? 1 : 0)
|
||||
#define swap(t,a,b) { register t dummy; dummy = a; a = b; b = dummy; }
|
||||
#define test(a) ((a) ? 1 : 0)
|
||||
#define set_if_bigger(a,b) { if ((a) < (b)) (a)=(b); }
|
||||
#define set_if_smaller(a,b) { if ((a) > (b)) (a)=(b); }
|
||||
#define set_if_bigger(a,b) do { if ((a) < (b)) (a)=(b); } while(0)
|
||||
#define set_if_smaller(a,b) do { if ((a) > (b)) (a)=(b); } while(0)
|
||||
#define test_all_bits(a,b) (((a) & (b)) == (b))
|
||||
#define set_bits(type, bit_count) (sizeof(type)*8 <= (bit_count) ? ~(type) 0 : ((((type) 1) << (bit_count)) - (type) 1))
|
||||
#define array_elements(A) ((uint) (sizeof(A)/sizeof(A[0])))
|
||||
@ -529,7 +531,7 @@ typedef SOCKET_SIZE_TYPE size_socket;
|
||||
#define FN_EXTCHAR '.'
|
||||
#define FN_HOMELIB '~' /* ~/ is used as abbrev for home dir */
|
||||
#define FN_CURLIB '.' /* ./ is used as abbrev for current dir */
|
||||
#define FN_PARENTDIR ".." /* Parentdirectory; Must be a string */
|
||||
#define FN_PARENTDIR ".." /* Parent directory; Must be a string */
|
||||
#define FN_DEVCHAR ':'
|
||||
|
||||
#ifndef FN_LIBCHAR
|
||||
@ -540,7 +542,10 @@ typedef SOCKET_SIZE_TYPE size_socket;
|
||||
#define FN_LIBCHAR '/'
|
||||
#define FN_ROOTDIR "/"
|
||||
#endif
|
||||
#define MY_NFILE 1024 /* This is only used to save filenames */
|
||||
#endif
|
||||
#define MY_NFILE 64 /* This is only used to save filenames */
|
||||
#ifndef OS_FILE_LIMIT
|
||||
#define OS_FILE_LIMIT 65535
|
||||
#endif
|
||||
|
||||
/* #define EXT_IN_LIBNAME */
|
||||
@ -588,14 +593,6 @@ typedef SOCKET_SIZE_TYPE size_socket;
|
||||
|
||||
/* Some defines of functions for portability */
|
||||
|
||||
#ifndef HAVE_ATOD
|
||||
#define atod atof
|
||||
#endif
|
||||
#ifdef USE_MY_ATOF
|
||||
#define atof my_atof
|
||||
extern void init_my_atof(void);
|
||||
extern double my_atof(const char*);
|
||||
#endif
|
||||
#undef remove /* Crashes MySQL on SCO 5.0.0 */
|
||||
#ifndef __WIN__
|
||||
#ifdef OS2
|
||||
@ -684,6 +681,10 @@ extern double my_atof(const char*);
|
||||
#define FLT_MAX ((float)3.40282346638528860e+38)
|
||||
#endif
|
||||
|
||||
#ifndef HAVE_ISINF
|
||||
#define isinf(X) 0
|
||||
#endif
|
||||
|
||||
/* Define missing math constants. */
|
||||
#ifndef M_PI
|
||||
#define M_PI 3.14159265358979323846
|
||||
@ -709,7 +710,7 @@ typedef long long my_ptrdiff_t;
|
||||
#define ALIGN_SIZE(A) MY_ALIGN((A),sizeof(double))
|
||||
/* Size to make adressable obj. */
|
||||
#define ALIGN_PTR(A, t) ((t*) MY_ALIGN((A),sizeof(t)))
|
||||
/* Offset of filed f in structure t */
|
||||
/* Offset of field f in structure t */
|
||||
#define OFFSET(t, f) ((size_t)(char *)&((t *)0)->f)
|
||||
#define ADD_TO_PTR(ptr,size,type) (type) ((byte*) (ptr)+size)
|
||||
#define PTR_BYTE_DIFF(A,B) (my_ptrdiff_t) ((byte*) (A) - (byte*) (B))
|
||||
@ -859,6 +860,14 @@ typedef char bool; /* Ordinary boolean values 0 1 */
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifndef ULL
|
||||
#ifdef HAVE_LONG_LONG
|
||||
#define ULL(A) A ## ULL
|
||||
#else
|
||||
#define ULL(A) A ## UL
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/*
|
||||
Defines to make it possible to prioritize register assignments. No
|
||||
longer that important with modern compilers.
|
||||
@ -1129,10 +1138,10 @@ typedef union {
|
||||
*((T)+1)=(((A) >> 16));\
|
||||
*((T)+0)=(((A) >> 24)); }
|
||||
|
||||
#define doubleget(V,M) memcpy((byte*) &V,(byte*) (M),sizeof(double))
|
||||
#define doublestore(T,V) memcpy((byte*) (T),(byte*) &V,sizeof(double))
|
||||
#define longlongget(V,M) memcpy((byte*) &V,(byte*) (M),sizeof(ulonglong))
|
||||
#define longlongstore(T,V) memcpy((byte*) (T),(byte*) &V,sizeof(ulonglong))
|
||||
#define doubleget(V,M) memcpy_fixed((byte*) &V,(byte*) (M),sizeof(double))
|
||||
#define doublestore(T,V) memcpy_fixed((byte*) (T),(byte*) &V,sizeof(double))
|
||||
#define longlongget(V,M) memcpy_fixed((byte*) &V,(byte*) (M),sizeof(ulonglong))
|
||||
#define longlongstore(T,V) memcpy_fixed((byte*) (T),(byte*) &V,sizeof(ulonglong))
|
||||
|
||||
#else
|
||||
|
||||
|
@ -58,7 +58,7 @@ typedef struct st_HA_KEYSEG /* Key-portion */
|
||||
}
|
||||
|
||||
extern int mi_compare_text(CHARSET_INFO *, uchar *, uint, uchar *, uint ,
|
||||
my_bool);
|
||||
my_bool, my_bool);
|
||||
extern int ha_key_cmp(register HA_KEYSEG *keyseg, register uchar *a,
|
||||
register uchar *b, uint key_length, uint nextflag,
|
||||
uint *diff_pos);
|
||||
|
@ -392,6 +392,11 @@ struct tm *gmtime_r(const time_t *clock, struct tm *res);
|
||||
#define pthread_condattr_destroy pthread_condattr_delete
|
||||
#endif
|
||||
|
||||
/* FSU THREADS */
|
||||
#if !defined(HAVE_PTHREAD_KEY_DELETE) && !defined(pthread_key_delete)
|
||||
#define pthread_key_delete(A) pthread_dummy(0)
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_CTHREADS_WRAPPER /* For MacOSX */
|
||||
#define pthread_cond_destroy(A) pthread_dummy(0)
|
||||
#define pthread_mutex_destroy(A) pthread_dummy(0)
|
||||
|
@ -202,26 +202,13 @@ extern char NEAR curr_dir[]; /* Current directory for user */
|
||||
extern int (*error_handler_hook)(uint my_err, const char *str,myf MyFlags);
|
||||
extern int (*fatal_error_handler_hook)(uint my_err, const char *str,
|
||||
myf MyFlags);
|
||||
extern uint my_file_limit;
|
||||
|
||||
/* charsets */
|
||||
extern CHARSET_INFO *default_charset_info;
|
||||
extern CHARSET_INFO *all_charsets[256];
|
||||
extern CHARSET_INFO compiled_charsets[];
|
||||
|
||||
extern uint get_charset_number(const char *cs_name, uint cs_flags);
|
||||
extern uint get_collation_number(const char *name);
|
||||
extern const char *get_charset_name(uint cs_number);
|
||||
|
||||
extern CHARSET_INFO *get_charset(uint cs_number, myf flags);
|
||||
extern CHARSET_INFO *get_charset_by_name(const char *cs_name, myf flags);
|
||||
extern CHARSET_INFO *get_charset_by_csname(const char *cs_name,
|
||||
uint cs_flags, myf my_flags);
|
||||
extern void free_charsets(void);
|
||||
extern char *get_charsets_dir(char *buf);
|
||||
extern my_bool my_charset_same(CHARSET_INFO *cs1, CHARSET_INFO *cs2);
|
||||
extern my_bool init_compiled_charsets(myf flags);
|
||||
extern void add_compiled_collation(CHARSET_INFO *cs);
|
||||
|
||||
/* statistics */
|
||||
extern ulong my_cache_w_requests, my_cache_write, my_cache_r_requests,
|
||||
my_cache_read;
|
||||
@ -288,14 +275,16 @@ enum file_type
|
||||
FILE_BY_MKSTEMP, FILE_BY_DUP
|
||||
};
|
||||
|
||||
extern struct my_file_info
|
||||
struct st_my_file_info
|
||||
{
|
||||
my_string name;
|
||||
enum file_type type;
|
||||
#if defined(THREAD) && !defined(HAVE_PREAD)
|
||||
pthread_mutex_t mutex;
|
||||
#endif
|
||||
} my_file_info[MY_NFILE];
|
||||
};
|
||||
|
||||
extern struct st_my_file_info *my_file_info;
|
||||
|
||||
typedef struct st_my_tmpdir
|
||||
{
|
||||
@ -423,6 +412,11 @@ typedef struct st_io_cache /* Used when cacheing files */
|
||||
IO_CACHE_CALLBACK pre_read;
|
||||
IO_CACHE_CALLBACK post_read;
|
||||
IO_CACHE_CALLBACK pre_close;
|
||||
/*
|
||||
Counts the number of times, when we were forced to use disk. We use it to
|
||||
increase the binlog_cache_disk_use status variable.
|
||||
*/
|
||||
ulong disk_writes;
|
||||
void* arg; /* for use by pre/post_read */
|
||||
char *file_name; /* if used with 'open_cached_file' */
|
||||
char *dir,*prefix;
|
||||
@ -618,7 +612,7 @@ extern void pack_dirname(my_string to,const char *from);
|
||||
extern uint unpack_dirname(my_string to,const char *from);
|
||||
extern uint cleanup_dirname(my_string to,const char *from);
|
||||
extern uint system_filename(my_string to,const char *from);
|
||||
extern my_string unpack_filename(my_string to,const char *from);
|
||||
extern uint unpack_filename(my_string to,const char *from);
|
||||
extern my_string intern_filename(my_string to,const char *from);
|
||||
extern my_string directory_file_name(my_string dst, const char *src);
|
||||
extern int pack_filename(my_string to, const char *name, size_s max_length);
|
||||
@ -675,9 +669,9 @@ extern int my_b_safe_write(IO_CACHE *info,const byte *Buffer,uint Count);
|
||||
|
||||
extern int my_block_write(IO_CACHE *info, const byte *Buffer,
|
||||
uint Count, my_off_t pos);
|
||||
extern int _flush_io_cache(IO_CACHE *info, int need_append_buffer_lock);
|
||||
extern int my_b_flush_io_cache(IO_CACHE *info, int need_append_buffer_lock);
|
||||
|
||||
#define flush_io_cache(info) _flush_io_cache((info),1)
|
||||
#define flush_io_cache(info) my_b_flush_io_cache((info),1)
|
||||
|
||||
extern int end_io_cache(IO_CACHE *info);
|
||||
extern uint my_b_fill(IO_CACHE *info);
|
||||
@ -726,11 +720,14 @@ extern void my_free_lock(byte *ptr,myf flags);
|
||||
#define my_free_lock(A,B) my_free((A),(B))
|
||||
#endif
|
||||
#define alloc_root_inited(A) ((A)->min_malloc != 0)
|
||||
#define clear_alloc_root(A) bzero((void *) (A), sizeof(MEM_ROOT))
|
||||
extern void init_alloc_root(MEM_ROOT *mem_root, uint block_size,
|
||||
uint pre_alloc_size);
|
||||
extern gptr alloc_root(MEM_ROOT *mem_root,unsigned int Size);
|
||||
extern void free_root(MEM_ROOT *root, myf MyFLAGS);
|
||||
extern void set_prealloc_root(MEM_ROOT *root, char *ptr);
|
||||
extern void reset_root_defaults(MEM_ROOT *mem_root, uint block_size,
|
||||
uint prealloc_size);
|
||||
extern char *strdup_root(MEM_ROOT *root,const char *str);
|
||||
extern char *strmake_root(MEM_ROOT *root,const char *str,uint len);
|
||||
extern char *memdup_root(MEM_ROOT *root,const char *str,uint len);
|
||||
@ -746,6 +743,26 @@ extern uint my_bit_log2(ulong value);
|
||||
extern uint my_count_bits(ulonglong v);
|
||||
extern void my_sleep(ulong m_seconds);
|
||||
extern ulong crc32(ulong crc, const uchar *buf, uint len);
|
||||
extern uint my_set_max_open_files(uint files);
|
||||
void my_free_open_file_info(void);
|
||||
|
||||
ulonglong my_getsystime(void);
|
||||
my_bool my_gethwaddr(uchar *to);
|
||||
|
||||
/* character sets */
|
||||
extern uint get_charset_number(const char *cs_name, uint cs_flags);
|
||||
extern uint get_collation_number(const char *name);
|
||||
extern const char *get_charset_name(uint cs_number);
|
||||
|
||||
extern CHARSET_INFO *get_charset(uint cs_number, myf flags);
|
||||
extern CHARSET_INFO *get_charset_by_name(const char *cs_name, myf flags);
|
||||
extern CHARSET_INFO *get_charset_by_csname(const char *cs_name,
|
||||
uint cs_flags, myf my_flags);
|
||||
extern void free_charsets(void);
|
||||
extern char *get_charsets_dir(char *buf);
|
||||
extern my_bool my_charset_same(CHARSET_INFO *cs1, CHARSET_INFO *cs2);
|
||||
extern my_bool init_compiled_charsets(myf flags);
|
||||
extern void add_compiled_collation(CHARSET_INFO *cs);
|
||||
|
||||
#ifdef __WIN__
|
||||
extern my_bool have_tcpip; /* Is set if tcpip is used */
|
||||
|
@ -22,7 +22,9 @@ extern "C" {
|
||||
|
||||
#include "my_base.h" /* get 'enum ha_rkey_function' */
|
||||
|
||||
#define MAX_TREE_HEIGHT 40 /* = max 1048576 leafs in tree */
|
||||
/* Worst case tree is half full. This gives use 2^(MAX_TREE_HEIGHT/2) leafs */
|
||||
#define MAX_TREE_HEIGHT 64
|
||||
|
||||
#define ELEMENT_KEY(tree,element)\
|
||||
(tree->offset_to_key ? (void*)((byte*) element+tree->offset_to_key) :\
|
||||
*((void**) (element+1)))
|
||||
|
@ -38,7 +38,7 @@ extern "C" {
|
||||
/* The following defines can be increased if necessary */
|
||||
#define MI_MAX_KEY 32 /* Max allowed keys */
|
||||
#define MI_MAX_KEY_SEG 16 /* Max segments for key */
|
||||
#define MI_MAX_KEY_LENGTH 500
|
||||
#define MI_MAX_KEY_LENGTH 1000
|
||||
|
||||
#define MI_MAX_KEY_BUFF (MI_MAX_KEY_LENGTH+MI_MAX_KEY_SEG*6+8+8)
|
||||
#define MI_MAX_POSSIBLE_KEY_BUFF (1024+6+6) /* For myisam_chk */
|
||||
@ -93,7 +93,7 @@ typedef struct st_mi_isaminfo /* Struct from h_info */
|
||||
|
||||
typedef struct st_mi_create_info
|
||||
{
|
||||
char *index_file_name, *data_file_name; /* If using symlinks */
|
||||
const char *index_file_name, *data_file_name; /* If using symlinks */
|
||||
ha_rows max_rows;
|
||||
ha_rows reloc_rows;
|
||||
ulonglong auto_increment;
|
||||
|
153
include/mysql.h
153
include/mysql.h
@ -77,6 +77,8 @@ extern char *mysql_unix_port;
|
||||
#define IS_NUM_FIELD(f) ((f)->flags & NUM_FLAG)
|
||||
#define INTERNAL_NUM_FIELD(f) (((f)->type <= FIELD_TYPE_INT24 && ((f)->type != FIELD_TYPE_TIMESTAMP || (f)->length == 14 || (f)->length == 8)) || (f)->type == FIELD_TYPE_YEAR)
|
||||
|
||||
#define HAVE_DEPRECATED_411_API 1
|
||||
|
||||
typedef struct st_mysql_field {
|
||||
char *name; /* Name of column */
|
||||
char *org_name; /* Original column name, if an alias */
|
||||
@ -183,6 +185,12 @@ struct st_mysql_options {
|
||||
char *client_ip;
|
||||
/* Refuse client connecting to server if it uses old (pre-4.1.1) protocol */
|
||||
my_bool secure_auth;
|
||||
|
||||
/* function pointers for local infile support */
|
||||
int (*local_infile_init)(void **, const char *);
|
||||
int (*local_infile_read)(void *, char *, unsigned int);
|
||||
void (*local_infile_end)(void *);
|
||||
int (*local_infile_error)(void *, char *, unsigned int);
|
||||
};
|
||||
|
||||
enum mysql_status
|
||||
@ -254,6 +262,11 @@ typedef struct st_mysql
|
||||
LIST *stmts; /* list of all statements */
|
||||
const struct st_mysql_methods *methods;
|
||||
void *thd;
|
||||
/*
|
||||
Points to boolean flag in MYSQL_RES or MYSQL_STMT. We set this flag
|
||||
from mysql_stmt_close if close had to cancel result set of this object.
|
||||
*/
|
||||
my_bool *unbuffered_fetch_owner;
|
||||
} MYSQL;
|
||||
|
||||
typedef struct st_mysql_res {
|
||||
@ -268,6 +281,8 @@ typedef struct st_mysql_res {
|
||||
MYSQL_ROW row; /* If unbuffered read */
|
||||
MYSQL_ROW current_row; /* buffer to current row */
|
||||
my_bool eof; /* Used by mysql_fetch_row */
|
||||
/* mysql_stmt_close() had to cancel this result */
|
||||
my_bool unbuffered_fetch_cancelled;
|
||||
const struct st_mysql_methods *methods;
|
||||
} MYSQL_RES;
|
||||
|
||||
@ -375,6 +390,23 @@ my_bool STDCALL mysql_slave_query(MYSQL *mysql, const char *q,
|
||||
my_bool STDCALL mysql_slave_send_query(MYSQL *mysql, const char *q,
|
||||
unsigned long length);
|
||||
|
||||
/* local infile support */
|
||||
|
||||
#define LOCAL_INFILE_ERROR_LEN 512
|
||||
|
||||
void
|
||||
mysql_set_local_infile_handler(MYSQL *mysql,
|
||||
int (*local_infile_init)(void **, const char *),
|
||||
int (*local_infile_read)(void *, char *,
|
||||
unsigned int),
|
||||
void (*local_infile_end)(void *),
|
||||
int (*local_infile_error)(void *, char*,
|
||||
unsigned int));
|
||||
|
||||
void
|
||||
mysql_set_local_infile_default(MYSQL *mysql);
|
||||
|
||||
|
||||
/*
|
||||
enable/disable parsing of all queries to decide if they go on master or
|
||||
slave
|
||||
@ -477,7 +509,11 @@ my_bool STDCALL mysql_read_query_result(MYSQL *mysql);
|
||||
*/
|
||||
|
||||
/* statement state */
|
||||
enum PREP_STMT_STATE { MY_ST_UNKNOWN, MY_ST_PREPARE, MY_ST_EXECUTE };
|
||||
enum enum_mysql_stmt_state
|
||||
{
|
||||
MYSQL_STMT_INIT_DONE= 1, MYSQL_STMT_PREPARE_DONE, MYSQL_STMT_EXECUTE_DONE,
|
||||
MYSQL_STMT_FETCH_DONE
|
||||
};
|
||||
|
||||
/*
|
||||
client TIME structure to handle TIME, DATE and TIMESTAMP directly in
|
||||
@ -523,31 +559,36 @@ typedef struct st_mysql_bind
|
||||
/* statement handler */
|
||||
typedef struct st_mysql_stmt
|
||||
{
|
||||
MYSQL *mysql; /* connection handle */
|
||||
MYSQL_BIND *params; /* input parameters */
|
||||
MYSQL_RES *result; /* resultset */
|
||||
MYSQL_BIND *bind; /* row binding */
|
||||
MYSQL_FIELD *fields; /* prepare meta info */
|
||||
MEM_ROOT mem_root; /* root allocations */
|
||||
LIST list; /* list to keep track of all stmts */
|
||||
unsigned char *current_row; /* unbuffered row */
|
||||
unsigned char *last_fetched_buffer; /* last fetched column buffer */
|
||||
char *query; /* query buffer */
|
||||
MEM_ROOT mem_root; /* root allocations */
|
||||
my_ulonglong last_fetched_column; /* last fetched column */
|
||||
my_ulonglong affected_rows; /* copy of mysql->affected_rows
|
||||
after statement execution */
|
||||
MYSQL *mysql; /* connection handle */
|
||||
MYSQL_BIND *params; /* input parameters */
|
||||
MYSQL_BIND *bind; /* output parameters */
|
||||
MYSQL_FIELD *fields; /* result set metadata */
|
||||
MYSQL_DATA result; /* cached result set */
|
||||
MYSQL_ROWS *data_cursor; /* current row in cached result */
|
||||
/* copy of mysql->affected_rows after statement execution */
|
||||
my_ulonglong affected_rows;
|
||||
my_ulonglong insert_id; /* copy of mysql->insert_id */
|
||||
/*
|
||||
mysql_stmt_fetch() calls this function to fetch one row (it's different
|
||||
for buffered, unbuffered and cursor fetch).
|
||||
*/
|
||||
int (*read_row_func)(struct st_mysql_stmt *stmt,
|
||||
unsigned char **row);
|
||||
unsigned long stmt_id; /* Id for prepared statement */
|
||||
unsigned int last_errno; /* error code */
|
||||
unsigned int param_count; /* parameters count */
|
||||
unsigned int field_count; /* fields count */
|
||||
enum PREP_STMT_STATE state; /* statement state */
|
||||
unsigned int param_count; /* inpute parameters count */
|
||||
unsigned int field_count; /* number of columns in result set */
|
||||
enum enum_mysql_stmt_state state; /* statement state */
|
||||
char last_error[MYSQL_ERRMSG_SIZE]; /* error message */
|
||||
char sqlstate[SQLSTATE_LENGTH+1];
|
||||
my_bool long_alloced; /* flag to indicate long alloced */
|
||||
my_bool send_types_to_server; /* Types sent to server */
|
||||
my_bool param_buffers; /* param bound buffers */
|
||||
my_bool res_buffers; /* output bound buffers */
|
||||
my_bool result_buffered; /* Results buffered */
|
||||
/* Types of input parameters should be sent to server */
|
||||
my_bool send_types_to_server;
|
||||
my_bool bind_param_done; /* input buffers were supplied */
|
||||
my_bool bind_result_done; /* output buffers were supplied */
|
||||
/* mysql_stmt_close() had to cancel this result */
|
||||
my_bool unbuffered_fetch_cancelled;
|
||||
} MYSQL_STMT;
|
||||
|
||||
|
||||
@ -570,48 +611,70 @@ typedef struct st_mysql_methods
|
||||
MYSQL_FIELD * (*list_fields)(MYSQL *mysql);
|
||||
my_bool (*read_prepare_result)(MYSQL *mysql, MYSQL_STMT *stmt);
|
||||
int (*stmt_execute)(MYSQL_STMT *stmt);
|
||||
MYSQL_DATA *(*read_binary_rows)(MYSQL_STMT *stmt);
|
||||
int (*read_binary_rows)(MYSQL_STMT *stmt);
|
||||
int (*unbuffered_fetch)(MYSQL *mysql, char **row);
|
||||
void (*free_embedded_thd)(MYSQL *mysql);
|
||||
const char *(*read_statistic)(MYSQL *mysql);
|
||||
int (*next_result)(MYSQL *mysql);
|
||||
const char *(*read_statistics)(MYSQL *mysql);
|
||||
my_bool (*next_result)(MYSQL *mysql);
|
||||
int (*read_change_user_result)(MYSQL *mysql, char *buff, const char *passwd);
|
||||
#endif
|
||||
} MYSQL_METHODS;
|
||||
|
||||
#ifdef HAVE_DEPRECATED_411_API
|
||||
/* Deprecated calls (since MySQL 4.1.2) */
|
||||
|
||||
/* Use mysql_stmt_init + mysql_stmt_prepare instead */
|
||||
MYSQL_STMT * STDCALL mysql_prepare(MYSQL * mysql, const char *query,
|
||||
unsigned long length);
|
||||
int STDCALL mysql_execute(MYSQL_STMT * stmt);
|
||||
unsigned long STDCALL mysql_param_count(MYSQL_STMT * stmt);
|
||||
my_bool STDCALL mysql_bind_param(MYSQL_STMT * stmt, MYSQL_BIND * bnd);
|
||||
my_bool STDCALL mysql_bind_result(MYSQL_STMT * stmt, MYSQL_BIND * bnd);
|
||||
#define mysql_execute mysql_stmt_execute
|
||||
#define mysql_fetch mysql_stmt_fetch
|
||||
#define mysql_fetch_column mysql_stmt_fetch_column
|
||||
#define mysql_bind_param mysql_stmt_bind_param
|
||||
#define mysql_bind_result mysql_stmt_bind_result
|
||||
#define mysql_param_count mysql_stmt_param_count
|
||||
#define mysql_param_result mysql_stmt_param_metadata
|
||||
#define mysql_get_metadata mysql_stmt_result_metadata
|
||||
#define mysql_send_long_data mysql_stmt_send_long_data
|
||||
|
||||
#endif /* HAVE_DEPRECATED_411_API */
|
||||
|
||||
MYSQL_STMT * STDCALL mysql_stmt_init(MYSQL *mysql);
|
||||
int STDCALL mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query,
|
||||
unsigned long length);
|
||||
int STDCALL mysql_stmt_execute(MYSQL_STMT *stmt);
|
||||
int STDCALL mysql_stmt_fetch(MYSQL_STMT *stmt);
|
||||
int STDCALL mysql_stmt_fetch_column(MYSQL_STMT *stmt, MYSQL_BIND *bind,
|
||||
unsigned int column,
|
||||
unsigned long offset);
|
||||
int STDCALL mysql_stmt_store_result(MYSQL_STMT *stmt);
|
||||
unsigned long STDCALL mysql_stmt_param_count(MYSQL_STMT * stmt);
|
||||
my_bool STDCALL mysql_stmt_bind_param(MYSQL_STMT * stmt, MYSQL_BIND * bnd);
|
||||
my_bool STDCALL mysql_stmt_bind_result(MYSQL_STMT * stmt, MYSQL_BIND * bnd);
|
||||
my_bool STDCALL mysql_stmt_close(MYSQL_STMT * stmt);
|
||||
my_bool STDCALL mysql_stmt_reset(MYSQL_STMT * stmt);
|
||||
my_bool STDCALL mysql_stmt_free_result(MYSQL_STMT *stmt);
|
||||
my_bool STDCALL mysql_stmt_send_long_data(MYSQL_STMT *stmt,
|
||||
unsigned int param_number,
|
||||
const char *data,
|
||||
unsigned long length);
|
||||
MYSQL_RES *STDCALL mysql_stmt_result_metadata(MYSQL_STMT *stmt);
|
||||
MYSQL_RES *STDCALL mysql_stmt_param_metadata(MYSQL_STMT *stmt);
|
||||
unsigned int STDCALL mysql_stmt_errno(MYSQL_STMT * stmt);
|
||||
const char *STDCALL mysql_stmt_error(MYSQL_STMT * stmt);
|
||||
const char *STDCALL mysql_stmt_sqlstate(MYSQL_STMT * stmt);
|
||||
my_bool STDCALL mysql_commit(MYSQL * mysql);
|
||||
my_bool STDCALL mysql_rollback(MYSQL * mysql);
|
||||
my_bool STDCALL mysql_autocommit(MYSQL * mysql, my_bool auto_mode);
|
||||
int STDCALL mysql_fetch(MYSQL_STMT *stmt);
|
||||
int STDCALL mysql_fetch_column(MYSQL_STMT *stmt, MYSQL_BIND *bind,
|
||||
unsigned int column,
|
||||
unsigned long offset);
|
||||
my_bool STDCALL mysql_send_long_data(MYSQL_STMT *stmt,
|
||||
unsigned int param_number,
|
||||
const char *data,
|
||||
unsigned long length);
|
||||
MYSQL_RES *STDCALL mysql_get_metadata(MYSQL_STMT *stmt);
|
||||
MYSQL_RES *STDCALL mysql_param_result(MYSQL_STMT *stmt);
|
||||
my_ulonglong STDCALL mysql_stmt_affected_rows(MYSQL_STMT *stmt);
|
||||
int STDCALL mysql_stmt_store_result(MYSQL_STMT *stmt);
|
||||
my_bool STDCALL mysql_more_results(MYSQL *mysql);
|
||||
int STDCALL mysql_next_result(MYSQL *mysql);
|
||||
MYSQL_ROW_OFFSET STDCALL mysql_stmt_row_seek(MYSQL_STMT *stmt,
|
||||
MYSQL_ROW_OFFSET offset);
|
||||
MYSQL_ROW_OFFSET STDCALL mysql_stmt_row_tell(MYSQL_STMT *stmt);
|
||||
void STDCALL mysql_stmt_data_seek(MYSQL_STMT *stmt, my_ulonglong offset);
|
||||
my_ulonglong STDCALL mysql_stmt_num_rows(MYSQL_STMT *stmt);
|
||||
my_ulonglong STDCALL mysql_stmt_affected_rows(MYSQL_STMT *stmt);
|
||||
my_ulonglong STDCALL mysql_stmt_insert_id(MYSQL_STMT *stmt);
|
||||
|
||||
my_bool STDCALL mysql_commit(MYSQL * mysql);
|
||||
my_bool STDCALL mysql_rollback(MYSQL * mysql);
|
||||
my_bool STDCALL mysql_autocommit(MYSQL * mysql, my_bool auto_mode);
|
||||
my_bool STDCALL mysql_more_results(MYSQL *mysql);
|
||||
int STDCALL mysql_next_result(MYSQL *mysql);
|
||||
void STDCALL mysql_close(MYSQL *sock);
|
||||
|
||||
|
||||
|
@ -78,6 +78,7 @@ enum enum_server_command
|
||||
#define PART_KEY_FLAG 16384 /* Intern; Part of some key */
|
||||
#define GROUP_FLAG 32768 /* Intern: Group field */
|
||||
#define UNIQUE_FLAG 65536 /* Intern: Used by sql_yacc */
|
||||
#define BINCMP_FLAG 131072 /* Intern: Used by sql_yacc */
|
||||
|
||||
#define REFRESH_GRANT 1 /* Refresh grant tables */
|
||||
#define REFRESH_LOG 2 /* Start on new log file */
|
||||
@ -118,7 +119,7 @@ enum enum_server_command
|
||||
#define CLIENT_SECURE_CONNECTION 32768 /* New 4.1 authentication */
|
||||
#define CLIENT_MULTI_STATEMENTS 65536 /* Enable/disable multi-stmt support */
|
||||
#define CLIENT_MULTI_RESULTS 131072 /* Enable/disable multi-results */
|
||||
#define CLIENT_REMEMBER_OPTIONS ((ulong) (1L << 31))
|
||||
#define CLIENT_REMEMBER_OPTIONS (((ulong) 1) << 31)
|
||||
|
||||
#define SERVER_STATUS_IN_TRANS 1 /* Transaction has started */
|
||||
#define SERVER_STATUS_AUTOCOMMIT 2 /* Server in auto_commit mode */
|
||||
|
@ -23,4 +23,9 @@
|
||||
|
||||
/* mysqld compile time options */
|
||||
#endif /* _CUSTOMCONFIG_ */
|
||||
|
||||
#ifndef LICENSE
|
||||
#define LICENSE "GPL"
|
||||
#endif /* LICENSE */
|
||||
|
||||
#endif /* _mysql_version_h */
|
||||
|
@ -254,93 +254,98 @@
|
||||
#define ER_NOT_SUPPORTED_YET 1235
|
||||
#define ER_MASTER_FATAL_ERROR_READING_BINLOG 1236
|
||||
#define ER_SLAVE_IGNORED_TABLE 1237
|
||||
#define ER_WRONG_FK_DEF 1238
|
||||
#define ER_KEY_REF_DO_NOT_MATCH_TABLE_REF 1239
|
||||
#define ER_OPERAND_COLUMNS 1240
|
||||
#define ER_SUBQUERY_NO_1_ROW 1241
|
||||
#define ER_UNKNOWN_STMT_HANDLER 1242
|
||||
#define ER_CORRUPT_HELP_DB 1243
|
||||
#define ER_CYCLIC_REFERENCE 1244
|
||||
#define ER_AUTO_CONVERT 1245
|
||||
#define ER_ILLEGAL_REFERENCE 1246
|
||||
#define ER_DERIVED_MUST_HAVE_ALIAS 1247
|
||||
#define ER_SELECT_REDUCED 1248
|
||||
#define ER_TABLENAME_NOT_ALLOWED_HERE 1249
|
||||
#define ER_NOT_SUPPORTED_AUTH_MODE 1250
|
||||
#define ER_SPATIAL_CANT_HAVE_NULL 1251
|
||||
#define ER_COLLATION_CHARSET_MISMATCH 1252
|
||||
#define ER_SLAVE_WAS_RUNNING 1253
|
||||
#define ER_SLAVE_WAS_NOT_RUNNING 1254
|
||||
#define ER_TOO_BIG_FOR_UNCOMPRESS 1255
|
||||
#define ER_ZLIB_Z_MEM_ERROR 1256
|
||||
#define ER_ZLIB_Z_BUF_ERROR 1257
|
||||
#define ER_ZLIB_Z_DATA_ERROR 1258
|
||||
#define ER_CUT_VALUE_GROUP_CONCAT 1259
|
||||
#define ER_WARN_TOO_FEW_RECORDS 1260
|
||||
#define ER_WARN_TOO_MANY_RECORDS 1261
|
||||
#define ER_WARN_NULL_TO_NOTNULL 1262
|
||||
#define ER_WARN_DATA_OUT_OF_RANGE 1263
|
||||
#define ER_WARN_DATA_TRUNCATED 1264
|
||||
#define ER_WARN_USING_OTHER_HANDLER 1265
|
||||
#define ER_CANT_AGGREGATE_2COLLATIONS 1266
|
||||
#define ER_DROP_USER 1267
|
||||
#define ER_REVOKE_GRANTS 1268
|
||||
#define ER_CANT_AGGREGATE_3COLLATIONS 1269
|
||||
#define ER_CANT_AGGREGATE_NCOLLATIONS 1270
|
||||
#define ER_VARIABLE_IS_NOT_STRUCT 1271
|
||||
#define ER_UNKNOWN_COLLATION 1272
|
||||
#define ER_SLAVE_IGNORED_SSL_PARAMS 1273
|
||||
#define ER_SERVER_IS_IN_SECURE_AUTH_MODE 1274
|
||||
#define ER_WARN_FIELD_RESOLVED 1275
|
||||
#define ER_BAD_SLAVE_UNTIL_COND 1276
|
||||
#define ER_MISSING_SKIP_SLAVE 1277
|
||||
#define ER_UNTIL_COND_IGNORED 1278
|
||||
#define ER_WRONG_NAME_FOR_INDEX 1279
|
||||
#define ER_WRONG_NAME_FOR_CATALOG 1280
|
||||
#define ER_WARN_QC_RESIZE 1281
|
||||
#define ER_BAD_FT_COLUMN 1282
|
||||
#define ER_UNKNOWN_KEY_CACHE 1283
|
||||
#define ER_WARN_HOSTNAME_WONT_WORK 1284
|
||||
#define ER_UNKNOWN_STORAGE_ENGINE 1285
|
||||
#define ER_WARN_DEPRECATED_SYNTAX 1286
|
||||
#define ER_NON_UPDATABLE_TABLE 1287
|
||||
#define ER_FEATURE_DISABLED 1288
|
||||
#define ER_SKIP_GRANT_TABLES 1289
|
||||
#define ER_SP_NO_RECURSIVE_CREATE 1290
|
||||
#define ER_SP_ALREADY_EXISTS 1291
|
||||
#define ER_SP_DOES_NOT_EXIST 1292
|
||||
#define ER_SP_DROP_FAILED 1293
|
||||
#define ER_SP_STORE_FAILED 1294
|
||||
#define ER_SP_LILABEL_MISMATCH 1295
|
||||
#define ER_SP_LABEL_REDEFINE 1296
|
||||
#define ER_SP_LABEL_MISMATCH 1297
|
||||
#define ER_SP_UNINIT_VAR 1298
|
||||
#define ER_SP_BADSELECT 1299
|
||||
#define ER_SP_BADRETURN 1300
|
||||
#define ER_SP_BADSTATEMENT 1301
|
||||
#define ER_UPDATE_LOG_DEPRECATED_IGNORED 1302
|
||||
#define ER_UPDATE_LOG_DEPRECATED_TRANSLATED 1303
|
||||
#define ER_QUERY_INTERRUPTED 1304
|
||||
#define ER_SP_WRONG_NO_OF_ARGS 1305
|
||||
#define ER_SP_COND_MISMATCH 1306
|
||||
#define ER_SP_NORETURN 1307
|
||||
#define ER_SP_NORETURNEND 1308
|
||||
#define ER_SP_BAD_CURSOR_QUERY 1309
|
||||
#define ER_SP_BAD_CURSOR_SELECT 1310
|
||||
#define ER_SP_CURSOR_MISMATCH 1311
|
||||
#define ER_SP_CURSOR_ALREADY_OPEN 1312
|
||||
#define ER_SP_CURSOR_NOT_OPEN 1313
|
||||
#define ER_SP_UNDECLARED_VAR 1314
|
||||
#define ER_SP_WRONG_NO_OF_FETCH_ARGS 1315
|
||||
#define ER_SP_FETCH_NO_DATA 1316
|
||||
#define ER_SP_DUP_PARAM 1317
|
||||
#define ER_SP_DUP_VAR 1318
|
||||
#define ER_SP_DUP_COND 1319
|
||||
#define ER_SP_DUP_CURS 1320
|
||||
#define ER_SP_CANT_ALTER 1321
|
||||
#define ER_SP_SUBSELECT_NYI 1322
|
||||
#define ER_SP_NO_USE 1323
|
||||
#define ER_SP_VARCOND_AFTER_CURSHNDLR 1324
|
||||
#define ER_SP_CURSOR_AFTER_HANDLER 1325
|
||||
#define ER_SP_CASE_NOT_FOUND 1326
|
||||
#define ER_ERROR_MESSAGES 327
|
||||
#define ER_INCORRECT_GLOBAL_LOCAL_VAR 1238
|
||||
#define ER_WRONG_FK_DEF 1239
|
||||
#define ER_KEY_REF_DO_NOT_MATCH_TABLE_REF 1240
|
||||
#define ER_OPERAND_COLUMNS 1241
|
||||
#define ER_SUBQUERY_NO_1_ROW 1242
|
||||
#define ER_UNKNOWN_STMT_HANDLER 1243
|
||||
#define ER_CORRUPT_HELP_DB 1244
|
||||
#define ER_CYCLIC_REFERENCE 1245
|
||||
#define ER_AUTO_CONVERT 1246
|
||||
#define ER_ILLEGAL_REFERENCE 1247
|
||||
#define ER_DERIVED_MUST_HAVE_ALIAS 1248
|
||||
#define ER_SELECT_REDUCED 1249
|
||||
#define ER_TABLENAME_NOT_ALLOWED_HERE 1250
|
||||
#define ER_NOT_SUPPORTED_AUTH_MODE 1251
|
||||
#define ER_SPATIAL_CANT_HAVE_NULL 1252
|
||||
#define ER_COLLATION_CHARSET_MISMATCH 1253
|
||||
#define ER_SLAVE_WAS_RUNNING 1254
|
||||
#define ER_SLAVE_WAS_NOT_RUNNING 1255
|
||||
#define ER_TOO_BIG_FOR_UNCOMPRESS 1256
|
||||
#define ER_ZLIB_Z_MEM_ERROR 1257
|
||||
#define ER_ZLIB_Z_BUF_ERROR 1258
|
||||
#define ER_ZLIB_Z_DATA_ERROR 1259
|
||||
#define ER_CUT_VALUE_GROUP_CONCAT 1260
|
||||
#define ER_WARN_TOO_FEW_RECORDS 1261
|
||||
#define ER_WARN_TOO_MANY_RECORDS 1262
|
||||
#define ER_WARN_NULL_TO_NOTNULL 1263
|
||||
#define ER_WARN_DATA_OUT_OF_RANGE 1264
|
||||
#define ER_WARN_DATA_TRUNCATED 1265
|
||||
#define ER_WARN_USING_OTHER_HANDLER 1266
|
||||
#define ER_CANT_AGGREGATE_2COLLATIONS 1267
|
||||
#define ER_DROP_USER 1268
|
||||
#define ER_REVOKE_GRANTS 1269
|
||||
#define ER_CANT_AGGREGATE_3COLLATIONS 1270
|
||||
#define ER_CANT_AGGREGATE_NCOLLATIONS 1271
|
||||
#define ER_VARIABLE_IS_NOT_STRUCT 1272
|
||||
#define ER_UNKNOWN_COLLATION 1273
|
||||
#define ER_SLAVE_IGNORED_SSL_PARAMS 1274
|
||||
#define ER_SERVER_IS_IN_SECURE_AUTH_MODE 1275
|
||||
#define ER_WARN_FIELD_RESOLVED 1276
|
||||
#define ER_BAD_SLAVE_UNTIL_COND 1277
|
||||
#define ER_MISSING_SKIP_SLAVE 1278
|
||||
#define ER_UNTIL_COND_IGNORED 1279
|
||||
#define ER_WRONG_NAME_FOR_INDEX 1280
|
||||
#define ER_WRONG_NAME_FOR_CATALOG 1281
|
||||
#define ER_WARN_QC_RESIZE 1282
|
||||
#define ER_BAD_FT_COLUMN 1283
|
||||
#define ER_UNKNOWN_KEY_CACHE 1284
|
||||
#define ER_WARN_HOSTNAME_WONT_WORK 1285
|
||||
#define ER_UNKNOWN_STORAGE_ENGINE 1286
|
||||
#define ER_WARN_DEPRECATED_SYNTAX 1287
|
||||
#define ER_NON_UPDATABLE_TABLE 1288
|
||||
#define ER_FEATURE_DISABLED 1289
|
||||
#define ER_OPTION_PREVENTS_STATEMENT 1290
|
||||
#define ER_DUPLICATED_VALUE_IN_TYPE 1291
|
||||
#define ER_TRUNCATED_WRONG_VALUE 1292
|
||||
#define ER_TOO_MUCH_AUTO_TIMESTAMP_COLS 1293
|
||||
#define ER_INVALID_ON_UPDATE 1294
|
||||
#define ER_SP_NO_RECURSIVE_CREATE 1294
|
||||
#define ER_SP_ALREADY_EXISTS 1295
|
||||
#define ER_SP_DOES_NOT_EXIST 1296
|
||||
#define ER_SP_DROP_FAILED 1297
|
||||
#define ER_SP_STORE_FAILED 1298
|
||||
#define ER_SP_LILABEL_MISMATCH 1299
|
||||
#define ER_SP_LABEL_REDEFINE 1300
|
||||
#define ER_SP_LABEL_MISMATCH 1301
|
||||
#define ER_SP_UNINIT_VAR 1302
|
||||
#define ER_SP_BADSELECT 1303
|
||||
#define ER_SP_BADRETURN 1304
|
||||
#define ER_SP_BADSTATEMENT 1305
|
||||
#define ER_UPDATE_LOG_DEPRECATED_IGNORED 1306
|
||||
#define ER_UPDATE_LOG_DEPRECATED_TRANSLATED 1307
|
||||
#define ER_QUERY_INTERRUPTED 1308
|
||||
#define ER_SP_WRONG_NO_OF_ARGS 1309
|
||||
#define ER_SP_COND_MISMATCH 1310
|
||||
#define ER_SP_NORETURN 1311
|
||||
#define ER_SP_NORETURNEND 1312
|
||||
#define ER_SP_BAD_CURSOR_QUERY 1313
|
||||
#define ER_SP_BAD_CURSOR_SELECT 1314
|
||||
#define ER_SP_CURSOR_MISMATCH 1315
|
||||
#define ER_SP_CURSOR_ALREADY_OPEN 1316
|
||||
#define ER_SP_CURSOR_NOT_OPEN 1317
|
||||
#define ER_SP_UNDECLARED_VAR 1318
|
||||
#define ER_SP_WRONG_NO_OF_FETCH_ARGS 1319
|
||||
#define ER_SP_FETCH_NO_DATA 1320
|
||||
#define ER_SP_DUP_PARAM 1321
|
||||
#define ER_SP_DUP_VAR 1322
|
||||
#define ER_SP_DUP_COND 1323
|
||||
#define ER_SP_DUP_CURS 1324
|
||||
#define ER_SP_CANT_ALTER 1325
|
||||
#define ER_SP_SUBSELECT_NYI 1326
|
||||
#define ER_SP_NO_USE 1327
|
||||
#define ER_SP_VARCOND_AFTER_CURSHNDLR 1328
|
||||
#define ER_SP_CURSOR_AFTER_HANDLER 1329
|
||||
#define ER_SP_CASE_NOT_FOUND 1330
|
||||
#define ER_ERROR_MESSAGES 331
|
||||
|
@ -25,6 +25,7 @@ extern "C" {
|
||||
MYSQL_FIELD *unpack_fields(MYSQL_DATA *data,MEM_ROOT *alloc,uint fields,
|
||||
my_bool default_value, uint server_capabilities);
|
||||
void free_rows(MYSQL_DATA *cur);
|
||||
void flush_use_result(MYSQL *mysql);
|
||||
my_bool mysql_autenticate(MYSQL *mysql, const char *passwd);
|
||||
void free_old_query(MYSQL *mysql);
|
||||
void end_server(MYSQL *mysql);
|
||||
@ -38,6 +39,7 @@ cli_advanced_command(MYSQL *mysql, enum enum_server_command command,
|
||||
|
||||
void set_stmt_errmsg(MYSQL_STMT * stmt, const char *err, int errcode,
|
||||
const char *sqlstate);
|
||||
void set_mysql_error(MYSQL *mysql, int errcode, const char *sqlstate);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
@ -22,8 +22,8 @@ TAR = gtar
|
||||
|
||||
noinst_HEADERS = ib_config.h
|
||||
|
||||
SUBDIRS = os ut btr buf com data dict dyn eval fil fsp fut \
|
||||
ha ibuf include lock log mach mem mtr odbc page \
|
||||
SUBDIRS = os ut btr buf data dict dyn eval fil fsp fut \
|
||||
ha ibuf include lock log mach mem mtr page \
|
||||
pars que read rem row srv sync thr trx usr
|
||||
|
||||
# Don't update the files from bitkeeper
|
||||
|
@ -5,7 +5,7 @@ The B-tree
|
||||
|
||||
Created 6/2/1994 Heikki Tuuri
|
||||
*******************************************************/
|
||||
|
||||
|
||||
#include "btr0btr.h"
|
||||
|
||||
#ifdef UNIV_NONINL
|
||||
@ -76,9 +76,6 @@ make them consecutive on disk if possible. From the other file segment
|
||||
we allocate pages for the non-leaf levels of the tree.
|
||||
*/
|
||||
|
||||
/* If this many inserts occur sequentially, it affects page split */
|
||||
#define BTR_PAGE_SEQ_INSERT_LIMIT 5
|
||||
|
||||
/******************************************************************
|
||||
Creates a new index page to the tree (not the root, and also not
|
||||
used in page reorganization). */
|
||||
@ -299,7 +296,9 @@ btr_page_alloc_for_ibuf(
|
||||
|
||||
new_page = buf_page_get(dict_tree_get_space(tree), node_addr.page,
|
||||
RW_X_LATCH, mtr);
|
||||
#ifdef UNIV_SYNC_DEBUG
|
||||
buf_page_dbg_add_level(new_page, SYNC_TREE_NODE_NEW);
|
||||
#endif /* UNIV_SYNC_DEBUG */
|
||||
|
||||
flst_remove(root + PAGE_HEADER + PAGE_BTR_IBUF_FREE_LIST,
|
||||
new_page + PAGE_HEADER + PAGE_BTR_IBUF_FREE_LIST_NODE,
|
||||
@ -357,7 +356,9 @@ btr_page_alloc(
|
||||
|
||||
new_page = buf_page_get(dict_tree_get_space(tree), new_page_no,
|
||||
RW_X_LATCH, mtr);
|
||||
#ifdef UNIV_SYNC_DEBUG
|
||||
buf_page_dbg_add_level(new_page, SYNC_TREE_NODE_NEW);
|
||||
#endif /* UNIV_SYNC_DEBUG */
|
||||
|
||||
return(new_page);
|
||||
}
|
||||
@ -398,7 +399,7 @@ btr_get_size(
|
||||
|
||||
n += fseg_n_reserved_pages(seg_header, &dummy, &mtr);
|
||||
} else {
|
||||
ut_a(0);
|
||||
ut_error;
|
||||
}
|
||||
|
||||
mtr_commit(&mtr);
|
||||
@ -664,8 +665,9 @@ btr_create(
|
||||
ibuf_hdr_frame = fseg_create(space, 0,
|
||||
IBUF_HEADER + IBUF_TREE_SEG_HEADER, mtr);
|
||||
|
||||
#ifdef UNIV_SYNC_DEBUG
|
||||
buf_page_dbg_add_level(ibuf_hdr_frame, SYNC_TREE_NODE_NEW);
|
||||
|
||||
#endif /* UNIV_SYNC_DEBUG */
|
||||
ut_ad(buf_frame_get_page_no(ibuf_hdr_frame)
|
||||
== IBUF_HEADER_PAGE_NO);
|
||||
/* Allocate then the next page to the segment: it will be the
|
||||
@ -690,7 +692,9 @@ btr_create(
|
||||
|
||||
page_no = buf_frame_get_page_no(frame);
|
||||
|
||||
#ifdef UNIV_SYNC_DEBUG
|
||||
buf_page_dbg_add_level(frame, SYNC_TREE_NODE_NEW);
|
||||
#endif /* UNIV_SYNC_DEBUG */
|
||||
|
||||
if (type & DICT_IBUF) {
|
||||
/* It is an insert buffer tree: initialize the free list */
|
||||
@ -705,7 +709,9 @@ btr_create(
|
||||
mtr);
|
||||
/* The fseg create acquires a second latch on the page,
|
||||
therefore we must declare it: */
|
||||
#ifdef UNIV_SYNC_DEBUG
|
||||
buf_page_dbg_add_level(frame, SYNC_TREE_NODE_NEW);
|
||||
#endif /* UNIV_SYNC_DEBUG */
|
||||
}
|
||||
|
||||
/* Create a new index page on the the allocated segment page */
|
||||
@ -1080,18 +1086,18 @@ btr_page_get_split_rec_to_left(
|
||||
page = btr_cur_get_page(cursor);
|
||||
insert_point = btr_cur_get_rec(cursor);
|
||||
|
||||
if ((page_header_get_ptr(page, PAGE_LAST_INSERT)
|
||||
== page_rec_get_next(insert_point))
|
||||
&& (page_header_get_field(page, PAGE_DIRECTION) == PAGE_LEFT)
|
||||
&& ((page_header_get_field(page, PAGE_N_DIRECTION)
|
||||
>= BTR_PAGE_SEQ_INSERT_LIMIT)
|
||||
|| (page_header_get_field(page, PAGE_N_DIRECTION) + 1
|
||||
>= page_get_n_recs(page)))) {
|
||||
if (page_header_get_ptr(page, PAGE_LAST_INSERT)
|
||||
== page_rec_get_next(insert_point)) {
|
||||
|
||||
infimum = page_get_infimum_rec(page);
|
||||
|
||||
if ((infimum != insert_point)
|
||||
&& (page_rec_get_next(infimum) != insert_point)) {
|
||||
|
||||
/* If the convergence is in the middle of a page, include also
|
||||
the record immediately before the new insert to the upper
|
||||
page. Otherwise, we could repeatedly move from page to page
|
||||
lots of records smaller than the convergence point. */
|
||||
|
||||
if (infimum != insert_point
|
||||
&& page_rec_get_next(infimum) != insert_point) {
|
||||
|
||||
*split_rec = insert_point;
|
||||
} else {
|
||||
@ -1125,29 +1131,29 @@ btr_page_get_split_rec_to_right(
|
||||
page = btr_cur_get_page(cursor);
|
||||
insert_point = btr_cur_get_rec(cursor);
|
||||
|
||||
if ((page_header_get_ptr(page, PAGE_LAST_INSERT) == insert_point)
|
||||
&& (page_header_get_field(page, PAGE_DIRECTION) == PAGE_RIGHT)
|
||||
&& ((page_header_get_field(page, PAGE_N_DIRECTION)
|
||||
>= BTR_PAGE_SEQ_INSERT_LIMIT)
|
||||
|| (page_header_get_field(page, PAGE_N_DIRECTION) + 1
|
||||
>= page_get_n_recs(page)))) {
|
||||
/* We use eager heuristics: if the new insert would be right after
|
||||
the previous insert on the same page, we assume that there is a
|
||||
pattern of sequential inserts here. */
|
||||
|
||||
if (page_header_get_ptr(page, PAGE_LAST_INSERT) == insert_point) {
|
||||
|
||||
supremum = page_get_supremum_rec(page);
|
||||
|
||||
if ((page_rec_get_next(insert_point) != supremum)
|
||||
&& (page_rec_get_next(page_rec_get_next(insert_point))
|
||||
!= supremum)
|
||||
&& (page_rec_get_next(page_rec_get_next(
|
||||
page_rec_get_next(insert_point)))
|
||||
!= supremum)) {
|
||||
if (page_rec_get_next(insert_point) != supremum
|
||||
&& page_rec_get_next(page_rec_get_next(insert_point))
|
||||
!= supremum) {
|
||||
|
||||
/* If there are >= 3 user records up from the insert
|
||||
point, split all but 2 off */
|
||||
|
||||
*split_rec = page_rec_get_next(page_rec_get_next(
|
||||
page_rec_get_next(insert_point)));
|
||||
/* If there are >= 2 user records up from the insert
|
||||
point, split all but 1 off. We want to keep one because
|
||||
then sequential inserts can use the adaptive hash
|
||||
index, as they can do the necessary checks of the right
|
||||
search position just by looking at the records on this
|
||||
page. */
|
||||
|
||||
*split_rec = page_rec_get_next(
|
||||
page_rec_get_next(insert_point));
|
||||
} else {
|
||||
/* Else split at inserted record */
|
||||
/* Else split at the new record to insert */
|
||||
*split_rec = NULL;
|
||||
}
|
||||
|
||||
@ -1520,7 +1526,9 @@ func_start:
|
||||
|
||||
ut_ad(mtr_memo_contains(mtr, dict_tree_get_lock(tree),
|
||||
MTR_MEMO_X_LOCK));
|
||||
#ifdef UNIV_SYNC_DEBUG
|
||||
ut_ad(rw_lock_own(dict_tree_get_lock(tree), RW_LOCK_EX));
|
||||
#endif /* UNIV_SYNC_DEBUG */
|
||||
|
||||
page = btr_cur_get_page(cursor);
|
||||
|
||||
|
@ -65,6 +65,16 @@ this many index pages */
|
||||
/*--------------------------------------*/
|
||||
#define BTR_BLOB_HDR_SIZE 8
|
||||
|
||||
/***********************************************************************
|
||||
Marks all extern fields in a record as owned by the record. This function
|
||||
should be called if the delete mark of a record is removed: a not delete
|
||||
marked record always owns all its extern fields. */
|
||||
static
|
||||
void
|
||||
btr_cur_unmark_extern_fields(
|
||||
/*=========================*/
|
||||
rec_t* rec, /* in: record in a clustered index */
|
||||
mtr_t* mtr); /* in: mtr */
|
||||
/***********************************************************************
|
||||
Adds path information to the cursor for the current page, for which
|
||||
the binary search has been performed. */
|
||||
@ -1322,66 +1332,6 @@ btr_cur_parse_update_in_place(
|
||||
return(ptr);
|
||||
}
|
||||
|
||||
/*****************************************************************
|
||||
Updates a secondary index record when the update causes no size
|
||||
changes in its fields. The only case when this function is currently
|
||||
called is that in a char field characters change to others which
|
||||
are identified in the collation order. */
|
||||
|
||||
ulint
|
||||
btr_cur_update_sec_rec_in_place(
|
||||
/*============================*/
|
||||
/* out: DB_SUCCESS or error number */
|
||||
btr_cur_t* cursor, /* in: cursor on the record to update;
|
||||
cursor stays valid and positioned on the
|
||||
same record */
|
||||
upd_t* update, /* in: update vector */
|
||||
que_thr_t* thr, /* in: query thread */
|
||||
mtr_t* mtr) /* in: mtr */
|
||||
{
|
||||
dict_index_t* index = cursor->index;
|
||||
dict_index_t* clust_index;
|
||||
ulint err;
|
||||
rec_t* rec;
|
||||
dulint roll_ptr = ut_dulint_zero;
|
||||
trx_t* trx = thr_get_trx(thr);
|
||||
|
||||
/* Only secondary index records are updated using this function */
|
||||
ut_ad(0 == (index->type & DICT_CLUSTERED));
|
||||
|
||||
rec = btr_cur_get_rec(cursor);
|
||||
|
||||
if (btr_cur_print_record_ops && thr) {
|
||||
printf(
|
||||
"Trx with id %lu %lu going to update table %s index %s\n",
|
||||
(unsigned long) ut_dulint_get_high(thr_get_trx(thr)->id),
|
||||
(unsigned long) ut_dulint_get_low(thr_get_trx(thr)->id),
|
||||
index->table_name, index->name);
|
||||
rec_print(rec);
|
||||
}
|
||||
|
||||
err = lock_sec_rec_modify_check_and_lock(0, rec, index, thr);
|
||||
|
||||
if (err != DB_SUCCESS) {
|
||||
|
||||
return(err);
|
||||
}
|
||||
|
||||
/* Remove possible hash index pointer to this record */
|
||||
btr_search_update_hash_on_delete(cursor);
|
||||
|
||||
row_upd_rec_in_place(rec, update);
|
||||
|
||||
clust_index = dict_table_get_first_index(index->table);
|
||||
|
||||
/* Note that roll_ptr is really just a dummy value since
|
||||
a secondary index record does not contain any sys columns */
|
||||
|
||||
btr_cur_update_in_place_log(BTR_KEEP_SYS_FLAG, rec, clust_index,
|
||||
update, trx, roll_ptr, mtr);
|
||||
return(DB_SUCCESS);
|
||||
}
|
||||
|
||||
/*****************************************************************
|
||||
Updates a record when the update causes no size changes in its fields.
|
||||
We assume here that the ordering fields of the record do not change. */
|
||||
@ -2709,7 +2659,7 @@ btr_estimate_number_of_different_key_vals(
|
||||
ulint n_cols;
|
||||
ulint matched_fields;
|
||||
ulint matched_bytes;
|
||||
ulint* n_diff;
|
||||
ib_longlong* n_diff;
|
||||
ulint not_empty_flag = 0;
|
||||
ulint total_external_size = 0;
|
||||
ulint i;
|
||||
@ -2732,10 +2682,11 @@ btr_estimate_number_of_different_key_vals(
|
||||
|
||||
btr_cur_open_at_rnd_pos(index, BTR_SEARCH_LEAF, &cursor, &mtr);
|
||||
|
||||
/* Count the number of different key values minus one
|
||||
for each prefix of the key on this index page: we subtract
|
||||
one because otherwise our algorithm would give a wrong
|
||||
estimate for an index where there is just one key value */
|
||||
/* Count the number of different key values for each prefix of
|
||||
the key on this index page. If the prefix does not determine
|
||||
the index record uniquely in te B-tree, then we subtract one
|
||||
because otherwise our algorithm would give a wrong estimate
|
||||
for an index where there is just one key value. */
|
||||
|
||||
page = btr_cur_get_page(&cursor);
|
||||
|
||||
@ -2757,6 +2708,9 @@ btr_estimate_number_of_different_key_vals(
|
||||
&matched_bytes);
|
||||
|
||||
for (j = matched_fields + 1; j <= n_cols; j++) {
|
||||
/* We add one if this index record has
|
||||
a different prefix from the previous */
|
||||
|
||||
n_diff[j]++;
|
||||
}
|
||||
|
||||
@ -2766,6 +2720,18 @@ btr_estimate_number_of_different_key_vals(
|
||||
rec = page_rec_get_next(rec);
|
||||
}
|
||||
|
||||
if (n_cols == dict_index_get_n_unique_in_tree(index)) {
|
||||
/* We add one because we know that the first record
|
||||
on the page certainly had a different prefix than the
|
||||
last record on the previous index page in the
|
||||
alphabetical order. Before this fix, if there was
|
||||
just one big record on each clustered index page, the
|
||||
algorithm grossly underestimated the number of rows
|
||||
in the table. */
|
||||
|
||||
n_diff[n_cols]++;
|
||||
}
|
||||
|
||||
total_external_size +=
|
||||
btr_rec_get_externally_stored_len(rec);
|
||||
mtr_commit(&mtr);
|
||||
@ -2781,7 +2747,8 @@ btr_estimate_number_of_different_key_vals(
|
||||
|
||||
for (j = 0; j <= n_cols; j++) {
|
||||
index->stat_n_diff_key_vals[j] =
|
||||
(n_diff[j] * index->stat_n_leaf_pages
|
||||
(n_diff[j]
|
||||
* (ib_longlong)index->stat_n_leaf_pages
|
||||
+ BTR_KEY_VAL_ESTIMATE_N_PAGES - 1
|
||||
+ total_external_size
|
||||
+ not_empty_flag)
|
||||
@ -2992,7 +2959,7 @@ btr_cur_mark_dtuple_inherited_extern(
|
||||
Marks all extern fields in a record as owned by the record. This function
|
||||
should be called if the delete mark of a record is removed: a not delete
|
||||
marked record always owns all its extern fields. */
|
||||
|
||||
static
|
||||
void
|
||||
btr_cur_unmark_extern_fields(
|
||||
/*=========================*/
|
||||
@ -3216,8 +3183,10 @@ btr_store_big_rec_extern_fields(
|
||||
prev_page_no,
|
||||
RW_X_LATCH, &mtr);
|
||||
|
||||
#ifdef UNIV_SYNC_DEBUG
|
||||
buf_page_dbg_add_level(prev_page,
|
||||
SYNC_EXTERN_STORAGE);
|
||||
#endif /* UNIV_SYNC_DEBUG */
|
||||
|
||||
mlog_write_ulint(prev_page + FIL_PAGE_DATA
|
||||
+ BTR_BLOB_HDR_NEXT_PAGE_NO,
|
||||
@ -3252,9 +3221,9 @@ btr_store_big_rec_extern_fields(
|
||||
rec_page = buf_page_get(space_id,
|
||||
buf_frame_get_page_no(data),
|
||||
RW_X_LATCH, &mtr);
|
||||
|
||||
#ifdef UNIV_SYNC_DEBUG
|
||||
buf_page_dbg_add_level(rec_page, SYNC_NO_ORDER_CHECK);
|
||||
|
||||
#endif /* UNIV_SYNC_DEBUG */
|
||||
mlog_write_ulint(data + local_len + BTR_EXTERN_LEN, 0,
|
||||
MLOG_4BYTES, &mtr);
|
||||
mlog_write_ulint(data + local_len + BTR_EXTERN_LEN + 4,
|
||||
@ -3346,9 +3315,9 @@ btr_free_externally_stored_field(
|
||||
|
||||
rec_page = buf_page_get(buf_frame_get_space_id(data),
|
||||
buf_frame_get_page_no(data), RW_X_LATCH, &mtr);
|
||||
|
||||
#ifdef UNIV_SYNC_DEBUG
|
||||
buf_page_dbg_add_level(rec_page, SYNC_NO_ORDER_CHECK);
|
||||
|
||||
#endif /* UNIV_SYNC_DEBUG */
|
||||
space_id = mach_read_from_4(data + local_len
|
||||
+ BTR_EXTERN_SPACE_ID);
|
||||
|
||||
@ -3391,9 +3360,9 @@ btr_free_externally_stored_field(
|
||||
}
|
||||
|
||||
page = buf_page_get(space_id, page_no, RW_X_LATCH, &mtr);
|
||||
|
||||
#ifdef UNIV_SYNC_DEBUG
|
||||
buf_page_dbg_add_level(page, SYNC_EXTERN_STORAGE);
|
||||
|
||||
#endif /* UNIV_SYNC_DEBUG */
|
||||
next_page_no = mach_read_from_4(page + FIL_PAGE_DATA
|
||||
+ BTR_BLOB_HDR_NEXT_PAGE_NO);
|
||||
|
||||
@ -3571,9 +3540,9 @@ btr_copy_externally_stored_field(
|
||||
mtr_start(&mtr);
|
||||
|
||||
page = buf_page_get(space_id, page_no, RW_S_LATCH, &mtr);
|
||||
|
||||
#ifdef UNIV_SYNC_DEBUG
|
||||
buf_page_dbg_add_level(page, SYNC_EXTERN_STORAGE);
|
||||
|
||||
#endif /* UNIV_SYNC_DEBUG */
|
||||
blob_header = page + offset;
|
||||
|
||||
part_len = btr_blob_get_part_len(blob_header);
|
||||
|
@ -238,9 +238,9 @@ btr_pcur_restore_position(
|
||||
cursor->block_when_stored, page,
|
||||
cursor->modify_clock, mtr)) {
|
||||
cursor->pos_state = BTR_PCUR_IS_POSITIONED;
|
||||
|
||||
#ifdef UNIV_SYNC_DEBUG
|
||||
buf_page_dbg_add_level(page, SYNC_TREE_NODE);
|
||||
|
||||
#endif /* UNIV_SYNC_DEBUG */
|
||||
if (cursor->rel_pos == BTR_PCUR_ON) {
|
||||
|
||||
cursor->latch_mode = latch_mode;
|
||||
|
@ -22,7 +22,9 @@ Created 2/17/1996 Heikki Tuuri
|
||||
ulint btr_search_this_is_zero = 0; /* A dummy variable to fool the
|
||||
compiler */
|
||||
|
||||
#ifdef UNIV_SEARCH_PERF_STAT
|
||||
ulint btr_search_n_succ = 0;
|
||||
#endif /* UNIV_SEARCH_PERF_STAT */
|
||||
ulint btr_search_n_hash_fail = 0;
|
||||
|
||||
byte btr_sea_pad1[64]; /* padding to prevent other memory update
|
||||
@ -93,8 +95,10 @@ btr_search_check_free_space_in_heap(void)
|
||||
hash_table_t* table;
|
||||
mem_heap_t* heap;
|
||||
|
||||
ut_ad(!rw_lock_own(&btr_search_latch, RW_LOCK_SHARED)
|
||||
&& !rw_lock_own(&btr_search_latch, RW_LOCK_EX));
|
||||
#ifdef UNIV_SYNC_DEBUG
|
||||
ut_ad(!rw_lock_own(&btr_search_latch, RW_LOCK_SHARED));
|
||||
ut_ad(!rw_lock_own(&btr_search_latch, RW_LOCK_EX));
|
||||
#endif /* UNIV_SYNC_DEBUG */
|
||||
|
||||
table = btr_search_sys->hash_index;
|
||||
|
||||
@ -194,8 +198,10 @@ btr_search_info_update_hash(
|
||||
ulint n_unique;
|
||||
int cmp;
|
||||
|
||||
ut_ad(!rw_lock_own(&btr_search_latch, RW_LOCK_SHARED)
|
||||
&& !rw_lock_own(&btr_search_latch, RW_LOCK_EX));
|
||||
#ifdef UNIV_SYNC_DEBUG
|
||||
ut_ad(!rw_lock_own(&btr_search_latch, RW_LOCK_SHARED));
|
||||
ut_ad(!rw_lock_own(&btr_search_latch, RW_LOCK_EX));
|
||||
#endif /* UNIV_SYNC_DEBUG */
|
||||
|
||||
index = cursor->index;
|
||||
|
||||
@ -317,10 +323,12 @@ btr_search_update_block_hash_info(
|
||||
buf_block_t* block, /* in: buffer block */
|
||||
btr_cur_t* cursor) /* in: cursor */
|
||||
{
|
||||
ut_ad(!rw_lock_own(&btr_search_latch, RW_LOCK_SHARED)
|
||||
&& !rw_lock_own(&btr_search_latch, RW_LOCK_EX));
|
||||
ut_ad(rw_lock_own(&(block->lock), RW_LOCK_SHARED)
|
||||
|| rw_lock_own(&(block->lock), RW_LOCK_EX));
|
||||
#ifdef UNIV_SYNC_DEBUG
|
||||
ut_ad(!rw_lock_own(&btr_search_latch, RW_LOCK_SHARED));
|
||||
ut_ad(!rw_lock_own(&btr_search_latch, RW_LOCK_EX));
|
||||
ut_ad(rw_lock_own(&((buf_block_t*) block)->lock, RW_LOCK_SHARED)
|
||||
|| rw_lock_own(&((buf_block_t*) block)->lock, RW_LOCK_EX));
|
||||
#endif /* UNIV_SYNC_DEBUG */
|
||||
ut_ad(cursor);
|
||||
|
||||
info->last_hash_succ = FALSE;
|
||||
@ -398,9 +406,11 @@ btr_search_update_hash_ref(
|
||||
dulint tree_id;
|
||||
|
||||
ut_ad(cursor->flag == BTR_CUR_HASH_FAIL);
|
||||
#ifdef UNIV_SYNC_DEBUG
|
||||
ut_ad(rw_lock_own(&btr_search_latch, RW_LOCK_EX));
|
||||
ut_ad(rw_lock_own(&(block->lock), RW_LOCK_SHARED)
|
||||
|| rw_lock_own(&(block->lock), RW_LOCK_EX));
|
||||
#endif /* UNIV_SYNC_DEBUG */
|
||||
if (block->is_hashed
|
||||
&& (info->n_hash_potential > 0)
|
||||
&& (block->curr_n_fields == info->n_fields)
|
||||
@ -419,7 +429,9 @@ btr_search_update_hash_ref(
|
||||
fold = rec_fold(rec, block->curr_n_fields,
|
||||
block->curr_n_bytes, tree_id);
|
||||
|
||||
#ifdef UNIV_SYNC_DEBUG
|
||||
ut_ad(rw_lock_own(&btr_search_latch, RW_LOCK_EX));
|
||||
#endif /* UNIV_SYNC_DEBUG */
|
||||
|
||||
ha_insert_for_fold(btr_search_sys->hash_index, fold, rec);
|
||||
}
|
||||
@ -439,8 +451,10 @@ btr_search_info_update_slow(
|
||||
ulint* params;
|
||||
ulint* params2;
|
||||
|
||||
ut_ad(!rw_lock_own(&btr_search_latch, RW_LOCK_SHARED)
|
||||
&& !rw_lock_own(&btr_search_latch, RW_LOCK_EX));
|
||||
#ifdef UNIV_SYNC_DEBUG
|
||||
ut_ad(!rw_lock_own(&btr_search_latch, RW_LOCK_SHARED));
|
||||
ut_ad(!rw_lock_own(&btr_search_latch, RW_LOCK_EX));
|
||||
#endif /* UNIV_SYNC_DEBUG */
|
||||
|
||||
block = buf_block_align(btr_cur_get_rec(cursor));
|
||||
|
||||
@ -762,7 +776,9 @@ btr_search_guess_on_hash(
|
||||
|
||||
can_only_compare_to_cursor_rec = FALSE;
|
||||
|
||||
#ifdef UNIV_SYNC_DEBUG
|
||||
buf_page_dbg_add_level(page, SYNC_TREE_NODE_FROM_HASH);
|
||||
#endif /* UNIV_SYNC_DEBUG */
|
||||
}
|
||||
|
||||
block = buf_block_align(page);
|
||||
@ -910,10 +926,12 @@ btr_search_drop_page_hash_index(
|
||||
ulint n_recs;
|
||||
ulint* folds;
|
||||
ulint i;
|
||||
|
||||
ut_ad(!rw_lock_own(&btr_search_latch, RW_LOCK_SHARED)
|
||||
&& !rw_lock_own(&btr_search_latch, RW_LOCK_EX));
|
||||
|
||||
|
||||
#ifdef UNIV_SYNC_DEBUG
|
||||
ut_ad(!rw_lock_own(&btr_search_latch, RW_LOCK_SHARED));
|
||||
ut_ad(!rw_lock_own(&btr_search_latch, RW_LOCK_EX));
|
||||
#endif /* UNIV_SYNC_DEBUG */
|
||||
|
||||
rw_lock_s_lock(&btr_search_latch);
|
||||
|
||||
block = buf_block_align(page);
|
||||
@ -927,9 +945,11 @@ btr_search_drop_page_hash_index(
|
||||
|
||||
table = btr_search_sys->hash_index;
|
||||
|
||||
#ifdef UNIV_SYNC_DEBUG
|
||||
ut_ad(rw_lock_own(&(block->lock), RW_LOCK_SHARED)
|
||||
|| rw_lock_own(&(block->lock), RW_LOCK_EX)
|
||||
|| (block->buf_fix_count == 0));
|
||||
#endif /* UNIV_SYNC_DEBUG */
|
||||
|
||||
n_fields = block->curr_n_fields;
|
||||
n_bytes = block->curr_n_bytes;
|
||||
@ -1031,8 +1051,10 @@ btr_search_drop_page_hash_when_freed(
|
||||
BUF_GET_IF_IN_POOL, IB__FILE__, __LINE__,
|
||||
&mtr);
|
||||
|
||||
#ifdef UNIV_SYNC_DEBUG
|
||||
buf_page_dbg_add_level(page, SYNC_TREE_NODE_FROM_HASH);
|
||||
|
||||
#endif /* UNIV_SYNC_DEBUG */
|
||||
|
||||
btr_search_drop_page_hash_index(page);
|
||||
|
||||
mtr_commit(&mtr);
|
||||
@ -1072,9 +1094,11 @@ btr_search_build_page_hash_index(
|
||||
block = buf_block_align(page);
|
||||
table = btr_search_sys->hash_index;
|
||||
|
||||
#ifdef UNIV_SYNC_DEBUG
|
||||
ut_ad(!rw_lock_own(&btr_search_latch, RW_LOCK_EX));
|
||||
ut_ad(rw_lock_own(&(block->lock), RW_LOCK_SHARED)
|
||||
|| rw_lock_own(&(block->lock), RW_LOCK_EX));
|
||||
#endif /* UNIV_SYNC_DEBUG */
|
||||
|
||||
rw_lock_s_lock(&btr_search_latch);
|
||||
|
||||
@ -1237,8 +1261,10 @@ btr_search_move_or_delete_hash_entries(
|
||||
block = buf_block_align(page);
|
||||
new_block = buf_block_align(new_page);
|
||||
|
||||
ut_ad(rw_lock_own(&(block->lock), RW_LOCK_EX)
|
||||
&& rw_lock_own(&(new_block->lock), RW_LOCK_EX));
|
||||
#ifdef UNIV_SYNC_DEBUG
|
||||
ut_ad(rw_lock_own(&(block->lock), RW_LOCK_EX));
|
||||
ut_ad(rw_lock_own(&(new_block->lock), RW_LOCK_EX));
|
||||
#endif /* UNIV_SYNC_DEBUG */
|
||||
|
||||
rw_lock_s_lock(&btr_search_latch);
|
||||
|
||||
@ -1298,7 +1324,9 @@ btr_search_update_hash_on_delete(
|
||||
|
||||
block = buf_block_align(rec);
|
||||
|
||||
#ifdef UNIV_SYNC_DEBUG
|
||||
ut_ad(rw_lock_own(&(block->lock), RW_LOCK_EX));
|
||||
#endif /* UNIV_SYNC_DEBUG */
|
||||
|
||||
if (!block->is_hashed) {
|
||||
|
||||
@ -1339,7 +1367,9 @@ btr_search_update_hash_node_on_insert(
|
||||
|
||||
block = buf_block_align(rec);
|
||||
|
||||
#ifdef UNIV_SYNC_DEBUG
|
||||
ut_ad(rw_lock_own(&(block->lock), RW_LOCK_EX));
|
||||
#endif /* UNIV_SYNC_DEBUG */
|
||||
|
||||
if (!block->is_hashed) {
|
||||
|
||||
@ -1400,7 +1430,9 @@ btr_search_update_hash_on_insert(
|
||||
|
||||
block = buf_block_align(rec);
|
||||
|
||||
#ifdef UNIV_SYNC_DEBUG
|
||||
ut_ad(rw_lock_own(&(block->lock), RW_LOCK_EX));
|
||||
#endif /* UNIV_SYNC_DEBUG */
|
||||
|
||||
if (!block->is_hashed) {
|
||||
|
||||
@ -1499,75 +1531,6 @@ function_exit:
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
Prints info of the search system. */
|
||||
|
||||
void
|
||||
btr_search_print_info(void)
|
||||
/*=======================*/
|
||||
{
|
||||
printf("SEARCH SYSTEM INFO\n");
|
||||
|
||||
rw_lock_x_lock(&btr_search_latch);
|
||||
|
||||
/* ha_print_info(btr_search_sys->hash_index); */
|
||||
|
||||
rw_lock_x_unlock(&btr_search_latch);
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
Prints info of searches on an index. */
|
||||
|
||||
void
|
||||
btr_search_index_print_info(
|
||||
/*========================*/
|
||||
dict_index_t* index) /* in: index */
|
||||
{
|
||||
btr_search_t* info;
|
||||
|
||||
printf("INDEX SEARCH INFO\n");
|
||||
|
||||
rw_lock_x_lock(&btr_search_latch);
|
||||
|
||||
info = btr_search_get_info(index);
|
||||
|
||||
printf("Searches %lu, hash succ %lu, fail %lu, patt succ %lu\n",
|
||||
(ulong) info->n_searches, (ulong) info->n_hash_succ,
|
||||
(ulong) info->n_hash_fail, (ulong) info->n_patt_succ);
|
||||
|
||||
printf("Total of page cur short succ for all indexes %lu\n",
|
||||
(ulong) page_cur_short_succ);
|
||||
rw_lock_x_unlock(&btr_search_latch);
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
Prints info of searches on a table. */
|
||||
|
||||
void
|
||||
btr_search_table_print_info(
|
||||
/*========================*/
|
||||
char* name) /* in: table name */
|
||||
{
|
||||
dict_table_t* table;
|
||||
dict_index_t* index;
|
||||
|
||||
mutex_enter(&(dict_sys->mutex));
|
||||
|
||||
table = dict_table_get_low(name);
|
||||
|
||||
ut_a(table);
|
||||
|
||||
mutex_exit(&(dict_sys->mutex));
|
||||
|
||||
index = dict_table_get_first_index(table);
|
||||
|
||||
while (index) {
|
||||
btr_search_index_print_info(index);
|
||||
|
||||
index = dict_table_get_next_index(index);
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
Validates the search system. */
|
||||
|
||||
|
@ -1,312 +0,0 @@
|
||||
/************************************************************************
|
||||
Test for the client: interactive SQL
|
||||
|
||||
(c) 1996-1997 Innobase Oy
|
||||
|
||||
Created 2/16/1996 Heikki Tuuri
|
||||
*************************************************************************/
|
||||
|
||||
#include "univ.i"
|
||||
#include "ib_odbc.h"
|
||||
#include "mem0mem.h"
|
||||
#include "sync0sync.h"
|
||||
#include "os0thread.h"
|
||||
#include "os0proc.h"
|
||||
#include "os0sync.h"
|
||||
#include "srv0srv.h"
|
||||
|
||||
ulint n_exited = 0;
|
||||
|
||||
char cli_srv_endpoint_name[100];
|
||||
char cli_user_name[100];
|
||||
|
||||
ulint n_warehouses = ULINT_MAX;
|
||||
ulint n_customers_d = ULINT_MAX;
|
||||
bool is_tpc_d = FALSE;
|
||||
ulint n_rounds = ULINT_MAX;
|
||||
ulint n_users = ULINT_MAX;
|
||||
ulint startdate = 0;
|
||||
ulint enddate = 0;
|
||||
bool own_warehouse = FALSE;
|
||||
|
||||
ulint mem_pool_size = ULINT_MAX;
|
||||
|
||||
/*************************************************************************
|
||||
Reads a keywords and a values from an initfile. In case of an error, exits
|
||||
from the process. */
|
||||
static
|
||||
void
|
||||
cli_read_initfile(
|
||||
/*==============*/
|
||||
FILE* initfile) /* in: file pointer */
|
||||
{
|
||||
char str_buf[10000];
|
||||
ulint ulint_val;
|
||||
|
||||
srv_read_init_val(initfile, FALSE, "SRV_ENDPOINT_NAME", str_buf,
|
||||
&ulint_val);
|
||||
|
||||
ut_a(ut_strlen(str_buf) < COM_MAX_ADDR_LEN);
|
||||
|
||||
ut_memcpy(cli_srv_endpoint_name, str_buf, COM_MAX_ADDR_LEN);
|
||||
|
||||
srv_read_init_val(initfile, FALSE, "USER_NAME", str_buf,
|
||||
&ulint_val);
|
||||
ut_a(ut_strlen(str_buf) < COM_MAX_ADDR_LEN);
|
||||
|
||||
ut_memcpy(cli_user_name, str_buf, COM_MAX_ADDR_LEN);
|
||||
|
||||
srv_read_init_val(initfile, TRUE, "MEM_POOL_SIZE", str_buf,
|
||||
&mem_pool_size);
|
||||
|
||||
srv_read_init_val(initfile, TRUE, "N_WAREHOUSES", str_buf,
|
||||
&n_warehouses);
|
||||
|
||||
srv_read_init_val(initfile, TRUE, "N_CUSTOMERS_D", str_buf,
|
||||
&n_customers_d);
|
||||
|
||||
srv_read_init_val(initfile, TRUE, "IS_TPC_D", str_buf,
|
||||
&is_tpc_d);
|
||||
|
||||
srv_read_init_val(initfile, TRUE, "N_ROUNDS", str_buf,
|
||||
&n_rounds);
|
||||
|
||||
srv_read_init_val(initfile, TRUE, "N_USERS", str_buf,
|
||||
&n_users);
|
||||
|
||||
srv_read_init_val(initfile, TRUE, "STARTDATE", str_buf,
|
||||
&startdate);
|
||||
|
||||
srv_read_init_val(initfile, TRUE, "ENDDATE", str_buf,
|
||||
&enddate);
|
||||
|
||||
srv_read_init_val(initfile, TRUE, "OWN_WAREHOUSE", str_buf,
|
||||
&own_warehouse);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
Reads configuration info for the client. */
|
||||
static
|
||||
void
|
||||
cli_boot(
|
||||
/*=====*/
|
||||
char* name) /* in: the initialization file name */
|
||||
{
|
||||
FILE* initfile;
|
||||
|
||||
initfile = fopen(name, "r");
|
||||
|
||||
if (initfile == NULL) {
|
||||
printf(
|
||||
"Error in client booting: could not open initfile whose name is %s!\n",
|
||||
name);
|
||||
os_process_exit(1);
|
||||
}
|
||||
|
||||
cli_read_initfile(initfile);
|
||||
|
||||
fclose(initfile);
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
Interactive SQL loop. */
|
||||
static
|
||||
void
|
||||
isql(
|
||||
/*=*/
|
||||
FILE* inputfile) /* in: input file containing SQL strings,
|
||||
or stdin */
|
||||
{
|
||||
HENV env;
|
||||
HDBC conn;
|
||||
RETCODE ret;
|
||||
HSTMT sql_query;
|
||||
ulint tm, oldtm;
|
||||
char buf[1000];
|
||||
char* str;
|
||||
ulint count;
|
||||
ulint n_begins;
|
||||
ulint len;
|
||||
ulint n;
|
||||
ulint i;
|
||||
ulint n_lines;
|
||||
|
||||
ret = SQLAllocEnv(&env);
|
||||
|
||||
ut_a(ret == SQL_SUCCESS);
|
||||
|
||||
ret = SQLAllocConnect(env, &conn);
|
||||
|
||||
ut_a(ret == SQL_SUCCESS);
|
||||
|
||||
ret = SQLConnect(conn, (UCHAR*)cli_srv_endpoint_name,
|
||||
(SWORD)ut_strlen(cli_srv_endpoint_name),
|
||||
cli_user_name,
|
||||
(SWORD)ut_strlen(cli_user_name),
|
||||
(UCHAR*)"password", 8);
|
||||
ut_a(ret == SQL_SUCCESS);
|
||||
|
||||
printf("Connection established\n");
|
||||
|
||||
printf("Interactive SQL performs queries by first making a stored\n");
|
||||
printf("procedure from them, and then calling the procedure.\n");
|
||||
printf("Put a semicolon after each statement and\n");
|
||||
printf("end your query with two <enter>s.\n\n");
|
||||
printf("You can also give a single input file\n");
|
||||
printf("as a command line argument to isql.\n\n");
|
||||
printf("In the file separate SQL queries and procedure bodies\n");
|
||||
printf("by a single empty line. Do not write the final END; into\n");
|
||||
printf("a procedure body.\n\n");
|
||||
|
||||
count = 0;
|
||||
loop:
|
||||
count++;
|
||||
n = 0;
|
||||
n_lines = 0;
|
||||
|
||||
sprintf(buf, "PROCEDURE P%s%lu () IS\nBEGIN ", cli_user_name,
|
||||
count);
|
||||
for (;;) {
|
||||
len = ut_strlen(buf + n) - 1;
|
||||
n += len;
|
||||
|
||||
if (len == 0) {
|
||||
break;
|
||||
} else {
|
||||
sprintf(buf + n, "\n");
|
||||
n++;
|
||||
n_lines++;
|
||||
}
|
||||
|
||||
str = fgets(buf + n, 1000, inputfile);
|
||||
|
||||
if ((str == NULL) && (inputfile != stdin)) {
|
||||
/* Reached end-of-file: switch to input from
|
||||
keyboard */
|
||||
|
||||
inputfile = stdin;
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
ut_a(str);
|
||||
}
|
||||
|
||||
if (n_lines == 1) {
|
||||
/* Empty procedure */
|
||||
|
||||
goto loop;
|
||||
}
|
||||
|
||||
/* If the statement is actually the body of a procedure,
|
||||
erase the first BEGIN from the string: */
|
||||
|
||||
n_begins = 0;
|
||||
|
||||
for (i = 0; i < n - 5; i++) {
|
||||
|
||||
if (ut_memcmp(buf + i, "BEGIN", 5) == 0) {
|
||||
|
||||
n_begins++;
|
||||
}
|
||||
}
|
||||
|
||||
if (n_begins > 1) {
|
||||
|
||||
for (i = 0; i < n - 5; i++) {
|
||||
|
||||
if (ut_memcmp(buf + i, "BEGIN", 5) == 0) {
|
||||
|
||||
/* Erase the first BEGIN: */
|
||||
ut_memcpy(buf + i, " ", 5);
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
sprintf(buf + n, "END;\n");
|
||||
|
||||
printf("SQL procedure to execute:\n%s\n", buf);
|
||||
|
||||
ret = SQLAllocStmt(conn, &sql_query);
|
||||
|
||||
ut_a(ret == SQL_SUCCESS);
|
||||
|
||||
ret = SQLPrepare(sql_query, (UCHAR*)buf, ut_strlen(buf));
|
||||
|
||||
ut_a(ret == SQL_SUCCESS);
|
||||
|
||||
ret = SQLExecute(sql_query);
|
||||
|
||||
ut_a(ret == SQL_SUCCESS);
|
||||
|
||||
sprintf(buf, "{P%s%lu ()}", cli_user_name, count);
|
||||
|
||||
ret = SQLAllocStmt(conn, &sql_query);
|
||||
|
||||
ut_a(ret == SQL_SUCCESS);
|
||||
|
||||
ret = SQLPrepare(sql_query, (UCHAR*)buf, ut_strlen(buf));
|
||||
|
||||
ut_a(ret == SQL_SUCCESS);
|
||||
|
||||
printf("Starting to execute the query\n");
|
||||
|
||||
oldtm = ut_clock();
|
||||
|
||||
ret = SQLExecute(sql_query);
|
||||
|
||||
tm = ut_clock();
|
||||
|
||||
printf("Wall time for query %lu milliseconds\n\n", tm - oldtm);
|
||||
|
||||
ut_a(ret == SQL_SUCCESS);
|
||||
|
||||
goto loop;
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
Main test function. */
|
||||
|
||||
void
|
||||
main(int argc, char* argv[])
|
||||
/*========================*/
|
||||
{
|
||||
ulint tm, oldtm;
|
||||
FILE* inputfile;
|
||||
|
||||
if (argc > 2) {
|
||||
printf("Only one input file allowed\n");
|
||||
|
||||
os_process_exit(1);
|
||||
|
||||
} else if (argc == 2) {
|
||||
inputfile = fopen(argv[1], "r");
|
||||
|
||||
if (inputfile == NULL) {
|
||||
printf(
|
||||
"Error: could not open the inputfile whose name is %s!\n",
|
||||
argv[1]);
|
||||
os_process_exit(1);
|
||||
}
|
||||
} else {
|
||||
inputfile = stdin;
|
||||
}
|
||||
|
||||
cli_boot("cli_init");
|
||||
|
||||
sync_init();
|
||||
|
||||
mem_init(mem_pool_size);
|
||||
|
||||
oldtm = ut_clock();
|
||||
|
||||
isql(inputfile);
|
||||
|
||||
tm = ut_clock();
|
||||
|
||||
printf("Wall time for test %lu milliseconds\n", tm - oldtm);
|
||||
|
||||
printf("TESTS COMPLETED SUCCESSFULLY!\n");
|
||||
}
|
@ -1,16 +0,0 @@
|
||||
include ..\..\makefile.i
|
||||
|
||||
doall: tssrv tscli isql
|
||||
|
||||
tssrv: ..\btr.lib tssrv.c
|
||||
$(CCOM) $(CFL) -I.. -I..\.. ..\btr.lib ..\..\eval.lib ..\..\ibuf.lib ..\..\trx.lib ..\..\pars.lib ..\..\que.lib ..\..\lock.lib ..\..\row.lib ..\..\read.lib ..\..\srv.lib ..\..\com.lib ..\..\usr.lib ..\..\thr.lib ..\..\fut.lib ..\..\fsp.lib ..\..\page.lib ..\..\dyn.lib ..\..\mtr.lib ..\..\log.lib ..\..\rem.lib ..\..\fil.lib ..\..\buf.lib ..\..\dict.lib ..\..\data.lib ..\..\mach.lib ..\..\ha.lib ..\..\ut.lib ..\..\sync.lib ..\..\mem.lib ..\..\os.lib tssrv.c $(LFL)
|
||||
|
||||
tscli: ..\btr.lib tscli.c
|
||||
$(CCOM) $(CFL) -I.. -I..\.. ..\btr.lib ..\..\ib_odbc.lib ..\..\eval.lib ..\..\ibuf.lib ..\..\trx.lib ..\..\pars.lib ..\..\que.lib ..\..\lock.lib ..\..\row.lib ..\..\read.lib ..\..\srv.lib ..\..\com.lib ..\..\usr.lib ..\..\thr.lib ..\..\fut.lib ..\..\fsp.lib ..\..\page.lib ..\..\dyn.lib ..\..\mtr.lib ..\..\log.lib ..\..\rem.lib ..\..\fil.lib ..\..\buf.lib ..\..\dict.lib ..\..\data.lib ..\..\mach.lib ..\..\ha.lib ..\..\ut.lib ..\..\sync.lib ..\..\mem.lib ..\..\os.lib tscli.c $(LFL)
|
||||
|
||||
isql: ..\btr.lib isql.c
|
||||
$(CCOM) $(CFL) -I.. -I..\.. ..\btr.lib ..\..\ib_odbc.lib ..\..\eval.lib ..\..\ibuf.lib ..\..\trx.lib ..\..\pars.lib ..\..\que.lib ..\..\lock.lib ..\..\row.lib ..\..\read.lib ..\..\srv.lib ..\..\com.lib ..\..\usr.lib ..\..\thr.lib ..\..\fut.lib ..\..\fsp.lib ..\..\page.lib ..\..\dyn.lib ..\..\mtr.lib ..\..\log.lib ..\..\rem.lib ..\..\fil.lib ..\..\buf.lib ..\..\dict.lib ..\..\data.lib ..\..\mach.lib ..\..\ha.lib ..\..\ut.lib ..\..\sync.lib ..\..\mem.lib ..\..\os.lib isql.c $(LFL)
|
||||
|
||||
tsrecv: ..\btr.lib tsrecv.c
|
||||
$(CCOM) $(CFL) -I.. -I..\.. ..\btr.lib ..\..\ibuf.lib ..\..\trx.lib ..\..\pars.lib ..\..\que.lib ..\..\lock.lib ..\..\row.lib ..\..\read.lib ..\..\srv.lib ..\..\com.lib ..\..\usr.lib ..\..\thr.lib ..\..\fut.lib ..\..\fsp.lib ..\..\page.lib ..\..\dyn.lib ..\..\mtr.lib ..\..\log.lib ..\..\rem.lib ..\..\fil.lib ..\..\buf.lib ..\..\dict.lib ..\..\data.lib ..\..\mach.lib ..\..\ha.lib ..\..\ut.lib ..\..\sync.lib ..\..\mem.lib ..\..\os.lib tsrecv.c $(LFL)
|
||||
|
@ -1,483 +0,0 @@
|
||||
/************************************************************************
|
||||
The test module for the record manager of MVB.
|
||||
|
||||
(c) 1994 Heikki Tuuri
|
||||
|
||||
Created 1/25/1994 Heikki Tuuri
|
||||
*************************************************************************/
|
||||
|
||||
|
||||
#include "rm0phr.h"
|
||||
#include "rm0lgr.h"
|
||||
#include "ut0ut.h"
|
||||
#include "buf0mem.h"
|
||||
#include "rm0ipg.h"
|
||||
#include "../it0it.h"
|
||||
#include "../it0hi.h"
|
||||
#include "../it0ads.h"
|
||||
|
||||
byte buf[100];
|
||||
byte buf2[100];
|
||||
lint lintbuf[2048];
|
||||
|
||||
byte numbuf[6000];
|
||||
byte numlogrecbuf[100];
|
||||
phr_record_t* qs_table[100000];
|
||||
|
||||
lint qs_comp = 0;
|
||||
|
||||
extern
|
||||
void
|
||||
test1(void);
|
||||
|
||||
#ifdef NOT_DEFINED
|
||||
|
||||
void
|
||||
q_sort(lint low, lint up)
|
||||
{
|
||||
phr_record_t* temp, *pivot;
|
||||
lint i, j;
|
||||
|
||||
|
||||
pivot = qs_table[(low + up) / 2];
|
||||
|
||||
i = low;
|
||||
j = up;
|
||||
|
||||
while (i < j) {
|
||||
qs_comp++;
|
||||
if (cmp_phr_compare(qs_table[i], pivot)<= 0) {
|
||||
i++;
|
||||
} else {
|
||||
j--;
|
||||
temp = qs_table[i];
|
||||
qs_table[i] = qs_table[j];
|
||||
qs_table[j] = temp;
|
||||
}
|
||||
}
|
||||
|
||||
if (j == up) {
|
||||
temp = qs_table[(low + up) / 2];
|
||||
qs_table[(low + up) / 2] = qs_table[up - 1];
|
||||
qs_table[up - 1] = temp;
|
||||
j--;
|
||||
}
|
||||
|
||||
|
||||
if (j - low <= 1) {
|
||||
/* do nothing */
|
||||
} else if (j - low == 2) {
|
||||
qs_comp++;
|
||||
if (cmp_phr_compare(qs_table[low],
|
||||
qs_table[low + 1])
|
||||
<= 0) {
|
||||
/* do nothing */
|
||||
} else {
|
||||
temp = qs_table[low];
|
||||
qs_table[low] = qs_table[low + 1];
|
||||
qs_table[low + 1] = temp;
|
||||
}
|
||||
} else {
|
||||
q_sort(low, j);
|
||||
}
|
||||
|
||||
if (up - j <= 1) {
|
||||
/* do nothing */
|
||||
} else if (up - j == 2) {
|
||||
qs_comp++;
|
||||
if (cmp_phr_compare(qs_table[j],
|
||||
qs_table[j + 1])
|
||||
<= 0) {
|
||||
/* do nothing */
|
||||
} else {
|
||||
temp = qs_table[j];
|
||||
qs_table[j] = qs_table[j + 1];
|
||||
qs_table[j + 1] = temp;
|
||||
}
|
||||
} else {
|
||||
q_sort(j, up);
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
extern
|
||||
void
|
||||
test1(void)
|
||||
{
|
||||
phr_record_t* physrec;
|
||||
phr_record_t* rec1;
|
||||
phr_record_t* rec2;
|
||||
lgr_record_t* logrec;
|
||||
lgrf_field_t* logfield;
|
||||
lint len;
|
||||
byte* str;
|
||||
lint len2;
|
||||
lint tm;
|
||||
lint oldtm;
|
||||
lint i, j, k, l, m;
|
||||
bool b;
|
||||
it_cur_cursor_t cursor;
|
||||
ipg_cur_cursor_t* page_cursor;
|
||||
ipg_page_t* page;
|
||||
|
||||
byte c4, c3, c2, c1, c0;
|
||||
lint rand, rnd1, rnd2;
|
||||
byte* nb;
|
||||
lgr_record_t* numlogrec;
|
||||
byte* pgbuf;
|
||||
mem_stream_t* stream;
|
||||
lint tree1, tree2, tree3;
|
||||
lint dummy1, dummy2;
|
||||
|
||||
pgbuf = (byte*)lintbuf;
|
||||
|
||||
stream = mem_stream_create(0);
|
||||
|
||||
printf("-------------------------------------------\n");
|
||||
printf("TEST 1. Speed and basic tests.\n");
|
||||
|
||||
logrec = lgr_create_logical_record(stream, 2);
|
||||
|
||||
nb = numbuf;
|
||||
|
||||
c4 = '0';
|
||||
c3 = '0';
|
||||
for (c2 = '0'; c2 <= '9'; c2++) {
|
||||
for (c1 = '0'; c1 <= '9'; c1++) {
|
||||
for (c0 = '0'; c0 <= '9'; c0++) {
|
||||
*nb = c4; nb++;
|
||||
*nb = c3; nb++;
|
||||
*nb = c2; nb++;
|
||||
*nb = c1; nb++;
|
||||
*nb = c0; nb++;
|
||||
*nb = '\0'; nb++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
numlogrec = lgr_create_logical_record(stream, 2);
|
||||
|
||||
|
||||
tree1 = it_create_index_tree();
|
||||
|
||||
oldtm = ut_clock();
|
||||
|
||||
rand = 99900;
|
||||
rnd1 = 67;
|
||||
for (j = 0; j < 1; j++) {
|
||||
for (i = 0 ; i < 100000; i++) {
|
||||
|
||||
rand = (rand + 1) % 100000;
|
||||
|
||||
logfield = lgr_get_nth_field(numlogrec, 0);
|
||||
lgrf_set_data(logfield, numbuf + 6 * (rand / 300));
|
||||
lgrf_set_len(logfield, 6);
|
||||
|
||||
logfield = lgr_get_nth_field(numlogrec, 1);
|
||||
lgrf_set_data(logfield, numbuf + 6 * (rand % 300));
|
||||
lgrf_set_len(logfield, 6);
|
||||
/*
|
||||
it_insert(tree1, numlogrec);
|
||||
*/
|
||||
|
||||
|
||||
|
||||
it_cur_search_tree_to_nth_level(tree1, 1, numlogrec,
|
||||
IPG_SE_L_GE, &cursor, &dummy1, &dummy2);
|
||||
|
||||
/*
|
||||
it_cur_set_to_first(tree1, &cursor);
|
||||
*/
|
||||
|
||||
it_cur_insert_record(&cursor, numlogrec);
|
||||
|
||||
}
|
||||
}
|
||||
tm = ut_clock();
|
||||
printf("Time for inserting %ld recs = %ld \n", i* j, tm - oldtm);
|
||||
|
||||
/* it_print_tree(tree1, 10);*/
|
||||
hi_print_info();
|
||||
ads_print_info();
|
||||
/*
|
||||
oldtm = ut_clock();
|
||||
|
||||
rand = 11113;
|
||||
for (i = 0; i < 5000; i++) {
|
||||
|
||||
rand = (rand + 57123) % 100000;
|
||||
|
||||
logfield = lgr_get_nth_field(numlogrec, 0);
|
||||
lgrf_set_data(logfield, numbuf + 6 * (rand / 300));
|
||||
lgrf_set_len(logfield, 6);
|
||||
|
||||
logfield = lgr_get_nth_field(numlogrec, 1);
|
||||
lgrf_set_data(logfield, numbuf + 6 * (rand % 300));
|
||||
lgrf_set_len(logfield, 6);
|
||||
|
||||
it_cur_search_tree_to_nth_level(tree1, 1, numlogrec,
|
||||
IPG_SE_L_GE, &cursor, &dummy1, &dummy2);
|
||||
|
||||
}
|
||||
tm = ut_clock();
|
||||
printf("Time for searching %ld recs = %ld \n", i, tm - oldtm);
|
||||
*/
|
||||
|
||||
it_cur_set_to_first(tree1, &cursor);
|
||||
|
||||
rec1 = ipg_cur_get_record(it_cur_get_page_cursor(&cursor));
|
||||
|
||||
for (i = 0;; i++) {
|
||||
it_cur_move_to_next(&cursor);
|
||||
if (it_cur_end_of_level(&cursor)) {
|
||||
break;
|
||||
}
|
||||
rec2 = ipg_cur_get_record(it_cur_get_page_cursor(&cursor));
|
||||
ut_a(cmp_phr_compare(rec1, rec2) == -1);
|
||||
rec1 = rec2;
|
||||
}
|
||||
|
||||
printf("tree1 checked for right sorted order!\n");
|
||||
|
||||
#ifdef not_defined
|
||||
|
||||
oldtm = ut_clock();
|
||||
|
||||
for (j = 0; j < 1; j++) {
|
||||
rand = 11113;
|
||||
for (i = 0; i < 3000; i++) {
|
||||
|
||||
rand = (rand + 57123) % 100000;
|
||||
|
||||
logfield = lgr_get_nth_field(numlogrec, 0);
|
||||
lgrf_set_data(logfield, numbuf + 6 * (rand / 300));
|
||||
lgrf_set_len(logfield, 6);
|
||||
|
||||
logfield = lgr_get_nth_field(numlogrec, 1);
|
||||
lgrf_set_data(logfield, numbuf + 6 * (rand % 300));
|
||||
lgrf_set_len(logfield, 6);
|
||||
|
||||
physrec = hi_search(numlogrec);
|
||||
|
||||
ut_a(physrec);
|
||||
}
|
||||
|
||||
}
|
||||
ut_a(physrec);
|
||||
tm = ut_clock();
|
||||
printf("Time for hi_search %ld recs = %ld \n", i * j,
|
||||
tm - oldtm);
|
||||
|
||||
|
||||
|
||||
oldtm = ut_clock();
|
||||
|
||||
for (i = 0; i < 100000; i++) {
|
||||
/* j += lgr_fold(numlogrec, -1, -1);*/
|
||||
/* b += phr_lgr_equal(physrec, numlogrec, -1);*/
|
||||
k += ut_hash_lint(j, HI_TABLE_SIZE);
|
||||
}
|
||||
|
||||
|
||||
/* ut_a(b);*/
|
||||
tm = ut_clock();
|
||||
printf("Time for fold + equal %ld recs %s = %ld \n", i, physrec,
|
||||
tm - oldtm);
|
||||
|
||||
printf("%ld %ld %ld\n", j, b, k);
|
||||
|
||||
hi_print_info();
|
||||
|
||||
tree2 = it_create_index_tree();
|
||||
|
||||
rand = 90000;
|
||||
for (i = 0; i < 300; i++) {
|
||||
|
||||
rand = (rand + 1) % 100000;
|
||||
|
||||
logfield = lgr_get_nth_field(numlogrec, 0);
|
||||
lgrf_set_data(logfield, numbuf + 6 * (rand / 300));
|
||||
lgrf_set_len(logfield, 6);
|
||||
|
||||
logfield = lgr_get_nth_field(numlogrec, 1);
|
||||
lgrf_set_data(logfield, numbuf + 6 * (rand % 300));
|
||||
lgrf_set_len(logfield, 6);
|
||||
|
||||
it_cur_search_tree_to_nth_level(tree2, 1, numlogrec,
|
||||
IPG_SE_L_GE, &cursor);
|
||||
|
||||
it_cur_insert_record(&cursor, numlogrec);
|
||||
|
||||
}
|
||||
|
||||
oldtm = ut_clock();
|
||||
|
||||
rand = 10000;
|
||||
for (i = 0; i < 3000; i++) {
|
||||
|
||||
rand = (rand + 1) % 100000;
|
||||
|
||||
logfield = lgr_get_nth_field(numlogrec, 0);
|
||||
lgrf_set_data(logfield, numbuf + 6 * (rand / 300));
|
||||
lgrf_set_len(logfield, 6);
|
||||
|
||||
logfield = lgr_get_nth_field(numlogrec, 1);
|
||||
lgrf_set_data(logfield, numbuf + 6 * (rand % 300));
|
||||
lgrf_set_len(logfield, 6);
|
||||
|
||||
it_cur_search_tree_to_nth_level(tree2, 1, numlogrec,
|
||||
IPG_SE_L_GE, &cursor);
|
||||
|
||||
it_cur_insert_record(&cursor, numlogrec);
|
||||
|
||||
}
|
||||
tm = ut_clock();
|
||||
printf("Time for inserting sequentially %ld recs = %ld \n",
|
||||
i, tm - oldtm);
|
||||
|
||||
|
||||
/* it_print_tree(tree2, 10); */
|
||||
|
||||
|
||||
tree3 = it_create_index_tree();
|
||||
|
||||
rand = 0;
|
||||
for (i = 0; i < 300; i++) {
|
||||
|
||||
rand = (rand + 1) % 100000;
|
||||
|
||||
logfield = lgr_get_nth_field(numlogrec, 0);
|
||||
lgrf_set_data(logfield, numbuf + 6 * (rand / 300));
|
||||
lgrf_set_len(logfield, 6);
|
||||
|
||||
logfield = lgr_get_nth_field(numlogrec, 1);
|
||||
lgrf_set_data(logfield, numbuf + 6 * (rand % 300));
|
||||
lgrf_set_len(logfield, 6);
|
||||
|
||||
it_cur_search_tree_to_nth_level(tree3, 1, numlogrec,
|
||||
IPG_SE_L_GE, &cursor);
|
||||
|
||||
it_cur_insert_record(&cursor, numlogrec);
|
||||
|
||||
}
|
||||
|
||||
oldtm = ut_clock();
|
||||
|
||||
rand = 100000;
|
||||
for (i = 0; i < 3000; i++) {
|
||||
|
||||
rand = (rand - 1) % 100000;
|
||||
|
||||
logfield = lgr_get_nth_field(numlogrec, 0);
|
||||
lgrf_set_data(logfield, numbuf + 6 * (rand / 300));
|
||||
lgrf_set_len(logfield, 6);
|
||||
|
||||
logfield = lgr_get_nth_field(numlogrec, 1);
|
||||
lgrf_set_data(logfield, numbuf + 6 * (rand % 300));
|
||||
lgrf_set_len(logfield, 6);
|
||||
|
||||
it_cur_search_tree_to_nth_level(tree3, 1, numlogrec,
|
||||
IPG_SE_L_GE, &cursor);
|
||||
|
||||
it_cur_insert_record(&cursor, numlogrec);
|
||||
|
||||
}
|
||||
tm = ut_clock();
|
||||
printf("Time for inserting sequentially downw. %ld recs = %ld \n",
|
||||
i, tm - oldtm);
|
||||
|
||||
|
||||
/* it_print_tree(tree3, 10); */
|
||||
|
||||
#endif
|
||||
|
||||
}
|
||||
|
||||
#ifdef NOT_DEFINED
|
||||
|
||||
/* Test of quicksort */
|
||||
void
|
||||
test2(void)
|
||||
{
|
||||
mem_stream_t* stream;
|
||||
byte* stbuf;
|
||||
lgrf_field_t* logfield;
|
||||
lint tm;
|
||||
lint oldtm;
|
||||
lint i, j, k, l, m;
|
||||
lint rand;
|
||||
lgr_record_t* numlogrec;
|
||||
phr_record_t* ph_rec;
|
||||
|
||||
stream = mem_stream_create(1000);
|
||||
|
||||
numlogrec = lgr_create_logical_record(stream, 2);
|
||||
|
||||
oldtm = ut_clock();
|
||||
|
||||
rand = 11113;
|
||||
for (i = 0; i < 50000; i++) {
|
||||
stbuf = mem_stream_alloc(stream, 30);
|
||||
|
||||
rand = (rand + 57123) % 100000;
|
||||
|
||||
logfield = lgr_get_nth_field(numlogrec, 0);
|
||||
lgrf_set_data(logfield, numbuf + 6 * (rand / 300));
|
||||
lgrf_set_len(logfield, 6);
|
||||
|
||||
logfield = lgr_get_nth_field(numlogrec, 1);
|
||||
lgrf_set_data(logfield, numbuf + 6 * (rand % 300));
|
||||
lgrf_set_len(logfield, 6);
|
||||
|
||||
ph_rec = phr_create_physical_record(stbuf, 30, numlogrec);
|
||||
|
||||
qs_table[i] = ph_rec;
|
||||
|
||||
}
|
||||
tm = ut_clock();
|
||||
printf("Time for inserting %ld recs to mem stream = %ld \n",
|
||||
i, tm - oldtm);
|
||||
|
||||
|
||||
oldtm = ut_clock();
|
||||
|
||||
q_sort(0, 50000);
|
||||
|
||||
tm = ut_clock();
|
||||
printf("Time for quicksort of %ld recs = %ld, comps: %ld \n",
|
||||
i, tm - oldtm, qs_comp);
|
||||
|
||||
|
||||
|
||||
for (i = 1; i < 49999; i++) {
|
||||
ut_a(-1 ==
|
||||
cmp_phr_compare(qs_table[i], qs_table[i+1]
|
||||
));
|
||||
}
|
||||
tm = ut_clock();
|
||||
|
||||
|
||||
oldtm = ut_clock();
|
||||
for (i = 1; i < 50000; i++) {
|
||||
k += cmp_phr_compare(qs_table[i & 0xF],
|
||||
qs_table[5]);
|
||||
}
|
||||
tm = ut_clock();
|
||||
printf("%ld\n", k);
|
||||
|
||||
printf("Time for cmp of %ld ph_recs = %ld \n",
|
||||
i, tm - oldtm);
|
||||
|
||||
mem_stream_free(stream);
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
void
|
||||
main(void)
|
||||
{
|
||||
test1();
|
||||
/* test2(); */
|
||||
}
|
||||
|
@ -1,798 +0,0 @@
|
||||
/************************************************************************
|
||||
The test for the index tree
|
||||
|
||||
(c) 1994-1996 Innobase Oy
|
||||
|
||||
Created 2/16/1996 Heikki Tuuri
|
||||
*************************************************************************/
|
||||
|
||||
#include "sync0sync.h"
|
||||
#include "ut0mem.h"
|
||||
#include "mem0mem.h"
|
||||
#include "data0data.h"
|
||||
#include "data0type.h"
|
||||
#include "dict0dict.h"
|
||||
#include "buf0buf.h"
|
||||
#include "os0file.h"
|
||||
#include "fil0fil.h"
|
||||
#include "fsp0fsp.h"
|
||||
#include "rem0rec.h"
|
||||
#include "rem0cmp.h"
|
||||
#include "mtr0mtr.h"
|
||||
#include "log0log.h"
|
||||
#include "page0page.h"
|
||||
#include "page0cur.h"
|
||||
#include "..\btr0btr.h"
|
||||
#include "..\btr0cur.h"
|
||||
#include "..\btr0pcur.h"
|
||||
|
||||
os_file_t files[1000];
|
||||
|
||||
mutex_t ios_mutex;
|
||||
ulint ios;
|
||||
ulint n[10];
|
||||
|
||||
mutex_t incs_mutex;
|
||||
ulint incs;
|
||||
|
||||
byte bigbuf[1000000];
|
||||
|
||||
#define N_SPACES 1
|
||||
#define N_FILES 2
|
||||
#define FILE_SIZE 1000 /* must be > 512 */
|
||||
#define POOL_SIZE 1000
|
||||
#define COUNTER_OFFSET 1500
|
||||
|
||||
#define LOOP_SIZE 150
|
||||
#define N_THREADS 5
|
||||
|
||||
|
||||
ulint zero = 0;
|
||||
|
||||
buf_block_t* bl_arr[POOL_SIZE];
|
||||
|
||||
/************************************************************************
|
||||
Io-handler thread function. */
|
||||
|
||||
ulint
|
||||
handler_thread(
|
||||
/*===========*/
|
||||
void* arg)
|
||||
{
|
||||
ulint segment;
|
||||
void* mess;
|
||||
ulint i;
|
||||
bool ret;
|
||||
|
||||
segment = *((ulint*)arg);
|
||||
|
||||
printf("Io handler thread %lu starts\n", segment);
|
||||
|
||||
for (i = 0;; i++) {
|
||||
ret = fil_aio_wait(segment, &mess);
|
||||
ut_a(ret);
|
||||
|
||||
buf_page_io_complete((buf_block_t*)mess);
|
||||
|
||||
mutex_enter(&ios_mutex);
|
||||
ios++;
|
||||
mutex_exit(&ios_mutex);
|
||||
|
||||
}
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
Creates the files for the file system test and inserts them to
|
||||
the file system. */
|
||||
|
||||
void
|
||||
create_files(void)
|
||||
/*==============*/
|
||||
{
|
||||
bool ret;
|
||||
ulint i, k;
|
||||
char name[20];
|
||||
os_thread_t thr[5];
|
||||
os_thread_id_t id[5];
|
||||
|
||||
printf("--------------------------------------------------------\n");
|
||||
printf("Create or open database files\n");
|
||||
|
||||
strcpy(name, "j:\\tsfile00");
|
||||
|
||||
for (k = 0; k < N_SPACES; k++) {
|
||||
for (i = 0; i < N_FILES; i++) {
|
||||
|
||||
name[9] = (char)((ulint)'0' + k);
|
||||
name[10] = (char)((ulint)'0' + i);
|
||||
|
||||
files[i] = os_file_create(name, OS_FILE_CREATE,
|
||||
OS_FILE_TABLESPACE, &ret);
|
||||
|
||||
if (ret == FALSE) {
|
||||
ut_a(os_file_get_last_error() ==
|
||||
OS_FILE_ALREADY_EXISTS);
|
||||
|
||||
files[i] = os_file_create(
|
||||
name, OS_FILE_OPEN,
|
||||
OS_FILE_TABLESPACE, &ret);
|
||||
|
||||
ut_a(ret);
|
||||
}
|
||||
|
||||
ret = os_file_close(files[i]);
|
||||
ut_a(ret);
|
||||
|
||||
if (i == 0) {
|
||||
fil_space_create(name, k, OS_FILE_TABLESPACE);
|
||||
}
|
||||
|
||||
ut_a(fil_validate());
|
||||
|
||||
fil_node_create(name, FILE_SIZE, k);
|
||||
}
|
||||
}
|
||||
|
||||
ios = 0;
|
||||
|
||||
mutex_create(&ios_mutex);
|
||||
|
||||
for (i = 0; i < 5; i++) {
|
||||
n[i] = i;
|
||||
|
||||
thr[i] = os_thread_create(handler_thread, n + i, id + i);
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
Inits space header of space 0. */
|
||||
|
||||
void
|
||||
init_space(void)
|
||||
/*============*/
|
||||
{
|
||||
mtr_t mtr;
|
||||
|
||||
printf("Init space header\n");
|
||||
|
||||
mtr_start(&mtr);
|
||||
|
||||
fsp_header_init(0, FILE_SIZE * N_FILES, &mtr);
|
||||
|
||||
mtr_commit(&mtr);
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
Test for index page. */
|
||||
|
||||
void
|
||||
test1(void)
|
||||
/*=======*/
|
||||
{
|
||||
dtuple_t* tuple;
|
||||
mem_heap_t* heap;
|
||||
ulint rnd = 0;
|
||||
dict_index_t* index;
|
||||
dict_table_t* table;
|
||||
dict_tree_t* tree;
|
||||
mtr_t mtr;
|
||||
byte buf[8];
|
||||
ulint i;
|
||||
ulint tm, oldtm;
|
||||
btr_pcur_t cursor;
|
||||
|
||||
printf("-------------------------------------------------\n");
|
||||
printf("TEST 1. Basic test\n");
|
||||
|
||||
heap = mem_heap_create(0);
|
||||
|
||||
table = dict_mem_table_create("TS_TABLE1", 2);
|
||||
|
||||
dict_mem_table_add_col(table, "COL1", DATA_VARCHAR, DATA_ENGLISH, 10, 0);
|
||||
dict_mem_table_add_col(table, "COL2", DATA_VARCHAR, DATA_ENGLISH, 10, 0);
|
||||
|
||||
dict_table_add_to_cache(table);
|
||||
|
||||
index = dict_mem_index_create("TS_TABLE1", "IND1", 0, 2, 0);
|
||||
|
||||
dict_mem_index_add_field(index, "COL1", 0);
|
||||
dict_mem_index_add_field(index, "COL2", 0);
|
||||
|
||||
dict_index_add_to_cache(index);
|
||||
|
||||
index = dict_index_get("TS_TABLE1", "IND1");
|
||||
ut_a(index);
|
||||
|
||||
tree = dict_index_get_tree(index);
|
||||
|
||||
tuple = dtuple_create(heap, 3);
|
||||
|
||||
mtr_start(&mtr);
|
||||
|
||||
btr_root_create(tree, 0, &mtr);
|
||||
|
||||
mtr_commit(&mtr);
|
||||
|
||||
mtr_start(&mtr);
|
||||
|
||||
dtuple_gen_test_tuple3(tuple, 0, buf);
|
||||
btr_insert(tree, tuple, &mtr);
|
||||
|
||||
mtr_commit(&mtr);
|
||||
|
||||
rnd = 90000;
|
||||
|
||||
oldtm = ut_clock();
|
||||
|
||||
for (i = 0; i < 1000 * UNIV_DBC * UNIV_DBC; i++) {
|
||||
|
||||
mtr_start(&mtr);
|
||||
|
||||
if (i == 77000) {
|
||||
rnd = rnd % 200000;
|
||||
}
|
||||
|
||||
rnd = (rnd + 15675751) % 200000;
|
||||
|
||||
dtuple_gen_test_tuple3(tuple, rnd, buf);
|
||||
|
||||
btr_insert(tree, tuple, &mtr);
|
||||
|
||||
mtr_commit(&mtr);
|
||||
}
|
||||
|
||||
tm = ut_clock();
|
||||
printf("Wall time for test %lu milliseconds\n", tm - oldtm);
|
||||
|
||||
rnd = 90000;
|
||||
|
||||
oldtm = ut_clock();
|
||||
|
||||
for (i = 0; i < 1000 * UNIV_DBC * UNIV_DBC; i++) {
|
||||
|
||||
mtr_start(&mtr);
|
||||
|
||||
if (i == 50000) {
|
||||
rnd = rnd % 200000;
|
||||
}
|
||||
|
||||
rnd = (rnd + 595659561) % 200000;
|
||||
|
||||
dtuple_gen_test_tuple3(tuple, rnd, buf);
|
||||
|
||||
btr_pcur_open(tree, tuple, PAGE_CUR_GE,
|
||||
BTR_SEARCH_LEAF, &cursor, &mtr);
|
||||
|
||||
mtr_commit(&mtr);
|
||||
}
|
||||
|
||||
tm = ut_clock();
|
||||
printf("Wall time for test %lu milliseconds\n", tm - oldtm);
|
||||
|
||||
rnd = 0;
|
||||
|
||||
oldtm = ut_clock();
|
||||
|
||||
for (i = 0; i < 1000 * UNIV_DBC * UNIV_DBC; i++) {
|
||||
|
||||
mtr_start(&mtr);
|
||||
|
||||
rnd = (rnd + 35608971) % 200000 + 1;
|
||||
|
||||
dtuple_gen_test_tuple3(tuple, rnd, buf);
|
||||
|
||||
mtr_commit(&mtr);
|
||||
}
|
||||
|
||||
tm = ut_clock();
|
||||
printf("Wall time for test %lu milliseconds\n", tm - oldtm);
|
||||
|
||||
/* btr_print_tree(tree, 3); */
|
||||
|
||||
mem_heap_free(heap);
|
||||
}
|
||||
|
||||
|
||||
#ifdef notdefined
|
||||
|
||||
mtr_start(&mtr);
|
||||
|
||||
block = buf_page_create(0, 5, &mtr);
|
||||
buf_page_x_lock(block, &mtr);
|
||||
|
||||
frame = buf_block_get_frame(block);
|
||||
|
||||
page = page_create(frame, &mtr);
|
||||
|
||||
for (i = 0; i < 512; i++) {
|
||||
|
||||
rnd = (rnd + 534671) % 512;
|
||||
|
||||
if (i % 27 == 0) {
|
||||
ut_a(page_validate(page, index));
|
||||
}
|
||||
|
||||
dtuple_gen_test_tuple(tuple, rnd);
|
||||
|
||||
/* dtuple_print(tuple);*/
|
||||
|
||||
page_cur_search(page, tuple, PAGE_CUR_G, &cursor);
|
||||
|
||||
rec = page_cur_insert_rec(&cursor, tuple, NULL, &mtr);
|
||||
|
||||
ut_a(rec);
|
||||
|
||||
rec_validate(rec);
|
||||
/* page_print_list(page, 151); */
|
||||
}
|
||||
|
||||
/* page_print_list(page, 151); */
|
||||
|
||||
ut_a(page_validate(page, index));
|
||||
ut_a(page_get_n_recs(page) == 512);
|
||||
|
||||
for (i = 0; i < 512; i++) {
|
||||
|
||||
rnd = (rnd + 7771) % 512;
|
||||
|
||||
if (i % 27 == 0) {
|
||||
ut_a(page_validate(page, index));
|
||||
}
|
||||
|
||||
dtuple_gen_test_tuple(tuple, rnd);
|
||||
|
||||
/* dtuple_print(tuple);*/
|
||||
|
||||
page_cur_search(page, tuple, PAGE_CUR_G, &cursor);
|
||||
|
||||
page_cur_delete_rec(&cursor, &mtr);
|
||||
|
||||
ut_a(rec);
|
||||
|
||||
rec_validate(rec);
|
||||
/* page_print_list(page, 151); */
|
||||
}
|
||||
|
||||
ut_a(page_get_n_recs(page) == 0);
|
||||
|
||||
ut_a(page_validate(page, index));
|
||||
page = page_create(frame, &mtr);
|
||||
|
||||
rnd = 311;
|
||||
|
||||
for (i = 0; i < 512; i++) {
|
||||
|
||||
rnd = (rnd + 1) % 512;
|
||||
|
||||
if (i % 27 == 0) {
|
||||
ut_a(page_validate(page, index));
|
||||
}
|
||||
|
||||
dtuple_gen_test_tuple(tuple, rnd);
|
||||
|
||||
/* dtuple_print(tuple);*/
|
||||
|
||||
page_cur_search(page, tuple, PAGE_CUR_G, &cursor);
|
||||
|
||||
rec = page_cur_insert_rec(&cursor, tuple, NULL, &mtr);
|
||||
|
||||
ut_a(rec);
|
||||
|
||||
rec_validate(rec);
|
||||
/* page_print_list(page, 151); */
|
||||
}
|
||||
|
||||
ut_a(page_validate(page, index));
|
||||
ut_a(page_get_n_recs(page) == 512);
|
||||
|
||||
rnd = 217;
|
||||
|
||||
for (i = 0; i < 512; i++) {
|
||||
|
||||
rnd = (rnd + 1) % 512;
|
||||
|
||||
if (i % 27 == 0) {
|
||||
ut_a(page_validate(page, index));
|
||||
}
|
||||
|
||||
dtuple_gen_test_tuple(tuple, rnd);
|
||||
|
||||
/* dtuple_print(tuple);*/
|
||||
|
||||
page_cur_search(page, tuple, PAGE_CUR_G, &cursor);
|
||||
|
||||
page_cur_delete_rec(&cursor, &mtr);
|
||||
|
||||
ut_a(rec);
|
||||
|
||||
rec_validate(rec);
|
||||
/* page_print_list(page, 151); */
|
||||
}
|
||||
|
||||
ut_a(page_validate(page, index));
|
||||
ut_a(page_get_n_recs(page) == 0);
|
||||
page = page_create(frame, &mtr);
|
||||
|
||||
rnd = 291;
|
||||
|
||||
for (i = 0; i < 512; i++) {
|
||||
|
||||
rnd = (rnd - 1) % 512;
|
||||
|
||||
if (i % 27 == 0) {
|
||||
ut_a(page_validate(page, index));
|
||||
}
|
||||
|
||||
dtuple_gen_test_tuple(tuple, rnd);
|
||||
|
||||
/* dtuple_print(tuple);*/
|
||||
|
||||
page_cur_search(page, tuple, PAGE_CUR_G, &cursor);
|
||||
|
||||
rec = page_cur_insert_rec(&cursor, tuple, NULL, &mtr);
|
||||
|
||||
ut_a(rec);
|
||||
|
||||
rec_validate(rec);
|
||||
/* page_print_list(page, 151); */
|
||||
}
|
||||
|
||||
ut_a(page_validate(page, index));
|
||||
ut_a(page_get_n_recs(page) == 512);
|
||||
|
||||
rnd = 277;
|
||||
|
||||
for (i = 0; i < 512; i++) {
|
||||
|
||||
rnd = (rnd - 1) % 512;
|
||||
|
||||
if (i % 27 == 0) {
|
||||
ut_a(page_validate(page, index));
|
||||
}
|
||||
|
||||
dtuple_gen_test_tuple(tuple, rnd);
|
||||
|
||||
/* dtuple_print(tuple);*/
|
||||
|
||||
page_cur_search(page, tuple, PAGE_CUR_G, &cursor);
|
||||
|
||||
page_cur_delete_rec(&cursor, &mtr);
|
||||
|
||||
ut_a(rec);
|
||||
|
||||
rec_validate(rec);
|
||||
/* page_print_list(page, 151); */
|
||||
}
|
||||
|
||||
ut_a(page_validate(page, index));
|
||||
ut_a(page_get_n_recs(page) == 0);
|
||||
|
||||
mtr_commit(&mtr);
|
||||
mem_heap_free(heap);
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
Test for index page. */
|
||||
|
||||
void
|
||||
test2(void)
|
||||
/*=======*/
|
||||
{
|
||||
page_t* page;
|
||||
dtuple_t* tuple;
|
||||
mem_heap_t* heap;
|
||||
ulint i, j;
|
||||
ulint rnd = 0;
|
||||
rec_t* rec;
|
||||
page_cur_t cursor;
|
||||
dict_index_t* index;
|
||||
dict_table_t* table;
|
||||
buf_block_t* block;
|
||||
buf_frame_t* frame;
|
||||
ulint tm, oldtm;
|
||||
byte buf[8];
|
||||
mtr_t mtr;
|
||||
|
||||
printf("-------------------------------------------------\n");
|
||||
printf("TEST 2. Speed test\n");
|
||||
|
||||
oldtm = ut_clock();
|
||||
|
||||
for (i = 0; i < 1000 * UNIV_DBC * UNIV_DBC; i++) {
|
||||
ut_memcpy(bigbuf, bigbuf + 800, 800);
|
||||
}
|
||||
|
||||
tm = ut_clock();
|
||||
printf("Wall time for %lu mem copys of 800 bytes %lu millisecs\n",
|
||||
i, tm - oldtm);
|
||||
|
||||
oldtm = ut_clock();
|
||||
|
||||
rnd = 0;
|
||||
for (i = 0; i < 1000 * UNIV_DBC * UNIV_DBC; i++) {
|
||||
ut_memcpy(bigbuf + rnd, bigbuf + rnd + 800, 800);
|
||||
rnd += 1600;
|
||||
if (rnd > 995000) {
|
||||
rnd = 0;
|
||||
}
|
||||
}
|
||||
|
||||
tm = ut_clock();
|
||||
printf("Wall time for %lu mem copys of 800 bytes %lu millisecs\n",
|
||||
i, tm - oldtm);
|
||||
|
||||
heap = mem_heap_create(0);
|
||||
|
||||
table = dict_table_create("TS_TABLE2", 2);
|
||||
|
||||
dict_table_add_col(table, "COL1", DATA_VARCHAR, DATA_ENGLISH, 10, 0);
|
||||
dict_table_add_col(table, "COL2", DATA_VARCHAR, DATA_ENGLISH, 10, 0);
|
||||
|
||||
ut_a(0 == dict_table_publish(table));
|
||||
|
||||
index = dict_index_create("TS_TABLE2", "IND2", 0, 2, 0);
|
||||
|
||||
dict_index_add_field(index, "COL1", 0);
|
||||
dict_index_add_field(index, "COL2", 0);
|
||||
|
||||
ut_a(0 == dict_index_publish(index));
|
||||
|
||||
index = dict_index_get("TS_TABLE2", "IND2");
|
||||
ut_a(index);
|
||||
|
||||
tuple = dtuple_create(heap, 2);
|
||||
|
||||
oldtm = ut_clock();
|
||||
|
||||
rnd = 677;
|
||||
for (i = 0; i < 4 * UNIV_DBC * UNIV_DBC; i++) {
|
||||
|
||||
mtr_start(&mtr);
|
||||
|
||||
block = buf_page_create(0, 5, &mtr);
|
||||
buf_page_x_lock(block, &mtr);
|
||||
|
||||
frame = buf_block_get_frame(block);
|
||||
|
||||
page = page_create(frame, &mtr);
|
||||
|
||||
for (j = 0; j < 250; j++) {
|
||||
rnd = (rnd + 54841) % 1000;
|
||||
dtuple_gen_test_tuple2(tuple, rnd, buf);
|
||||
page_cur_search(page, tuple, PAGE_CUR_G, &cursor);
|
||||
|
||||
rec = page_cur_insert_rec(&cursor, tuple, NULL, &mtr);
|
||||
ut_a(rec);
|
||||
}
|
||||
mtr_commit(&mtr);
|
||||
}
|
||||
|
||||
tm = ut_clock();
|
||||
printf("Wall time for insertion of %lu recs %lu milliseconds\n",
|
||||
i * j, tm - oldtm);
|
||||
|
||||
mtr_start(&mtr);
|
||||
|
||||
block = buf_page_get(0, 5, &mtr);
|
||||
buf_page_s_lock(block, &mtr);
|
||||
|
||||
page = buf_block_get_frame(block);
|
||||
ut_a(page_validate(page, index));
|
||||
mtr_commit(&mtr);
|
||||
|
||||
oldtm = ut_clock();
|
||||
|
||||
rnd = 677;
|
||||
for (i = 0; i < 4 * UNIV_DBC * UNIV_DBC; i++) {
|
||||
mtr_start(&mtr);
|
||||
|
||||
block = buf_page_create(0, 5, &mtr);
|
||||
buf_page_x_lock(block, &mtr);
|
||||
|
||||
frame = buf_block_get_frame(block);
|
||||
|
||||
page = page_create(frame, &mtr);
|
||||
|
||||
for (j = 0; j < 250; j++) {
|
||||
rnd = (rnd + 54841) % 1000;
|
||||
dtuple_gen_test_tuple2(tuple, rnd, buf);
|
||||
}
|
||||
mtr_commit(&mtr);
|
||||
}
|
||||
|
||||
tm = ut_clock();
|
||||
printf(
|
||||
"Wall time for %lu empty loops with page create %lu milliseconds\n",
|
||||
i * j, tm - oldtm);
|
||||
|
||||
oldtm = ut_clock();
|
||||
|
||||
for (i = 0; i < 4 * UNIV_DBC * UNIV_DBC; i++) {
|
||||
|
||||
mtr_start(&mtr);
|
||||
|
||||
block = buf_page_create(0, 5, &mtr);
|
||||
buf_page_x_lock(block, &mtr);
|
||||
|
||||
frame = buf_block_get_frame(block);
|
||||
|
||||
page = page_create(frame, &mtr);
|
||||
|
||||
rnd = 100;
|
||||
for (j = 0; j < 250; j++) {
|
||||
rnd = (rnd + 1) % 1000;
|
||||
dtuple_gen_test_tuple2(tuple, rnd, buf);
|
||||
page_cur_search(page, tuple, PAGE_CUR_G, &cursor);
|
||||
|
||||
rec = page_cur_insert_rec(&cursor, tuple, NULL, &mtr);
|
||||
ut_a(rec);
|
||||
}
|
||||
mtr_commit(&mtr);
|
||||
}
|
||||
|
||||
tm = ut_clock();
|
||||
printf(
|
||||
"Wall time for sequential insertion of %lu recs %lu milliseconds\n",
|
||||
i * j, tm - oldtm);
|
||||
|
||||
|
||||
oldtm = ut_clock();
|
||||
|
||||
for (i = 0; i < 4 * UNIV_DBC * UNIV_DBC; i++) {
|
||||
mtr_start(&mtr);
|
||||
|
||||
block = buf_page_create(0, 5, &mtr);
|
||||
buf_page_x_lock(block, &mtr);
|
||||
|
||||
frame = buf_block_get_frame(block);
|
||||
|
||||
page = page_create(frame, &mtr);
|
||||
|
||||
rnd = 500;
|
||||
for (j = 0; j < 250; j++) {
|
||||
rnd = (rnd - 1) % 1000;
|
||||
dtuple_gen_test_tuple2(tuple, rnd, buf);
|
||||
page_cur_search(page, tuple, PAGE_CUR_G, &cursor);
|
||||
|
||||
rec = page_cur_insert_rec(&cursor, tuple, NULL, &mtr);
|
||||
ut_a(rec);
|
||||
}
|
||||
mtr_commit(&mtr);
|
||||
}
|
||||
|
||||
tm = ut_clock();
|
||||
printf(
|
||||
"Wall time for descend. seq. insertion of %lu recs %lu milliseconds\n",
|
||||
i * j, tm - oldtm);
|
||||
|
||||
oldtm = ut_clock();
|
||||
|
||||
for (i = 0; i < 4 * UNIV_DBC * UNIV_DBC; i++) {
|
||||
mtr_start(&mtr);
|
||||
|
||||
block = buf_page_create(0, 5, &mtr);
|
||||
buf_page_x_lock(block, &mtr);
|
||||
|
||||
frame = buf_block_get_frame(block);
|
||||
|
||||
page = page_create(frame, &mtr);
|
||||
|
||||
rnd = 677;
|
||||
|
||||
for (j = 0; j < 250; j++) {
|
||||
rnd = (rnd + 54841) % 1000;
|
||||
dtuple_gen_test_tuple2(tuple, rnd, buf);
|
||||
page_cur_search(page, tuple, PAGE_CUR_G, &cursor);
|
||||
|
||||
rec = page_cur_insert_rec(&cursor, tuple, NULL, &mtr);
|
||||
ut_a(rec);
|
||||
}
|
||||
|
||||
rnd = 677;
|
||||
for (j = 0; j < 250; j++) {
|
||||
rnd = (rnd + 54841) % 1000;
|
||||
dtuple_gen_test_tuple2(tuple, rnd, buf);
|
||||
page_cur_search(page, tuple, PAGE_CUR_G, &cursor);
|
||||
|
||||
page_cur_delete_rec(&cursor, &mtr);
|
||||
}
|
||||
ut_a(page_get_n_recs(page) == 0);
|
||||
|
||||
mtr_commit(&mtr);
|
||||
}
|
||||
|
||||
tm = ut_clock();
|
||||
printf("Wall time for insert and delete of %lu recs %lu milliseconds\n",
|
||||
i * j, tm - oldtm);
|
||||
|
||||
mtr_start(&mtr);
|
||||
|
||||
block = buf_page_create(0, 5, &mtr);
|
||||
buf_page_x_lock(block, &mtr);
|
||||
|
||||
frame = buf_block_get_frame(block);
|
||||
|
||||
page = page_create(frame, &mtr);
|
||||
|
||||
rnd = 677;
|
||||
|
||||
for (j = 0; j < 250; j++) {
|
||||
rnd = (rnd + 54841) % 1000;
|
||||
dtuple_gen_test_tuple2(tuple, rnd, buf);
|
||||
page_cur_search(page, tuple, PAGE_CUR_G, &cursor);
|
||||
|
||||
rec = page_cur_insert_rec(&cursor, tuple, NULL, &mtr);
|
||||
ut_a(rec);
|
||||
}
|
||||
ut_a(page_validate(page, index));
|
||||
mtr_print(&mtr);
|
||||
|
||||
oldtm = ut_clock();
|
||||
|
||||
for (i = 0; i < 4 * UNIV_DBC * UNIV_DBC; i++) {
|
||||
rnd = 677;
|
||||
for (j = 0; j < 250; j++) {
|
||||
rnd = (rnd + 54841) % 1000;
|
||||
dtuple_gen_test_tuple2(tuple, rnd, buf);
|
||||
page_cur_search(page, tuple, PAGE_CUR_G, &cursor);
|
||||
}
|
||||
}
|
||||
|
||||
tm = ut_clock();
|
||||
printf("Wall time for search of %lu recs %lu milliseconds\n",
|
||||
i * j, tm - oldtm);
|
||||
|
||||
oldtm = ut_clock();
|
||||
|
||||
for (i = 0; i < 4 * UNIV_DBC * UNIV_DBC; i++) {
|
||||
rnd = 677;
|
||||
for (j = 0; j < 250; j++) {
|
||||
rnd = (rnd + 54841) % 1000;
|
||||
dtuple_gen_test_tuple2(tuple, rnd, buf);
|
||||
}
|
||||
}
|
||||
|
||||
tm = ut_clock();
|
||||
printf("Wall time for %lu empty loops %lu milliseconds\n",
|
||||
i * j, tm - oldtm);
|
||||
mtr_commit(&mtr);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/********************************************************************
|
||||
Main test function. */
|
||||
|
||||
void
|
||||
main(void)
|
||||
/*======*/
|
||||
{
|
||||
ulint tm, oldtm;
|
||||
|
||||
sync_init();
|
||||
mem_init();
|
||||
os_aio_init(160, 5);
|
||||
fil_init(25);
|
||||
buf_pool_init(POOL_SIZE, POOL_SIZE);
|
||||
dict_init();
|
||||
fsp_init();
|
||||
log_init();
|
||||
|
||||
create_files();
|
||||
|
||||
init_space();
|
||||
|
||||
oldtm = ut_clock();
|
||||
|
||||
ut_rnd_set_seed(19);
|
||||
|
||||
test1();
|
||||
|
||||
/* mem_print_info(); */
|
||||
|
||||
tm = ut_clock();
|
||||
printf("Wall time for test %lu milliseconds\n", tm - oldtm);
|
||||
printf("TESTS COMPLETED SUCCESSFULLY!\n");
|
||||
}
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,802 +0,0 @@
|
||||
/************************************************************************
|
||||
Test for the B-tree
|
||||
|
||||
(c) 1994-1997 Innobase Oy
|
||||
|
||||
Created 2/16/1996 Heikki Tuuri
|
||||
*************************************************************************/
|
||||
|
||||
#include "os0proc.h"
|
||||
#include "sync0sync.h"
|
||||
#include "ut0mem.h"
|
||||
#include "mem0mem.h"
|
||||
#include "mem0pool.h"
|
||||
#include "data0data.h"
|
||||
#include "data0type.h"
|
||||
#include "dict0dict.h"
|
||||
#include "buf0buf.h"
|
||||
#include "os0file.h"
|
||||
#include "os0thread.h"
|
||||
#include "fil0fil.h"
|
||||
#include "fsp0fsp.h"
|
||||
#include "rem0rec.h"
|
||||
#include "rem0cmp.h"
|
||||
#include "mtr0mtr.h"
|
||||
#include "log0log.h"
|
||||
#include "page0page.h"
|
||||
#include "page0cur.h"
|
||||
#include "trx0trx.h"
|
||||
#include "dict0boot.h"
|
||||
#include "trx0sys.h"
|
||||
#include "dict0crea.h"
|
||||
#include "btr0btr.h"
|
||||
#include "btr0pcur.h"
|
||||
#include "btr0cur.h"
|
||||
#include "btr0sea.h"
|
||||
#include "rem0rec.h"
|
||||
#include "srv0srv.h"
|
||||
#include "que0que.h"
|
||||
#include "com0com.h"
|
||||
#include "usr0sess.h"
|
||||
#include "lock0lock.h"
|
||||
#include "trx0roll.h"
|
||||
#include "trx0purge.h"
|
||||
#include "row0ins.h"
|
||||
#include "row0upd.h"
|
||||
#include "row0row.h"
|
||||
#include "row0del.h"
|
||||
#include "lock0lock.h"
|
||||
#include "ibuf0ibuf.h"
|
||||
|
||||
os_file_t files[1000];
|
||||
|
||||
mutex_t ios_mutex;
|
||||
ulint ios;
|
||||
ulint n[10];
|
||||
|
||||
mutex_t incs_mutex;
|
||||
ulint incs;
|
||||
|
||||
#define N_SPACES 2 /* must be >= 2 */
|
||||
#define N_FILES 1
|
||||
#define FILE_SIZE 8096 /* must be > 512 */
|
||||
#define POOL_SIZE 1024
|
||||
#define IBUF_SIZE 200
|
||||
#define COUNTER_OFFSET 1500
|
||||
|
||||
#define LOOP_SIZE 150
|
||||
#define N_THREADS 5
|
||||
|
||||
#define COUNT 1
|
||||
|
||||
ulint zero = 0;
|
||||
|
||||
buf_block_t* bl_arr[POOL_SIZE];
|
||||
|
||||
ulint dummy = 0;
|
||||
|
||||
byte test_buf[8000];
|
||||
|
||||
/************************************************************************
|
||||
Io-handler thread function. */
|
||||
|
||||
ulint
|
||||
handler_thread(
|
||||
/*===========*/
|
||||
void* arg)
|
||||
{
|
||||
ulint segment;
|
||||
void* mess;
|
||||
ulint i;
|
||||
bool ret;
|
||||
|
||||
segment = *((ulint*)arg);
|
||||
|
||||
printf("Io handler thread %lu starts\n", segment);
|
||||
|
||||
for (i = 0;; i++) {
|
||||
ret = fil_aio_wait(segment, &mess);
|
||||
ut_a(ret);
|
||||
|
||||
buf_page_io_complete((buf_block_t*)mess);
|
||||
|
||||
mutex_enter(&ios_mutex);
|
||||
ios++;
|
||||
mutex_exit(&ios_mutex);
|
||||
|
||||
}
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
/*************************************************************************
|
||||
Creates the files for the file system test and inserts them to the file
|
||||
system. */
|
||||
|
||||
void
|
||||
create_files(void)
|
||||
/*==============*/
|
||||
{
|
||||
bool ret;
|
||||
ulint i, k;
|
||||
char name[20];
|
||||
os_thread_t thr[10];
|
||||
os_thread_id_t id[10];
|
||||
|
||||
printf("--------------------------------------------------------\n");
|
||||
printf("Create or open database files\n");
|
||||
|
||||
strcpy(name, "tsfile00");
|
||||
|
||||
for (k = 0; k < N_SPACES; k++) {
|
||||
for (i = 0; i < N_FILES; i++) {
|
||||
|
||||
name[6] = (char)((ulint)'0' + k);
|
||||
name[7] = (char)((ulint)'0' + i);
|
||||
|
||||
files[i] = os_file_create(name, OS_FILE_CREATE,
|
||||
OS_FILE_TABLESPACE, &ret);
|
||||
if (ret == FALSE) {
|
||||
ut_a(os_file_get_last_error() ==
|
||||
OS_FILE_ALREADY_EXISTS);
|
||||
|
||||
files[i] = os_file_create(
|
||||
name, OS_FILE_OPEN,
|
||||
OS_FILE_TABLESPACE, &ret);
|
||||
ut_a(ret);
|
||||
} else {
|
||||
if (k == 1) {
|
||||
ut_a(os_file_set_size(files[i],
|
||||
8192 * IBUF_SIZE, 0));
|
||||
} else {
|
||||
ut_a(os_file_set_size(files[i],
|
||||
8192 * FILE_SIZE, 0));
|
||||
}
|
||||
}
|
||||
|
||||
ret = os_file_close(files[i]);
|
||||
ut_a(ret);
|
||||
|
||||
if (i == 0) {
|
||||
fil_space_create(name, k, OS_FILE_TABLESPACE);
|
||||
}
|
||||
|
||||
ut_a(fil_validate());
|
||||
|
||||
fil_node_create(name, FILE_SIZE, k);
|
||||
}
|
||||
}
|
||||
|
||||
ios = 0;
|
||||
|
||||
mutex_create(&ios_mutex);
|
||||
mutex_set_level(&ios_mutex, SYNC_NO_ORDER_CHECK);
|
||||
|
||||
for (i = 0; i < 9; i++) {
|
||||
n[i] = i;
|
||||
|
||||
thr[i] = os_thread_create(handler_thread, n + i, id + i);
|
||||
}
|
||||
}
|
||||
|
||||
/************************************************************************
|
||||
Inits space headers of spaces 0 and 1. */
|
||||
|
||||
void
|
||||
init_spaces(void)
|
||||
/*=============*/
|
||||
{
|
||||
mtr_t mtr;
|
||||
|
||||
mtr_start(&mtr);
|
||||
|
||||
fsp_header_init(0, FILE_SIZE * N_FILES, &mtr);
|
||||
fsp_header_init(1, IBUF_SIZE, &mtr);
|
||||
|
||||
mtr_commit(&mtr);
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
Test for table creation. */
|
||||
|
||||
ulint
|
||||
test1(
|
||||
/*==*/
|
||||
void* arg)
|
||||
{
|
||||
sess_t* sess;
|
||||
com_endpoint_t* com_endpoint;
|
||||
mem_heap_t* heap;
|
||||
dict_index_t* index;
|
||||
dict_table_t* table;
|
||||
que_fork_t* fork;
|
||||
que_thr_t* thr;
|
||||
trx_t* trx;
|
||||
|
||||
UT_NOT_USED(arg);
|
||||
|
||||
printf("-------------------------------------------------\n");
|
||||
printf("TEST 1. CREATE TABLE WITH 3 COLUMNS AND WITH 3 INDEXES\n");
|
||||
|
||||
heap = mem_heap_create(512);
|
||||
|
||||
com_endpoint = (com_endpoint_t*)heap; /* This is a dummy non-NULL
|
||||
value */
|
||||
mutex_enter(&kernel_mutex);
|
||||
|
||||
sess = sess_open(ut_dulint_zero, com_endpoint, (byte*)"user1", 6);
|
||||
|
||||
trx = sess->trx;
|
||||
|
||||
mutex_exit(&kernel_mutex);
|
||||
|
||||
ut_a(trx_start(trx, ULINT_UNDEFINED));
|
||||
|
||||
table = dict_mem_table_create("TS_TABLE1", 0, 3);
|
||||
|
||||
dict_mem_table_add_col(table, "COL1", DATA_VARCHAR,
|
||||
DATA_ENGLISH, 10, 0);
|
||||
dict_mem_table_add_col(table, "COL2", DATA_VARCHAR,
|
||||
DATA_ENGLISH, 10, 0);
|
||||
dict_mem_table_add_col(table, "COL3", DATA_VARCHAR,
|
||||
DATA_ENGLISH, 100, 0);
|
||||
/*------------------------------------*/
|
||||
/* CREATE TABLE */
|
||||
|
||||
fork = que_fork_create(NULL, NULL, QUE_FORK_EXECUTE, heap);
|
||||
fork->trx = trx;
|
||||
|
||||
thr = que_thr_create(fork, fork, heap);
|
||||
|
||||
thr->child = tab_create_graph_create(fork, thr, table, heap);
|
||||
|
||||
mutex_enter(&kernel_mutex);
|
||||
|
||||
que_graph_publish(fork, trx->sess);
|
||||
|
||||
trx->graph = fork;
|
||||
|
||||
ut_a(thr == que_fork_start_command(fork, SESS_COMM_EXECUTE, 0));
|
||||
|
||||
mutex_exit(&kernel_mutex);
|
||||
|
||||
que_run_threads(thr);
|
||||
|
||||
/* dict_table_print_by_name("SYS_TABLES");
|
||||
dict_table_print_by_name("SYS_COLUMNS"); */
|
||||
/*-------------------------------------*/
|
||||
/* CREATE CLUSTERED INDEX */
|
||||
|
||||
index = dict_mem_index_create("TS_TABLE1", "IND1", 0,
|
||||
DICT_UNIQUE | DICT_CLUSTERED, 1);
|
||||
dict_mem_index_add_field(index, "COL1", 0);
|
||||
|
||||
ut_a(mem_heap_validate(index->heap));
|
||||
|
||||
fork = que_fork_create(NULL, NULL, QUE_FORK_EXECUTE, heap);
|
||||
fork->trx = trx;
|
||||
|
||||
thr = que_thr_create(fork, fork, heap);
|
||||
|
||||
thr->child = ind_create_graph_create(fork, thr, index, heap);
|
||||
|
||||
mutex_enter(&kernel_mutex);
|
||||
|
||||
que_graph_publish(fork, trx->sess);
|
||||
|
||||
trx->graph = fork;
|
||||
|
||||
ut_a(thr == que_fork_start_command(fork, SESS_COMM_EXECUTE, 0));
|
||||
|
||||
mutex_exit(&kernel_mutex);
|
||||
|
||||
que_run_threads(thr);
|
||||
|
||||
/* dict_table_print_by_name("SYS_INDEXES");
|
||||
dict_table_print_by_name("SYS_FIELDS"); */
|
||||
|
||||
/*-------------------------------------*/
|
||||
/* CREATE SECONDARY INDEX */
|
||||
|
||||
index = dict_mem_index_create("TS_TABLE1", "IND2", 0, 0, 1);
|
||||
|
||||
dict_mem_index_add_field(index, "COL2", 0);
|
||||
|
||||
ut_a(mem_heap_validate(index->heap));
|
||||
|
||||
fork = que_fork_create(NULL, NULL, QUE_FORK_EXECUTE, heap);
|
||||
fork->trx = trx;
|
||||
|
||||
thr = que_thr_create(fork, fork, heap);
|
||||
|
||||
thr->child = ind_create_graph_create(fork, thr, index, heap);
|
||||
|
||||
mutex_enter(&kernel_mutex);
|
||||
|
||||
que_graph_publish(fork, trx->sess);
|
||||
|
||||
trx->graph = fork;
|
||||
|
||||
ut_a(thr == que_fork_start_command(fork, SESS_COMM_EXECUTE, 0));
|
||||
|
||||
mutex_exit(&kernel_mutex);
|
||||
|
||||
que_run_threads(thr);
|
||||
|
||||
/* dict_table_print_by_name("SYS_INDEXES");
|
||||
dict_table_print_by_name("SYS_FIELDS"); */
|
||||
|
||||
/*-------------------------------------*/
|
||||
/* CREATE ANOTHER SECONDARY INDEX */
|
||||
|
||||
index = dict_mem_index_create("TS_TABLE1", "IND3", 0, 0, 1);
|
||||
|
||||
dict_mem_index_add_field(index, "COL2", 0);
|
||||
|
||||
ut_a(mem_heap_validate(index->heap));
|
||||
|
||||
fork = que_fork_create(NULL, NULL, QUE_FORK_EXECUTE, heap);
|
||||
fork->trx = trx;
|
||||
|
||||
thr = que_thr_create(fork, fork, heap);
|
||||
|
||||
thr->child = ind_create_graph_create(fork, thr, index, heap);
|
||||
|
||||
mutex_enter(&kernel_mutex);
|
||||
|
||||
que_graph_publish(fork, trx->sess);
|
||||
|
||||
trx->graph = fork;
|
||||
|
||||
ut_a(thr == que_fork_start_command(fork, SESS_COMM_EXECUTE, 0));
|
||||
|
||||
mutex_exit(&kernel_mutex);
|
||||
|
||||
que_run_threads(thr);
|
||||
|
||||
#ifdef notdefined
|
||||
/*-------------------------------------*/
|
||||
/* CREATE YET ANOTHER SECONDARY INDEX */
|
||||
|
||||
index = dict_mem_index_create("TS_TABLE1", "IND4", 0, 0, 1);
|
||||
|
||||
dict_mem_index_add_field(index, "COL2", 0);
|
||||
|
||||
ut_a(mem_heap_validate(index->heap));
|
||||
|
||||
fork = que_fork_create(NULL, NULL, QUE_FORK_EXECUTE, heap);
|
||||
fork->trx = trx;
|
||||
|
||||
thr = que_thr_create(fork, fork, heap);
|
||||
|
||||
thr->child = ind_create_graph_create(fork, thr, index, heap);
|
||||
|
||||
mutex_enter(&kernel_mutex);
|
||||
|
||||
que_graph_publish(fork, trx->sess);
|
||||
|
||||
trx->graph = fork;
|
||||
|
||||
ut_a(thr == que_fork_start_command(fork, SESS_COMM_EXECUTE, 0));
|
||||
|
||||
mutex_exit(&kernel_mutex);
|
||||
|
||||
que_run_threads(thr);
|
||||
#endif
|
||||
/* dict_table_print_by_name("SYS_INDEXES");
|
||||
dict_table_print_by_name("SYS_FIELDS"); */
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
Another test for inserts. */
|
||||
|
||||
ulint
|
||||
test2_1(
|
||||
/*====*/
|
||||
void* arg)
|
||||
{
|
||||
ulint tm, oldtm;
|
||||
sess_t* sess;
|
||||
com_endpoint_t* com_endpoint;
|
||||
mem_heap_t* heap;
|
||||
que_fork_t* fork;
|
||||
dict_table_t* table;
|
||||
que_thr_t* thr;
|
||||
trx_t* trx;
|
||||
ulint i;
|
||||
byte buf[100];
|
||||
ins_node_t* node;
|
||||
ulint count = 0;
|
||||
ulint rnd;
|
||||
dtuple_t* row;
|
||||
dict_index_t* index;
|
||||
/* dict_tree_t* tree;
|
||||
dtuple_t* entry;
|
||||
btr_pcur_t pcur;
|
||||
mtr_t mtr; */
|
||||
|
||||
printf("-------------------------------------------------\n");
|
||||
printf("TEST 2.1. MASSIVE ASCENDING INSERT\n");
|
||||
|
||||
heap = mem_heap_create(512);
|
||||
|
||||
com_endpoint = (com_endpoint_t*)heap; /* This is a dummy non-NULL
|
||||
value */
|
||||
mutex_enter(&kernel_mutex);
|
||||
|
||||
sess = sess_open(ut_dulint_zero, com_endpoint, (byte*)"user1", 6);
|
||||
|
||||
trx = sess->trx;
|
||||
|
||||
mutex_exit(&kernel_mutex);
|
||||
loop:
|
||||
ut_a(trx_start(trx, ULINT_UNDEFINED));
|
||||
|
||||
/*-------------------------------------*/
|
||||
/* MASSIVE INSERT */
|
||||
fork = que_fork_create(NULL, NULL, QUE_FORK_INSERT, heap);
|
||||
fork->trx = trx;
|
||||
|
||||
thr = que_thr_create(fork, fork, heap);
|
||||
|
||||
table = dict_table_get("TS_TABLE1", trx);
|
||||
|
||||
row = dtuple_create(heap, 3 + DATA_N_SYS_COLS);
|
||||
|
||||
dict_table_copy_types(row, table);
|
||||
|
||||
node = ins_node_create(fork, thr, row, table, heap);
|
||||
|
||||
thr->child = node;
|
||||
|
||||
row_ins_init_sys_fields_at_sql_compile(node->row, node->table, heap);
|
||||
row_ins_init_sys_fields_at_sql_prepare(node->row, node->table, trx);
|
||||
|
||||
node->init_all_sys_fields = FALSE;
|
||||
|
||||
mutex_enter(&kernel_mutex);
|
||||
|
||||
que_graph_publish(fork, trx->sess);
|
||||
|
||||
trx->graph = fork;
|
||||
|
||||
mutex_exit(&kernel_mutex);
|
||||
|
||||
rnd = 0;
|
||||
|
||||
log_print();
|
||||
|
||||
oldtm = ut_clock();
|
||||
|
||||
for (i = 0; i < *((ulint*)arg); i++) {
|
||||
|
||||
dtuple_gen_test_tuple3(row, rnd, DTUPLE_TEST_FIXED30, buf);
|
||||
|
||||
mutex_enter(&kernel_mutex);
|
||||
|
||||
ut_a(
|
||||
thr == que_fork_start_command(fork, SESS_COMM_EXECUTE, 0));
|
||||
|
||||
mutex_exit(&kernel_mutex);
|
||||
|
||||
que_run_threads(thr);
|
||||
|
||||
if (i % 5000 == 0) {
|
||||
/* ibuf_print(); */
|
||||
/* buf_print(); */
|
||||
|
||||
/* buf_print_io(); */
|
||||
/*
|
||||
tm = ut_clock();
|
||||
printf("Wall time for %lu inserts %lu milliseconds\n",
|
||||
i, tm - oldtm); */
|
||||
}
|
||||
|
||||
rnd = rnd + 1;
|
||||
}
|
||||
|
||||
tm = ut_clock();
|
||||
printf("Wall time for %lu inserts %lu milliseconds\n", i, tm - oldtm);
|
||||
|
||||
log_print();
|
||||
|
||||
/* dict_table_print_by_name("TS_TABLE1"); */
|
||||
|
||||
/* ibuf_print(); */
|
||||
|
||||
index = index;
|
||||
|
||||
index = dict_table_get_first_index(table);
|
||||
|
||||
if (zero) {
|
||||
btr_search_index_print_info(index);
|
||||
}
|
||||
|
||||
btr_validate_tree(dict_index_get_tree(index));
|
||||
|
||||
#ifdef notdefined
|
||||
index = dict_table_get_next_index(index);
|
||||
|
||||
if (zero) {
|
||||
btr_search_index_print_info(index);
|
||||
}
|
||||
|
||||
btr_validate_tree(dict_index_get_tree(index));
|
||||
|
||||
index = dict_table_get_next_index(index);
|
||||
|
||||
/* btr_search_index_print_info(index); */
|
||||
|
||||
btr_validate_tree(dict_index_get_tree(index));
|
||||
|
||||
/* dict_table_print_by_name("TS_TABLE1"); */
|
||||
|
||||
/* Check inserted entries */
|
||||
|
||||
btr_search_print_info();
|
||||
|
||||
entry = dtuple_create(heap, 1);
|
||||
dtuple_gen_search_tuple3(entry, 0, buf);
|
||||
|
||||
mtr_start(&mtr);
|
||||
|
||||
index = dict_table_get_first_index(table);
|
||||
tree = dict_index_get_tree(index);
|
||||
|
||||
btr_pcur_open(index, entry, PAGE_CUR_L, BTR_SEARCH_LEAF, &pcur, &mtr);
|
||||
ut_a(btr_pcur_is_before_first_in_tree(&pcur, &mtr));
|
||||
|
||||
for (i = 0; i < *((ulint*)arg); i++) {
|
||||
ut_a(btr_pcur_move_to_next(&pcur, &mtr));
|
||||
|
||||
dtuple_gen_search_tuple3(entry, i, buf);
|
||||
|
||||
ut_a(0 == cmp_dtuple_rec(entry, btr_pcur_get_rec(&pcur)));
|
||||
}
|
||||
|
||||
ut_a(!btr_pcur_move_to_next(&pcur, &mtr));
|
||||
ut_a(btr_pcur_is_after_last_in_tree(&pcur, &mtr));
|
||||
|
||||
btr_pcur_close(&pcur);
|
||||
mtr_commit(&mtr);
|
||||
|
||||
printf("Validating tree\n");
|
||||
btr_validate_tree(tree);
|
||||
printf("Validated\n");
|
||||
#endif
|
||||
/*-------------------------------------*/
|
||||
/* ROLLBACK */
|
||||
|
||||
#ifdef notdefined
|
||||
/* btr_validate_tree(tree); */
|
||||
|
||||
fork = que_fork_create(NULL, NULL, QUE_FORK_EXECUTE, heap);
|
||||
fork->trx = trx;
|
||||
|
||||
thr = que_thr_create(fork, fork, heap);
|
||||
|
||||
thr->child = roll_node_create(fork, thr, heap);
|
||||
|
||||
mutex_enter(&kernel_mutex);
|
||||
|
||||
que_graph_publish(fork, trx->sess);
|
||||
|
||||
trx->graph = fork;
|
||||
|
||||
ut_a(thr == que_fork_start_command(fork, SESS_COMM_EXECUTE, 0));
|
||||
|
||||
mutex_exit(&kernel_mutex);
|
||||
|
||||
oldtm = ut_clock();
|
||||
|
||||
que_run_threads(thr);
|
||||
|
||||
tm = ut_clock();
|
||||
printf("Wall time for rollback of %lu inserts %lu milliseconds\n",
|
||||
i, tm - oldtm);
|
||||
|
||||
os_thread_sleep(1000000);
|
||||
|
||||
/* dict_table_print_by_name("TS_TABLE1"); */
|
||||
|
||||
dtuple_gen_search_tuple3(entry, 0, buf);
|
||||
|
||||
mtr_start(&mtr);
|
||||
|
||||
btr_pcur_open(index, entry, PAGE_CUR_L, BTR_SEARCH_LEAF, &pcur, &mtr);
|
||||
ut_a(btr_pcur_is_before_first_in_tree(&pcur, &mtr));
|
||||
|
||||
ut_a(!btr_pcur_move_to_next(&pcur, &mtr));
|
||||
|
||||
ut_a(btr_pcur_is_after_last_in_tree(&pcur, &mtr));
|
||||
|
||||
btr_pcur_close(&pcur);
|
||||
mtr_commit(&mtr);
|
||||
|
||||
btr_search_print_info();
|
||||
#endif
|
||||
/*-------------------------------------*/
|
||||
/* COMMIT */
|
||||
fork = que_fork_create(NULL, NULL, QUE_FORK_EXECUTE, heap);
|
||||
fork->trx = trx;
|
||||
|
||||
thr = que_thr_create(fork, fork, heap);
|
||||
|
||||
thr->child = commit_node_create(fork, thr, heap);
|
||||
|
||||
mutex_enter(&kernel_mutex);
|
||||
|
||||
que_graph_publish(fork, trx->sess);
|
||||
|
||||
trx->graph = fork;
|
||||
|
||||
ut_a(thr == que_fork_start_command(fork, SESS_COMM_EXECUTE, 0));
|
||||
|
||||
mutex_exit(&kernel_mutex);
|
||||
|
||||
oldtm = ut_clock();
|
||||
|
||||
que_run_threads(thr);
|
||||
|
||||
tm = ut_clock();
|
||||
printf("Wall time for commit %lu milliseconds\n", tm - oldtm);
|
||||
/*-------------------------------------*/
|
||||
|
||||
count++;
|
||||
/* btr_validate_tree(tree); */
|
||||
|
||||
if (count < 1) {
|
||||
goto loop;
|
||||
}
|
||||
|
||||
mem_heap_free(heap);
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
/********************************************************************
|
||||
Main test function. */
|
||||
|
||||
void
|
||||
main(void)
|
||||
/*======*/
|
||||
{
|
||||
ulint tm, oldtm;
|
||||
os_thread_id_t id[10];
|
||||
ulint n1000[10];
|
||||
ulint i;
|
||||
ulint n5000 = 500;
|
||||
ulint n2;
|
||||
|
||||
/* buf_debug_prints = TRUE; */
|
||||
log_do_write = TRUE;
|
||||
|
||||
srv_boot("initfile");
|
||||
os_aio_init(576, 9, 100);
|
||||
fil_init(25);
|
||||
buf_pool_init(POOL_SIZE, POOL_SIZE);
|
||||
fsp_init();
|
||||
log_init();
|
||||
lock_sys_create(1024);
|
||||
|
||||
create_files();
|
||||
|
||||
init_spaces();
|
||||
|
||||
sess_sys_init_at_db_start();
|
||||
|
||||
trx_sys_create();
|
||||
|
||||
dict_create();
|
||||
|
||||
/* os_thread_sleep(500000); */
|
||||
|
||||
oldtm = ut_clock();
|
||||
|
||||
ut_rnd_set_seed(19);
|
||||
|
||||
test1(NULL);
|
||||
|
||||
/* for (i = 0; i < 2; i++) {
|
||||
|
||||
n1000[i] = i;
|
||||
id[i] = id[i];
|
||||
|
||||
os_thread_create(test10mt, n1000 + i, id + i);
|
||||
}
|
||||
*/
|
||||
i = 4;
|
||||
|
||||
n1000[i] = i;
|
||||
id[i] = id[i];
|
||||
|
||||
/* os_thread_create(test10_4, n1000 + i, id + i); */
|
||||
|
||||
i = 5;
|
||||
|
||||
/* test10mt(&i);
|
||||
|
||||
i = 6;
|
||||
|
||||
test10mt(&i);
|
||||
|
||||
trx_purge();
|
||||
printf("%lu pages purged\n", purge_sys->n_pages_handled);
|
||||
|
||||
dict_table_print_by_name("TS_TABLE1"); */
|
||||
|
||||
/* os_thread_create(test_measure_cont, &n3, id + 0); */
|
||||
|
||||
/* mem_print_info(); */
|
||||
|
||||
/* dict_table_print_by_name("TS_TABLE1"); */
|
||||
|
||||
log_flush_up_to(ut_dulint_zero);
|
||||
|
||||
os_thread_sleep(500000);
|
||||
|
||||
n2 = 10000;
|
||||
|
||||
test2_1(&n2);
|
||||
|
||||
/* test9A(&n2);
|
||||
test9(&n2); */
|
||||
|
||||
/* test6(&n2); */
|
||||
|
||||
/* test2(&n2); */
|
||||
|
||||
/* test2_2(&n2); */
|
||||
|
||||
/* mem_print_info(); */
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
|
||||
n1000[i] = 1000 + 10 * i;
|
||||
id[i] = id[i];
|
||||
|
||||
/* os_thread_create(test2mt, n1000 + i, id + i);
|
||||
os_thread_create(test2_1mt, n1000 + i, id + i);
|
||||
os_thread_create(test2_2mt, n1000 + i, id + i); */
|
||||
}
|
||||
|
||||
n2 = 2000;
|
||||
|
||||
/* test2mt(&n2); */
|
||||
|
||||
/* buf_print();
|
||||
ibuf_print();
|
||||
rw_lock_list_print_info();
|
||||
mutex_list_print_info();
|
||||
|
||||
dict_table_print_by_name("TS_TABLE1"); */
|
||||
|
||||
/* mem_print_info(); */
|
||||
|
||||
n2 = 1000;
|
||||
|
||||
/* test4_1();
|
||||
test4_2();
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
n1000[i] = i;
|
||||
id[i] = id[i];
|
||||
os_thread_create(test4mt, n1000 + i, id + i);
|
||||
}
|
||||
|
||||
n2 = 4;
|
||||
test4mt(&n2);
|
||||
test4mt(&n2);
|
||||
test4_2();
|
||||
lock_print_info(); */
|
||||
|
||||
/* test7(&n2); */
|
||||
|
||||
/* os_thread_sleep(25000000); */
|
||||
|
||||
tm = ut_clock();
|
||||
printf("Wall time for test %lu milliseconds\n", tm - oldtm);
|
||||
printf("TESTS COMPLETED SUCCESSFULLY!\n");
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user