mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
merging
mysql-test/r/ps.result: Auto merged sql/sql_class.cc: Auto merged sql/sql_select.cc: Auto merged
This commit is contained in:
157
.bzrignore
157
.bzrignore
@ -45,6 +45,19 @@ COPYING
|
|||||||
COPYING.LIB
|
COPYING.LIB
|
||||||
Docs/#manual.texi#
|
Docs/#manual.texi#
|
||||||
Docs/INSTALL-BINARY
|
Docs/INSTALL-BINARY
|
||||||
|
Docs/Images/myaccess-odbc.txt
|
||||||
|
Docs/Images/myaccess.txt
|
||||||
|
Docs/Images/myarchitecture.txt
|
||||||
|
Docs/Images/mydll-properties.txt
|
||||||
|
Docs/Images/mydsn-example.txt
|
||||||
|
Docs/Images/mydsn-icon.txt
|
||||||
|
Docs/Images/mydsn-options.txt
|
||||||
|
Docs/Images/mydsn-setup.txt
|
||||||
|
Docs/Images/mydsn-test-fail.txt
|
||||||
|
Docs/Images/mydsn-test-success.txt
|
||||||
|
Docs/Images/mydsn-trace.txt
|
||||||
|
Docs/Images/mydsn.txt
|
||||||
|
Docs/Images/myflowchart.txt
|
||||||
Docs/include.texi
|
Docs/include.texi
|
||||||
Docs/internals.html
|
Docs/internals.html
|
||||||
Docs/internals.info
|
Docs/internals.info
|
||||||
@ -88,7 +101,9 @@ Makefile.in
|
|||||||
Makefile.in'
|
Makefile.in'
|
||||||
PENDING/*
|
PENDING/*
|
||||||
TAGS
|
TAGS
|
||||||
|
ac_available_languages_fragment
|
||||||
aclocal.m4
|
aclocal.m4
|
||||||
|
analyse.test
|
||||||
autom4te-2.53.cache/output.0
|
autom4te-2.53.cache/output.0
|
||||||
autom4te-2.53.cache/requests
|
autom4te-2.53.cache/requests
|
||||||
autom4te-2.53.cache/traces.0
|
autom4te-2.53.cache/traces.0
|
||||||
@ -241,6 +256,7 @@ client/mf_iocache.c
|
|||||||
client/mf_iocache.cc
|
client/mf_iocache.cc
|
||||||
client/mysql
|
client/mysql
|
||||||
client/mysqladmin
|
client/mysqladmin
|
||||||
|
client/mysqladmin.c
|
||||||
client/mysqlbinlog
|
client/mysqlbinlog
|
||||||
client/mysqlcheck
|
client/mysqlcheck
|
||||||
client/mysqldump
|
client/mysqldump
|
||||||
@ -287,6 +303,7 @@ gmon.out
|
|||||||
hardcopy.0
|
hardcopy.0
|
||||||
heap/hp_test1
|
heap/hp_test1
|
||||||
heap/hp_test2
|
heap/hp_test2
|
||||||
|
help
|
||||||
help.c
|
help.c
|
||||||
help.h
|
help.h
|
||||||
include/my_config.h
|
include/my_config.h
|
||||||
@ -355,7 +372,9 @@ libmysqld/field_conv.cc
|
|||||||
libmysqld/filesort.cc
|
libmysqld/filesort.cc
|
||||||
libmysqld/get_password.c
|
libmysqld/get_password.c
|
||||||
libmysqld/gstream.cc
|
libmysqld/gstream.cc
|
||||||
|
libmysqld/ha_archive.cc
|
||||||
libmysqld/ha_berkeley.cc
|
libmysqld/ha_berkeley.cc
|
||||||
|
libmysqld/ha_example.cc
|
||||||
libmysqld/ha_heap.cc
|
libmysqld/ha_heap.cc
|
||||||
libmysqld/ha_innobase.cc
|
libmysqld/ha_innobase.cc
|
||||||
libmysqld/ha_innodb.cc
|
libmysqld/ha_innodb.cc
|
||||||
@ -363,6 +382,7 @@ libmysqld/ha_isam.cc
|
|||||||
libmysqld/ha_isammrg.cc
|
libmysqld/ha_isammrg.cc
|
||||||
libmysqld/ha_myisam.cc
|
libmysqld/ha_myisam.cc
|
||||||
libmysqld/ha_myisammrg.cc
|
libmysqld/ha_myisammrg.cc
|
||||||
|
libmysqld/ha_tina.cc
|
||||||
libmysqld/handler.cc
|
libmysqld/handler.cc
|
||||||
libmysqld/hash_filo.cc
|
libmysqld/hash_filo.cc
|
||||||
libmysqld/hostname.cc
|
libmysqld/hostname.cc
|
||||||
@ -492,15 +512,71 @@ myisam/test2.MYD
|
|||||||
myisam/test2.MYI
|
myisam/test2.MYI
|
||||||
mysql-4.0.2-alpha-pc-linux-gnu-i686.tar.gz
|
mysql-4.0.2-alpha-pc-linux-gnu-i686.tar.gz
|
||||||
mysql-4.0.2-alpha.tar.gz
|
mysql-4.0.2-alpha.tar.gz
|
||||||
|
mysql-4.1.8-win-src.zip
|
||||||
mysql-max-4.0.2-alpha-pc-linux-gnu-i686.tar.gz
|
mysql-max-4.0.2-alpha-pc-linux-gnu-i686.tar.gz
|
||||||
mysql-test/gmon.out
|
mysql-test/gmon.out
|
||||||
mysql-test/install_test_db
|
mysql-test/install_test_db
|
||||||
mysql-test/mysql-test-run
|
mysql-test/mysql-test-run
|
||||||
|
mysql-test/mysql-test-run.log
|
||||||
|
mysql-test/mysql_test_run_new
|
||||||
mysql-test/ndb/ndbcluster
|
mysql-test/ndb/ndbcluster
|
||||||
mysql-test/r/*.reject
|
mysql-test/r/*.reject
|
||||||
|
mysql-test/r/alter_table.err
|
||||||
|
mysql-test/r/archive.err
|
||||||
|
mysql-test/r/bdb-alter-table-1.err
|
||||||
|
mysql-test/r/bdb-alter-table-2.err
|
||||||
|
mysql-test/r/bdb-crash.err
|
||||||
|
mysql-test/r/bdb-deadlock.err
|
||||||
|
mysql-test/r/bdb.err
|
||||||
|
mysql-test/r/bdb_cache.err
|
||||||
|
mysql-test/r/client_test.err
|
||||||
|
mysql-test/r/csv.err
|
||||||
|
mysql-test/r/ctype_ucs.err
|
||||||
|
mysql-test/r/derived.err
|
||||||
|
mysql-test/r/exampledb.err
|
||||||
|
mysql-test/r/func_encrypt.err
|
||||||
|
mysql-test/r/isam.err
|
||||||
|
mysql-test/r/lowercase_table2.err
|
||||||
|
mysql-test/r/multi_update.err
|
||||||
|
mysql-test/r/mysql_protocols.err
|
||||||
|
mysql-test/r/mysqlbinlog.err
|
||||||
|
mysql-test/r/mysqlbinlog2.err
|
||||||
|
mysql-test/r/mysqldump.err
|
||||||
|
mysql-test/r/mysqltest.err
|
||||||
|
mysql-test/r/ndb_alter_table.err
|
||||||
|
mysql-test/r/ndb_autodiscover.err
|
||||||
|
mysql-test/r/ndb_autodiscover2.err
|
||||||
|
mysql-test/r/ndb_basic.err
|
||||||
|
mysql-test/r/ndb_blob.err
|
||||||
|
mysql-test/r/ndb_cache.err
|
||||||
|
mysql-test/r/ndb_charset.err
|
||||||
|
mysql-test/r/ndb_index.err
|
||||||
|
mysql-test/r/ndb_index_ordered.err
|
||||||
|
mysql-test/r/ndb_index_unique.err
|
||||||
|
mysql-test/r/ndb_insert.err
|
||||||
|
mysql-test/r/ndb_limit.err
|
||||||
|
mysql-test/r/ndb_lock.err
|
||||||
|
mysql-test/r/ndb_minmax.err
|
||||||
|
mysql-test/r/ndb_replace.err
|
||||||
|
mysql-test/r/ndb_subquery.err
|
||||||
|
mysql-test/r/ndb_transaction.err
|
||||||
|
mysql-test/r/ndb_truncate.err
|
||||||
|
mysql-test/r/ndb_types.err
|
||||||
|
mysql-test/r/ndb_update.err
|
||||||
|
mysql-test/r/openssl_1.err
|
||||||
|
mysql-test/r/ps_1general.err
|
||||||
|
mysql-test/r/ps_6bdb.err
|
||||||
|
mysql-test/r/ps_7ndb.err
|
||||||
|
mysql-test/r/query_cache.err
|
||||||
|
mysql-test/r/query_cache_merge.err
|
||||||
|
mysql-test/r/raid.err
|
||||||
|
mysql-test/r/repair.err
|
||||||
|
mysql-test/r/replace.err
|
||||||
|
mysql-test/r/rpl000001.err
|
||||||
mysql-test/r/rpl000001.eval
|
mysql-test/r/rpl000001.eval
|
||||||
mysql-test/r/rpl000002.eval
|
mysql-test/r/rpl000002.eval
|
||||||
mysql-test/r/rpl000014.eval
|
mysql-test/r/rpl000014.eval
|
||||||
|
mysql-test/r/rpl000015.err
|
||||||
mysql-test/r/rpl000015.eval
|
mysql-test/r/rpl000015.eval
|
||||||
mysql-test/r/rpl000016.eval
|
mysql-test/r/rpl000016.eval
|
||||||
mysql-test/r/rpl_log.eval
|
mysql-test/r/rpl_log.eval
|
||||||
@ -641,6 +717,8 @@ ndb/examples/ndbapi_example2/ndbapi_example2
|
|||||||
ndb/examples/ndbapi_example3/ndbapi_example3
|
ndb/examples/ndbapi_example3/ndbapi_example3
|
||||||
ndb/examples/ndbapi_example5/ndbapi_example5
|
ndb/examples/ndbapi_example5/ndbapi_example5
|
||||||
ndb/examples/select_all/select_all
|
ndb/examples/select_all/select_all
|
||||||
|
ndb/include/ndb_global.h
|
||||||
|
ndb/include/ndb_version.h
|
||||||
ndb/lib/libMGM_API.so
|
ndb/lib/libMGM_API.so
|
||||||
ndb/lib/libNDB_API.so
|
ndb/lib/libNDB_API.so
|
||||||
ndb/lib/libNDB_ODBC.so
|
ndb/lib/libNDB_ODBC.so
|
||||||
@ -711,10 +789,25 @@ ndb/tools/ndb_delete_all
|
|||||||
ndb/tools/ndb_desc
|
ndb/tools/ndb_desc
|
||||||
ndb/tools/ndb_drop_index
|
ndb/tools/ndb_drop_index
|
||||||
ndb/tools/ndb_drop_table
|
ndb/tools/ndb_drop_table
|
||||||
|
ndb/tools/ndb_restore
|
||||||
ndb/tools/ndb_select_all
|
ndb/tools/ndb_select_all
|
||||||
ndb/tools/ndb_select_count
|
ndb/tools/ndb_select_count
|
||||||
ndb/tools/ndb_show_tables
|
ndb/tools/ndb_show_tables
|
||||||
|
ndb/tools/ndb_test_platform
|
||||||
ndb/tools/ndb_waiter
|
ndb/tools/ndb_waiter
|
||||||
|
ndbcluster-1186
|
||||||
|
ndbcluster-1186/SCCS
|
||||||
|
ndbcluster-1186/config.ini
|
||||||
|
ndbcluster-1186/ndb_1.pid
|
||||||
|
ndbcluster-1186/ndb_1_out.log
|
||||||
|
ndbcluster-1186/ndb_1_signal.log
|
||||||
|
ndbcluster-1186/ndb_2.pid
|
||||||
|
ndbcluster-1186/ndb_2_out.log
|
||||||
|
ndbcluster-1186/ndb_2_signal.log
|
||||||
|
ndbcluster-1186/ndb_3.pid
|
||||||
|
ndbcluster-1186/ndb_3_cluster.log
|
||||||
|
ndbcluster-1186/ndb_3_out.log
|
||||||
|
ndbcluster-1186/ndbcluster.pid
|
||||||
pull.log
|
pull.log
|
||||||
regex/re
|
regex/re
|
||||||
repl-tests/test-repl-ts/repl-timestamp.master.reject
|
repl-tests/test-repl-ts/repl-timestamp.master.reject
|
||||||
@ -909,16 +1002,54 @@ vio/test-ssl
|
|||||||
vio/test-sslclient
|
vio/test-sslclient
|
||||||
vio/test-sslserver
|
vio/test-sslserver
|
||||||
vio/viotest-ssl
|
vio/viotest-ssl
|
||||||
Docs/Images/myaccess-odbc.txt
|
tests/mysql_client_test
|
||||||
Docs/Images/myaccess.txt
|
tests/mysql_client_test
|
||||||
Docs/Images/myarchitecture.txt
|
libmysqld/examples/mysql_client_test.c
|
||||||
Docs/Images/mydll-properties.txt
|
libmysqld/examples/mysql_client_test_embedded
|
||||||
Docs/Images/mydsn-example.txt
|
libmysqld/examples/mysqltest_embedded
|
||||||
Docs/Images/mydsn-icon.txt
|
ndb/src/common/debugger/signaldata/libsignaldataprint.dsp
|
||||||
Docs/Images/mydsn-options.txt
|
ndb/src/common/debugger/libtrace.dsp
|
||||||
Docs/Images/mydsn-setup.txt
|
ndb/src/common/logger/liblogger.dsp
|
||||||
Docs/Images/mydsn-test-fail.txt
|
ndb/src/common/mgmcommon/libmgmsrvcommon.dsp
|
||||||
Docs/Images/mydsn-test-success.txt
|
ndb/src/common/portlib/libportlib.dsp
|
||||||
Docs/Images/mydsn-trace.txt
|
ndb/src/common/transporter/libtransporter.dsp
|
||||||
Docs/Images/mydsn.txt
|
ndb/src/common/util/libgeneral.dsp
|
||||||
Docs/Images/myflowchart.txt
|
ndb/src/kernel/blocks/backup/libbackup.dsp
|
||||||
|
ndb/src/kernel/blocks/cmvmi/libcmvmi.dsp
|
||||||
|
ndb/src/kernel/blocks/dbacc/libdbacc.dsp
|
||||||
|
ndb/src/kernel/blocks/dbdict/libdbdict.dsp
|
||||||
|
ndb/src/kernel/blocks/dbdih/libdbdih.dsp
|
||||||
|
ndb/src/kernel/blocks/dblqh/libdblqh.dsp
|
||||||
|
ndb/src/kernel/blocks/dbtc/libdbtc.dsp
|
||||||
|
ndb/src/kernel/blocks/dbtup/libdbtup.dsp
|
||||||
|
ndb/src/kernel/blocks/dbtux/libdbtux.dsp
|
||||||
|
ndb/src/kernel/blocks/dbutil/libdbutil.dsp
|
||||||
|
ndb/src/kernel/blocks/grep/libgrep.dsp
|
||||||
|
ndb/src/kernel/blocks/ndbcntr/libndbcntr.dsp
|
||||||
|
ndb/src/kernel/blocks/ndbfs/libndbfs.dsp
|
||||||
|
ndb/src/kernel/blocks/qmgr/libqmgr.dsp
|
||||||
|
ndb/src/kernel/blocks/suma/libsuma.dsp
|
||||||
|
ndb/src/kernel/blocks/trix/libtrix.dsp
|
||||||
|
ndb/src/kernel/error/liberror.dsp
|
||||||
|
ndb/src/kernel/vm/libkernel.dsp
|
||||||
|
ndb/src/kernel/ndbd.dsp
|
||||||
|
ndb/src/mgmapi/libmgmapi.dsp
|
||||||
|
ndb/src/mgmclient/ndb_mgm.dsp
|
||||||
|
ndb/src/mgmclient/libndbmgmclient.dsp
|
||||||
|
ndb/src/mgmsrv/ndb_mgmd.dsp
|
||||||
|
ndb/src/ndbapi/libndbapi.dsp
|
||||||
|
ndb/src/libndbclient.dsp
|
||||||
|
ndb/test/ndbapi/flexBench.dsp
|
||||||
|
ndb/test/ndbapi/testBasic.dsp
|
||||||
|
ndb/test/ndbapi/testBlobs.dsp
|
||||||
|
ndb/test/ndbapi/testScan.dsp
|
||||||
|
ndb/test/src/libNDBT.dsp
|
||||||
|
ndb/tools/ndb_waiter.dsp
|
||||||
|
ndb/tools/ndb_drop_table.dsp
|
||||||
|
ndb/tools/ndb_delete_all.dsp
|
||||||
|
ndb/tools/ndb_desc.dsp
|
||||||
|
ndb/tools/ndb_drop_index.dsp
|
||||||
|
ndb/tools/ndb_show_tables.dsp
|
||||||
|
ndb/tools/ndb_select_all.dsp
|
||||||
|
ndb/tools/ndb_select_count.dsp
|
||||||
|
support-files/ndb-config-2-node.ini
|
||||||
|
30
BUILD/SETUP.sh
Normal file → Executable file
30
BUILD/SETUP.sh
Normal file → Executable file
@ -1,15 +1,20 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
if ! test -f sql/mysqld.cc
|
if ! test -f sql/mysqld.cc
|
||||||
then
|
then
|
||||||
echo "You must run this script from the MySQL top-level directory"
|
echo "You must run this script from the MySQL top-level directory"
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
prefix_configs="--prefix=/usr/local/mysql"
|
||||||
just_print=
|
just_print=
|
||||||
just_configure=
|
just_configure=
|
||||||
full_debug=
|
full_debug=
|
||||||
while test $# -gt 0
|
while test $# -gt 0
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
--prefix=* ) prefix_configs="$1"; shift ;;
|
||||||
|
--with-debug=full ) full_debug="=full"; shift ;;
|
||||||
-c | --just-configure ) just_configure=1; shift ;;
|
-c | --just-configure ) just_configure=1; shift ;;
|
||||||
-n | --just-print | --print ) just_print=1; shift ;;
|
-n | --just-print | --print ) just_print=1; shift ;;
|
||||||
-h | --help ) cat <<EOF; exit 0 ;;
|
-h | --help ) cat <<EOF; exit 0 ;;
|
||||||
@ -17,13 +22,15 @@ Usage: $0 [-h|-n] [configure-options]
|
|||||||
-h, --help Show this help message.
|
-h, --help Show this help message.
|
||||||
-n, --just-print Don't actually run any commands; just print them.
|
-n, --just-print Don't actually run any commands; just print them.
|
||||||
-c, --just-configure Stop after running configure.
|
-c, --just-configure Stop after running configure.
|
||||||
|
--with-debug=full Build with full debug.
|
||||||
Any other options will be passed directly to configure.
|
--prefix=path Build with prefix 'path'.
|
||||||
|
|
||||||
Note: this script is intended for internal use by MySQL developers.
|
Note: this script is intended for internal use by MySQL developers.
|
||||||
EOF
|
EOF
|
||||||
--with-debug=full ) full_debug="=full"; shift ;;
|
* )
|
||||||
* ) break ;;
|
echo "Unknown option '$1'"
|
||||||
|
exit 1
|
||||||
|
break ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
|
||||||
@ -41,8 +48,16 @@ global_warnings="-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wch
|
|||||||
c_warnings="$global_warnings -Wunused"
|
c_warnings="$global_warnings -Wunused"
|
||||||
cxx_warnings="$global_warnings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor"
|
cxx_warnings="$global_warnings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor"
|
||||||
|
|
||||||
|
base_max_configs="--with-innodb --with-bdb --with-ndbcluster --with-archive-storage-engine --with-raid --with-openssl --with-raid --with-vio"
|
||||||
|
max_leave_isam_configs="--with-innodb --with-bdb --with-ndbcluster --with-archive-storage-engine --with-raid --with-openssl --with-raid --with-vio --with-embedded-server"
|
||||||
|
max_no_es_configs="$max_leave_isam_configs --without-isam"
|
||||||
|
max_configs="$max_no_es_configs --with-embedded-server"
|
||||||
|
|
||||||
alpha_cflags="-mcpu=ev6 -Wa,-mev6" # Not used yet
|
alpha_cflags="-mcpu=ev6 -Wa,-mev6" # Not used yet
|
||||||
|
amd64_cflags="-DBIG_TABLES"
|
||||||
pentium_cflags="-mcpu=pentiumpro"
|
pentium_cflags="-mcpu=pentiumpro"
|
||||||
|
pentium64_cflags="-mcpu=nocona -m64"
|
||||||
|
ppc_cflags="-mpowerpc -mcpu=powerpc"
|
||||||
sparc_cflags=""
|
sparc_cflags=""
|
||||||
|
|
||||||
# be as fast as we can be without losing our ability to backtrace
|
# be as fast as we can be without losing our ability to backtrace
|
||||||
@ -52,11 +67,14 @@ fast_cflags="-O3 -fno-omit-frame-pointer"
|
|||||||
reckless_cflags="-O3 -fomit-frame-pointer "
|
reckless_cflags="-O3 -fomit-frame-pointer "
|
||||||
|
|
||||||
debug_cflags="-DUNIV_MUST_NOT_INLINE -DEXTRA_DEBUG -DFORCE_INIT_OF_VARS -DSAFEMALLOC -DPEDANTIC_SAFEMALLOC -DSAFE_MUTEX"
|
debug_cflags="-DUNIV_MUST_NOT_INLINE -DEXTRA_DEBUG -DFORCE_INIT_OF_VARS -DSAFEMALLOC -DPEDANTIC_SAFEMALLOC -DSAFE_MUTEX"
|
||||||
|
debug_extra_cflags="-O1 -Wuninitialized"
|
||||||
|
|
||||||
base_cxxflags="-felide-constructors -fno-exceptions -fno-rtti"
|
base_cxxflags="-felide-constructors -fno-exceptions -fno-rtti"
|
||||||
|
amd64_cxxflags="-DBIG_TABLES"
|
||||||
|
|
||||||
base_configs="--prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-readline"
|
base_configs="$prefix_configs --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-readline"
|
||||||
static_link="--with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static"
|
static_link="--with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static"
|
||||||
|
amd64_configs=""
|
||||||
alpha_configs="" # Not used yet
|
alpha_configs="" # Not used yet
|
||||||
pentium_configs=""
|
pentium_configs=""
|
||||||
sparc_configs=""
|
sparc_configs=""
|
||||||
@ -68,7 +86,7 @@ local_infile_configs="--enable-local-infile"
|
|||||||
debug_configs="--with-debug$full_debug"
|
debug_configs="--with-debug$full_debug"
|
||||||
if [ -z "$full_debug" ]
|
if [ -z "$full_debug" ]
|
||||||
then
|
then
|
||||||
debug_cflags="$debug_cflags -O1 -Wuninitialized"
|
debug_cflags="$debug_cflags $debug_extra_cflags"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if gmake --version > /dev/null 2>&1
|
if gmake --version > /dev/null 2>&1
|
||||||
|
9
BUILD/compile-amd64-debug-max
Executable file
9
BUILD/compile-amd64-debug-max
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
path=`dirname $0`
|
||||||
|
. "$path/SETUP.sh"
|
||||||
|
extra_flags="$amd64_cflags $debug_cflags $max_cflags"
|
||||||
|
c_warnings="$c_warnings $debug_extra_warnings"
|
||||||
|
cxx_warnings="$cxx_warnings $debug_extra_warnings"
|
||||||
|
extra_configs="$amd64_configs $debug_configs $max_configs"
|
||||||
|
|
||||||
|
. "$path/FINISH.sh"
|
8
BUILD/compile-amd64-max
Executable file
8
BUILD/compile-amd64-max
Executable file
@ -0,0 +1,8 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
path=`dirname $0`
|
||||||
|
. "$path/SETUP.sh"
|
||||||
|
extra_flags="$amd64_cflags $fast_cflags $max_cflags -g"
|
||||||
|
extra_configs="$amd64_configs $max_configs"
|
||||||
|
|
||||||
|
. "$path/FINISH.sh"
|
48
BUILD/compile-dist
Executable file
48
BUILD/compile-dist
Executable file
@ -0,0 +1,48 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# This script's purpose is to update the automake/autoconf helper scripts and
|
||||||
|
# to run a plain "configure" without any special compile flags. Only features
|
||||||
|
# that affect the content of the source distribution are enabled. The resulting
|
||||||
|
# tree can then be picked up by "make dist" to create the "pristine source
|
||||||
|
# package" that is used as the basis for all other binary builds.
|
||||||
|
#
|
||||||
|
make distclean
|
||||||
|
aclocal
|
||||||
|
autoheader
|
||||||
|
libtoolize --automake --force --copy
|
||||||
|
automake --force --add-missing --copy
|
||||||
|
autoconf
|
||||||
|
(cd bdb/dist && sh s_all)
|
||||||
|
(cd innobase && aclocal && autoheader && aclocal && automake && autoconf)
|
||||||
|
|
||||||
|
# Default to gcc for CC and CXX
|
||||||
|
if test -z "$CXX" ; then
|
||||||
|
export CXX=gcc
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test -z "$CC" ; then
|
||||||
|
export CC=gcc
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Use ccache, if available
|
||||||
|
if ccache -V > /dev/null 2>&1
|
||||||
|
then
|
||||||
|
if ! (echo "$CC" | grep "ccache" > /dev/null)
|
||||||
|
then
|
||||||
|
export CC="ccache $CC"
|
||||||
|
fi
|
||||||
|
if ! (echo "$CXX" | grep "ccache" > /dev/null)
|
||||||
|
then
|
||||||
|
export CXX="ccache $CXX"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Make sure to enable all features that affect "make dist"
|
||||||
|
./configure \
|
||||||
|
--with-embedded-server \
|
||||||
|
--with-berkeley-db \
|
||||||
|
--with-innodb \
|
||||||
|
--enable-thread-safe-client \
|
||||||
|
--with-extra-charsets=complex \
|
||||||
|
--with-ndbcluster
|
||||||
|
make
|
@ -9,5 +9,5 @@ then
|
|||||||
(cd gemini && aclocal && autoheader && aclocal && automake && autoconf)
|
(cd gemini && aclocal && autoheader && aclocal && automake && autoconf)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CC=ecc CFLAGS="-w1 -DEXTRA_DEBUG -DSAFEMALLOC -DSAFE_MUTEX -O2" CXX=ecc CXXFLAGS="-w1 -DEXTRA_DEBUG -DSAFEMALLOC -DSAFE_MUTEX -O2" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static --with-debug --with-innodb --with-embedded-server
|
CC=ecc CFLAGS="-w1 -DEXTRA_DEBUG -DSAFEMALLOC -DSAFE_MUTEX -O2" CXX=ecc CXXFLAGS="-w1 -DEXTRA_DEBUG -DSAFEMALLOC -DSAFE_MUTEX -O2" ./configure --prefix=/usr/local/mysql --with-extra-charsets=complex --enable-thread-safe-client --with-mysqld-ldflags=-all-static --with-client-ldflags=-all-static --with-debug --with-innodb --with-embedded-server --with-archive-storage-engine
|
||||||
gmake
|
gmake
|
||||||
|
@ -3,11 +3,9 @@
|
|||||||
path=`dirname $0`
|
path=`dirname $0`
|
||||||
. "$path/SETUP.sh"
|
. "$path/SETUP.sh"
|
||||||
|
|
||||||
extra_flags="$pentium_cflags $debug_cflags"
|
extra_flags="$pentium_cflags $debug_cflags $max_cflags"
|
||||||
c_warnings="$c_warnings $debug_extra_warnings"
|
c_warnings="$c_warnings $debug_extra_warnings"
|
||||||
cxx_warnings="$cxx_warnings $debug_extra_warnings"
|
cxx_warnings="$cxx_warnings $debug_extra_warnings"
|
||||||
extra_configs="$pentium_configs $debug_configs"
|
extra_configs="$pentium_configs $debug_configs $max_configs"
|
||||||
|
|
||||||
extra_configs="$extra_configs --with-berkeley-db --with-innodb --without-isam --with-embedded-server --with-openssl --with-raid --with-vio --with-ndbcluster"
|
|
||||||
|
|
||||||
. "$path/FINISH.sh"
|
. "$path/FINISH.sh"
|
||||||
|
@ -3,11 +3,9 @@
|
|||||||
path=`dirname $0`
|
path=`dirname $0`
|
||||||
. "$path/SETUP.sh"
|
. "$path/SETUP.sh"
|
||||||
|
|
||||||
extra_flags="$pentium_cflags $debug_cflags"
|
extra_flags="$pentium_cflags $debug_cflags $max_cflags"
|
||||||
c_warnings="$c_warnings $debug_extra_warnings"
|
c_warnings="$c_warnings $debug_extra_warnings"
|
||||||
cxx_warnings="$cxx_warnings $debug_extra_warnings"
|
cxx_warnings="$cxx_warnings $debug_extra_warnings"
|
||||||
extra_configs="$pentium_configs $debug_configs"
|
extra_configs="$pentium_configs $debug_configs $max_no_es_configs"
|
||||||
|
|
||||||
extra_configs="$extra_configs --with-berkeley-db --with-innodb --without-isam --with-openssl --with-raid"
|
|
||||||
|
|
||||||
. "$path/FINISH.sh"
|
. "$path/FINISH.sh"
|
||||||
|
@ -3,12 +3,7 @@
|
|||||||
path=`dirname $0`
|
path=`dirname $0`
|
||||||
. "$path/SETUP.sh"
|
. "$path/SETUP.sh"
|
||||||
|
|
||||||
extra_flags="$pentium_cflags $fast_cflags -g"
|
extra_flags="$pentium_cflags $fast_cflags $max_cflags -g"
|
||||||
extra_configs="$pentium_configs"
|
extra_configs="$pentium_configs $max_configs"
|
||||||
#strip=yes
|
|
||||||
|
|
||||||
extra_configs="$extra_configs --with-innodb --with-berkeley-db \
|
|
||||||
--with-embedded-server --enable-thread-safe-client \
|
|
||||||
--with-openssl --with-vio --with-raid --with-ndbcluster"
|
|
||||||
|
|
||||||
. "$path/FINISH.sh"
|
. "$path/FINISH.sh"
|
||||||
|
@ -3,13 +3,13 @@
|
|||||||
path=`dirname $0`
|
path=`dirname $0`
|
||||||
. "$path/SETUP.sh"
|
. "$path/SETUP.sh"
|
||||||
|
|
||||||
extra_flags="$pentium_cflags $debug_cflags -USAFEMALLOC -UFORCE_INIT_OF_VARS -DHAVE_purify -DMYSQL_SERVER_SUFFIX=-valgrind-max"
|
extra_flags="$pentium_cflags $debug_cflags $max_cflags -USAFEMALLOC -UFORCE_INIT_OF_VARS -DHAVE_purify -DMYSQL_SERVER_SUFFIX=-valgrind-max"
|
||||||
c_warnings="$c_warnings $debug_extra_warnings"
|
c_warnings="$c_warnings $debug_extra_warnings"
|
||||||
cxx_warnings="$cxx_warnings $debug_extra_warnings"
|
cxx_warnings="$cxx_warnings $debug_extra_warnings"
|
||||||
extra_configs="$pentium_configs $debug_configs"
|
extra_configs="$pentium_configs $debug_configs"
|
||||||
|
|
||||||
# We want to test isam when building with valgrind
|
# We want to test isam when building with valgrind
|
||||||
extra_configs="$extra_configs --with-berkeley-db --with-innodb --with-isam --with-embedded-server --with-openssl --with-vio --with-raid --with-ndbcluster"
|
extra_configs="$extra_configs $max_leave_isam_configs --with-isam"
|
||||||
|
|
||||||
. "$path/FINISH.sh"
|
. "$path/FINISH.sh"
|
||||||
|
|
||||||
|
13
BUILD/compile-pentium64-debug
Executable file
13
BUILD/compile-pentium64-debug
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
path=`dirname $0`
|
||||||
|
. "$path/SETUP.sh" $@ --with-debug=full
|
||||||
|
|
||||||
|
extra_flags="$pentium64_cflags $debug_cflags"
|
||||||
|
c_warnings="$c_warnings $debug_extra_warnings"
|
||||||
|
cxx_warnings="$cxx_warnings $debug_extra_warnings"
|
||||||
|
extra_configs="$pentium_configs $debug_configs $static_link"
|
||||||
|
|
||||||
|
extra_configs="$extra_configs "
|
||||||
|
|
||||||
|
. "$path/FINISH.sh"
|
10
BUILD/compile-ppc
Executable file
10
BUILD/compile-ppc
Executable file
@ -0,0 +1,10 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
path=`dirname $0`
|
||||||
|
. "$path/SETUP.sh"
|
||||||
|
|
||||||
|
extra_flags="$ppc_cflags $fast_cflags"
|
||||||
|
extra_configs="$static_link"
|
||||||
|
strip=yes
|
||||||
|
|
||||||
|
. "$path/FINISH.sh"
|
13
BUILD/compile-ppc-debug
Executable file
13
BUILD/compile-ppc-debug
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
path=`dirname $0`
|
||||||
|
. "$path/SETUP.sh"
|
||||||
|
|
||||||
|
extra_flags="$ppc_cflags $debug_cflags"
|
||||||
|
c_warnings="$c_warnings $debug_extra_warnings"
|
||||||
|
cxx_warnings="$cxx_warnings $debug_extra_warnings"
|
||||||
|
extra_configs="$debug_configs "
|
||||||
|
|
||||||
|
extra_configs="$extra_configs"
|
||||||
|
|
||||||
|
. "$path/FINISH.sh"
|
11
BUILD/compile-ppc-debug-max
Executable file
11
BUILD/compile-ppc-debug-max
Executable file
@ -0,0 +1,11 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
path=`dirname $0`
|
||||||
|
. "$path/SETUP.sh"
|
||||||
|
|
||||||
|
extra_flags="$ppc_cflags $debug_cflags $max_cflags"
|
||||||
|
c_warnings="$c_warnings $debug_extra_warnings"
|
||||||
|
cxx_warnings="$cxx_warnings $debug_extra_warnings"
|
||||||
|
extra_configs="$debug_configs $max_configs"
|
||||||
|
|
||||||
|
. "$path/FINISH.sh"
|
9
BUILD/compile-ppc-max
Executable file
9
BUILD/compile-ppc-max
Executable file
@ -0,0 +1,9 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
|
||||||
|
path=`dirname $0`
|
||||||
|
. "$path/SETUP.sh"
|
||||||
|
|
||||||
|
extra_flags="$ppc_cflags $fast_cflags $max_cflags -g"
|
||||||
|
extra_configs="$extra_configs $max_configs"
|
||||||
|
|
||||||
|
. "$path/FINISH.sh"
|
@ -1,15 +1,35 @@
|
|||||||
#! /bin/sh
|
#! /bin/sh
|
||||||
|
|
||||||
|
mode=""
|
||||||
|
cxxfilt=""
|
||||||
|
|
||||||
|
# For g++ 3.X, the PurifyPlus tools needs a program named "cxxfilt",
|
||||||
|
# "c++file" or similar. It is part of libtool. If not found, you can
|
||||||
|
# specify the path to it.
|
||||||
|
|
||||||
while test $# -gt 0
|
while test $# -gt 0
|
||||||
do
|
do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
--debug) EXTRA_CONFIG_FLAGS=--with-debug; shift ;;
|
--debug) EXTRA_CONFIG_FLAGS=--with-debug ;;
|
||||||
-h | --help ) cat <<EOF; exit 0 ;;
|
--purify) mode=purify ;;
|
||||||
Usage: $0 [-h|-n] [configure-options]
|
--purecov*) mode=purecov ;;
|
||||||
--debug Compile with DBUG enabled
|
--quantify) mode=quantify ;;
|
||||||
|
--cxxfilt) shift ; cxxfilt=$1 ;;
|
||||||
|
-h | --help ) cat <<EOF; exit 0 ;;
|
||||||
|
Usage: $0 [ options ]
|
||||||
|
|
||||||
|
Where the 'options' are
|
||||||
|
|
||||||
|
--debug Compile with DBUG enabled
|
||||||
|
--purify Only prepare for Purify
|
||||||
|
--purecov Only prepare for PureCover
|
||||||
|
--quantify Only prepare for Quantify
|
||||||
|
--cxxfilt <cxxfilt> Path to cxxfilt/c++filt program
|
||||||
|
This program is needed for gcc 3.X
|
||||||
EOF
|
EOF
|
||||||
*) echo "No such option '$1'" ; exit ;;
|
*) echo "No such option '$1'" ; exit 1 ;;
|
||||||
esac
|
esac
|
||||||
|
shift
|
||||||
done
|
done
|
||||||
|
|
||||||
gmake -k clean || true
|
gmake -k clean || true
|
||||||
@ -22,9 +42,70 @@ CFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-sub
|
|||||||
|
|
||||||
gmake -j 4
|
gmake -j 4
|
||||||
|
|
||||||
cd sql ; mv mysqld mysqld-org ;
|
# ----------------------------------------------------------------------
|
||||||
make CXXLD="purify -best-effort g++" mysqld ; mv mysqld mysqld-purify
|
|
||||||
make CXXLD="quantify -best-effort g++" mysqld ; mv mysqld mysqld-quantify
|
#set -x
|
||||||
make CXXLD="purecov -best-effort g++" mysqld ; mv mysqld mysqld-purecov
|
|
||||||
mv mysqld-org mysqld
|
purifying_binaries ()
|
||||||
|
{
|
||||||
|
while test $1
|
||||||
|
do
|
||||||
|
dir=$1
|
||||||
|
shift
|
||||||
|
target=$1
|
||||||
|
shift
|
||||||
|
binary=$1
|
||||||
|
shift
|
||||||
|
|
||||||
|
opts=""
|
||||||
|
if [ -n "$cxxfilt" ] ; then
|
||||||
|
opts="$opts -demangle-program=$cxxfilt"
|
||||||
|
fi
|
||||||
|
opts="$opts -best-effort"
|
||||||
|
|
||||||
|
back=`pwd`
|
||||||
|
cd $dir
|
||||||
|
|
||||||
|
# Because of libtool magic, the target and binary
|
||||||
|
# created might not be the same. To trigger rebuild,
|
||||||
|
# we need to move them both.
|
||||||
|
|
||||||
|
mv $binary $binary-old
|
||||||
|
if [ -f $target ] ; then
|
||||||
|
mv $target $target-old
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$mode" -a $mode = purify ] ; then
|
||||||
|
gmake CCLD="purify $opts gcc" CXXLD="purify $opts g++" $target
|
||||||
|
mv $binary $binary-purify
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$mode" -a $mode = quantify ] ; then
|
||||||
|
gmake CCLD="quantify $opts gcc" CXXLD="quantify $opts g++" $target
|
||||||
|
mv $binary $binary-quantify
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -n "$mode" -a $mode = purecov ] ; then
|
||||||
|
gmake CCLD="purecov $opts gcc" CXXLD="purecov $opts g++" $target
|
||||||
|
mv $binary $binary-purecov
|
||||||
|
fi
|
||||||
|
|
||||||
|
mv $binary-old $binary
|
||||||
|
if [ -f $target-old ] ; then
|
||||||
|
mv $target-old $target
|
||||||
|
fi
|
||||||
|
|
||||||
|
cd $back
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
purifying_binaries \
|
||||||
|
sql mysqld mysqld \
|
||||||
|
client mysqltest .libs/mysqltest \
|
||||||
|
tests mysql_client_test mysql_client_test \
|
||||||
|
libmysqld/examples mysqltest_embedded mysqltest_embedded \
|
||||||
|
libmysqld/examples mysql_client_test_embedded mysql_client_test_embedded
|
||||||
|
|
||||||
|
# ----------------------------------------------------------------------
|
||||||
|
|
||||||
|
@ -841,6 +841,241 @@ serg@serg.mysql.com|mysql-test/t/sel000027.test|20001211130731|23677|ab44bb57a58
|
|||||||
serg@serg.mysql.com|mysql-test/t/sel000028.test|20001211130731|28317|db9bfc0a808fb629
|
serg@serg.mysql.com|mysql-test/t/sel000028.test|20001211130731|28317|db9bfc0a808fb629
|
||||||
serg@serg.mysql.com|mysql-test/t/sel000029.test|20001211130731|32917|6aae34dbb3ee86d9
|
serg@serg.mysql.com|mysql-test/t/sel000029.test|20001211130731|32917|6aae34dbb3ee86d9
|
||||||
serg@serg.mysql.com|mysql-test/t/sel000030.test|20001211130732|03110|a29683eac3e7b706
|
serg@serg.mysql.com|mysql-test/t/sel000030.test|20001211130732|03110|a29683eac3e7b706
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_alter_sjis.result|20050107081527|04225|2ec1fd4929b5638e
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_alter_ucs2.result|20050107081527|11825|f3ac4ae77651d4f4
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_alter_ujis.result|20050107081528|17309|2c37b350cc1614b7
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_alter_utf8.result|20050107081528|57925|2916262ef0a8467c
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_charlength_sjis.result|20050107081528|32479|2d7cc0bab6a08fb7
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_charlength_ucs2.result|20050107081529|38657|a904397e286b018d
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_charlength_ujis.result|20050107081529|63265|a3e5fab4dda3f63
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_charlength_utf8.result|20050107081529|19050|8f33e213f34b75c4
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_charset_sjis.result|20050107081530|05840|92bcb5996a61c9bc
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_charset_ucs2.result|20050107081530|27322|9f3eb425f5a8a94e
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_charset_ujis.result|20050107081530|48971|ccce22a3ed33edb
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_charset_utf8.result|20050107081530|04766|6be23c27e03aaef
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_convert_sjis.result|20050107081530|26438|e16736c277401654
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_convert_ucs2.result|20050107081531|13914|845b174a4e12fdf5
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_convert_ujis.result|20050107081531|35726|ea4382cfe092a050
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_convert_utf8.result|20050107081531|58104|b90186d893390496
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_create_db_sjis.result|20050107081531|14644|d35a81ed738ce5ba
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_create_db_ucs2.result|20050107081532|01516|94fe34e7cf948cf4
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_create_db_ujis.result|20050107081532|23036|4d5552d56ab27619
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_create_db_utf8.result|20050107081532|44748|374e13cc2ae5b0fa
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_create_tbl_sjis.result|20050107081532|00620|eee512b72025128e
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_create_tbl_ucs2.result|20050107081532|22012|c0187e924a3b5cdc
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_create_tbl_ujis.result|20050107081533|09019|e8763bd889fa5d1
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_create_tbl_utf8.result|20050107081533|30411|b9afcd7fdbca71bf
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_enum_sjis.result|20050107081533|52491|68150e74f7d83182
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_enum_ucs2.result|20050107081533|08926|50375a296eea1a4c
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_enum_ujis.result|20050107081533|30516|26c8e1122bdac1f1
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_enum_utf8.result|20050107081534|17587|577e655491905344
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_insert_sjis.result|20050107081534|39290|67147bffbcee5282
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_insert_ucs2.result|20050107081534|61019|2a3faa20c3360cfb
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_insert_ujis.result|20050107081534|17136|5e7b2c0407b9eae
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_insert_utf8.result|20050107081535|04220|62fa831c2b8a02e9
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_instr_sjis.result|20050107081535|25969|abfcff6cbdae1925
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_instr_ucs2.result|20050107081535|47754|be297a9ec05c0e0a
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_instr_ujis.result|20050107081535|03623|f42e09a2a6736f23
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_instr_utf8.result|20050107081535|24952|8fc889df4669cd6
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_join_sjis.result|20050107081536|12369|396a43a5ac83bda3
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_join_ucs2.result|20050107081536|34440|f112f6b3a020dcb5
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_join_ujis.result|20050107081536|56149|dab3a2b2f5e31eb5
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_join_utf8.result|20050107081536|12246|6661d21d7c485970
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_left_sjis.result|20050107081536|33732|c4d6b2814e85710f
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_left_ucs2.result|20050107081537|20829|ebc1bcd92b01ba3
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_left_ujis.result|20050107081537|42728|c88e3ddf34290212
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_left_utf8.result|20050107081537|64357|702b2e408597f5ef
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_length_sjis.result|20050107081537|20201|ab84fe078f8c50e
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_length_ucs2.result|20050107081538|07211|f79c430972fe4242
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_length_ujis.result|20050107081538|28829|92e66a0d987080ab
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_length_utf8.result|20050107081538|50725|f3e1ec3c827572ef
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_like_sjis.result|20050107081538|07207|497ea317a9779e08
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_like_ucs2.result|20050107081538|29018|dff13e955936a635
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_like_ujis.result|20050107081539|16190|5aaf14c5cc0eb3d7
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_like_utf8.result|20050107081539|38032|e62cf43214334eaf
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_locate_sjis.result|20050107081539|59851|f5cd5bb0720f1388
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_locate_ucs2.result|20050107081539|16013|397f3c3ecc929da
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_locate_ujis.result|20050107081540|05016|a0746377dc240841
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_locate_utf8.result|20050107081540|26599|65816e1c9ea27fbc
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_lpad_sjis.result|20050107081540|48453|be23445a258c2efb
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_lpad_ucs2.result|20050107081540|04446|10797352d768da53
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_lpad_ujis.result|20050107081540|26224|75165c42c9da07e8
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_lpad_utf8.result|20050107081541|13606|36ad2d19941abede
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_ltrim_sjis.result|20050107081541|35572|2b3b542ec89a8440
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_ltrim_ucs2.result|20050107081541|57615|cab66782e2d918b7
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_ltrim_ujis.result|20050107081541|13734|5e405409e03dca3
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_ltrim_utf8.result|20050107081542|00849|5f64c2575080fb2e
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_ps_sjis.result|20050107081542|22464|194a85125571489c
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_ps_ujis.result|20050107081542|44552|1d31f04dc3869387
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_replace_sjis.result|20050107081542|00673|76b3f6fab7cce305
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_replace_ucs2.result|20050107081542|22178|40a5c69f7fb9ad70
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_replace_ujis.result|20050107081543|09299|ab8af1803ff6de87
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_replace_utf8.result|20050107081543|31103|34a42201cf18603f
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_reverse_sjis.result|20050107081543|53242|2fd638c1bbea9de
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_reverse_ucs2.result|20050107081543|09440|bcae1663ff14df06
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_reverse_ujis.result|20050107081543|31543|69792ccfb7d3b59b
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_reverse_utf8.result|20050107081544|19023|30e4181e77154299
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_right_sjis.result|20050107081544|40814|84b8e7d33c6cc088
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_right_ucs2.result|20050107081544|62694|20e50c73803406e0
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_right_ujis.result|20050107081544|18674|2bd13ccf7478f32b
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_right_utf8.result|20050107081545|06019|b26626fbc0c8fa25
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_rpad_sjis.result|20050107081545|47717|a6cb9a00a34d9280
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_rpad_ucs2.result|20050107081545|03933|6f310a21c6a3ad7f
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_rpad_ujis.result|20050107081545|25719|419271caa26c24cd
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_rpad_utf8.result|20050107081546|12990|e1cd2ebd6c0208ea
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_rtrim_sjis.result|20050107081546|34719|d23e6090f98e8fbc
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_rtrim_ucs2.result|20050107081546|56850|f2fe2a72c482aa49
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_rtrim_ujis.result|20050107081546|13304|1e865c1ccf400e23
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_rtrim_utf8.result|20050107081547|00440|8b2e0fffb1bc5cd4
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_select_sjis.result|20050107081547|22111|60535594c5605694
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_select_ucs2.result|20050107081547|44100|71c3558952cbc6ad
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_select_ujis.result|20050107081547|00264|f0e2860f90982398
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_select_utf8.result|20050107081547|21895|eeef381fbf2d9c95
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_subquery_sjis.result|20050107081548|09502|b652bee325136852
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_subquery_ucs2.result|20050107081548|31516|8a8aa66dad072fed
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_subquery_ujis.result|20050107081548|53490|8add4d2433058e8e
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_subquery_utf8.result|20050107081548|09693|cdeb3a8f901a6efb
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_substring_sjis.result|20050107081549|05596|fee80f00e654153
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_substring_ucs2.result|20050107081549|28016|238f41941bf1cde2
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_substring_ujis.result|20050107081549|50377|1d6072226dc693ac
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_substring_utf8.result|20050107081549|06796|2dba8103bf4ad46d
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_trim_sjis.result|20050107081549|28652|8a103fbcece5bf25
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_trim_ucs2.result|20050107081550|15970|ac4cba762dc14e28
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_trim_ujis.result|20050107081550|37865|4df912345aac10f1
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_trim_utf8.result|20050107081550|60045|79cba16887bf3b1f
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_union_ujis.result|20050107081550|16675|f0d464252c220c15
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_update_sjis.result|20050107081551|03970|13dc7639ad1ec6e5
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_update_ucs2.result|20050107081551|25688|8fc9b1f31d32a21f
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_update_ujis.result|20050107081551|47775|93f6c8b3f5622aff
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_update_utf8.result|20050107081551|04259|24a758ee1768afcc
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_where_sjis.result|20050107081551|26138|cb97323da2f50869
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_where_ucs2.result|20050107081552|13450|b3dad356facc16be
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_where_ujis.result|20050107081552|35250|4e3045c764bfa364
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/r/jp_where_utf8.result|20050107081552|57088|143422da49ad0cdb
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/std_data/jisx0201_sjis.dat|20050107081552|13191|3b811e51d64f83c7
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/std_data/jisx0201_ucs2.dat|20050107083211|03894|85975a083dfb7a54
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/std_data/jisx0201_ujis.dat|20050107081605|05898|699c7c58964df90
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/std_data/jisx0201_utf8.dat|20050107081606|12116|74d43073bf069bc7
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/std_data/jisx0208_sjis.dat|20050107081606|52743|9e8273f37d55fc4
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/std_data/jisx0208_sjis2.dat|20050107083212|14086|38a382ad2316ccf0
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/std_data/jisx0208_sjis3.dat|20050107081608|13836|8661d7801d6d35c
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/std_data/jisx0208_ucs2.dat|20050107081608|54705|269e953196baf762
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/std_data/jisx0208_ujis.dat|20050107081608|29492|e5d30a2aadd8062a
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/std_data/jisx0208_utf8.dat|20050107081609|35613|db4e6eadc27ec29e
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/std_data/jisx0212_ucs2.dat|20050107081609|10803|4fbb36024a7d47d0
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/std_data/jisx0212_ujis.dat|20050107081610|17128|bedeb2aa4cf2103d
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/std_data/jisx0212_utf8.dat|20050107081610|58355|6f46c105f00e6da7
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_alter_sjis.test|20050107081610|33134|f7c41740399a114a
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_alter_ucs2.test|20050107081611|40070|8aded01010aa4027
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_alter_ujis.test|20050107081611|04428|ddd8a1d2c2b10744
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_alter_utf8.test|20050107081611|26011|749a0e3b6ba599d2
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_charlength_sjis.test|20050107081612|13318|38dc8c4a77af62a4
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_charlength_ucs2.test|20050107081612|35063|fe5674c6b12d2b1
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_charlength_ujis.test|20050107081612|57379|e901fbd29981385b
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_charlength_utf8.test|20050107081612|13800|36ef1b7b55dc4a1b
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_charset_sjis.test|20050107081613|01245|daf9bbe53b34f1a8
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_charset_ucs2.test|20050107081613|22978|ea01c4415d5ef4a4
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_charset_ujis.test|20050107081613|45096|ca893d3a1c4a5fab
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_charset_utf8.test|20050107081613|01406|9d3ffec1489a799b
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_convert_sjis.test|20050107081613|23086|a7fbf85ce0fc9591
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_convert_ucs2.test|20050107081614|10458|84828e6663159064
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_convert_ujis.test|20050107081614|32393|a64465e0725243
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_convert_utf8.test|20050107081614|54260|8f344fb86504b604
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_create_db_sjis.test|20050107081614|10489|40a1631cffd46fe
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_create_db_ucs2.test|20050107081614|32422|8f034f1fb0ae644b
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_create_db_ujis.test|20050107081615|20478|bbdb04d1a483939b
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_create_db_utf8.test|20050107081615|42908|1f4418fddb751c58
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_create_tbl_sjis.test|20050107081615|64880|448ff3eaff962456
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_create_tbl_ucs2.test|20050107081615|21081|b2bafda9e7a3f226
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_create_tbl_ujis.test|20050107081616|08589|1477760d458bb313
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_create_tbl_utf8.test|20050107081616|30689|a1d12ccab39f74f3
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_enum_sjis.test|20050107081616|53230|9b863b7e4728f82a
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_enum_ucs2.test|20050107081617|23149|f05f1cbbe3740670
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_enum_ujis.test|20050107081618|10643|ac136bedb31cf9a8
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_enum_utf8.test|20050107081618|46561|43460e3947ac3d24
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_insert_sjis.test|20050107081618|02948|b32f23f3f588ea9a
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_insert_ucs2.test|20050107081618|24774|783e8b896271e49e
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_insert_ujis.test|20050107081619|12298|3f9c8c41cd92faa3
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_insert_utf8.test|20050107081619|37128|e4ab71ff1f780509
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_instr_sjis.test|20050107081619|59453|25fc516136ca9159
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_instr_ucs2.test|20050107081619|15956|673e221671a2770d
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_instr_ujis.test|20050107081620|03773|75c1239ff59d928a
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_instr_utf8.test|20050107081620|26260|ed912ad48a1893a8
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_join_sjis.test|20050107081620|49077|59a36a82ee570052
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_join_ucs2.test|20050107081620|05668|7d8665f03f26863d
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_join_ujis.test|20050107081620|27737|ecdf5e86cbda74cb
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_join_utf8.test|20050107081621|15489|b98f58e8a4a65e7b
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_left_sjis.test|20050107081621|41478|91fcd07aaac68648
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_left_ucs2.test|20050107081621|63674|65929b80d0271c86
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_left_ujis.test|20050107081621|20110|2a5ce575491289f4
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_left_utf8.test|20050107081622|07679|932150eea8460d1
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_length_sjis.test|20050107081622|30138|22fc722d29faeb92
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_length_ucs2.test|20050107081622|52718|81dcde6618d6a22d
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_length_ujis.test|20050107081622|09451|d5be7e1b3b4fb88b
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_length_utf8.test|20050107081622|31964|cfd3ea368b652b5b
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_like_sjis.test|20050107081623|19721|1db71ef08ca802d0
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_like_ucs2.test|20050107081623|42415|55eee7f0b2b984cd
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_like_ujis.test|20050107081623|64766|4136ccd8cd83eee5
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_like_utf8.test|20050107081623|21529|556e575385ee58f
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_locate_sjis.test|20050107081624|09362|ac12c88e8477d736
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_locate_ucs2.test|20050107081624|31699|e6e0cc4752262b9f
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_locate_ujis.test|20050107081624|54042|afa7eadd28fa536e
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_locate_utf8.test|20050107081624|10934|307d85c4cd318e62
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_lpad_sjis.test|20050107081624|33252|29972178e7d58d93
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_lpad_ucs2.test|20050107081625|21025|b722d1ed662e03c8
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_lpad_ujis.test|20050107081625|44023|c1feeadebdfc0ff9
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_lpad_utf8.test|20050107081625|01097|2f3347de2a42b9d6
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_ltrim_sjis.test|20050107081625|23224|fb954f6d4b2a20ac
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_ltrim_ucs2.test|20050107081626|11079|998157355fe96143
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_ltrim_ujis.test|20050107081626|33500|aab63ba3302196a2
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_ltrim_utf8.test|20050107081626|55883|8193f90a6ed58d36
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_ps_sjis.test|20050107081626|12674|2f1450a52f147fec
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_ps_ujis.test|20050107081627|00495|7b0eb3ca59abb12
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_replace_sjis.test|20050107081627|23008|a74ce2aca0e5ac66
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_replace_ucs2.test|20050107081627|45674|71b7010127493fb
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_replace_ujis.test|20050107081627|02501|cfe2af6b3db381c0
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_replace_utf8.test|20050107081627|24683|57e905b35703072
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_reverse_sjis.test|20050107081628|12962|f40219e9e488fc23
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_reverse_ucs2.test|20050107081628|35555|2c0e7ad52ec9ca65
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_reverse_ujis.test|20050107081628|57942|c353d85f4e92f5df
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_reverse_utf8.test|20050107081628|14597|e2588c2a3dcf63a
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_right_sjis.test|20050107081629|02304|14af84f068332d50
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_right_ucs2.test|20050107081629|24565|729a8377aa8100e4
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_right_ujis.test|20050107081629|47409|a839209fac19b930
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_right_utf8.test|20050107081629|04400|ada246cab13f1811
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_rpad_sjis.test|20050107081629|26583|9ae895ba98c4d31
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_rpad_ucs2.test|20050107081630|14467|cc7b3b62ee6dae28
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_rpad_ujis.test|20050107081630|37003|9c869c17899db4c7
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_rpad_utf8.test|20050107081630|59835|a8ed7c9ff559c38d
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_rtrim_sjis.test|20050107081630|16798|82a8f174f2ac5988
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_rtrim_ucs2.test|20050107081631|04558|1f90bdf68ed4d6d0
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_rtrim_ujis.test|20050107081631|26878|1804ccc6518b5d9
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_rtrim_utf8.test|20050107081631|49568|74375ee1105781bd
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_select_sjis.test|20050107081631|06299|b1151637493de45
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_select_ucs2.test|20050107081632|27924|3364d51b3168f562
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_select_ujis.test|20050107081632|50639|721b5841964bf8e6
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_select_utf8.test|20050107081632|07426|37222d28b4cfe7c8
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_subquery_sjis.test|20050107081632|29631|c92ff81669eb652
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_subquery_ucs2.test|20050107084021|10337|4b920d28fc9dc5aa
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_subquery_ujis.test|20050107083216|33062|3f51b47de1fb0c17
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_subquery_utf8.test|20050107081637|15503|fe599c9515084385
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_substring_sjis.test|20050107081638|08555|305285c02185f498
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_substring_ucs2.test|20050107081638|36441|ddc58f642ca61418
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_substring_ujis.test|20050107081638|64337|2cc53c02a5cc4879
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_substring_utf8.test|20050107081638|26081|55bb4e11bc747e5d
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_trim_sjis.test|20050107081639|19046|ec18bf7845064d09
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_trim_ucs2.test|20050107081639|46660|583edc63a51fd799
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_trim_ujis.test|20050107081639|06910|87aad3c53be879fd
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_trim_utf8.test|20050107081639|29347|b35fcc89b5fa47c3
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_union_ujis.test|20050107081640|17665|1eb842f74190b3c1
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_update_sjis.test|20050107081640|40239|d21d19721f975c74
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_update_ucs2.test|20050107081640|62869|3dad27b824548037
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_update_ujis.test|20050107081640|19575|5c3da888e148065b
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_update_utf8.test|20050107081641|07967|bc3adabdd5ac865
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_where_sjis.test|20050107081641|30584|e2886fcc8b23152f
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_where_ucs2.test|20050107081641|53233|b3c07768684ddfdb
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_where_ujis.test|20050107081641|10027|9e123ef3c645b66a
|
||||||
|
shuichi@mysql.com|mysql-test/suite/jp/t/jp_where_utf8.test|20050107081641|32217|59fb529f60d9d8bc
|
||||||
tfr@sarvik.tfr.cafe.ee|Docs/Flags/costarica.eps|20020228162345|64529|31ade79a89683616
|
tfr@sarvik.tfr.cafe.ee|Docs/Flags/costarica.eps|20020228162345|64529|31ade79a89683616
|
||||||
tfr@sarvik.tfr.cafe.ee|Docs/Flags/costarica.gif|20020228162348|36945|364ca7338682f71
|
tfr@sarvik.tfr.cafe.ee|Docs/Flags/costarica.gif|20020228162348|36945|364ca7338682f71
|
||||||
tfr@sarvik.tfr.cafe.ee|Docs/Flags/costarica.txt|20020228162350|33044|e155c53c10374ff
|
tfr@sarvik.tfr.cafe.ee|Docs/Flags/costarica.txt|20020228162350|33044|e155c53c10374ff
|
||||||
|
@ -2,6 +2,7 @@ Administrador@light.
|
|||||||
Administrator@co3064164-a.
|
Administrator@co3064164-a.
|
||||||
Administrator@co3064164-a.rochd1.qld.optushome.com.au
|
Administrator@co3064164-a.rochd1.qld.optushome.com.au
|
||||||
Administrator@fred.
|
Administrator@fred.
|
||||||
|
Administrator@w2k.
|
||||||
Greg@greg-laptop.
|
Greg@greg-laptop.
|
||||||
Miguel@light.local
|
Miguel@light.local
|
||||||
Sinisa@sinisa.nasamreza.org
|
Sinisa@sinisa.nasamreza.org
|
||||||
@ -25,6 +26,7 @@ bar@deer.(none)
|
|||||||
bar@gw.udmsearch.izhnet.ru
|
bar@gw.udmsearch.izhnet.ru
|
||||||
bar@mysql.com
|
bar@mysql.com
|
||||||
bar@noter.intranet.mysql.r18.ru
|
bar@noter.intranet.mysql.r18.ru
|
||||||
|
bell@51.0.168.192.in-addr.arpa
|
||||||
bell@laptop.sanja.is.com.ua
|
bell@laptop.sanja.is.com.ua
|
||||||
bell@sanja.is.com.ua
|
bell@sanja.is.com.ua
|
||||||
bk@admin.bk
|
bk@admin.bk
|
||||||
@ -32,8 +34,10 @@ bk@mysql.r18.ru
|
|||||||
brian@avenger.(none)
|
brian@avenger.(none)
|
||||||
brian@brian-akers-computer.local
|
brian@brian-akers-computer.local
|
||||||
brian@private-client-ip-101.oz.net
|
brian@private-client-ip-101.oz.net
|
||||||
|
brian@zim.(none)
|
||||||
carsten@tsort.bitbybit.dk
|
carsten@tsort.bitbybit.dk
|
||||||
davida@isil.mysql.com
|
davida@isil.mysql.com
|
||||||
|
dean@mysql.com
|
||||||
dellis@goetia.(none)
|
dellis@goetia.(none)
|
||||||
dlenev@brandersnatch.localdomain
|
dlenev@brandersnatch.localdomain
|
||||||
dlenev@build.mysql.com
|
dlenev@build.mysql.com
|
||||||
@ -87,20 +91,27 @@ jcole@mugatu.jcole.us
|
|||||||
jcole@mugatu.spaceapes.com
|
jcole@mugatu.spaceapes.com
|
||||||
jcole@sarvik.tfr.cafe.ee
|
jcole@sarvik.tfr.cafe.ee
|
||||||
jcole@tetra.spaceapes.com
|
jcole@tetra.spaceapes.com
|
||||||
|
jimw@mysql.com
|
||||||
joerg@mysql.com
|
joerg@mysql.com
|
||||||
joreland@mysql.com
|
joreland@mysql.com
|
||||||
jorge@linux.jorge.mysql.com
|
jorge@linux.jorge.mysql.com
|
||||||
jplindst@t41.(none)
|
jplindst@t41.(none)
|
||||||
|
kaa@polly.local
|
||||||
kaj@work.mysql.com
|
kaj@work.mysql.com
|
||||||
kent@mysql.com
|
kent@mysql.com
|
||||||
konstantin@mysql.com
|
konstantin@mysql.com
|
||||||
kostja@oak.local
|
kostja@oak.local
|
||||||
|
lars@mysql.com
|
||||||
lenz@kallisto.mysql.com
|
lenz@kallisto.mysql.com
|
||||||
lenz@mysql.com
|
lenz@mysql.com
|
||||||
magnus@neptunus.(none)
|
magnus@neptunus.(none)
|
||||||
magnus@shellback.(none)
|
magnus@shellback.(none)
|
||||||
marko@hundin.mysql.fi
|
marko@hundin.mysql.fi
|
||||||
|
marty@linux.site
|
||||||
|
mats@mysql.com
|
||||||
|
matt@booty.(none)
|
||||||
matt@mysql.com
|
matt@mysql.com
|
||||||
|
matthias@three.local.lan
|
||||||
miguel@hegel.(none)
|
miguel@hegel.(none)
|
||||||
miguel@hegel.br
|
miguel@hegel.br
|
||||||
miguel@hegel.local
|
miguel@hegel.local
|
||||||
@ -110,6 +121,7 @@ miguel@light.
|
|||||||
miguel@light.local
|
miguel@light.local
|
||||||
miguel@sartre.local
|
miguel@sartre.local
|
||||||
mikael@mc04.(none)
|
mikael@mc04.(none)
|
||||||
|
mikael@orca.ndb.mysql.com
|
||||||
mikron@c-fb0ae253.1238-1-64736c10.cust.bredbandsbolaget.se
|
mikron@c-fb0ae253.1238-1-64736c10.cust.bredbandsbolaget.se
|
||||||
mikron@mikael-ronstr-ms-dator.local
|
mikron@mikael-ronstr-ms-dator.local
|
||||||
mleich@mysql.com
|
mleich@mysql.com
|
||||||
@ -137,6 +149,7 @@ msvensson@build.mysql.com
|
|||||||
mwagner@cash.mwagner.org
|
mwagner@cash.mwagner.org
|
||||||
mwagner@evoq.mwagner.org
|
mwagner@evoq.mwagner.org
|
||||||
mwagner@here.mwagner.org
|
mwagner@here.mwagner.org
|
||||||
|
mwagner@mysql.com
|
||||||
mwagner@work.mysql.com
|
mwagner@work.mysql.com
|
||||||
mydev@mysql.com
|
mydev@mysql.com
|
||||||
mysql@home.(none)
|
mysql@home.(none)
|
||||||
@ -152,23 +165,28 @@ nick@nick.leippe.com
|
|||||||
papa@gbichot.local
|
papa@gbichot.local
|
||||||
patg@krsna.patg.net
|
patg@krsna.patg.net
|
||||||
paul@central.snake.net
|
paul@central.snake.net
|
||||||
|
paul@frost.snake.net
|
||||||
paul@ice.local
|
paul@ice.local
|
||||||
paul@ice.snake.net
|
paul@ice.snake.net
|
||||||
paul@kite-hub.kitebird.com
|
paul@kite-hub.kitebird.com
|
||||||
|
paul@snake-hub.snake.net
|
||||||
paul@teton.kitebird.com
|
paul@teton.kitebird.com
|
||||||
pekka@mysql.com
|
pekka@mysql.com
|
||||||
pem@mysql.com
|
pem@mysql.com
|
||||||
peter@linux.local
|
peter@linux.local
|
||||||
peter@mysql.com
|
peter@mysql.com
|
||||||
peterg@mysql.com
|
peterg@mysql.com
|
||||||
|
petr@mysql.com
|
||||||
pgulutzan@linux.local
|
pgulutzan@linux.local
|
||||||
ram@deer.(none)
|
ram@deer.(none)
|
||||||
ram@gw.mysql.r18.ru
|
ram@gw.mysql.r18.ru
|
||||||
ram@gw.udmsearch.izhnet.ru
|
ram@gw.udmsearch.izhnet.ru
|
||||||
ram@mysql.r18.ru
|
ram@mysql.r18.ru
|
||||||
ram@ram.(none)
|
ram@ram.(none)
|
||||||
|
ramil@mysql.com
|
||||||
ranger@regul.home.lan
|
ranger@regul.home.lan
|
||||||
rburnett@build.mysql.com
|
rburnett@build.mysql.com
|
||||||
|
reggie@bob.(none)
|
||||||
root@home.(none)
|
root@home.(none)
|
||||||
root@mc04.(none)
|
root@mc04.(none)
|
||||||
root@x3.internalnet
|
root@x3.internalnet
|
||||||
@ -186,6 +204,8 @@ serg@sergbook.mylan
|
|||||||
serg@sergbook.mysql.com
|
serg@sergbook.mysql.com
|
||||||
sergefp@mysql.com
|
sergefp@mysql.com
|
||||||
sinisa@rhols221.adsl.netsonic.fi
|
sinisa@rhols221.adsl.netsonic.fi
|
||||||
|
stewart@mysql.com
|
||||||
|
svoj@mysql.com
|
||||||
tfr@beta.frontier86.ee
|
tfr@beta.frontier86.ee
|
||||||
tfr@indrek.tfr.cafe.ee
|
tfr@indrek.tfr.cafe.ee
|
||||||
tfr@sarvik.tfr.cafe.ee
|
tfr@sarvik.tfr.cafe.ee
|
||||||
@ -193,9 +213,11 @@ tim@bitch.mysql.fi
|
|||||||
tim@black.box
|
tim@black.box
|
||||||
tim@hundin.mysql.fi
|
tim@hundin.mysql.fi
|
||||||
tim@sand.box
|
tim@sand.box
|
||||||
|
tim@siva.hindu.god
|
||||||
tim@threads.polyesthetic.msg
|
tim@threads.polyesthetic.msg
|
||||||
tim@white.box
|
tim@white.box
|
||||||
tim@work.mysql.com
|
tim@work.mysql.com
|
||||||
|
timour@mysql.com
|
||||||
tom@basil-firewall.home.com
|
tom@basil-firewall.home.com
|
||||||
tomas@mc05.(none)
|
tomas@mc05.(none)
|
||||||
tomas@poseidon.(none)
|
tomas@poseidon.(none)
|
||||||
@ -208,6 +230,7 @@ tonu@x153.internalnet
|
|||||||
tonu@x3.internalnet
|
tonu@x3.internalnet
|
||||||
tsmith@build.mysql.com
|
tsmith@build.mysql.com
|
||||||
tulin@build.mysql.com
|
tulin@build.mysql.com
|
||||||
|
tulin@mysql.com
|
||||||
ulli@morbus.(none)
|
ulli@morbus.(none)
|
||||||
venu@hundin.mysql.fi
|
venu@hundin.mysql.fi
|
||||||
venu@myvenu.com
|
venu@myvenu.com
|
||||||
|
@ -19,15 +19,28 @@ BK_STATUS=$BK_STATUS$BK_COMMIT
|
|||||||
if [ "$BK_STATUS" = OK ]
|
if [ "$BK_STATUS" = OK ]
|
||||||
then
|
then
|
||||||
|
|
||||||
|
HAS_ACTUAL_CHANGES=`bk cset -r+ -d | grep -v "^#"`
|
||||||
|
if [ "$HAS_ACTUAL_CHANGES" = "" ]
|
||||||
|
then
|
||||||
|
echo ChangeSet had no real changes, not sending emails
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
CHANGESET=`bk -R prs -r+ -h -d':P:::I:' ChangeSet`
|
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'`
|
BUG=`bk -R prs -r+ -h -d':C:' ChangeSet | sed -ne 's/^.*[Bb][Uu][Gg] *# *\([0-9][0-9]*\).*$/\1/p'`
|
||||||
WL=`bk -R prs -r+ -h -d':C:' ChangeSet | sed -ne 's/^.*[Ww][Ll] *# *\([0-9][0-9]*\).*$/ WL#\1/p'`
|
WL=`bk -R prs -r+ -h -d':C:' ChangeSet | sed -ne 's/^.*[Ww][Ll] *# *\([0-9][0-9]*\).*$/ WL#\1/p'`
|
||||||
|
|
||||||
if [ "$BUG" = "" ]
|
if [ "$BUG" = "" ]
|
||||||
then
|
then
|
||||||
TO=dev-public@mysql.com
|
TO=dev-public@mysql.com
|
||||||
|
BS=""
|
||||||
|
BH=""
|
||||||
else
|
else
|
||||||
TO=dev-bugs@mysql.com
|
TO=dev-bugs@mysql.com
|
||||||
|
BS=" BUG#$BUG"
|
||||||
|
# need newline here
|
||||||
|
BH="X-Bug: $BUG
|
||||||
|
"
|
||||||
fi
|
fi
|
||||||
#++
|
#++
|
||||||
# dev-public@ / dev-bugs@
|
# dev-public@ / dev-bugs@
|
||||||
@ -38,8 +51,8 @@ fi
|
|||||||
List-ID: <bk.mysql-$VERSION>
|
List-ID: <bk.mysql-$VERSION>
|
||||||
From: $FROM
|
From: $FROM
|
||||||
To: $TO
|
To: $TO
|
||||||
Subject: bk commit - $VERSION tree ($CHANGESET)${BUG}${WL}
|
Subject: bk commit - $VERSION tree ($CHANGESET)${BS}${WL}
|
||||||
|
$BH
|
||||||
EOF
|
EOF
|
||||||
bk changes -v -r+
|
bk changes -v -r+
|
||||||
bk cset -r+ -d
|
bk cset -r+ -d
|
||||||
@ -54,14 +67,14 @@ EOF
|
|||||||
List-ID: <bk.mysql-$VERSION>
|
List-ID: <bk.mysql-$VERSION>
|
||||||
From: $FROM
|
From: $FROM
|
||||||
To: $INTERNALS
|
To: $INTERNALS
|
||||||
Subject: bk commit into $VERSION tree ($CHANGESET)
|
Subject: bk commit into $VERSION tree ($CHANGESET)$BS
|
||||||
|
$BH
|
||||||
Below is the list of changes that have just been committed into a local
|
Below is the list of changes that have just been committed into a local
|
||||||
$VERSION 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
|
be propagated to the main repository and, within 24 hours after the
|
||||||
push, to the public repository.
|
push, to the public repository.
|
||||||
For information on how to access the public repository
|
For information on how to access the public repository
|
||||||
see http://www.mysql.com/doc/I/n/Installing_source_tree.html
|
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
bk changes -v -r+
|
bk changes -v -r+
|
||||||
@ -81,7 +94,7 @@ EOF
|
|||||||
List-ID: <bk.mysql-$VERSION>
|
List-ID: <bk.mysql-$VERSION>
|
||||||
From: $FROM
|
From: $FROM
|
||||||
To: $DOCS
|
To: $DOCS
|
||||||
Subject: bk commit - $VERSION tree (Manual) ($CHANGESET)
|
Subject: bk commit - $VERSION tree (Manual) ($CHANGESET)$BS
|
||||||
|
|
||||||
EOF
|
EOF
|
||||||
bk changes -v -r+
|
bk changes -v -r+
|
||||||
|
@ -1,5 +1,16 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
|
if [ "$BK_USER" = "Administrator" -o "$BK_USER" = "mysqldev" ]
|
||||||
|
then
|
||||||
|
echo "Error: you cannot checkin as 'Administrator' or 'mysqldev' user."
|
||||||
|
echo "as a workaround set BK_USER to your nickname"
|
||||||
|
echo "e.g.: export BK_USER='bar'"
|
||||||
|
echo ""
|
||||||
|
echo "Checkin FAILED!"
|
||||||
|
echo "Set BK_USER and retry."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
if [ `tail -c1 $BK_FILE` ]
|
if [ `tail -c1 $BK_FILE` ]
|
||||||
then
|
then
|
||||||
echo "File $BK_FILE does not end with a new-line character!"
|
echo "File $BK_FILE does not end with a new-line character!"
|
||||||
|
@ -26,7 +26,7 @@ else
|
|||||||
}
|
}
|
||||||
|
|
||||||
# Some predefined settings
|
# Some predefined settings
|
||||||
$build_command= "BUILD/compile-pentium-max";
|
$build_command= "BUILD/compile-dist";
|
||||||
$PWD= cwd();
|
$PWD= cwd();
|
||||||
$opt_docdir= $PWD . "/mysqldoc";
|
$opt_docdir= $PWD . "/mysqldoc";
|
||||||
$opt_archive_log= undef;
|
$opt_archive_log= undef;
|
||||||
@ -38,7 +38,7 @@ $opt_dry_run= undef;
|
|||||||
$opt_export_only= undef;
|
$opt_export_only= undef;
|
||||||
$opt_help= $opt_verbose= 0;
|
$opt_help= $opt_verbose= 0;
|
||||||
$opt_log= undef;
|
$opt_log= undef;
|
||||||
$opt_mail= "";
|
$opt_mail= "build\@mysql.com";
|
||||||
$opt_pull= undef;
|
$opt_pull= undef;
|
||||||
$opt_revision= undef;
|
$opt_revision= undef;
|
||||||
$opt_suffix= "";
|
$opt_suffix= "";
|
||||||
@ -70,7 +70,7 @@ GetOptions(
|
|||||||
"test|t",
|
"test|t",
|
||||||
"verbose|v",
|
"verbose|v",
|
||||||
"win-dist|w",
|
"win-dist|w",
|
||||||
"quiet|q",
|
"quiet|q",
|
||||||
) || print_help("");
|
) || print_help("");
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -122,18 +122,8 @@ if (($opt_directory ne $PWD) && (!-d $opt_directory && !$opt_dry_run))
|
|||||||
#
|
#
|
||||||
if ($opt_pull)
|
if ($opt_pull)
|
||||||
{
|
{
|
||||||
&logger("Updating BK tree $REPO to latest ChangeSet first");
|
&bk_pull("$REPO");
|
||||||
chdir ($REPO) or &abort("Could not chdir to $REPO!");
|
&bk_pull("$opt_docdir") unless ($opt_skip_manual);
|
||||||
&run_command("bk pull", "Could not update $REPO!");
|
|
||||||
chdir ($PWD) or &abort("Could not chdir to $PWD!");
|
|
||||||
|
|
||||||
unless ($opt_skip_manual)
|
|
||||||
{
|
|
||||||
&logger("Updating manual tree in $opt_docdir");
|
|
||||||
chdir ($opt_docdir) or &abort("Could not chdir to $opt_docdir!");
|
|
||||||
&run_command("bk pull", "Could not update $opt_docdir!");
|
|
||||||
chdir ($PWD) or &abort("Could not chdir to $PWD!");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -220,10 +210,16 @@ if (-d $target_dir)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
&logger("Renaming $target_dir to $target_dir.old." . $$);
|
# Get the time stamp of "configure.in"
|
||||||
|
@stat= stat("$target_dir/configure.in");
|
||||||
|
my $mtime= $stat[9];
|
||||||
|
my ($sec,$min,$hour,$mday,$mon,$year) = localtime($mtime);
|
||||||
|
my $mtime= sprintf("%04d-%02d-%02d-%02d:%02d", $year+1900, $mon+1, $mday, $hour, $min);
|
||||||
|
|
||||||
|
&logger("Renaming $target_dir to $target_dir-$mtime");
|
||||||
$command= "mv ";
|
$command= "mv ";
|
||||||
$command.= "-v " if ($opt_verbose || defined $opt_log);
|
$command.= "-v " if ($opt_verbose || defined $opt_log);
|
||||||
$command.= "$target_dir $target_dir.old." . $$;
|
$command.= "$target_dir $target_dir-$mtime";
|
||||||
&run_command($command, "Could not rename $target_dir!");
|
&run_command($command, "Could not rename $target_dir!");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -262,7 +258,7 @@ if (defined $opt_changelog)
|
|||||||
$msg= "Adding $target_dir/ChangeLog";
|
$msg= "Adding $target_dir/ChangeLog";
|
||||||
$msg.= " (down to revision $opt_changelog)" if $opt_changelog ne "";
|
$msg.= " (down to revision $opt_changelog)" if $opt_changelog ne "";
|
||||||
&logger($msg);
|
&logger($msg);
|
||||||
$command= "bk changes -mv";
|
$command= "bk changes -v";
|
||||||
$command.= " -r" if ($opt_changelog ne "" || $opt_revision);
|
$command.= " -r" if ($opt_changelog ne "" || $opt_revision);
|
||||||
$command.= $opt_changelog if $opt_changelog ne "";
|
$command.= $opt_changelog if $opt_changelog ne "";
|
||||||
$command.= ".." if ($opt_changelog ne "" && !$opt_revision);
|
$command.= ".." if ($opt_changelog ne "" && !$opt_revision);
|
||||||
@ -270,7 +266,7 @@ if (defined $opt_changelog)
|
|||||||
$command.= " " . $REPO . " > $target_dir/ChangeLog";
|
$command.= " " . $REPO . " > $target_dir/ChangeLog";
|
||||||
&logger($command);
|
&logger($command);
|
||||||
# We cannot use run_command here because of output redirection
|
# We cannot use run_command here because of output redirection
|
||||||
if (!$opt_dry_run)
|
unless ($opt_dry_run)
|
||||||
{
|
{
|
||||||
system($command) == 0 or &abort("Could not create $target_dir/ChangeLog!");
|
system($command) == 0 or &abort("Could not create $target_dir/ChangeLog!");
|
||||||
}
|
}
|
||||||
@ -281,13 +277,17 @@ if (defined $opt_changelog)
|
|||||||
#
|
#
|
||||||
unless ($opt_skip_manual)
|
unless ($opt_skip_manual)
|
||||||
{
|
{
|
||||||
$msg= "Updating manual files";
|
&logger("Updating manual files");
|
||||||
&logger($msg);
|
foreach $file qw/internals manual reservedwords errmsg-table cl-errmsg-table/
|
||||||
foreach $file qw/internals manual reservedwords/
|
|
||||||
{
|
{
|
||||||
system ("bk cat $opt_docdir/Docs/$file.texi > $target_dir/Docs/$file.texi") == 0
|
system ("bk cat $opt_docdir/Docs/$file.texi > $target_dir/Docs/$file.texi") == 0
|
||||||
or &abort("Could not update $file.texi in $target_dir/Docs/!");
|
or &abort("Could not update $file.texi in $target_dir/Docs/!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
&run_command("rm -f $target_dir/Docs/Images/Makefile*",
|
||||||
|
"Could not remove Makefiles in $target_dir/Docs/Images/!");
|
||||||
|
&run_command("cp $opt_docdir/Docs/Images/*.* $target_dir/Docs/Images",
|
||||||
|
"Could not copy image files in $target_dir/Docs/Images/!");
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -373,6 +373,18 @@ if ($opt_archive_log)
|
|||||||
|
|
||||||
exit 0;
|
exit 0;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Run a BK pull on the given BK tree
|
||||||
|
#
|
||||||
|
sub bk_pull
|
||||||
|
{
|
||||||
|
my $bk_tree= $_[0];
|
||||||
|
&logger("Updating BK tree $bk_tree to latest ChangeSet first");
|
||||||
|
chdir ($bk_tree) or &abort("Could not chdir to $bk_tree!");
|
||||||
|
&run_command("bk pull", "Could not update $bk_tree!");
|
||||||
|
chdir ($PWD) or &abort("Could not chdir to $PWD!");
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Print the help text message (with an optional message on top)
|
# Print the help text message (with an optional message on top)
|
||||||
#
|
#
|
||||||
@ -425,6 +437,7 @@ Options:
|
|||||||
include a log file snippet, if logging is enabled)
|
include a log file snippet, if logging is enabled)
|
||||||
Note that the \@-Sign needs to be quoted!
|
Note that the \@-Sign needs to be quoted!
|
||||||
Example: --mail=user\\\@domain.com
|
Example: --mail=user\\\@domain.com
|
||||||
|
Default: build\@mysql.com
|
||||||
-q, --quiet Be quiet
|
-q, --quiet Be quiet
|
||||||
-p, --pull Update the source BK trees before building
|
-p, --pull Update the source BK trees before building
|
||||||
-r, --revision=<rev> Export the tree as of revision <rev>
|
-r, --revision=<rev> Export the tree as of revision <rev>
|
||||||
|
@ -7,16 +7,17 @@ use Sys::Hostname;
|
|||||||
@config_options= ();
|
@config_options= ();
|
||||||
@make_options= ();
|
@make_options= ();
|
||||||
|
|
||||||
$opt_distribution=$opt_user=$opt_config_env=$opt_config_extra_env="";
|
$opt_comment=$opt_distribution=$opt_user=$opt_config_env=$opt_config_extra_env="";
|
||||||
$opt_dbd_options=$opt_perl_options=$opt_config_options=$opt_make_options=$opt_suffix="";
|
$opt_dbd_options=$opt_perl_options=$opt_config_options=$opt_make_options=$opt_suffix="";
|
||||||
$opt_tmp=$opt_version_suffix="";
|
$opt_tmp=$opt_version_suffix="";
|
||||||
$opt_bundled_zlib=$opt_help=$opt_delete=$opt_debug=$opt_stage=$opt_no_test=$opt_no_perl=$opt_with_low_memory=$opt_fast_benchmark=$opt_static_client=$opt_static_server=$opt_static_perl=$opt_sur=$opt_with_small_disk=$opt_local_perl=$opt_tcpip=$opt_build_thread=$opt_use_old_distribution=$opt_enable_shared=$opt_no_crash_me=$opt_no_strip=$opt_with_cluster=$opt_with_debug=$opt_no_benchmark=$opt_no_mysqltest=$opt_without_embedded=$opt_readline=0;
|
$opt_bundled_zlib=$opt_help=$opt_delete=$opt_debug=$opt_stage=$opt_no_test=$opt_no_perl=$opt_one_error=$opt_with_low_memory=$opt_fast_benchmark=$opt_static_client=$opt_static_server=$opt_static_perl=$opt_sur=$opt_with_small_disk=$opt_local_perl=$opt_tcpip=$opt_build_thread=$opt_use_old_distribution=$opt_enable_shared=$opt_no_crash_me=$opt_no_strip=$opt_with_archive=$opt_with_cluster=$opt_with_csv=$opt_with_example=$opt_with_debug=$opt_no_benchmark=$opt_no_mysqltest=$opt_without_embedded=$opt_readline=0;
|
||||||
$opt_innodb=$opt_bdb=$opt_raid=$opt_libwrap=$opt_clearlogs=0;
|
$opt_skip_embedded_test=$opt_skip_ps_test=$opt_innodb=$opt_bdb=$opt_raid=$opt_libwrap=$opt_clearlogs=0;
|
||||||
|
|
||||||
GetOptions(
|
GetOptions(
|
||||||
"bdb",
|
"bdb",
|
||||||
"build-thread=i",
|
"build-thread=i",
|
||||||
"bundled-zlib",
|
"bundled-zlib",
|
||||||
|
"comment=s",
|
||||||
"config-env=s" => \@config_env,
|
"config-env=s" => \@config_env,
|
||||||
"config-extra-env=s" => \@config_extra_env,
|
"config-extra-env=s" => \@config_extra_env,
|
||||||
"config-options=s" => \@config_options,
|
"config-options=s" => \@config_options,
|
||||||
@ -37,10 +38,13 @@ GetOptions(
|
|||||||
"no-test",
|
"no-test",
|
||||||
"no-mysqltest",
|
"no-mysqltest",
|
||||||
"no-benchmark",
|
"no-benchmark",
|
||||||
|
"one-error",
|
||||||
"perl-files=s",
|
"perl-files=s",
|
||||||
"perl-options=s",
|
"perl-options=s",
|
||||||
"raid",
|
"raid",
|
||||||
"readline",
|
"readline",
|
||||||
|
"skip-embedded-test",
|
||||||
|
"skip-ps-test",
|
||||||
"stage=i",
|
"stage=i",
|
||||||
"static-client",
|
"static-client",
|
||||||
"static-perl",
|
"static-perl",
|
||||||
@ -52,7 +56,10 @@ GetOptions(
|
|||||||
"use-old-distribution",
|
"use-old-distribution",
|
||||||
"user=s",
|
"user=s",
|
||||||
"version-suffix=s",
|
"version-suffix=s",
|
||||||
|
"with-archive",
|
||||||
"with-cluster",
|
"with-cluster",
|
||||||
|
"with-csv",
|
||||||
|
"with-example",
|
||||||
"with-debug",
|
"with-debug",
|
||||||
"with-low-memory",
|
"with-low-memory",
|
||||||
"with-other-libc=s",
|
"with-other-libc=s",
|
||||||
@ -104,6 +111,7 @@ $log="$pwd/Logs/$host-$major.$minor$opt_version_suffix.log";
|
|||||||
$opt_distribution =~ /(mysql[^\/]*)\.tar/;
|
$opt_distribution =~ /(mysql[^\/]*)\.tar/;
|
||||||
$ver=$1;
|
$ver=$1;
|
||||||
$gcc_version=which("gcc");
|
$gcc_version=which("gcc");
|
||||||
|
$opt_comment= "Official MySQL$opt_version_suffix binary" unless $opt_comment;
|
||||||
if (defined($gcc_version) && ! $opt_config_env)
|
if (defined($gcc_version) && ! $opt_config_env)
|
||||||
{
|
{
|
||||||
$tmp=`$gcc_version -v 2>&1`;
|
$tmp=`$gcc_version -v 2>&1`;
|
||||||
@ -149,7 +157,7 @@ $ENV{'MYSQL_TCP_PORT'}= $mysql_tcp_port= 3334 + $opt_build_thread*2;
|
|||||||
$ENV{'MYSQL_UNIX_PORT'}=$mysql_unix_port="$opt_tmp/mysql$opt_suffix.build";
|
$ENV{'MYSQL_UNIX_PORT'}=$mysql_unix_port="$opt_tmp/mysql$opt_suffix.build";
|
||||||
$ENV{"PERL5LIB"}="$pwd/$host/perl5:$pwd/$host/perl5/site_perl";
|
$ENV{"PERL5LIB"}="$pwd/$host/perl5:$pwd/$host/perl5/site_perl";
|
||||||
$slave_port=$mysql_tcp_port+16;
|
$slave_port=$mysql_tcp_port+16;
|
||||||
$ndbcluster_port= 9350 + $opt_build_thread*2;
|
$ndbcluster_port= 9350 + $opt_build_thread*4;
|
||||||
$manager_port=$mysql_tcp_port+1;
|
$manager_port=$mysql_tcp_port+1;
|
||||||
$mysqladmin_args="--no-defaults -u root --connect_timeout=5 --shutdown_timeout=20";
|
$mysqladmin_args="--no-defaults -u root --connect_timeout=5 --shutdown_timeout=20";
|
||||||
|
|
||||||
@ -258,7 +266,8 @@ if ($opt_stage <= 1)
|
|||||||
$opt_config_options.= " --with-berkeley-db" if ($opt_bdb);
|
$opt_config_options.= " --with-berkeley-db" if ($opt_bdb);
|
||||||
$opt_config_options.= " --with-zlib-dir=bundled" if ($opt_bundled_zlib);
|
$opt_config_options.= " --with-zlib-dir=bundled" if ($opt_bundled_zlib);
|
||||||
$opt_config_options.= " --with-client-ldflags=-all-static" if ($opt_static_client);
|
$opt_config_options.= " --with-client-ldflags=-all-static" if ($opt_static_client);
|
||||||
$opt_config_options.= " --with-debug" if ($opt_with_debug);
|
$opt_config_options.= " --with-debug" if ($opt_with_debug);
|
||||||
|
$opt_config_options.= " --without-ndb-debug" if ($opt_with_debug && $opt_with_cluster);
|
||||||
$opt_config_options.= " --with-libwrap" if ($opt_libwrap);
|
$opt_config_options.= " --with-libwrap" if ($opt_libwrap);
|
||||||
$opt_config_options.= " --with-low-memory" if ($opt_with_low_memory);
|
$opt_config_options.= " --with-low-memory" if ($opt_with_low_memory);
|
||||||
$opt_config_options.= " --with-mysqld-ldflags=-all-static" if ($opt_static_server);
|
$opt_config_options.= " --with-mysqld-ldflags=-all-static" if ($opt_static_server);
|
||||||
@ -272,7 +281,11 @@ if ($opt_stage <= 1)
|
|||||||
$opt_config_options.= " --with-libedit";
|
$opt_config_options.= " --with-libedit";
|
||||||
}
|
}
|
||||||
$opt_config_options.= " --with-embedded-server" unless ($opt_without_embedded);
|
$opt_config_options.= " --with-embedded-server" unless ($opt_without_embedded);
|
||||||
|
$opt_skip_embedded_test= 1 if ($opt_without_embedded);
|
||||||
|
$opt_config_options.= " --with-archive-storage-engine" if ($opt_with_archive);
|
||||||
$opt_config_options.= " --with-ndbcluster" if ($opt_with_cluster);
|
$opt_config_options.= " --with-ndbcluster" if ($opt_with_cluster);
|
||||||
|
$opt_config_options.= " --with-csv-storage-engine" if ($opt_with_csv);
|
||||||
|
$opt_config_options.= " --with-example-storage-engine" if ($opt_with_example);
|
||||||
|
|
||||||
# Only enable InnoDB when requested (required to be able to
|
# Only enable InnoDB when requested (required to be able to
|
||||||
# build the "Classic" packages that do not include InnoDB)
|
# build the "Classic" packages that do not include InnoDB)
|
||||||
@ -292,7 +305,7 @@ if ($opt_stage <= 1)
|
|||||||
}
|
}
|
||||||
|
|
||||||
$prefix="/usr/local/mysql";
|
$prefix="/usr/local/mysql";
|
||||||
check_system("$opt_config_env ./configure --prefix=$prefix --localstatedir=$prefix/data --libexecdir=$prefix/bin --with-comment=\"Official MySQL$opt_version_suffix binary\" --with-extra-charsets=complex --with-server-suffix=\"$opt_version_suffix\" --enable-thread-safe-client --enable-local-infile $opt_config_options","Thank you for choosing MySQL");
|
check_system("$opt_config_env ./configure --prefix=$prefix --localstatedir=$prefix/data --libexecdir=$prefix/bin --with-comment=\"$opt_comment\" --with-extra-charsets=complex --with-server-suffix=\"$opt_version_suffix\" --enable-thread-safe-client --enable-local-infile $opt_config_options","Thank you for choosing MySQL");
|
||||||
if (-d "$pwd/$host/include-mysql")
|
if (-d "$pwd/$host/include-mysql")
|
||||||
{
|
{
|
||||||
safe_system("cp -r $pwd/$host/include-mysql/* $pwd/$host/$ver/include");
|
safe_system("cp -r $pwd/$host/include-mysql/* $pwd/$host/$ver/include");
|
||||||
@ -310,6 +323,7 @@ if ($opt_stage <= 2)
|
|||||||
$command=$make;
|
$command=$make;
|
||||||
$command.= " $opt_make_options" if (defined($opt_make_options) && $opt_make_options ne "");
|
$command.= " $opt_make_options" if (defined($opt_make_options) && $opt_make_options ne "");
|
||||||
safe_system($command);
|
safe_system($command);
|
||||||
|
print LOG "Do-compile: Build successful\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -373,10 +387,29 @@ if ($opt_stage <= 5 && !$opt_no_test && !$opt_no_mysqltest)
|
|||||||
{
|
{
|
||||||
my $flags= "";
|
my $flags= "";
|
||||||
$flags.= " --with-ndbcluster" if ($opt_with_cluster);
|
$flags.= " --with-ndbcluster" if ($opt_with_cluster);
|
||||||
|
$flags.= " --force" if (!$opt_one_error);
|
||||||
log_timestamp();
|
log_timestamp();
|
||||||
|
info("Running test suite");
|
||||||
system("mkdir $bench_tmpdir") if (! -d $bench_tmpdir);
|
system("mkdir $bench_tmpdir") if (! -d $bench_tmpdir);
|
||||||
safe_cd("${test_dir}/mysql-test");
|
safe_cd("${test_dir}/mysql-test");
|
||||||
check_system("./mysql-test-run $flags --tmpdir=$bench_tmpdir --master_port=$mysql_tcp_port --slave_port=$slave_port --ndbcluster_port=$ndbcluster_port --manager-port=$manager_port --no-manager --sleep=10", "tests were successful");
|
check_system("./mysql-test-run $flags --tmpdir=$bench_tmpdir --master_port=$mysql_tcp_port --slave_port=$slave_port --ndbcluster_port=$ndbcluster_port --manager-port=$manager_port --no-manager --sleep=10", "tests were successful");
|
||||||
|
|
||||||
|
unless ($opt_skip_ps_test)
|
||||||
|
{
|
||||||
|
log_timestamp();
|
||||||
|
info("Running test suite using prepared statements");
|
||||||
|
check_system("./mysql-test-run $flags --ps-protocol --tmpdir=$bench_tmpdir --master_port=$mysql_tcp_port --slave_port=$slave_port --ndbcluster_port=$ndbcluster_port --manager-port=$manager_port --no-manager --sleep=10", "tests were successful");
|
||||||
|
}
|
||||||
|
|
||||||
|
unless ($opt_skip_embedded_test)
|
||||||
|
{
|
||||||
|
log_timestamp();
|
||||||
|
info("Running embedded server test suite");
|
||||||
|
# Embedded server and NDB don't jive
|
||||||
|
$flags=~ s/ --with-ndbcluster//;
|
||||||
|
check_system("./mysql-test-run $flags --embedded-server --tmpdir=$bench_tmpdir --master_port=$mysql_tcp_port --slave_port=$slave_port --manager-port=$manager_port --no-manager --sleep=10", "tests were successful");
|
||||||
|
}
|
||||||
|
# 'mysql-test-run' writes its own final message for log evaluation.
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -499,6 +532,10 @@ When running several Do-compile runs in parallel, each build
|
|||||||
should have its own thread ID, so running the test suites
|
should have its own thread ID, so running the test suites
|
||||||
does not cause conflicts with duplicate TCP port numbers.
|
does not cause conflicts with duplicate TCP port numbers.
|
||||||
|
|
||||||
|
--comment=<comment>
|
||||||
|
Replace the default compilation comment that is embedded into
|
||||||
|
the mysqld binary.
|
||||||
|
|
||||||
--config-env=<environment for configure>
|
--config-env=<environment for configure>
|
||||||
To set up the environment, like 'CC=cc CXX=gcc CXXFLAGS=-O3'
|
To set up the environment, like 'CC=cc CXX=gcc CXXFLAGS=-O3'
|
||||||
|
|
||||||
@ -555,7 +592,10 @@ Do not run any tests.
|
|||||||
Do not run the benchmark test (written in perl)
|
Do not run the benchmark test (written in perl)
|
||||||
|
|
||||||
--no-mysqltest
|
--no-mysqltest
|
||||||
Do not run the the mysql-test-run test (Same as 'make test')
|
Do not run the mysql-test-run test (Same as 'make test')
|
||||||
|
|
||||||
|
--one-error
|
||||||
|
Terminate the mysql-test-run test after the first difference (default: use '--force')
|
||||||
|
|
||||||
--no-perl
|
--no-perl
|
||||||
Do not compile or install Perl modules, use the system installed ones
|
Do not compile or install Perl modules, use the system installed ones
|
||||||
@ -572,6 +612,12 @@ Compile with RAID support
|
|||||||
--readline
|
--readline
|
||||||
Compile against readline library instead of libedit
|
Compile against readline library instead of libedit
|
||||||
|
|
||||||
|
--skip-embedded-test
|
||||||
|
Skip running the test suite against the embedded server
|
||||||
|
|
||||||
|
--skip-ps-test
|
||||||
|
Skip running the additional test run that uses the prepared statement protocol
|
||||||
|
|
||||||
--stage=[1-6]
|
--stage=[1-6]
|
||||||
Start script from some specific point.
|
Start script from some specific point.
|
||||||
|
|
||||||
@ -601,9 +647,18 @@ If user is empty then no mail is sent.
|
|||||||
--version-suffix=suffix
|
--version-suffix=suffix
|
||||||
Set name suffix (e.g. 'com' or '-max') for a distribution
|
Set name suffix (e.g. 'com' or '-max') for a distribution
|
||||||
|
|
||||||
|
--with archive
|
||||||
|
Enable the Archive storage engine
|
||||||
|
|
||||||
--with cluster
|
--with cluster
|
||||||
Compile and test with NDB Cluster enabled
|
Compile and test with NDB Cluster enabled
|
||||||
|
|
||||||
|
--with-csv
|
||||||
|
Enable the CSV storage engine
|
||||||
|
|
||||||
|
--with-example
|
||||||
|
Enable the Example storage engine
|
||||||
|
|
||||||
--with-debug
|
--with-debug
|
||||||
Build binaries with debug information (implies "--no-strip")
|
Build binaries with debug information (implies "--no-strip")
|
||||||
|
|
||||||
@ -635,16 +690,20 @@ sub abort
|
|||||||
|
|
||||||
if ($opt_user)
|
if ($opt_user)
|
||||||
{
|
{
|
||||||
$mail_header_file="$opt_tmp/do-command.$$";
|
# Take the last 40 lines of the build log
|
||||||
open(TMP,">$mail_header_file");
|
open(LOG, "$log") or die $!;
|
||||||
|
my @log= <LOG>;
|
||||||
|
close LOG;
|
||||||
|
splice @log => 0, -40;
|
||||||
|
my $mail_file="$opt_tmp/do-command.$$";
|
||||||
|
open(TMP,">$mail_file") or die $!;
|
||||||
print TMP "From: mysqldev\@$full_host_name\n";
|
print TMP "From: mysqldev\@$full_host_name\n";
|
||||||
print TMP "To: $email\n";
|
print TMP "To: $email\n";
|
||||||
print TMP "Subject: $host($uname): $ver$opt_version_suffix compilation failed\n\n";
|
print TMP "Subject: $host($uname): $ver$opt_version_suffix compilation failed\n\n";
|
||||||
|
print TMP @log;
|
||||||
close TMP;
|
close TMP;
|
||||||
system("tail -n 40 $log > $log.mail");
|
system("$sendmail -t -f $email < $mail_file");
|
||||||
system("cat $mail_header_file $log.mail | $sendmail -t -f $email");
|
unlink($mail_file);
|
||||||
unlink($mail_header_file);
|
|
||||||
unlink("$log.mail");
|
|
||||||
}
|
}
|
||||||
exit 1;
|
exit 1;
|
||||||
}
|
}
|
||||||
@ -747,7 +806,7 @@ sub find
|
|||||||
sub rm_all
|
sub rm_all
|
||||||
{
|
{
|
||||||
my(@rm_files)=@_;
|
my(@rm_files)=@_;
|
||||||
my($dir,$current_dir,@files,@dirs);
|
my($dir,$current_dir,@files,@dirs,$removed);
|
||||||
$current_dir = `pwd`; chomp($current_dir);
|
$current_dir = `pwd`; chomp($current_dir);
|
||||||
|
|
||||||
foreach $dir (@rm_files)
|
foreach $dir (@rm_files)
|
||||||
@ -771,7 +830,9 @@ sub rm_all
|
|||||||
}
|
}
|
||||||
if ($#files >= 0)
|
if ($#files >= 0)
|
||||||
{
|
{
|
||||||
system("rm -f " . join(" ",@files)) && abort("Can't remove files from $dir");
|
$removed= unlink @files;
|
||||||
|
print "rm_all : removed $removed files in $current_dir/$dir\n" if ($opt_debug);
|
||||||
|
abort("Can't remove all $#files+1 from $current_dir/$dir, just $removed") if $removed != $#files+1;
|
||||||
}
|
}
|
||||||
foreach $dir (@dirs)
|
foreach $dir (@dirs)
|
||||||
{
|
{
|
||||||
|
85
Build-tools/Do-hpux-depot
Executable file
85
Build-tools/Do-hpux-depot
Executable file
@ -0,0 +1,85 @@
|
|||||||
|
#!/usr/bin/perl
|
||||||
|
|
||||||
|
#
|
||||||
|
# By Matt Wagner <matt@mysql.com> 2005
|
||||||
|
#
|
||||||
|
# This script generates HP Depot packages for MySQL Server.
|
||||||
|
# It basically repackages a binary tarball as a depot.
|
||||||
|
#
|
||||||
|
# Usage: ./Do-hpux-depot <untarred-binary-tarball>
|
||||||
|
#
|
||||||
|
|
||||||
|
$fullname = shift @ARGV;
|
||||||
|
$fullname or die "No package name was specified";
|
||||||
|
-d $fullname or die "That directory is not present!";
|
||||||
|
|
||||||
|
$fullname =~ s,/+$,,; # Remove ending slash if any
|
||||||
|
|
||||||
|
chomp($pwd= `pwd`);
|
||||||
|
|
||||||
|
%title= (
|
||||||
|
"mysql-standard" => "MySQL Community Edition - Standard (GPL)",
|
||||||
|
"mysql-debug" => "MySQL Community Edition - Debug (GPL)",
|
||||||
|
"mysql-max" => "MySQL Community Edition - Experimental (GPL)",
|
||||||
|
"mysql-pro" => "MySQL Pro (Commercial)",
|
||||||
|
"mysql-classic" => "MySQL Classic (Commercial)",
|
||||||
|
"mysql-cluster" => "MySQL Cluster (Commercial)",
|
||||||
|
);
|
||||||
|
|
||||||
|
%architecture= (
|
||||||
|
"hpux11.23" => "HP-UX_B.11.23",
|
||||||
|
"hpux11.11" => "HP-UX_B.11.11",
|
||||||
|
"hpux11.00" => "HP-UX_B.11.00",
|
||||||
|
);
|
||||||
|
|
||||||
|
%os_release= (
|
||||||
|
"hpux11.23" => "?.11.2?",
|
||||||
|
"hpux11.11" => "?.11.1?",
|
||||||
|
"hpux11.00" => "?.11.0?",
|
||||||
|
);
|
||||||
|
|
||||||
|
%machine_type= (
|
||||||
|
"ia64" => "ia64*",
|
||||||
|
"hppa2.0w" => "9000/*",
|
||||||
|
);
|
||||||
|
|
||||||
|
$fullname =~ m/^(mysql-\w+)-([\d\.]+)-hp-(hpux11\.\d\d)-(hppa2\.0w|(ia64))-?(64bit)?$/;
|
||||||
|
|
||||||
|
# print "title: $1\n";
|
||||||
|
# print "version: $2\n";
|
||||||
|
# print "os: $3\n";
|
||||||
|
# print "cpu: $4\n";
|
||||||
|
# print "64: $6\n";
|
||||||
|
|
||||||
|
$cpu64= ($6 ne "") ? "_64" : "";
|
||||||
|
|
||||||
|
open (PSF,">${fullname}.psf") or die "Unable to write PSF file ($!)\n";
|
||||||
|
|
||||||
|
print PSF <<EOF;
|
||||||
|
product
|
||||||
|
tag $1
|
||||||
|
vendor_tag "MySQL_AB"
|
||||||
|
title "$title{$1}"
|
||||||
|
description "MySQL Database Server and Clients"
|
||||||
|
revision $2
|
||||||
|
|
||||||
|
architecture $architecture{$3}$cpu64
|
||||||
|
machine_type $machine_type{$4}
|
||||||
|
os_name HP-UX
|
||||||
|
os_release $os_release{$3}
|
||||||
|
directory /usr/local
|
||||||
|
|
||||||
|
fileset
|
||||||
|
tag all
|
||||||
|
revision $2
|
||||||
|
directory $fullname=/usr/local/$fullname
|
||||||
|
file_permissions -u 222 -g bin -o bin
|
||||||
|
file *
|
||||||
|
end
|
||||||
|
end
|
||||||
|
EOF
|
||||||
|
|
||||||
|
close(PSF);
|
||||||
|
|
||||||
|
system("/usr/sbin/swpackage -v -d \"|gzip -c > $fullname.depot.gz\" -x target_type=tape -s ${pwd}/${fullname}.psf");
|
||||||
|
|
@ -31,6 +31,7 @@ $opt_help= undef;
|
|||||||
$opt_log= undef;
|
$opt_log= undef;
|
||||||
$opt_mail= "";
|
$opt_mail= "";
|
||||||
$opt_skip_dmg= undef;
|
$opt_skip_dmg= undef;
|
||||||
|
$opt_skip_prefpane= undef;
|
||||||
$opt_skip_si= undef;
|
$opt_skip_si= undef;
|
||||||
$opt_suffix= undef;
|
$opt_suffix= undef;
|
||||||
$opt_verbose= undef;
|
$opt_verbose= undef;
|
||||||
@ -41,6 +42,7 @@ GetOptions(
|
|||||||
"help|h",
|
"help|h",
|
||||||
"log|l:s",
|
"log|l:s",
|
||||||
"mail|m=s",
|
"mail|m=s",
|
||||||
|
"skip-prefpane|p",
|
||||||
"skip-dmg|skip-disk-image|s",
|
"skip-dmg|skip-disk-image|s",
|
||||||
"skip-si|skip-startup-item",
|
"skip-si|skip-startup-item",
|
||||||
"suffix=s",
|
"suffix=s",
|
||||||
@ -82,9 +84,10 @@ $HOST=~ /^([^.-]*)/;
|
|||||||
$HOST= $1;
|
$HOST= $1;
|
||||||
$LOGFILE= "$PWD/Logs/$HOST-$MAJOR.$MINOR$SUFFIX.log";
|
$LOGFILE= "$PWD/Logs/$HOST-$MAJOR.$MINOR$SUFFIX.log";
|
||||||
$BUILDDIR= "$PWD/$HOST";
|
$BUILDDIR= "$PWD/$HOST";
|
||||||
|
$PREFPANE= "$PWD/mysql-administrator/source/mac/PreferencePane/build/MySQL.prefPane";
|
||||||
$SRCBASEDIR= <$BUILDDIR/mysql*-$VERSION>;
|
$SRCBASEDIR= <$BUILDDIR/mysql*-$VERSION>;
|
||||||
$SUPFILEDIR= <$SRCBASEDIR/support-files/MacOSX>;
|
$SUPFILEDIR= <$SRCBASEDIR/support-files/MacOSX>;
|
||||||
$TAR= <$BUILDDIR/$NAME-apple-darwin*-powerpc.tar.gz>;
|
$TAR= <$BUILDDIR/$NAME-apple-darwin*-powerpc*.tar.gz>;
|
||||||
$TAR =~ /.*\/$NAME(.*)\.tar\.gz$/;
|
$TAR =~ /.*\/$NAME(.*)\.tar\.gz$/;
|
||||||
$ARCH= $1;
|
$ARCH= $1;
|
||||||
$NAME= $NAME . $ARCH;
|
$NAME= $NAME . $ARCH;
|
||||||
@ -219,6 +222,19 @@ unless ($opt_skip_si)
|
|||||||
&run_command($command, "Error while building package $SI_NAME.pkg!");
|
&run_command($command, "Error while building package $SI_NAME.pkg!");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Include the MySQL Preference Pane
|
||||||
|
#
|
||||||
|
unless ($opt_skip_prefpane)
|
||||||
|
{
|
||||||
|
&abort("Could not find PrefPane helper application. Did you compile and install it?")
|
||||||
|
unless (-f "$PREFPANE/Contents/Resources/mahelper");
|
||||||
|
&logger("Including $PREFPANE in $PKGDEST");
|
||||||
|
&run_command("mkdir $PKGDEST/MySQL.prefPane", "Could not create $PKGDEST/MySQL.prefPane!");
|
||||||
|
&run_command("ditto $PREFPANE $PKGDEST/MySQL.prefPane", "Could not copy $PREFPANE into $PKGDEST!");
|
||||||
|
&run_command("chown -R root:wheel $PKGDEST/MySQL.prefPane", "Cannot chown $PKGDEST/MySQL.prefPane!");
|
||||||
|
}
|
||||||
|
|
||||||
if ($opt_skip_dmg)
|
if ($opt_skip_dmg)
|
||||||
{
|
{
|
||||||
&logger("SUCCESS: Package $PKGDEST/$NAME.pkg created");
|
&logger("SUCCESS: Package $PKGDEST/$NAME.pkg created");
|
||||||
@ -254,6 +270,7 @@ chomp($mountpoint=`mount | grep "\/Volumes\/$NAME" | cut -f3 -d" "`) if (!$opt_d
|
|||||||
&logger("Copying $PKGDEST/$NAME.pkg to Disk image /Volumes/$NAME");
|
&logger("Copying $PKGDEST/$NAME.pkg to Disk image /Volumes/$NAME");
|
||||||
&run_command("ditto $PKGDEST /Volumes/$NAME", "Could not copy $PKGDEST to /Volumes/$NAME!");
|
&run_command("ditto $PKGDEST /Volumes/$NAME", "Could not copy $PKGDEST to /Volumes/$NAME!");
|
||||||
&run_command("ditto $SUPFILEDIR/ReadMe.txt /Volumes/$NAME", "Could not copy $SPFILEDIR/ReadMe.txt to /Volumes/$NAME!");
|
&run_command("ditto $SUPFILEDIR/ReadMe.txt /Volumes/$NAME", "Could not copy $SPFILEDIR/ReadMe.txt to /Volumes/$NAME!");
|
||||||
|
&run_command("chown root:wheel /Volumes/$NAME/ReadMe.txt", "Could not fix ownerships of /Volumes/$NAME/ReadMe.txt!");
|
||||||
chomp($mountpoint=`mount | grep "\/Volumes\/$NAME" | cut -f1 -d" "`) if (!$opt_dry_run);
|
chomp($mountpoint=`mount | grep "\/Volumes\/$NAME" | cut -f1 -d" "`) if (!$opt_dry_run);
|
||||||
&abort("/Volumes/$NAME not attached!") if (!$mountpoint && !$opt_dry_run);
|
&abort("/Volumes/$NAME not attached!") if (!$mountpoint && !$opt_dry_run);
|
||||||
&logger("Unmounting $mountpoint");
|
&logger("Unmounting $mountpoint");
|
||||||
@ -302,6 +319,7 @@ Options:
|
|||||||
if logging is enabled)
|
if logging is enabled)
|
||||||
Note that the \@-Sign needs to be quoted!
|
Note that the \@-Sign needs to be quoted!
|
||||||
Example: --mail=user\\\@domain.com
|
Example: --mail=user\\\@domain.com
|
||||||
|
-p, --skip-prefpane Skip including the PreferencePane
|
||||||
-s, --skip-disk-image, --skip-dmg Just build the PKGs, don't put it into a
|
-s, --skip-disk-image, --skip-dmg Just build the PKGs, don't put it into a
|
||||||
disk image afterwards
|
disk image afterwards
|
||||||
--skip-startup-item, --skip-si Skip the creation of the StartupItem PKG
|
--skip-startup-item, --skip-si Skip the creation of the StartupItem PKG
|
||||||
|
@ -22,7 +22,6 @@ use Getopt::Long;
|
|||||||
Getopt::Long::Configure ("bundling");
|
Getopt::Long::Configure ("bundling");
|
||||||
use Sys::Hostname;
|
use Sys::Hostname;
|
||||||
|
|
||||||
$opt_nobuild = undef;
|
|
||||||
$opt_cc= undef;
|
$opt_cc= undef;
|
||||||
$opt_cflags= undef;
|
$opt_cflags= undef;
|
||||||
$opt_clean= undef;
|
$opt_clean= undef;
|
||||||
@ -33,6 +32,9 @@ $opt_help= undef;
|
|||||||
$opt_log= undef;
|
$opt_log= undef;
|
||||||
$opt_mail= "";
|
$opt_mail= "";
|
||||||
$opt_verbose= undef;
|
$opt_verbose= undef;
|
||||||
|
$opt_susebuild= undef;
|
||||||
|
$opt_susebuildroot= undef;
|
||||||
|
$opt_suserpms= undef;
|
||||||
|
|
||||||
# Set a dummy version until we know the correct one
|
# Set a dummy version until we know the correct one
|
||||||
$VERSION= "x.y.z";
|
$VERSION= "x.y.z";
|
||||||
@ -49,7 +51,9 @@ GetOptions(
|
|||||||
"help|h",
|
"help|h",
|
||||||
"log|l:s",
|
"log|l:s",
|
||||||
"mail|m=s",
|
"mail|m=s",
|
||||||
"nobuild",
|
"susebuild|s",
|
||||||
|
"susebuildroot|r=s",
|
||||||
|
"suserpms=s",
|
||||||
"verbose|v",
|
"verbose|v",
|
||||||
) || &print_help;
|
) || &print_help;
|
||||||
|
|
||||||
@ -57,6 +61,20 @@ GetOptions(
|
|||||||
|
|
||||||
defined($SPECFILE=$ARGV[0]) || print_help("Please provide the spec file name!");
|
defined($SPECFILE=$ARGV[0]) || print_help("Please provide the spec file name!");
|
||||||
|
|
||||||
|
&print_help("Please define the location of the RPM repository!") if $opt_susebuild && !($opt_suserpms || $ENV{BUILD_RPMS});
|
||||||
|
|
||||||
|
unless ($opt_susebuildroot)
|
||||||
|
{
|
||||||
|
if ($ENV{BUILD_ROOT})
|
||||||
|
{
|
||||||
|
$opt_susebuildroot= $ENV{BUILD_ROOT};
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$opt_susebuildroot="/var/tmp/build-root";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# Include helper functions
|
# Include helper functions
|
||||||
$PWD= cwd();
|
$PWD= cwd();
|
||||||
$LOGGER= "$PWD/logger.pm";
|
$LOGGER= "$PWD/logger.pm";
|
||||||
@ -72,7 +90,7 @@ else
|
|||||||
$subject= "RPM build for $SPECFILE failed" if $opt_mail;
|
$subject= "RPM build for $SPECFILE failed" if $opt_mail;
|
||||||
|
|
||||||
# Open the spec file and extract the version number
|
# Open the spec file and extract the version number
|
||||||
open(SPEC, $SPECFILE) or &abort("Unable to open \"$ARGV[0]\": $!");
|
open(SPEC, $SPECFILE) or die "Unable to open \"$ARGV[0]\": $!";
|
||||||
@spec= <SPEC>;
|
@spec= <SPEC>;
|
||||||
close SPEC;
|
close SPEC;
|
||||||
|
|
||||||
@ -94,7 +112,7 @@ $HOST= hostname();
|
|||||||
$HOST=~ /^([^.-]*)/;
|
$HOST=~ /^([^.-]*)/;
|
||||||
$HOST= $1;
|
$HOST= $1;
|
||||||
$LOGFILE= "$PWD/Logs/Do-rpm-$HOST-$MAJOR.$MINOR.log";
|
$LOGFILE= "$PWD/Logs/Do-rpm-$HOST-$MAJOR.$MINOR.log";
|
||||||
&logger("Using spec file for version: $VERSION");
|
&logger("Logging to $LOGFILE");
|
||||||
|
|
||||||
#
|
#
|
||||||
# Override predefined Log file name
|
# Override predefined Log file name
|
||||||
@ -114,111 +132,157 @@ if (defined $opt_log)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
&logger("Using spec file for version: $VERSION");
|
||||||
# Newer RPM versions ship with a separate tool "rpmbuild" to build RPMs
|
|
||||||
#
|
if ($opt_susebuild)
|
||||||
if (-x "/usr/bin/rpmbuild")
|
|
||||||
{
|
{
|
||||||
$RPM= "/usr/bin/rpmbuild";
|
&susebuild;
|
||||||
$RMSOURCE= "--rmsource --rmspec";
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$RPM= "/bin/rpm";
|
&rpmbuild;
|
||||||
$RMSOURCE= "--rmspec";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($RPM)
|
|
||||||
{
|
|
||||||
&logger("Found rpm binary: $RPM");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
&abort("Unable to find RPM binary!");
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# determine some RPM settings for this host
|
|
||||||
#
|
|
||||||
chomp($RPMARCH= `$RPM --eval "%{_arch}" 2> /dev/null`);
|
|
||||||
chomp($RPMDIR= `$RPM --eval "%{_rpmdir}" 2> /dev/null`);
|
|
||||||
chomp($SOURCEDIR= `$RPM --eval "%{_sourcedir}" 2> /dev/null`);
|
|
||||||
chomp($SPECDIR= `$RPM --eval "%{_specdir}" 2> /dev/null`);
|
|
||||||
chomp($SRCRPMDIR= `$RPM --eval "%{_srcrpmdir}" 2> /dev/null`);
|
|
||||||
|
|
||||||
$SOURCEFILE= glob "mysql*-$VERSION.tar.gz";
|
|
||||||
|
|
||||||
unless($opt_nobuild) {
|
|
||||||
|
|
||||||
&logger("Starting RPM build of MySQL-$VERSION on $HOST");
|
|
||||||
|
|
||||||
foreach $file ($SOURCEFILE, $SPECFILE)
|
|
||||||
{
|
|
||||||
&abort("Unable to find $file!") unless (-f "$file");
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Install source and spec file
|
|
||||||
#
|
|
||||||
&logger("Copying SOURCE and SPEC file to build directories.");
|
|
||||||
unless ($opt_dry_run)
|
|
||||||
{
|
|
||||||
copy($SOURCEFILE, $SOURCEDIR)
|
|
||||||
or &abort("Unable to copy $SOURCEFILE to $SOURCEDIR!");
|
|
||||||
copy($SPECFILE, $SPECDIR)
|
|
||||||
or &abort("Unable to copy $SPECFILE to $SPECDIR!");
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Set environment variables - these are being used in the
|
|
||||||
# official MySQL RPM spec file
|
|
||||||
#
|
|
||||||
&logger("Setting special build environment variables")
|
|
||||||
if ($opt_cc) or ($opt_cflags) or ($opt_cxxflags) or ($opt_cxx);
|
|
||||||
$ENV{MYSQL_BUILD_CC}=$opt_cc if ($opt_cc);
|
|
||||||
$ENV{MYSQL_BUILD_CFLAGS}=$opt_cflags if ($opt_cflags);
|
|
||||||
$ENV{MYSQL_BUILD_CXXFLAGS}=$opt_cxxflags if ($opt_cxxflags);
|
|
||||||
$ENV{MYSQL_BUILD_CXX}=$opt_cxx if ($opt_cxx);
|
|
||||||
|
|
||||||
#
|
|
||||||
# Build the RPMs
|
|
||||||
#
|
|
||||||
$command= "$RPM";
|
|
||||||
$command.= " -v" if ($opt_verbose);
|
|
||||||
$command.= " -ba";
|
|
||||||
$command.= " --clean $RMSOURCE" if $opt_clean;
|
|
||||||
$command.= " $SPECDIR/";
|
|
||||||
$command.= basename($SPECFILE);
|
|
||||||
&logger("Building RPM.");
|
|
||||||
&run_command($command, "Error while building the RPMs!");
|
|
||||||
}
|
|
||||||
|
|
||||||
#
|
|
||||||
# Move the resulting RPMs into the pwd
|
|
||||||
#
|
|
||||||
$command= "mv";
|
|
||||||
$command.= " -v " if ($opt_verbose);
|
|
||||||
$command.= " $SRCRPMDIR/MySQL*$VERSION_SRPM*.src.rpm $PWD";
|
|
||||||
&logger("Moving source RPM to current dir.");
|
|
||||||
&run_command($command, "Error moving source RPM!");
|
|
||||||
|
|
||||||
$command= "mv";
|
|
||||||
$command.= " -v " if ($opt_verbose);
|
|
||||||
# $command.= " $RPMDIR/$RPMARCH/MySQL*$VERSION*.$RPMARCH.rpm $PWD";
|
|
||||||
$command.= " $RPMDIR/$RPMARCH/MySQL*$VERSION_SRPM*.$RPMARCH.rpm $PWD";
|
|
||||||
&logger("Moving binary RPMs to current dir.");
|
|
||||||
&run_command($command, "Error moving binary RPMs!");
|
|
||||||
|
|
||||||
&logger("SUCCESS: RPM files successfully created.") unless ($opt_dry_run);
|
&logger("SUCCESS: RPM files successfully created.") unless ($opt_dry_run);
|
||||||
exit 0;
|
exit 0;
|
||||||
|
|
||||||
|
#
|
||||||
|
# Build using SUSE's "build" script
|
||||||
|
#
|
||||||
|
sub susebuild
|
||||||
|
{
|
||||||
|
$BUILD= "/usr/bin/build";
|
||||||
|
( -x $BUILD) ? &logger("$BUILD found, proceeding.") : &abort("$BUILD could not be found!");
|
||||||
|
$command= "sudo $BUILD --clean";
|
||||||
|
$command.= " --root=$opt_susebuildroot";
|
||||||
|
$command.= " --rpms=$opt_suserpms" if $opt_suserpms;
|
||||||
|
$command.= " $SPECFILE";
|
||||||
|
&logger("Building RPMs using SUSE build.");
|
||||||
|
&run_command($command, "Error while running the SUSE RPM build!");
|
||||||
|
|
||||||
|
#
|
||||||
|
# Move the resulting RPMs into the pwd - we can use broad globs here
|
||||||
|
# as the build root has been cleaned up before so there should not be
|
||||||
|
# any residuals from previous build runs
|
||||||
|
#
|
||||||
|
$command= "cp";
|
||||||
|
$command.= " -v " if ($opt_verbose);
|
||||||
|
$command.= " $opt_susebuildroot/usr/src/packages/SRPMS/MySQL*.src.rpm $PWD";
|
||||||
|
&logger("Copying source RPM to current dir.");
|
||||||
|
&run_command($command, "Error moving source RPM!");
|
||||||
|
|
||||||
|
$command= "cp";
|
||||||
|
$command.= " -v " if ($opt_verbose);
|
||||||
|
$command.= " $opt_susebuildroot/usr/src/packages/RPMS/*/MySQL*.rpm $PWD";
|
||||||
|
&logger("Copying binary RPMs to current dir.");
|
||||||
|
&run_command($command, "Error moving binary RPMs!");
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Build using "plain" RPM
|
||||||
|
#
|
||||||
|
sub rpmbuild
|
||||||
|
{
|
||||||
|
|
||||||
|
#
|
||||||
|
# Newer RPM versions ship with a separate tool "rpmbuild" to build RPMs
|
||||||
|
#
|
||||||
|
if (-x "/usr/bin/rpmbuild")
|
||||||
|
{
|
||||||
|
$RPM= "/usr/bin/rpmbuild";
|
||||||
|
$RMSOURCE= "--rmsource --rmspec";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$RPM= "/bin/rpm";
|
||||||
|
$RMSOURCE= "--rmspec";
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($RPM)
|
||||||
|
{
|
||||||
|
&logger("Found rpm binary: $RPM");
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
&abort("Unable to find RPM binary!");
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# determine some RPM settings for this host
|
||||||
|
#
|
||||||
|
chomp($RPMARCH= `$RPM --eval "%{_arch}" 2> /dev/null`);
|
||||||
|
chomp($RPMDIR= `$RPM --eval "%{_rpmdir}" 2> /dev/null`);
|
||||||
|
chomp($SOURCEDIR= `$RPM --eval "%{_sourcedir}" 2> /dev/null`);
|
||||||
|
chomp($SPECDIR= `$RPM --eval "%{_specdir}" 2> /dev/null`);
|
||||||
|
chomp($SRCRPMDIR= `$RPM --eval "%{_srcrpmdir}" 2> /dev/null`);
|
||||||
|
|
||||||
|
$SOURCEFILE= glob "mysql*-$VERSION.tar.gz";
|
||||||
|
|
||||||
|
&logger("Starting RPM build of MySQL-$VERSION on $HOST");
|
||||||
|
|
||||||
|
foreach $file ($SOURCEFILE, $SPECFILE)
|
||||||
|
{
|
||||||
|
&abort("Unable to find $file!") unless (-f "$file");
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Install source and spec file
|
||||||
|
#
|
||||||
|
&logger("Copying SOURCE and SPEC file to build directories.");
|
||||||
|
unless ($opt_dry_run)
|
||||||
|
{
|
||||||
|
copy($SOURCEFILE, $SOURCEDIR)
|
||||||
|
or &abort("Unable to copy $SOURCEFILE to $SOURCEDIR!");
|
||||||
|
copy($SPECFILE, $SPECDIR)
|
||||||
|
or &abort("Unable to copy $SPECFILE to $SPECDIR!");
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Set environment variables - these are being used in the
|
||||||
|
# official MySQL RPM spec file
|
||||||
|
#
|
||||||
|
&logger("Setting special build environment variables")
|
||||||
|
if ($opt_cc) or ($opt_cflags) or ($opt_cxxflags) or ($opt_cxx);
|
||||||
|
$ENV{MYSQL_BUILD_CC}=$opt_cc if ($opt_cc);
|
||||||
|
$ENV{MYSQL_BUILD_CFLAGS}=$opt_cflags if ($opt_cflags);
|
||||||
|
$ENV{MYSQL_BUILD_CXXFLAGS}=$opt_cxxflags if ($opt_cxxflags);
|
||||||
|
$ENV{MYSQL_BUILD_CXX}=$opt_cxx if ($opt_cxx);
|
||||||
|
|
||||||
|
#
|
||||||
|
# Build the RPMs
|
||||||
|
#
|
||||||
|
$command= "$RPM";
|
||||||
|
$command.= " -v" if ($opt_verbose);
|
||||||
|
$command.= " -ba";
|
||||||
|
$command.= " --clean $RMSOURCE" if $opt_clean;
|
||||||
|
$command.= " $SPECDIR/";
|
||||||
|
$command.= basename($SPECFILE);
|
||||||
|
&logger("Building RPM.");
|
||||||
|
&run_command($command, "Error while building the RPMs!");
|
||||||
|
|
||||||
|
#
|
||||||
|
# Move the resulting RPMs into the pwd
|
||||||
|
#
|
||||||
|
$command= "mv";
|
||||||
|
$command.= " -v " if ($opt_verbose);
|
||||||
|
$command.= " $SRCRPMDIR/MySQL*$VERSION_SRPM*.src.rpm $PWD";
|
||||||
|
&logger("Moving source RPM to current dir.");
|
||||||
|
&run_command($command, "Error moving source RPM!");
|
||||||
|
|
||||||
|
$command= "mv";
|
||||||
|
$command.= " -v " if ($opt_verbose);
|
||||||
|
$command.= " $RPMDIR/$RPMARCH/MySQL*$VERSION_SRPM*.$RPMARCH.rpm $PWD";
|
||||||
|
&logger("Moving binary RPMs to current dir.");
|
||||||
|
&run_command($command, "Error moving binary RPMs!");
|
||||||
|
}
|
||||||
|
|
||||||
sub print_help
|
sub print_help
|
||||||
{
|
{
|
||||||
my $message= $_[0];
|
my $message= $_[0];
|
||||||
if ($message ne "")
|
if ($message ne "")
|
||||||
{
|
{
|
||||||
print "\n";
|
print "\n";
|
||||||
print "ERROR: $message\n\n}";
|
print "ERROR: $message\n\n";
|
||||||
}
|
}
|
||||||
print <<EOF;
|
print <<EOF;
|
||||||
|
|
||||||
@ -241,12 +305,22 @@ Options:
|
|||||||
-t, --dry-run Dry run without executing
|
-t, --dry-run Dry run without executing
|
||||||
-h, --help Print this help
|
-h, --help Print this help
|
||||||
-l, --log[=<filename>] Write a log file [to <filename>]
|
-l, --log[=<filename>] Write a log file [to <filename>]
|
||||||
(default is "$LOGFILE")
|
|
||||||
-m, --mail=<address> Mail a failure report to the given address
|
-m, --mail=<address> Mail a failure report to the given address
|
||||||
(and include a log file snippet, if logging
|
(and include a log file snippet, if logging
|
||||||
is enabled)
|
is enabled)
|
||||||
Note that the \@-Sign needs to be quoted!
|
Note that the \@-Sign needs to be quoted!
|
||||||
Example: --mail=user\\\@domain.com
|
Example: --mail=user\\\@domain.com
|
||||||
|
-s, --susebuild Use the SUSE "build" script instead of RPM
|
||||||
|
directly (requires sudo privileges to run the
|
||||||
|
/usr/bin/build command)
|
||||||
|
-r, --susebuildroot=<root> Use <root> as the build root directory for the
|
||||||
|
SUSE "build" (default is /var/tmp/build-root
|
||||||
|
or defined by the BUILD_ROOT environment
|
||||||
|
variable)
|
||||||
|
--suserpms=<path> Path to the SUSE RPM repository to build up
|
||||||
|
the build root (mandatory option when using
|
||||||
|
--susebuild and the BUILD_RPMS environment
|
||||||
|
variable is not set.)
|
||||||
-v, --verbose Verbose execution
|
-v, --verbose Verbose execution
|
||||||
|
|
||||||
Example:
|
Example:
|
||||||
|
183
Build-tools/Do-solaris-pkg
Normal file
183
Build-tools/Do-solaris-pkg
Normal file
@ -0,0 +1,183 @@
|
|||||||
|
#!/usr/bin/perl
|
||||||
|
#
|
||||||
|
# Script to create Solaris packages
|
||||||
|
#
|
||||||
|
$INTERACTIVE= 0;
|
||||||
|
chomp ($hostname= `hostname`);
|
||||||
|
$find = "/usr/bin/find";
|
||||||
|
$pkgproto = "/usr/bin/pkgproto";
|
||||||
|
$pkgmk = "/usr/bin/pkgmk -o";
|
||||||
|
$pkgtrans = "/usr/bin/pkgtrans";
|
||||||
|
$temp = "/tmp/prototype$$";
|
||||||
|
$prototype = "prototype";
|
||||||
|
$pkginfo = "pkginfo";
|
||||||
|
($gid ,$pkg ,$uid ,$userInfo ,$email ,$quota ,$group ,$passwd
|
||||||
|
,$category ,$userHome ,$vendor ,$loginShell ,$pstamp ,$basedir)=();
|
||||||
|
|
||||||
|
$fullname = shift @ARGV;
|
||||||
|
$fullname or die "No package name was specified";
|
||||||
|
-d $fullname or die "That directory is not present!";
|
||||||
|
|
||||||
|
$fullname =~ s,/+$,,; # Remove ending slash if any
|
||||||
|
|
||||||
|
$pkgdir= `cd ../$hostname; pwd`;
|
||||||
|
$pwd = `pwd`;
|
||||||
|
if ($pwd =~ '\/usr\/local') {
|
||||||
|
$pwd = $`;
|
||||||
|
}
|
||||||
|
die "Wrong location, please cd to <PKGBASE>/usr/local/ and run again.\n"
|
||||||
|
if ($pwd eq "");
|
||||||
|
|
||||||
|
system ("$find . -print | $pkgproto > $temp");
|
||||||
|
open (PREPROTO,"<$temp") or die "Unable to read prototype information ($!)\n";
|
||||||
|
open (PROTO,">$prototype") or die "Unable to write file prototype ($!)\n";
|
||||||
|
print PROTO "i pkginfo=./$pkginfo\n";
|
||||||
|
while (<PREPROTO>) {
|
||||||
|
# Read the prototype information from /tmp/prototype$$
|
||||||
|
chomp;
|
||||||
|
$thisline = $_;
|
||||||
|
if ($thisline =~ " prototype "
|
||||||
|
or $thisline =~ " pkginfo ") {
|
||||||
|
# We don't need that line
|
||||||
|
} elsif ($thisline =~ "^[fd] ") {
|
||||||
|
# Change the ownership for files and directories
|
||||||
|
($dir, $none, $file, $mode, $user, $group) = split / /,$thisline;
|
||||||
|
print PROTO "$dir $none $file $mode bin bin\n";
|
||||||
|
} else {
|
||||||
|
# Symlinks and other stuff should be printed as well ofcourse
|
||||||
|
print PROTO "$thisline\n";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
close PROTO;
|
||||||
|
close PREPROTO;
|
||||||
|
|
||||||
|
# Clean up
|
||||||
|
unlink $temp or warn "Unable to remove tempfile ($!)\n";
|
||||||
|
|
||||||
|
# Now we can start building the package
|
||||||
|
#
|
||||||
|
# First get some info
|
||||||
|
|
||||||
|
$fullname =~ /^((mysql)-.+)-([\d\.]+)-.+$/
|
||||||
|
or die "This name is not what I expected - \"$fullname\"";
|
||||||
|
|
||||||
|
$default{"name"}= $2;
|
||||||
|
$default{"version"}= $3;
|
||||||
|
$default{"pkg"}= $1;
|
||||||
|
$default{"arch"} = `uname -m`;
|
||||||
|
chomp $default{"arch"};
|
||||||
|
$default{"category"}= "application";
|
||||||
|
$default{"vendor"}= "MySQL AB";
|
||||||
|
$default{"email"}= "build\@mysql.com";
|
||||||
|
$default{"pstamp"}= "MySQL AB Build Engineers";
|
||||||
|
$os = `uname -r`;
|
||||||
|
$os =~ '\.';
|
||||||
|
$os = "sol$'";
|
||||||
|
chomp $os;
|
||||||
|
$default{"basedir"}= "/usr/local";
|
||||||
|
$default{"packagename"}= "${fullname}.pkg";
|
||||||
|
|
||||||
|
# Check for correctness of guessed values by userinput
|
||||||
|
|
||||||
|
%questions = (
|
||||||
|
pkg => "Please give the name for this package",
|
||||||
|
name => "Now enter the real name for this package",
|
||||||
|
arch => "What architecture did you build the package on?",
|
||||||
|
version => "Enter the version number of the package",
|
||||||
|
category => "What category does this package belong to?",
|
||||||
|
vendor => "Who is the vendor of this package?",
|
||||||
|
email => "Enter the email adress for contact",
|
||||||
|
pstamp => "Enter your own name",
|
||||||
|
basedir => "What is the basedir this package will install into?",
|
||||||
|
packagename => "How should I call the packagefile?",
|
||||||
|
);
|
||||||
|
|
||||||
|
@vars = qw(pkg name arch version category vendor email pstamp basedir
|
||||||
|
packagename);
|
||||||
|
foreach $varname (@vars) {
|
||||||
|
getvar_noq($varname);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($INTERACTIVE) {
|
||||||
|
while (!&chkvar()) {
|
||||||
|
print "\n";
|
||||||
|
foreach $varname (@vars) {
|
||||||
|
getvar($varname);
|
||||||
|
}
|
||||||
|
@vars = qw(pkg name arch version category vendor email pstamp basedir
|
||||||
|
packagename);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
$classes = "none";
|
||||||
|
|
||||||
|
# Create the pkginfo file
|
||||||
|
|
||||||
|
print "\nNow creating $pkginfo file\n";
|
||||||
|
open (PKGINFO,">$pkginfo") || die "Unable to open $pkginfo for writing ($!)\n";
|
||||||
|
print PKGINFO "PKG=\"$pkg\"\n";
|
||||||
|
print PKGINFO "NAME=\"$name\"\n";
|
||||||
|
print PKGINFO "ARCH=\"$arch\"\n";
|
||||||
|
print PKGINFO "VERSION=\"$version\"\n";
|
||||||
|
print PKGINFO "CATEGORY=\"$category\"\n";
|
||||||
|
print PKGINFO "VENDOR=\"$vendor\"\n";
|
||||||
|
print PKGINFO "EMAIL=\"$email\"\n";
|
||||||
|
print PKGINFO "PSTAMP=\"$pstamp\"\n";
|
||||||
|
print PKGINFO "BASEDIR=\"$basedir\"\n";
|
||||||
|
print PKGINFO "CLASSES=\"$classes\"\n";
|
||||||
|
close PKGINFO;
|
||||||
|
print "Done.\n";
|
||||||
|
|
||||||
|
# Build and zip the package
|
||||||
|
|
||||||
|
print "Building package\n";
|
||||||
|
system ("$pkgmk -r `pwd`");
|
||||||
|
system ("(cd /var/spool/pkg; $pkgtrans -s -o `pwd` /tmp/$packagename $pkg)");
|
||||||
|
system ("gzip /tmp/$packagename");
|
||||||
|
|
||||||
|
# Clean-up the spool area
|
||||||
|
system ("(cd /var/spool/pkg; rm -rf $pkg)");
|
||||||
|
# Clean-up the ~/packaging/ area
|
||||||
|
system ("(rm -rf mysql*)");
|
||||||
|
unlink $pkginfo;
|
||||||
|
unlink $prototype;
|
||||||
|
system ("mv /tmp/${packagename}.gz $pkgdir");
|
||||||
|
print "Done. (~/$hostname/$packagename.gz)\n";
|
||||||
|
# The subroutines
|
||||||
|
sub chkvar {
|
||||||
|
print "\n";
|
||||||
|
|
||||||
|
print "PKG=$pkg\n";
|
||||||
|
print "NAME=$name\n";
|
||||||
|
print "ARCH=$arch\n";
|
||||||
|
print "VERSION=$version\n";
|
||||||
|
print "CATEGORY=$category\n";
|
||||||
|
print "VENDOR=$vendor\n";
|
||||||
|
print "EMAIL=$email\n";
|
||||||
|
print "PSTAMP=$pstamp\n";
|
||||||
|
print "BASEDIR=$basedir\n";
|
||||||
|
print "PACKAGENAME=$packagename\n";
|
||||||
|
|
||||||
|
|
||||||
|
print "\nIs this information correct? [Y/n]: ";
|
||||||
|
my $answer= <STDIN>;
|
||||||
|
chomp $answer;
|
||||||
|
$answer= 'Y' if ($answer eq "");
|
||||||
|
$answer= uc $answer;
|
||||||
|
my $res= ($answer eq 'Y')? 1 : 0;
|
||||||
|
return($res);
|
||||||
|
}
|
||||||
|
|
||||||
|
sub getvar_noq {
|
||||||
|
my $questionname = "@_";
|
||||||
|
$$questionname = $default{$questionname};
|
||||||
|
}
|
||||||
|
|
||||||
|
sub getvar {
|
||||||
|
my $questionname = "@_";
|
||||||
|
my $ucquestionname= uc $questionname;
|
||||||
|
print "$ucquestionname: $questions{$questionname} [$default{\"$questionname\"}]: ";
|
||||||
|
my $answer = <STDIN>;
|
||||||
|
chomp $answer;
|
||||||
|
$$questionname = $answer;
|
||||||
|
$$questionname = $default{$questionname} if ($$questionname eq "");
|
||||||
|
}
|
@ -109,6 +109,12 @@ sub add_copyright
|
|||||||
$line_copyright= "! ";
|
$line_copyright= "! ";
|
||||||
$end_copyright= "";
|
$end_copyright= "";
|
||||||
}
|
}
|
||||||
|
elsif ($ARGV =~ /\.sql$/)
|
||||||
|
{
|
||||||
|
$start_copyright="-- ";
|
||||||
|
$line_copyright= "-- ";
|
||||||
|
$end_copyright= "";
|
||||||
|
}
|
||||||
elsif ($ARGV =~ /\.asm$/)
|
elsif ($ARGV =~ /\.asm$/)
|
||||||
{
|
{
|
||||||
$start_copyright="; ";
|
$start_copyright="; ";
|
||||||
|
35
Docs/Images/Makefile.am
Normal file
35
Docs/Images/Makefile.am
Normal file
@ -0,0 +1,35 @@
|
|||||||
|
# Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
|
||||||
|
#
|
||||||
|
# This library is free software; you can redistribute it and/or
|
||||||
|
# modify it under the terms of the GNU Library General Public
|
||||||
|
# License as published by the Free Software Foundation; either
|
||||||
|
# version 2 of the License, or (at your option) any later version.
|
||||||
|
#
|
||||||
|
# This library is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# Library General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Library General Public
|
||||||
|
# License along with this library; if not, write to the Free
|
||||||
|
# Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
||||||
|
# MA 02111-1307, USA
|
||||||
|
|
||||||
|
## Process this file with automake to create Makefile.in
|
||||||
|
|
||||||
|
# This is a dummy file to satisfy the hierarchy of Makefiles.
|
||||||
|
# When a release is built, the true Makefile will be copied
|
||||||
|
# together with the "real" files in this directory.
|
||||||
|
|
||||||
|
EXTRA_DIST =
|
||||||
|
|
||||||
|
# Nothing to create in this dummy directory.
|
||||||
|
all:
|
||||||
|
:
|
||||||
|
|
||||||
|
# Nothing to cleanup in this dummy directory.
|
||||||
|
clean:
|
||||||
|
:
|
||||||
|
|
||||||
|
# Don't update the files from bitkeeper
|
||||||
|
%::SCCS/s.%
|
@ -9,7 +9,7 @@
|
|||||||
# If you know how to fix any of this more elegantly please mail
|
# If you know how to fix any of this more elegantly please mail
|
||||||
# docs@mysql.com
|
# docs@mysql.com
|
||||||
|
|
||||||
TEXI2HTML_FLAGS = -iso -number
|
TEXI2HTML_FLAGS = -iso -number -acc
|
||||||
DVIPS = dvips
|
DVIPS = dvips
|
||||||
MAKEINFO = @MAKEINFO@
|
MAKEINFO = @MAKEINFO@
|
||||||
TEXINFO_TEX = Support/texinfo.tex
|
TEXINFO_TEX = Support/texinfo.tex
|
||||||
@ -24,6 +24,8 @@ BUILT_SOURCES = $(targets) manual_toc.html include.texi
|
|||||||
EXTRA_DIST = $(noinst_SCRIPTS) $(BUILT_SOURCES) mysqld_error.txt \
|
EXTRA_DIST = $(noinst_SCRIPTS) $(BUILT_SOURCES) mysqld_error.txt \
|
||||||
INSTALL-BINARY reservedwords.texi internals.texi
|
INSTALL-BINARY reservedwords.texi internals.texi
|
||||||
|
|
||||||
|
SUBDIRS = Images
|
||||||
|
|
||||||
all: $(targets) txt_files
|
all: $(targets) txt_files
|
||||||
|
|
||||||
txt_files: ../INSTALL-SOURCE ../COPYING ../INSTALL-WIN-SOURCE ../EXCEPTIONS-CLIENT \
|
txt_files: ../INSTALL-SOURCE ../COPYING ../INSTALL-WIN-SOURCE ../EXCEPTIONS-CLIENT \
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!PATH_TO_PERL -*- perl -*-
|
#!/usr/bin/perl
|
||||||
# Add path to perl on the previous line and make this executable
|
# Add path to perl on the previous line and make this executable
|
||||||
# if you want to use this as a normal script.
|
# if you want to use this as a normal script.
|
||||||
'di ';
|
'di ';
|
||||||
@ -12,7 +12,7 @@
|
|||||||
#-##############################################################################
|
#-##############################################################################
|
||||||
|
|
||||||
# @(#)texi2html 1.52 971230 Written (mainly) by Lionel Cons, Lionel.Cons@cern.ch
|
# @(#)texi2html 1.52 971230 Written (mainly) by Lionel Cons, Lionel.Cons@cern.ch
|
||||||
# Enhanced by David Axmark, david@detron.se
|
# Enhanced by David Axmark
|
||||||
|
|
||||||
# The man page for this program is included at the end of this file and can be
|
# The man page for this program is included at the end of this file and can be
|
||||||
# viewed using the command 'nroff -man texi2html'.
|
# viewed using the command 'nroff -man texi2html'.
|
||||||
@ -40,8 +40,7 @@ $NODESRE = '[^@{}:\'`"]+'; # RE for a list of node names
|
|||||||
$XREFRE = '[^@{}]+'; # RE for a xref (should use NODERE)
|
$XREFRE = '[^@{}]+'; # RE for a xref (should use NODERE)
|
||||||
|
|
||||||
$ERROR = "***"; # prefix for errors and warnings
|
$ERROR = "***"; # prefix for errors and warnings
|
||||||
$THISPROG = "texi2html 1.52 (hacked by david\@detron.se)"; # program name and version
|
$THISPROG = "texi2html 1.52 (with additions by MySQL AB)"; # program name and version
|
||||||
$HOMEPAGE = "http://www.mathematik.uni-kl.de/~obachman/Texi2html/"; # program home page
|
|
||||||
$TODAY = &pretty_date; # like "20 September 1993"
|
$TODAY = &pretty_date; # like "20 September 1993"
|
||||||
$SPLITTAG = "<!-- SPLIT HERE -->\n"; # tag to know where to split
|
$SPLITTAG = "<!-- SPLIT HERE -->\n"; # tag to know where to split
|
||||||
$PROTECTTAG = "_ThisIsProtected_"; # tag to recognize protected sections
|
$PROTECTTAG = "_ThisIsProtected_"; # tag to recognize protected sections
|
||||||
@ -114,10 +113,12 @@ $html2_doctype = '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0 Strict Level 2//E
|
|||||||
#
|
#
|
||||||
%accent_map = (
|
%accent_map = (
|
||||||
'"', 'uml',
|
'"', 'uml',
|
||||||
|
'\'', 'acute',
|
||||||
|
',{', 'cedil',
|
||||||
'~', 'tilde',
|
'~', 'tilde',
|
||||||
'^', 'circ',
|
'^', 'circ',
|
||||||
'`', 'grave',
|
'`', 'grave',
|
||||||
'\'', 'acute',
|
'ringaccent{', 'ring',
|
||||||
);
|
);
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -125,7 +126,7 @@ $html2_doctype = '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0 Strict Level 2//E
|
|||||||
#
|
#
|
||||||
%simple_map = (
|
%simple_map = (
|
||||||
# cf. makeinfo.c
|
# cf. makeinfo.c
|
||||||
"*", "<BR>", # HTML+
|
"*", "<br />", # HTML+
|
||||||
" ", " ",
|
" ", " ",
|
||||||
"\n", "\n",
|
"\n", "\n",
|
||||||
"|", "",
|
"|", "",
|
||||||
@ -134,6 +135,8 @@ $html2_doctype = '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0 Strict Level 2//E
|
|||||||
"!", "!",
|
"!", "!",
|
||||||
"?", "?",
|
"?", "?",
|
||||||
".", ".",
|
".", ".",
|
||||||
|
# @- means "allow word break", not —
|
||||||
|
"-", "",
|
||||||
);
|
);
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -141,9 +144,10 @@ $html2_doctype = '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0 Strict Level 2//E
|
|||||||
#
|
#
|
||||||
%things_map = (
|
%things_map = (
|
||||||
'TeX', 'TeX',
|
'TeX', 'TeX',
|
||||||
'br', '<P>', # paragraph break
|
'br', '<p>', # paragraph break
|
||||||
'bullet', '*',
|
'bullet', '*',
|
||||||
'copyright', '(C)',
|
'copyright', '(C)',
|
||||||
|
'registeredsymbol', '(R)',
|
||||||
'dots', '...',
|
'dots', '...',
|
||||||
'equiv', '==',
|
'equiv', '==',
|
||||||
'error', 'error-->',
|
'error', 'error-->',
|
||||||
@ -161,27 +165,28 @@ $html2_doctype = '<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0 Strict Level 2//E
|
|||||||
%style_map = (
|
%style_map = (
|
||||||
'asis', '',
|
'asis', '',
|
||||||
'b', 'B',
|
'b', 'B',
|
||||||
'cite', 'CITE',
|
'cite', 'cite',
|
||||||
'code', 'CODE',
|
'code', 'code',
|
||||||
|
'command', 'code',
|
||||||
'ctrl', '&do_ctrl', # special case
|
'ctrl', '&do_ctrl', # special case
|
||||||
'dfn', 'STRONG', # DFN tag is illegal in the standard
|
'dfn', 'strong', # DFN tag is illegal in the standard
|
||||||
'dmn', '', # useless
|
'dmn', '', # useless
|
||||||
'email', '&fix_email', # special
|
'email', '&fix_email', # special
|
||||||
'emph', 'EM',
|
'emph', 'em',
|
||||||
'file', '"TT', # will put quotes, cf. &apply_style
|
'file', '"tt', # will put quotes, cf. &apply_style
|
||||||
'i', 'I',
|
'i', 'i',
|
||||||
'kbd', 'KBD',
|
'kbd', 'kbd',
|
||||||
'key', 'KBD',
|
'key', 'kbd',
|
||||||
'r', '', # unsupported
|
'r', '', # unsupported
|
||||||
'samp', '"SAMP', # will put quotes, cf. &apply_style
|
'samp', '"samp', # will put quotes, cf. &apply_style
|
||||||
'sc', '&do_sc', # special case
|
'sc', '&do_sc', # special case
|
||||||
'strong', 'STRONG',
|
'strong', 'strong',
|
||||||
't', 'TT',
|
't', 'tt',
|
||||||
'titlefont', '', # useless
|
'titlefont', '', # useless
|
||||||
'image', '&fix_image', # Image
|
'image', '&fix_image', # Image
|
||||||
'url', '&fix_url', # URL
|
'url', '&fix_url', # URL
|
||||||
'uref', '&fix_uref', # URL Reference
|
'uref', '&fix_uref', # URL Reference
|
||||||
'var', 'VAR',
|
'var', 'var',
|
||||||
'w', '', # unsupported
|
'w', '', # unsupported
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -317,6 +322,7 @@ $usage = <<EOT;
|
|||||||
This is $THISPROG
|
This is $THISPROG
|
||||||
To convert a Texinfo file to HMTL: $0 [options] file
|
To convert a Texinfo file to HMTL: $0 [options] file
|
||||||
where options can be:
|
where options can be:
|
||||||
|
-acc : convert @"-like accents to &entities;
|
||||||
-expandinfo : use \@ifinfo sections, not \@iftex
|
-expandinfo : use \@ifinfo sections, not \@iftex
|
||||||
-glossary : handle a glossary
|
-glossary : handle a glossary
|
||||||
-invisible name: use 'name' as an invisible anchor
|
-invisible name: use 'name' as an invisible anchor
|
||||||
@ -445,11 +451,15 @@ $html_num = 0;
|
|||||||
if ($use_iso) {
|
if ($use_iso) {
|
||||||
$things_map{'bullet'} = "•";
|
$things_map{'bullet'} = "•";
|
||||||
$things_map{'copyright'} = "©";
|
$things_map{'copyright'} = "©";
|
||||||
|
$things_map{'registeredsymbol'} = "®";
|
||||||
$things_map{'dots'} = "…";
|
$things_map{'dots'} = "…";
|
||||||
$things_map{'equiv'} = "≡";
|
$things_map{'equiv'} = "≡";
|
||||||
$things_map{'expansion'} = "→";
|
$things_map{'expansion'} = "→";
|
||||||
$things_map{'point'} = "∗";
|
$things_map{'point'} = "∗";
|
||||||
$things_map{'result'} = "⇒";
|
$things_map{'result'} = "⇒";
|
||||||
|
$things_map{'ss'} = "ß";
|
||||||
|
$things_map{'o'} = "ø";
|
||||||
|
$things_map{'O'} = "Ø";
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
@ -505,23 +515,27 @@ $html_element = ''; # current HTML element
|
|||||||
# watch out for regexps, / and escaped characters!
|
# watch out for regexps, / and escaped characters!
|
||||||
$subst_code = '';
|
$subst_code = '';
|
||||||
foreach (keys(%simple_map)) {
|
foreach (keys(%simple_map)) {
|
||||||
($re = $_) =~ s/(\W)/\\$1/g; # protect regexp chars
|
$re = quotemeta $_; # protect regexp chars
|
||||||
$subst_code .= "s/\\\@$re/$simple_map{$_}/g;\n";
|
$sub = quotemeta $simple_map{$_};
|
||||||
|
$subst_code .= "s/\\\@$re/$sub/g;\n";
|
||||||
}
|
}
|
||||||
foreach (keys(%things_map)) {
|
foreach (keys(%things_map)) {
|
||||||
$subst_code .= "s/\\\@$_\\{\\}/$things_map{$_}/g;\n";
|
$re = quotemeta $_; # protect regexp chars
|
||||||
|
$sub = quotemeta $things_map{$_};
|
||||||
|
$subst_code .= "s/\\\@$re\\{\\}/$sub/g;\n";
|
||||||
}
|
}
|
||||||
if ($use_acc) {
|
if ($use_acc) {
|
||||||
# accentuated characters
|
# accentuated characters
|
||||||
foreach (keys(%accent_map)) {
|
foreach (keys(%accent_map)) {
|
||||||
|
my $brace = /{$/ ? '}' : '';
|
||||||
if ($_ eq "`") {
|
if ($_ eq "`") {
|
||||||
$subst_code .= "s/$;3";
|
$subst_code .= "s/$;3";
|
||||||
} elsif ($_ eq "'") {
|
} elsif ($_ eq "'") {
|
||||||
$subst_code .= "s/$;4";
|
$subst_code .= "s/$;4";
|
||||||
} else {
|
} else {
|
||||||
$subst_code .= "s/\\\@\\$_";
|
$subst_code .= "s/\\\@\\Q$_\\E";
|
||||||
}
|
}
|
||||||
$subst_code .= "([aeiou])/&\${1}$accent_map{$_};/gi;\n";
|
$subst_code .= "(\\w)$brace/&\${1}$accent_map{$_};/gi;\n";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
eval("sub simple_substitutions { $subst_code }");
|
eval("sub simple_substitutions { $subst_code }");
|
||||||
@ -703,7 +717,7 @@ READ_LINE: while ($_ = &next_line)
|
|||||||
s/{[^{}]+}//g);
|
s/{[^{}]+}//g);
|
||||||
print "# Multitable with $multitable_cols columns\n"
|
print "# Multitable with $multitable_cols columns\n"
|
||||||
if $debug and $DEBUG_USER;
|
if $debug and $DEBUG_USER;
|
||||||
push(@lines, &debug("<TABLE BORDER WIDTH=\"100%\">\n", __LINE__));
|
push(@lines, &debug("<TABLE BORDER>\n", __LINE__));
|
||||||
} else {
|
} else {
|
||||||
warn "$ERROR Bad table line: $_";
|
warn "$ERROR Bad table line: $_";
|
||||||
}
|
}
|
||||||
@ -873,7 +887,7 @@ READ_LINE: while ($_ = &next_line)
|
|||||||
&simple_substitutions;
|
&simple_substitutions;
|
||||||
s/\@value{($VARRE)}/$value{$1}/eg;
|
s/\@value{($VARRE)}/$value{$1}/eg;
|
||||||
s/\@footnote\{/\@footnote$docu_doc\{/g; # mark footnotes, cf. pass 4
|
s/\@footnote\{/\@footnote$docu_doc\{/g; # mark footnotes, cf. pass 4
|
||||||
s|\s+\@tab\s*| </TD><TD> |g if ($in_multitable);
|
s/(^|\s+)\@tab\s*/ <\/TD><TD> /g if ($in_multitable);
|
||||||
|
|
||||||
#
|
#
|
||||||
# analyze the tag again
|
# analyze the tag again
|
||||||
@ -885,7 +899,7 @@ READ_LINE: while ($_ = &next_line)
|
|||||||
$name =~ s/\s+$//;
|
$name =~ s/\s+$//;
|
||||||
$level = $sec2level{$tag};
|
$level = $sec2level{$tag};
|
||||||
$name = &update_sec_num($tag, $level) . " $name"
|
$name = &update_sec_num($tag, $level) . " $name"
|
||||||
if $number_sections && $tag !~ /^unnumbered/;
|
if $number_sections && $tag !~ /^unnumbered/ && $tag ne 'subsubheading';
|
||||||
if ($tag =~ /heading$/) {
|
if ($tag =~ /heading$/) {
|
||||||
push(@lines, &html_debug("\n", __LINE__));
|
push(@lines, &html_debug("\n", __LINE__));
|
||||||
if ($html_element ne 'body') {
|
if ($html_element ne 'body') {
|
||||||
@ -1079,7 +1093,7 @@ EOC
|
|||||||
push(@lines, &debug("</TD></TR>\n", __LINE__))
|
push(@lines, &debug("</TD></TR>\n", __LINE__))
|
||||||
unless $html_element eq 'TABLE';
|
unless $html_element eq 'TABLE';
|
||||||
&html_pop_if('TR');
|
&html_pop_if('TR');
|
||||||
$what =~ s|\s+\@tab\s*| </TD><TD> |g;
|
$what =~ s/(^|\s+)\@tab\s*/ <\/TD><TD> /g;
|
||||||
push(@lines, &debug("<TR><TD>$what\n", __LINE__));
|
push(@lines, &debug("<TR><TD>$what\n", __LINE__));
|
||||||
&html_push('TR');
|
&html_push('TR');
|
||||||
if ($deferred_ref)
|
if ($deferred_ref)
|
||||||
@ -1463,11 +1477,7 @@ print "# end of pass 4\n" if $verbose;
|
|||||||
# #
|
# #
|
||||||
#---############################################################################
|
#---############################################################################
|
||||||
|
|
||||||
$header = <<EOT;
|
$header = '';
|
||||||
<!-- This HTML file has been created by $THISPROG
|
|
||||||
from $docu on $TODAY -->
|
|
||||||
EOT
|
|
||||||
|
|
||||||
$full_title = $value{'_title'} || $value{'_settitle'} || "Untitled Document";
|
$full_title = $value{'_title'} || $value{'_settitle'} || "Untitled Document";
|
||||||
$title = $value{'_settitle'} || $full_title;
|
$title = $value{'_settitle'} || $full_title;
|
||||||
$_ = &substitute_style($full_title);
|
$_ = &substitute_style($full_title);
|
||||||
@ -1815,8 +1825,10 @@ sub fix_image
|
|||||||
die "error in image: '$text'" unless defined($1);
|
die "error in image: '$text'" unless defined($1);
|
||||||
$arg1 = $1;
|
$arg1 = $1;
|
||||||
$arg1 =~ s/@@/@/g;
|
$arg1 =~ s/@@/@/g;
|
||||||
$ext = "jpg" if -f "$arg1.jpg";
|
foreach (@include_dirs) {
|
||||||
$ext = "gif" if -f "$arg1.gif";
|
$ext = "jpg" if -f "$_/$arg1.jpg";
|
||||||
|
$ext = "gif" if -f "$_/$arg1.gif";
|
||||||
|
}
|
||||||
if (defined($ext))
|
if (defined($ext))
|
||||||
{
|
{
|
||||||
"<IMG SRC=\"$arg1.$ext\">";
|
"<IMG SRC=\"$arg1.$ext\">";
|
||||||
@ -2010,7 +2022,7 @@ sub print_toplevel_header
|
|||||||
{
|
{
|
||||||
local($_);
|
local($_);
|
||||||
|
|
||||||
&print_header; # pass given arg...
|
&print_header unless $opt_empty_headers; # pass given arg...
|
||||||
print FILE $full_title;
|
print FILE $full_title;
|
||||||
if ($value{'_subtitle'}) {
|
if ($value{'_subtitle'}) {
|
||||||
$value{'_subtitle'} =~ s/\n+$//;
|
$value{'_subtitle'} =~ s/\n+$//;
|
||||||
@ -2042,13 +2054,7 @@ EOT
|
|||||||
|
|
||||||
sub print_toplevel_footer
|
sub print_toplevel_footer
|
||||||
{
|
{
|
||||||
&print_ruler;
|
&print_footer unless $opt_empty_headers;
|
||||||
print FILE <<EOT;
|
|
||||||
This document was generated on $TODAY using the
|
|
||||||
<A HREF=\"$HOMEPAGE\">texi2html</A>
|
|
||||||
translator version 1.52 (extended by davida\@detron.se).</P>
|
|
||||||
EOT
|
|
||||||
&print_footer;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sub protect_texi
|
sub protect_texi
|
||||||
@ -2065,8 +2071,10 @@ sub protect_html
|
|||||||
{
|
{
|
||||||
local($what) = @_;
|
local($what) = @_;
|
||||||
# protect & < >
|
# protect & < >
|
||||||
# Avoid loop in & replacement. This instead bugs out for &# in text..
|
# hack for the two entity-like variable reference in existing examples
|
||||||
$what =~ s/\&([^#]|$)/\&\#38;$1/g;
|
$what =~ s/\&(length|ts);/\&\#38;$1;/g;
|
||||||
|
# this leaves alone entities, but encodes standalone ampersands
|
||||||
|
$what =~ s/\&(?!([a-z0-9]+|#\d+);)/\&\#38;/ig;
|
||||||
$what =~ s/\</\&\#60;/g;
|
$what =~ s/\</\&\#60;/g;
|
||||||
$what =~ s/\>/\&\#62;/g;
|
$what =~ s/\>/\&\#62;/g;
|
||||||
# but recognize some HTML things
|
# but recognize some HTML things
|
||||||
|
11
Makefile.am
11
Makefile.am
@ -22,15 +22,15 @@ AUTOMAKE_OPTIONS = foreign
|
|||||||
EXTRA_DIST = INSTALL-SOURCE README COPYING EXCEPTIONS-CLIENT
|
EXTRA_DIST = INSTALL-SOURCE README COPYING EXCEPTIONS-CLIENT
|
||||||
SUBDIRS = . include @docs_dirs@ @zlib_dir@ \
|
SUBDIRS = . include @docs_dirs@ @zlib_dir@ \
|
||||||
@readline_topdir@ sql-common \
|
@readline_topdir@ sql-common \
|
||||||
@thread_dirs@ pstack @sql_client_dirs@ \
|
@thread_dirs@ pstack \
|
||||||
@sql_server_dirs@ scripts man tests \
|
@sql_union_dirs@ scripts man tests \
|
||||||
netware @libmysqld_dirs@ \
|
netware @libmysqld_dirs@ \
|
||||||
@bench_dirs@ support-files @fs_dirs@ @tools_dirs@
|
@bench_dirs@ support-files @fs_dirs@ @tools_dirs@
|
||||||
|
|
||||||
DIST_SUBDIRS = . include @docs_dirs@ zlib \
|
DIST_SUBDIRS = . include @docs_dirs@ zlib \
|
||||||
@readline_topdir@ sql-common \
|
@readline_topdir@ sql-common \
|
||||||
@thread_dirs@ pstack @sql_client_dirs@ \
|
@thread_dirs@ pstack \
|
||||||
@sql_server_dirs@ scripts @man_dirs@ tests SSL\
|
@sql_union_dirs@ scripts @man_dirs@ tests SSL\
|
||||||
BUILD netware os2 @libmysqld_dirs@ \
|
BUILD netware os2 @libmysqld_dirs@ \
|
||||||
@bench_dirs@ support-files @fs_dirs@ @tools_dirs@
|
@bench_dirs@ support-files @fs_dirs@ @tools_dirs@
|
||||||
|
|
||||||
@ -100,5 +100,4 @@ tags:
|
|||||||
# Test installation
|
# Test installation
|
||||||
|
|
||||||
test:
|
test:
|
||||||
cd mysql-test ; ./mysql-test-run
|
cd mysql-test; ./mysql-test-run && ./mysql-test-run --ps-protocol
|
||||||
|
|
||||||
|
@ -115,7 +115,7 @@ LINK32=xilink6.exe
|
|||||||
# Name "mysqladmin - Win32 classic"
|
# Name "mysqladmin - Win32 classic"
|
||||||
# Begin Source File
|
# Begin Source File
|
||||||
|
|
||||||
SOURCE=.\mysqladmin.c
|
SOURCE=.\mysqladmin.cpp
|
||||||
# End Source File
|
# End Source File
|
||||||
# End Target
|
# End Target
|
||||||
# End Project
|
# End Project
|
||||||
|
@ -51,8 +51,8 @@ BSC32=bscmake.exe
|
|||||||
# ADD BASE BSC32 /nologo
|
# ADD BASE BSC32 /nologo
|
||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=xilink6.exe
|
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 /nologo /subsystem:console /machine:I386
|
# 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 mysys.lib /nologo /subsystem:console /machine:I386
|
||||||
# ADD LINK32 mysqlclient.lib wsock32.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 /out:"../client_release/mysqldump.exe" /libpath:"..\lib_release\\"
|
# ADD LINK32 mysqlclient.lib wsock32.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 mysys.lib /nologo /subsystem:console /machine:I386 /out:"../client_release/mysqldump.exe" /libpath:"..\lib_release\\"
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "mysqldump - Win32 Debug"
|
!ELSEIF "$(CFG)" == "mysqldump - Win32 Debug"
|
||||||
|
|
||||||
@ -76,8 +76,8 @@ BSC32=bscmake.exe
|
|||||||
# ADD BASE BSC32 /nologo
|
# ADD BASE BSC32 /nologo
|
||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=xilink6.exe
|
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 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
# 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 mysys.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||||
# ADD LINK32 mysqlclient.lib wsock32.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 /incremental:no /debug /machine:I386 /out:"../client_debug/mysqldump.exe" /pdbtype:sept /libpath:"..\lib_debug\\"
|
# ADD LINK32 mysqlclient.lib wsock32.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 mysys.lib /nologo /subsystem:console /incremental:no /debug /machine:I386 /out:"../client_debug/mysqldump.exe" /pdbtype:sept /libpath:"..\lib_debug\\"
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "mysqldump - Win32 classic"
|
!ELSEIF "$(CFG)" == "mysqldump - Win32 classic"
|
||||||
|
|
||||||
@ -103,8 +103,8 @@ BSC32=bscmake.exe
|
|||||||
# ADD BASE BSC32 /nologo
|
# ADD BASE BSC32 /nologo
|
||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=xilink6.exe
|
LINK32=xilink6.exe
|
||||||
# ADD BASE LINK32 mysqlclient.lib wsock32.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 /out:"../client_release/mysqldump.exe" /libpath:"..\lib_release\\"
|
# ADD BASE LINK32 mysqlclient.lib wsock32.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 mysys.lib /nologo /subsystem:console /machine:I386 /out:"../client_release/mysqldump.exe" /libpath:"..\lib_release\\"
|
||||||
# ADD LINK32 mysqlclient.lib wsock32.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 /out:"../client_classic/mysqldump.exe" /libpath:"..\lib_release\\"
|
# ADD LINK32 mysqlclient.lib wsock32.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 mysys.lib /nologo /subsystem:console /machine:I386 /out:"../client_classic/mysqldump.exe" /libpath:"..\lib_release\\"
|
||||||
|
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
|
125
VC++Files/client/mysqltest.dsp
Normal file
125
VC++Files/client/mysqltest.dsp
Normal file
@ -0,0 +1,125 @@
|
|||||||
|
# Microsoft Developer Studio Project File - Name="mysqltest" - Package Owner=<4>
|
||||||
|
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||||
|
# ** DO NOT EDIT **
|
||||||
|
|
||||||
|
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||||
|
|
||||||
|
CFG=mysqltest - 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 "mysqltest.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 "mysqltest.mak" CFG="mysqltest - Win32 Debug"
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE Possible choices for configuration are:
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE "mysqltest - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||||
|
!MESSAGE "mysqltest - Win32 classic" (based on "Win32 (x86) Console Application")
|
||||||
|
!MESSAGE "mysqltest - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||||
|
!MESSAGE
|
||||||
|
|
||||||
|
# Begin Project
|
||||||
|
# PROP AllowPerConfigDependencies 0
|
||||||
|
# PROP Scc_ProjName ""
|
||||||
|
# PROP Scc_LocalPath ""
|
||||||
|
CPP=cl.exe
|
||||||
|
MTL=midl.exe
|
||||||
|
RSC=rc.exe
|
||||||
|
|
||||||
|
!IF "$(CFG)" == "mysqltest - 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 Target_Dir ""
|
||||||
|
# ADD BASE CPP /nologo /MTd /I "../include" /I "../regex" /I "../" /Z7 /W3 /Od /G6 /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_CONSOLE" /D "_WINDOWS" /D "_MBCS" /Fp".\debug/mysqltest.pch" /Fo".\debug/" /Fd".\debug/" /GZ /c /GX
|
||||||
|
# ADD CPP /nologo /MTd /I "../include" /I "../regex" /I "../" /Z7 /W3 /Od /G6 /D "_DEBUG" /D "SAFEMALLOC" /D "SAFE_MUTEX" /D "_CONSOLE" /D "_WINDOWS" /D "_MBCS" /Fp".\debug/mysqltest.pch" /Fo".\debug/" /Fd".\debug/" /GZ /c /GX
|
||||||
|
# ADD BASE MTL /nologo /tlb".\debug\mysqltest.tlb" /win32
|
||||||
|
# ADD MTL /nologo /tlb".\debug\mysqltest.tlb" /win32
|
||||||
|
# ADD BASE RSC /l 1033 /d "_DEBUG"
|
||||||
|
# ADD RSC /l 1033 /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 odbc32.lib odbccp32.lib mysqlclient.lib wsock32.lib mysys.lib regex.lib /nologo /out:"..\client_debug\mysqltest.exe" /incremental:no /libpath:"..\lib_debug\" /debug /pdb:".\debug\mysqltest.pdb" /pdbtype:sept /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 odbc32.lib odbccp32.lib mysqlclient.lib wsock32.lib mysys.lib regex.lib /nologo /out:"..\client_debug\mysqltest.exe" /incremental:no /libpath:"..\lib_debug\" /debug /pdb:".\debug\mysqltest.pdb" /pdbtype:sept /subsystem:console /MACHINE:I386
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "mysqltest - Win32 classic"
|
||||||
|
|
||||||
|
# PROP BASE Use_MFC 0
|
||||||
|
# PROP BASE Use_Debug_Libraries 0
|
||||||
|
# PROP BASE Output_Dir ".\classic"
|
||||||
|
# PROP BASE Intermediate_Dir ".\classic"
|
||||||
|
# PROP BASE Target_Dir ""
|
||||||
|
# PROP Use_MFC 0
|
||||||
|
# PROP Use_Debug_Libraries 0
|
||||||
|
# PROP Output_Dir ".\classic"
|
||||||
|
# PROP Intermediate_Dir ".\classic"
|
||||||
|
# PROP Target_Dir ""
|
||||||
|
# ADD BASE CPP /nologo /MT /I "../include" /I "../regex" /I "../" /W3 /Ob1 /G6 /D "_CONSOLE" /D "_WINDOWS" /D "LICENSE=Commercial" /D "DBUG_OFF" /D "NDEBUG" /D "_MBCS" /GF /Gy /Fp".\classic/mysqltest.pch" /Fo".\classic/" /Fd".\classic/" /c /GX
|
||||||
|
# ADD CPP /nologo /MT /I "../include" /I "../regex" /I "../" /W3 /Ob1 /G6 /D "_CONSOLE" /D "_WINDOWS" /D "LICENSE=Commercial" /D "DBUG_OFF" /D "NDEBUG" /D "_MBCS" /GF /Gy /Fp".\classic/mysqltest.pch" /Fo".\classic/" /Fd".\classic/" /c /GX
|
||||||
|
# ADD BASE MTL /nologo /tlb".\classic\mysqltest.tlb" /win32
|
||||||
|
# ADD MTL /nologo /tlb".\classic\mysqltest.tlb" /win32
|
||||||
|
# ADD BASE RSC /l 1033 /d "NDEBUG"
|
||||||
|
# ADD RSC /l 1033 /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 odbc32.lib odbccp32.lib mysqlclient.lib wsock32.lib mysys.lib regex.lib /nologo /out:"..\client_classic\mysqltest.exe" /incremental:no /libpath:"..\lib_release\" /pdb:".\classic\mysqltest.pdb" /pdbtype:sept /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 odbc32.lib odbccp32.lib mysqlclient.lib wsock32.lib mysys.lib regex.lib /nologo /out:"..\client_classic\mysqltest.exe" /incremental:no /libpath:"..\lib_release\" /pdb:".\classic\mysqltest.pdb" /pdbtype:sept /subsystem:console /MACHINE:I386
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "mysqltest - 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 Target_Dir ""
|
||||||
|
# ADD BASE CPP /nologo /MT /I "../include" /I "../regex" /I "../" /W3 /Ob1 /G6 /D "DBUG_OFF" /D "_CONSOLE" /D "_WINDOWS" /D "NDEBUG" /D "_MBCS" /GF /Gy /Fp".\release/mysqltest.pch" /Fo".\release/" /Fd".\release/" /c /GX
|
||||||
|
# ADD CPP /nologo /MT /I "../include" /I "../regex" /I "../" /W3 /Ob1 /G6 /D "DBUG_OFF" /D "_CONSOLE" /D "_WINDOWS" /D "NDEBUG" /D "_MBCS" /GF /Gy /Fp".\release/mysqltest.pch" /Fo".\release/" /Fd".\release/" /c /GX
|
||||||
|
# ADD BASE MTL /nologo /tlb".\release\mysqltest.tlb" /win32
|
||||||
|
# ADD MTL /nologo /tlb".\release\mysqltest.tlb" /win32
|
||||||
|
# ADD BASE RSC /l 1033 /d "NDEBUG"
|
||||||
|
# ADD RSC /l 1033 /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 odbc32.lib odbccp32.lib mysqlclient.lib wsock32.lib mysys.lib regex.lib /nologo /out:"..\client_release\mysqltest.exe" /incremental:no /libpath:"..\lib_release\" /pdb:".\release\mysqltest.pdb" /pdbtype:sept /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 odbc32.lib odbccp32.lib mysqlclient.lib wsock32.lib mysys.lib regex.lib /nologo /out:"..\client_release\mysqltest.exe" /incremental:no /libpath:"..\lib_release\" /pdb:".\release\mysqltest.pdb" /pdbtype:sept /subsystem:console /MACHINE:I386
|
||||||
|
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
# Begin Target
|
||||||
|
|
||||||
|
# Name "mysqltest - Win32 Debug"
|
||||||
|
# Name "mysqltest - Win32 classic"
|
||||||
|
# Name "mysqltest - Win32 Release"
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=..\libmysql\manager.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\mysqltest.c
|
||||||
|
# End Source File
|
||||||
|
# End Target
|
||||||
|
# End Project
|
||||||
|
|
@ -73,7 +73,7 @@ LINK32=xilink6.exe
|
|||||||
# PROP Ignore_Export_Lib 0
|
# PROP Ignore_Export_Lib 0
|
||||||
# PROP Target_Dir ""
|
# 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 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 "../libmysqld" /I "../sql" /I "../regex" /I "../bdb/build_win32" /I "../zlib" /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 "HAVE_INNOBASE_DB" /D "USE_TLS" /D "__WIN__" /FD /GZ /c
|
# ADD CPP /nologo /MT /W3 /Z7 /Od /I "../include" /I "../libmysqld" /I "../sql" /I "../regex" /I "../bdb/build_win32" /I "../zlib" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "SAFEMALLOC" /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" /D "__WIN__" /FD /GZ /c
|
||||||
# SUBTRACT CPP /X /Fr
|
# SUBTRACT CPP /X /Fr
|
||||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
|
||||||
|
106
VC++Files/mysql-test/mysql_test_run_new.dsp
Normal file
106
VC++Files/mysql-test/mysql_test_run_new.dsp
Normal file
@ -0,0 +1,106 @@
|
|||||||
|
# Microsoft Developer Studio Project File - Name="mysql_test_run_new" - Package Owner=<4>
|
||||||
|
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||||
|
# ** DO NOT EDIT **
|
||||||
|
|
||||||
|
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||||
|
|
||||||
|
CFG=mysql_test_run_new - 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 "mysql_test_run_new.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 "mysql_test_run_new.mak" CFG="mysql_test_run_new - Win32 Debug"
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE Possible choices for configuration are:
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE "mysql_test_run_new - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||||
|
!MESSAGE "mysql_test_run_new - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||||
|
!MESSAGE
|
||||||
|
|
||||||
|
# Begin Project
|
||||||
|
# PROP AllowPerConfigDependencies 0
|
||||||
|
# PROP Scc_ProjName ""
|
||||||
|
# PROP Scc_LocalPath ""
|
||||||
|
CPP=cl.exe
|
||||||
|
MTL=midl.exe
|
||||||
|
RSC=rc.exe
|
||||||
|
|
||||||
|
!IF "$(CFG)" == "mysql_test_run_new - 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 Target_Dir ""
|
||||||
|
# ADD BASE CPP /nologo /MTd /I "../include" /I "../" /Z7 /W3 /Od /G6 /D "_DEBUG" /D "_WINDOWS" /D "SAFE_MUTEX" /D "USE_TLS" /D "MYSQL_CLIENT" /D "__WIN__" /D "_WIN32" /Fp".\Debug/mysql_test_run_new.pch" /Fo".\Debug/" /Fd".\Debug/" /GZ /c /GX
|
||||||
|
# ADD CPP /nologo /MTd /I "../include" /I "../" /Z7 /W3 /Od /G6 /D "_DEBUG" /D "_WINDOWS" /D "SAFE_MUTEX" /D "USE_TLS" /D "MYSQL_CLIENT" /D "__WIN__" /D "_WIN32" /Fp".\Debug/mysql_test_run_new.pch" /Fo".\Debug/" /Fd".\Debug/" /GZ /c /GX
|
||||||
|
# ADD BASE MTL /nologo /tlb".\Debug\mysql_test_run_new.tlb" /win32
|
||||||
|
# ADD MTL /nologo /tlb".\Debug\mysql_test_run_new.tlb" /win32
|
||||||
|
# ADD BASE RSC /l 1033
|
||||||
|
# ADD RSC /l 1033
|
||||||
|
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 odbc32.lib odbccp32.lib Ws2_32.lib /nologo /out:"..\mysql-test\mysql_test_run_new.exe" /incremental:yes /debug /pdb:".\Debug\mysql_test_run_new.pdb" /pdbtype:sept /map:".\Debug\mysql_test_run_new.map" /subsystem:console
|
||||||
|
# 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 odbc32.lib odbccp32.lib Ws2_32.lib /nologo /out:"..\mysql-test\mysql_test_run_new.exe" /incremental:yes /debug /pdb:".\Debug\mysql_test_run_new.pdb" /pdbtype:sept /map:".\Debug\mysql_test_run_new.map" /subsystem:console
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "mysql_test_run_new - 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 Target_Dir ""
|
||||||
|
# ADD BASE CPP /nologo /MTd /I "../include" /I "../" /W3 /Ob1 /G6 /D "DBUG_OFF" /D "_WINDOWS" /D "SAFE_MUTEX" /D "USE_TLS" /D "MYSQL_CLIENT" /D "__WIN__" /D "_WIN32" /GF /Gy /Fp".\Release/mysql_test_run_new.pch" /Fo".\Release/" /Fd".\Release/" /c /GX
|
||||||
|
# ADD CPP /nologo /MTd /I "../include" /I "../" /W3 /Ob1 /G6 /D "DBUG_OFF" /D "_WINDOWS" /D "SAFE_MUTEX" /D "USE_TLS" /D "MYSQL_CLIENT" /D "__WIN__" /D "_WIN32" /GF /Gy /Fp".\Release/mysql_test_run_new.pch" /Fo".\Release/" /Fd".\Release/" /c /GX
|
||||||
|
# ADD BASE MTL /nologo /tlb".\Release\mysql_test_run_new.tlb" /win32
|
||||||
|
# ADD MTL /nologo /tlb".\Release\mysql_test_run_new.tlb" /win32
|
||||||
|
# ADD BASE RSC /l 1033
|
||||||
|
# ADD RSC /l 1033
|
||||||
|
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 odbc32.lib odbccp32.lib Ws2_32.lib /nologo /out:"..\mysql-test\mysql_test_run_new.exe" /incremental:no /pdb:".\Release\mysql_test_run_new.pdb" /pdbtype:sept /subsystem:console
|
||||||
|
# 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 odbc32.lib odbccp32.lib Ws2_32.lib /nologo /out:"..\mysql-test\mysql_test_run_new.exe" /incremental:no /pdb:".\Release\mysql_test_run_new.pdb" /pdbtype:sept /subsystem:console
|
||||||
|
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
# Begin Target
|
||||||
|
|
||||||
|
# Name "mysql_test_run_new - Win32 Debug"
|
||||||
|
# Name "mysql_test_run_new - Win32 Release"
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\my_create_tables.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\my_manage.c
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\my_manage.h
|
||||||
|
# End Source File
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=.\mysql_test_run_new.c
|
||||||
|
# End Source File
|
||||||
|
# End Target
|
||||||
|
# End Project
|
||||||
|
|
@ -814,6 +814,61 @@ Package=<4>
|
|||||||
{{{
|
{{{
|
||||||
}}}
|
}}}
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
Project: "mysqltest"=.\client\mysqltest.dsp - Package Owner=<4>
|
||||||
|
|
||||||
|
Package=<5>
|
||||||
|
{{{
|
||||||
|
|
||||||
|
}}}
|
||||||
|
|
||||||
|
|
||||||
|
Package=<4>
|
||||||
|
{{{
|
||||||
|
Begin Project Dependency
|
||||||
|
Project_Dep_Name libmysql
|
||||||
|
End Project Dependency
|
||||||
|
Begin Project Dependency
|
||||||
|
Project_Dep_Name mysys
|
||||||
|
End Project Dependency
|
||||||
|
Begin Project Dependency
|
||||||
|
Project_Dep_Name regex
|
||||||
|
End Project Dependency
|
||||||
|
}}}
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
Project: "mysql_client_test"=.\tests\mysql_client_test.dsp - Package Owner=<4>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Package=<5>
|
||||||
|
{{{
|
||||||
|
|
||||||
|
}}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Package=<4>
|
||||||
|
|
||||||
|
|
||||||
|
{{{
|
||||||
|
|
||||||
|
}}}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
###############################################################################
|
||||||
|
|
||||||
|
|
||||||
|
Project: "mysql_test_run_new"=".\mysql-test\mysql_test_run_new.dsp" - Package Owner=<4>
|
||||||
|
|
||||||
|
Package=<5>
|
||||||
{{{
|
{{{
|
||||||
}}}
|
}}}
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ BSC32=bscmake.exe
|
|||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=xilink6.exe
|
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 /nologo /subsystem:console /machine:I386
|
# 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"
|
# 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.exe"
|
||||||
# SUBTRACT LINK32 /debug
|
# SUBTRACT LINK32 /debug
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "mysqld - Win32 Debug"
|
!ELSEIF "$(CFG)" == "mysqld - Win32 Debug"
|
||||||
@ -84,7 +84,7 @@ BSC32=bscmake.exe
|
|||||||
# ADD BSC32 /nologo
|
# ADD BSC32 /nologo
|
||||||
LINK32=xilink6.exe
|
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 /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
# 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
|
# 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-debug.exe" /pdbtype:sept
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "mysqld - Win32 nt"
|
!ELSEIF "$(CFG)" == "mysqld - Win32 nt"
|
||||||
|
|
||||||
@ -924,76 +924,139 @@ SOURCE=.\message.mc
|
|||||||
|
|
||||||
!IF "$(CFG)" == "mysqld - Win32 Release"
|
!IF "$(CFG)" == "mysqld - Win32 Release"
|
||||||
|
|
||||||
|
# Begin Custom Build
|
||||||
|
InputPath=.\message.mc
|
||||||
|
|
||||||
|
BuildCmds= \
|
||||||
|
mc message.mc
|
||||||
|
|
||||||
|
"message.rc" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||||
|
$(BuildCmds)
|
||||||
|
|
||||||
|
"message.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||||
|
$(BuildCmds)
|
||||||
|
# End Custom Build
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "mysqld - Win32 Debug"
|
!ELSEIF "$(CFG)" == "mysqld - Win32 Debug"
|
||||||
|
|
||||||
|
# Begin Custom Build
|
||||||
|
InputPath=.\message.mc
|
||||||
|
|
||||||
|
BuildCmds= \
|
||||||
|
mc message.mc
|
||||||
|
|
||||||
|
"message.rc" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||||
|
$(BuildCmds)
|
||||||
|
|
||||||
|
"message.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||||
|
$(BuildCmds)
|
||||||
|
# End Custom Build
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "mysqld - Win32 nt"
|
!ELSEIF "$(CFG)" == "mysqld - Win32 nt"
|
||||||
|
|
||||||
# Begin Custom Build - Compiling messages
|
# Begin Custom Build
|
||||||
InputDir=.
|
|
||||||
InputPath=.\message.mc
|
InputPath=.\message.mc
|
||||||
InputName=message
|
|
||||||
|
|
||||||
BuildCmds= \
|
BuildCmds= \
|
||||||
mc.exe "$(InputDir)\$(InputName).mc"
|
mc message.mc
|
||||||
|
|
||||||
"$(InputDir)\$(InputName).rc" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
"message.rc" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||||
$(BuildCmds)
|
$(BuildCmds)
|
||||||
|
|
||||||
"$(InputDir)\$(InputName).h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
"message.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||||
$(BuildCmds)
|
$(BuildCmds)
|
||||||
# End Custom Build
|
# End Custom Build
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "mysqld - Win32 Max nt"
|
!ELSEIF "$(CFG)" == "mysqld - Win32 Max nt"
|
||||||
# Begin Custom Build - Compiling messages
|
|
||||||
InputDir=.
|
# Begin Custom Build
|
||||||
InputPath=.\message.mc
|
InputPath=.\message.mc
|
||||||
InputName=message
|
|
||||||
|
|
||||||
BuildCmds= \
|
BuildCmds= \
|
||||||
mc.exe "$(InputDir)\$(InputName).mc"
|
mc message.mc
|
||||||
|
|
||||||
"$(InputDir)\$(InputName).rc" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
"message.rc" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||||
$(BuildCmds)
|
$(BuildCmds)
|
||||||
|
|
||||||
"$(InputDir)\$(InputName).h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
"message.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||||
$(BuildCmds)
|
$(BuildCmds)
|
||||||
# End Custom Build
|
# End Custom Build
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
|
!ELSEIF "$(CFG)" == "mysqld - Win32 Max"
|
||||||
|
|
||||||
|
# Begin Custom Build
|
||||||
|
InputPath=.\message.mc
|
||||||
|
|
||||||
|
BuildCmds= \
|
||||||
|
mc message.mc
|
||||||
|
|
||||||
|
"message.rc" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||||
|
$(BuildCmds)
|
||||||
|
|
||||||
|
"message.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||||
|
$(BuildCmds)
|
||||||
|
# End Custom Build
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "mysqld - Win32 classic"
|
!ELSEIF "$(CFG)" == "mysqld - Win32 classic"
|
||||||
|
|
||||||
|
# Begin Custom Build
|
||||||
|
InputPath=.\message.mc
|
||||||
|
|
||||||
|
BuildCmds= \
|
||||||
|
mc message.mc
|
||||||
|
|
||||||
|
"message.rc" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||||
|
$(BuildCmds)
|
||||||
|
|
||||||
|
"message.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||||
|
$(BuildCmds)
|
||||||
|
# End Custom Build
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "mysqld - Win32 pro"
|
!ELSEIF "$(CFG)" == "mysqld - Win32 pro"
|
||||||
|
|
||||||
|
# Begin Custom Build
|
||||||
|
InputPath=.\message.mc
|
||||||
|
|
||||||
|
BuildCmds= \
|
||||||
|
mc message.mc
|
||||||
|
|
||||||
|
"message.rc" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||||
|
$(BuildCmds)
|
||||||
|
|
||||||
|
"message.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||||
|
$(BuildCmds)
|
||||||
|
# End Custom Build
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "mysqld - Win32 classic nt"
|
!ELSEIF "$(CFG)" == "mysqld - Win32 classic nt"
|
||||||
# Begin Custom Build - Compiling messages
|
|
||||||
InputDir=.
|
# Begin Custom Build
|
||||||
InputPath=.\message.mc
|
InputPath=.\message.mc
|
||||||
InputName=message
|
|
||||||
|
|
||||||
BuildCmds= \
|
BuildCmds= \
|
||||||
mc.exe "$(InputDir)\$(InputName).mc"
|
mc message.mc
|
||||||
|
|
||||||
"$(InputDir)\$(InputName).rc" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
"message.rc" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||||
$(BuildCmds)
|
$(BuildCmds)
|
||||||
|
|
||||||
"$(InputDir)\$(InputName).h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
"message.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||||
$(BuildCmds)
|
$(BuildCmds)
|
||||||
# End Custom Build
|
# End Custom Build
|
||||||
|
|
||||||
!ELSEIF "$(CFG)" == "mysqld - Win32 pro nt"
|
!ELSEIF "$(CFG)" == "mysqld - Win32 pro nt"
|
||||||
# Begin Custom Build - Compiling messages
|
|
||||||
InputDir=.
|
# Begin Custom Build
|
||||||
InputPath=.\message.mc
|
InputPath=.\message.mc
|
||||||
InputName=message
|
|
||||||
|
|
||||||
BuildCmds= \
|
BuildCmds= \
|
||||||
mc.exe "$(InputDir)\$(InputName).mc"
|
mc message.mc
|
||||||
|
|
||||||
"$(InputDir)\$(InputName).rc" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
"message.rc" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||||
$(BuildCmds)
|
$(BuildCmds)
|
||||||
|
|
||||||
"$(InputDir)\$(InputName).h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
"message.h" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||||
$(BuildCmds)
|
$(BuildCmds)
|
||||||
# End Custom Build
|
# End Custom Build
|
||||||
|
|
||||||
!ENDIF
|
!ENDIF
|
||||||
|
|
||||||
# End Source File
|
# End Source File
|
||||||
|
94
VC++Files/tests/mysql_client_test.dsp
Normal file
94
VC++Files/tests/mysql_client_test.dsp
Normal file
@ -0,0 +1,94 @@
|
|||||||
|
# Microsoft Developer Studio Project File - Name="mysql_client_test" - Package Owner=<4>
|
||||||
|
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||||
|
# ** DO NOT EDIT **
|
||||||
|
|
||||||
|
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||||
|
|
||||||
|
CFG=mysql_client_test - 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 "mysql_client_test.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 "mysql_client_test.mak" CFG="mysql_client_test - Win32 Debug"
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE Possible choices for configuration are:
|
||||||
|
!MESSAGE
|
||||||
|
!MESSAGE "mysql_client_test - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||||
|
!MESSAGE "mysql_client_test - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||||
|
!MESSAGE
|
||||||
|
|
||||||
|
# Begin Project
|
||||||
|
# PROP AllowPerConfigDependencies 0
|
||||||
|
# PROP Scc_ProjName ""
|
||||||
|
# PROP Scc_LocalPath ""
|
||||||
|
CPP=cl.exe
|
||||||
|
MTL=midl.exe
|
||||||
|
RSC=rc.exe
|
||||||
|
|
||||||
|
!IF "$(CFG)" == "mysql_client_test - 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 Target_Dir ""
|
||||||
|
# ADD BASE CPP /nologo /MTd /I "../include" /I "../" /Z7 /W3 /Od /G6 /D "_DEBUG" /D "_WINDOWS" /D "SAFE_MUTEX" /D "USE_TLS" /D "MYSQL_CLIENT" /D "__WIN__" /D "_WIN32" /Fp".\Debug/mysql_client_test.pch" /Fo".\Debug/" /Fd".\Debug/" /GZ /c /GX
|
||||||
|
# ADD CPP /nologo /MTd /I "../include" /I "../" /Z7 /W3 /Od /G6 /D "_DEBUG" /D "_WINDOWS" /D "SAFE_MUTEX" /D "USE_TLS" /D "MYSQL_CLIENT" /D "__WIN__" /D "_WIN32" /Fp".\Debug/mysql_client_test.pch" /Fo".\Debug/" /Fd".\Debug/" /GZ /c /GX
|
||||||
|
# ADD BASE MTL /nologo /tlb".\Debug\mysql_client_test.tlb" /win32
|
||||||
|
# ADD MTL /nologo /tlb".\Debug\mysql_client_test.tlb" /win32
|
||||||
|
# ADD BASE RSC /l 1033
|
||||||
|
# ADD RSC /l 1033
|
||||||
|
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 odbc32.lib odbccp32.lib mysqlclient.lib wsock32.lib mysys.lib regex.lib /nologo /out:"..\tests\mysql_client_test.exe" /incremental:yes /libpath:"..\lib_debug\" /debug /pdb:".\Debug\mysql_client_test.pdb" /pdbtype:sept /map:".\Debug\mysql_client_test.map" /subsystem:console
|
||||||
|
# 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 odbc32.lib odbccp32.lib mysqlclient.lib wsock32.lib mysys.lib regex.lib /nologo /out:"..\tests\mysql_client_test.exe" /incremental:yes /libpath:"..\lib_debug\" /debug /pdb:".\Debug\mysql_client_test.pdb" /pdbtype:sept /map:".\Debug\mysql_client_test.map" /subsystem:console
|
||||||
|
|
||||||
|
!ELSEIF "$(CFG)" == "mysql_client_test - 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 Target_Dir ""
|
||||||
|
# ADD BASE CPP /nologo /MTd /I "../include" /I "../" /W3 /Ob1 /G6 /D "DBUG_OFF" /D "_WINDOWS" /D "SAFE_MUTEX" /D "USE_TLS" /D "MYSQL_CLIENT" /D "__WIN__" /D "_WIN32" /GF /Gy /Fp".\Release/mysql_client_test.pch" /Fo".\Release/" /Fd".\Release/" /c /GX
|
||||||
|
# ADD CPP /nologo /MTd /I "../include" /I "../" /W3 /Ob1 /G6 /D "DBUG_OFF" /D "_WINDOWS" /D "SAFE_MUTEX" /D "USE_TLS" /D "MYSQL_CLIENT" /D "__WIN__" /D "_WIN32" /GF /Gy /Fp".\Release/mysql_client_test.pch" /Fo".\Release/" /Fd".\Release/" /c /GX
|
||||||
|
# ADD BASE MTL /nologo /tlb".\Release\mysql_client_test.tlb" /win32
|
||||||
|
# ADD MTL /nologo /tlb".\Release\mysql_client_test.tlb" /win32
|
||||||
|
# ADD BASE RSC /l 1033
|
||||||
|
# ADD RSC /l 1033
|
||||||
|
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 odbc32.lib odbccp32.lib Ws2_32.lib /nologo /out:"..\tests\mysql_client_test.exe" /incremental:no /pdb:".\Release\mysql_client_test.pdb" /pdbtype:sept /subsystem:console
|
||||||
|
# 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 odbc32.lib odbccp32.lib Ws2_32.lib /nologo /out:"..\tests\mysql_client_test.exe" /incremental:no /pdb:".\Release\mysql_client_test.pdb" /pdbtype:sept /subsystem:console
|
||||||
|
|
||||||
|
!ENDIF
|
||||||
|
|
||||||
|
# Begin Target
|
||||||
|
|
||||||
|
# Name "mysql_client_test - Win32 Debug"
|
||||||
|
# Name "mysql_client_test - Win32 Release"
|
||||||
|
# Begin Source File
|
||||||
|
|
||||||
|
SOURCE=tests\mysql_client_test.c
|
||||||
|
# End Source File
|
||||||
|
# End Target
|
||||||
|
# End Project
|
||||||
|
|
76
acinclude.m4
76
acinclude.m4
@ -194,6 +194,8 @@ dnl Define zlib paths to point at bundled zlib
|
|||||||
AC_DEFUN([MYSQL_USE_BUNDLED_ZLIB], [
|
AC_DEFUN([MYSQL_USE_BUNDLED_ZLIB], [
|
||||||
ZLIB_INCLUDES="-I\$(top_srcdir)/zlib"
|
ZLIB_INCLUDES="-I\$(top_srcdir)/zlib"
|
||||||
ZLIB_LIBS="\$(top_builddir)/zlib/libz.la"
|
ZLIB_LIBS="\$(top_builddir)/zlib/libz.la"
|
||||||
|
dnl Omit -L$pkglibdir as it's always in the list of mysql_config deps.
|
||||||
|
ZLIB_DEPS="-lz"
|
||||||
zlib_dir="zlib"
|
zlib_dir="zlib"
|
||||||
AC_SUBST([zlib_dir])
|
AC_SUBST([zlib_dir])
|
||||||
mysql_cv_compress="yes"
|
mysql_cv_compress="yes"
|
||||||
@ -208,7 +210,7 @@ INCLUDES="$INCLUDES $ZLIB_INCLUDES"
|
|||||||
LIBS="$LIBS $ZLIB_LIBS"
|
LIBS="$LIBS $ZLIB_LIBS"
|
||||||
AC_CACHE_VAL([mysql_cv_compress],
|
AC_CACHE_VAL([mysql_cv_compress],
|
||||||
[AC_TRY_LINK([#include <zlib.h>],
|
[AC_TRY_LINK([#include <zlib.h>],
|
||||||
[int link_test() { return compress(0, (unsigned long*) 0, "", 0); }],
|
[return compress(0, (unsigned long*) 0, "", 0);],
|
||||||
[mysql_cv_compress="yes"
|
[mysql_cv_compress="yes"
|
||||||
AC_MSG_RESULT([ok])],
|
AC_MSG_RESULT([ok])],
|
||||||
[mysql_cv_compress="no"])
|
[mysql_cv_compress="no"])
|
||||||
@ -235,8 +237,13 @@ dnl $prefix/lib. If zlib headers or binaries weren't found at $prefix, the
|
|||||||
dnl macro bails out with error.
|
dnl macro bails out with error.
|
||||||
dnl
|
dnl
|
||||||
dnl If the library was found, this function #defines HAVE_COMPRESS
|
dnl If the library was found, this function #defines HAVE_COMPRESS
|
||||||
dnl and configure variables ZLIB_INCLUDES (i.e. -I/path/to/zlib/include) and
|
dnl and configure variables ZLIB_INCLUDES (i.e. -I/path/to/zlib/include),
|
||||||
dnl ZLIB_LIBS (i. e. -L/path/to/zlib/lib -lz).
|
dnl ZLIB_LIBS (i. e. -L/path/to/zlib/lib -lz) and ZLIB_DEPS which is
|
||||||
|
dnl used in mysql_config and is always the same as ZLIB_LIBS except to
|
||||||
|
dnl when we use the bundled zlib. In the latter case ZLIB_LIBS points to the
|
||||||
|
dnl build dir ($top_builddir/zlib), while mysql_config must point to the
|
||||||
|
dnl installation dir ($pkglibdir), so ZLIB_DEPS is set to point to
|
||||||
|
dnl $pkglibdir.
|
||||||
|
|
||||||
AC_DEFUN([MYSQL_CHECK_ZLIB_WITH_COMPRESS], [
|
AC_DEFUN([MYSQL_CHECK_ZLIB_WITH_COMPRESS], [
|
||||||
AC_MSG_CHECKING([for zlib compression library])
|
AC_MSG_CHECKING([for zlib compression library])
|
||||||
@ -285,7 +292,11 @@ case $SYSTEM_TYPE in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
if test "$mysql_cv_compress" = "yes"; then
|
if test "$mysql_cv_compress" = "yes"; then
|
||||||
|
if test "x$ZLIB_DEPS" = "x"; then
|
||||||
|
ZLIB_DEPS="$ZLIB_LIBS"
|
||||||
|
fi
|
||||||
AC_SUBST([ZLIB_LIBS])
|
AC_SUBST([ZLIB_LIBS])
|
||||||
|
AC_SUBST([ZLIB_DEPS])
|
||||||
AC_SUBST([ZLIB_INCLUDES])
|
AC_SUBST([ZLIB_INCLUDES])
|
||||||
AC_DEFINE([HAVE_COMPRESS], [1], [Define to enable compression support])
|
AC_DEFINE([HAVE_COMPRESS], [1], [Define to enable compression support])
|
||||||
fi
|
fi
|
||||||
@ -1039,7 +1050,6 @@ AC_MSG_CHECKING(for OpenSSL)
|
|||||||
echo "You can't use the --all-static link option when using openssl."
|
echo "You can't use the --all-static link option when using openssl."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
NON_THREADED_CLIENT_LIBS="$NON_THREADED_CLIENT_LIBS $openssl_libs"
|
|
||||||
else
|
else
|
||||||
AC_MSG_RESULT(no)
|
AC_MSG_RESULT(no)
|
||||||
if test ! -z "$openssl_includes"
|
if test ! -z "$openssl_includes"
|
||||||
@ -1599,11 +1609,6 @@ AC_DEFUN([MYSQL_CHECK_NDB_OPTIONS], [
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
AC_ARG_WITH([ndb-shm],
|
|
||||||
[
|
|
||||||
--with-ndb-shm Include the NDB Cluster shared memory transporter],
|
|
||||||
[ndb_shm="$withval"],
|
|
||||||
[ndb_shm=no])
|
|
||||||
AC_ARG_WITH([ndb-test],
|
AC_ARG_WITH([ndb-test],
|
||||||
[
|
[
|
||||||
--with-ndb-test Include the NDB Cluster ndbapi test programs],
|
--with-ndb-test Include the NDB Cluster ndbapi test programs],
|
||||||
@ -1614,28 +1619,30 @@ AC_DEFUN([MYSQL_CHECK_NDB_OPTIONS], [
|
|||||||
--with-ndb-docs Include the NDB Cluster ndbapi and mgmapi documentation],
|
--with-ndb-docs Include the NDB Cluster ndbapi and mgmapi documentation],
|
||||||
[ndb_docs="$withval"],
|
[ndb_docs="$withval"],
|
||||||
[ndb_docs=no])
|
[ndb_docs=no])
|
||||||
|
AC_ARG_WITH([ndb-port],
|
||||||
|
[
|
||||||
|
--with-ndb-port Port for NDB Cluster management server],
|
||||||
|
[ndb_port="$withval"],
|
||||||
|
[ndb_port="default"])
|
||||||
AC_ARG_WITH([ndb-port-base],
|
AC_ARG_WITH([ndb-port-base],
|
||||||
[
|
[
|
||||||
--with-ndb-port-base Base port for NDB Cluster],
|
--with-ndb-port-base Base port for NDB Cluster transporters],
|
||||||
[ndb_port_base="$withval"],
|
[ndb_port_base="$withval"],
|
||||||
[ndb_port_base="default"])
|
[ndb_port_base="default"])
|
||||||
|
AC_ARG_WITH([ndb-debug],
|
||||||
|
[
|
||||||
|
--without-ndb-debug Disable special ndb debug features],
|
||||||
|
[ndb_debug="$withval"],
|
||||||
|
[ndb_debug="default"])
|
||||||
|
AC_ARG_WITH([ndb-ccflags],
|
||||||
|
[
|
||||||
|
--with-ndb-ccflags Extra CC options for ndb compile],
|
||||||
|
[ndb_cxxflags_fix="$ndb_cxxflags_fix $withval"],
|
||||||
|
[ndb_cxxflags_fix=$ndb_cxxflags_fix])
|
||||||
|
|
||||||
AC_MSG_CHECKING([for NDB Cluster options])
|
AC_MSG_CHECKING([for NDB Cluster options])
|
||||||
AC_MSG_RESULT([])
|
AC_MSG_RESULT([])
|
||||||
|
|
||||||
have_ndb_shm=no
|
|
||||||
case "$ndb_shm" in
|
|
||||||
yes )
|
|
||||||
AC_MSG_RESULT([-- including shared memory transporter])
|
|
||||||
AC_DEFINE([NDB_SHM_TRANSPORTER], [1],
|
|
||||||
[Including Ndb Cluster DB shared memory transporter])
|
|
||||||
have_ndb_shm="yes"
|
|
||||||
;;
|
|
||||||
* )
|
|
||||||
AC_MSG_RESULT([-- not including shared memory transporter])
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
have_ndb_test=no
|
have_ndb_test=no
|
||||||
case "$ndb_test" in
|
case "$ndb_test" in
|
||||||
yes )
|
yes )
|
||||||
@ -1658,6 +1665,24 @@ AC_DEFUN([MYSQL_CHECK_NDB_OPTIONS], [
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
case "$ndb_debug" in
|
||||||
|
yes )
|
||||||
|
AC_MSG_RESULT([-- including ndb extra debug options])
|
||||||
|
have_ndb_debug="yes"
|
||||||
|
;;
|
||||||
|
full )
|
||||||
|
AC_MSG_RESULT([-- including ndb extra extra debug options])
|
||||||
|
have_ndb_debug="full"
|
||||||
|
;;
|
||||||
|
no )
|
||||||
|
AC_MSG_RESULT([-- not including ndb extra debug options])
|
||||||
|
have_ndb_debug="no"
|
||||||
|
;;
|
||||||
|
* )
|
||||||
|
have_ndb_debug="default"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
AC_MSG_RESULT([done.])
|
AC_MSG_RESULT([done.])
|
||||||
])
|
])
|
||||||
|
|
||||||
@ -1673,6 +1698,7 @@ AC_DEFUN([MYSQL_CHECK_NDBCLUSTER], [
|
|||||||
have_ndbcluster=no
|
have_ndbcluster=no
|
||||||
ndbcluster_includes=
|
ndbcluster_includes=
|
||||||
ndbcluster_libs=
|
ndbcluster_libs=
|
||||||
|
ndb_mgmclient_libs=
|
||||||
case "$ndbcluster" in
|
case "$ndbcluster" in
|
||||||
yes )
|
yes )
|
||||||
AC_MSG_RESULT([Using NDB Cluster])
|
AC_MSG_RESULT([Using NDB Cluster])
|
||||||
@ -1681,6 +1707,7 @@ AC_DEFUN([MYSQL_CHECK_NDBCLUSTER], [
|
|||||||
ndbcluster_includes="-I../ndb/include -I../ndb/include/ndbapi"
|
ndbcluster_includes="-I../ndb/include -I../ndb/include/ndbapi"
|
||||||
ndbcluster_libs="\$(top_builddir)/ndb/src/.libs/libndbclient.a"
|
ndbcluster_libs="\$(top_builddir)/ndb/src/.libs/libndbclient.a"
|
||||||
ndbcluster_system_libs=""
|
ndbcluster_system_libs=""
|
||||||
|
ndb_mgmclient_libs="\$(top_builddir)/ndb/src/mgmclient/libndbmgmclient.la"
|
||||||
MYSQL_CHECK_NDB_OPTIONS
|
MYSQL_CHECK_NDB_OPTIONS
|
||||||
;;
|
;;
|
||||||
* )
|
* )
|
||||||
@ -1692,6 +1719,7 @@ AC_DEFUN([MYSQL_CHECK_NDBCLUSTER], [
|
|||||||
AC_SUBST(ndbcluster_includes)
|
AC_SUBST(ndbcluster_includes)
|
||||||
AC_SUBST(ndbcluster_libs)
|
AC_SUBST(ndbcluster_libs)
|
||||||
AC_SUBST(ndbcluster_system_libs)
|
AC_SUBST(ndbcluster_system_libs)
|
||||||
|
AC_SUBST(ndb_mgmclient_libs)
|
||||||
])
|
])
|
||||||
|
|
||||||
dnl ---------------------------------------------------------------------------
|
dnl ---------------------------------------------------------------------------
|
||||||
|
@ -20,28 +20,20 @@
|
|||||||
INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/regex \
|
INCLUDES = -I$(top_srcdir)/include -I$(top_srcdir)/regex \
|
||||||
$(openssl_includes)
|
$(openssl_includes)
|
||||||
LIBS = @CLIENT_LIBS@
|
LIBS = @CLIENT_LIBS@
|
||||||
DEPLIB= ../libmysql/libmysqlclient.la
|
LDADD= @CLIENT_EXTRA_LDFLAGS@ \
|
||||||
LDADD = @CLIENT_EXTRA_LDFLAGS@ $(DEPLIB)
|
$(top_builddir)/libmysql/libmysqlclient.la
|
||||||
bin_PROGRAMS = mysql mysqladmin mysqlcheck mysqlshow \
|
bin_PROGRAMS = mysql mysqladmin mysqlcheck mysqlshow \
|
||||||
mysqldump mysqlimport mysqltest mysqlbinlog mysqlmanagerc mysqlmanager-pwgen
|
mysqldump mysqlimport mysqltest mysqlbinlog mysqlmanagerc mysqlmanager-pwgen
|
||||||
noinst_HEADERS = sql_string.h completion_hash.h my_readline.h \
|
noinst_HEADERS = sql_string.h completion_hash.h my_readline.h \
|
||||||
client_priv.h
|
client_priv.h
|
||||||
mysql_SOURCES = mysql.cc readline.cc sql_string.cc completion_hash.cc
|
mysql_SOURCES = mysql.cc readline.cc sql_string.cc completion_hash.cc
|
||||||
|
mysqladmin_SOURCES = mysqladmin.cc
|
||||||
mysql_LDADD = @readline_link@ @TERMCAP_LIB@ $(LDADD) $(CXXLDFLAGS)
|
mysql_LDADD = @readline_link@ @TERMCAP_LIB@ $(LDADD) $(CXXLDFLAGS)
|
||||||
mysqlbinlog_LDADD = $(LDADD) $(CXXLDFLAGS)
|
mysqlbinlog_LDADD = $(LDADD) $(CXXLDFLAGS)
|
||||||
mysql_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) $(DEPLIB)
|
mysqltest_SOURCES= mysqltest.c $(top_srcdir)/mysys/my_getsystime.c
|
||||||
mysqladmin_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) $(DEPLIB)
|
mysqltest_LDADD = $(top_builddir)/regex/libregex.a $(LDADD)
|
||||||
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 ../mysys/my_getsystime.c
|
|
||||||
mysqltest_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) $(DEPLIB)
|
|
||||||
mysqltest_LDADD = $(LDADD) $(top_builddir)/regex/libregex.a
|
|
||||||
mysqlbinlog_SOURCES = mysqlbinlog.cc ../mysys/mf_tempdir.c
|
mysqlbinlog_SOURCES = mysqlbinlog.cc ../mysys/mf_tempdir.c
|
||||||
mysqlbinlog_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) $(DEPLIB)
|
|
||||||
mysqlmanagerc_SOURCES = mysqlmanagerc.c
|
mysqlmanagerc_SOURCES = mysqlmanagerc.c
|
||||||
mysqlmanagerc_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES) $(DEPLIB)
|
|
||||||
sql_src=log_event.h log_event.cc
|
sql_src=log_event.h log_event.cc
|
||||||
|
|
||||||
# Fix for mit-threads
|
# Fix for mit-threads
|
||||||
|
@ -45,5 +45,9 @@ enum options_client
|
|||||||
OPT_COMPATIBLE, OPT_RECONNECT, OPT_DELIMITER, OPT_SECURE_AUTH,
|
OPT_COMPATIBLE, OPT_RECONNECT, OPT_DELIMITER, OPT_SECURE_AUTH,
|
||||||
OPT_OPEN_FILES_LIMIT, OPT_SET_CHARSET, OPT_CREATE_OPTIONS,
|
OPT_OPEN_FILES_LIMIT, OPT_SET_CHARSET, OPT_CREATE_OPTIONS,
|
||||||
OPT_START_POSITION, OPT_STOP_POSITION, OPT_START_DATETIME, OPT_STOP_DATETIME,
|
OPT_START_POSITION, OPT_STOP_POSITION, OPT_START_DATETIME, OPT_STOP_DATETIME,
|
||||||
OPT_SIGINT_IGNORE, OPT_HEXBLOB
|
OPT_SIGINT_IGNORE, OPT_HEXBLOB, OPT_ORDER_BY_PRIMARY
|
||||||
|
#ifdef HAVE_NDBCLUSTER_DB
|
||||||
|
,OPT_NDBCLUSTER,OPT_NDB_CONNECTSTRING
|
||||||
|
#endif
|
||||||
|
,OPT_IGNORE_TABLE
|
||||||
};
|
};
|
||||||
|
@ -79,7 +79,8 @@ int completion_hash_update(HashTable *ht, char *arKey, uint nKeyLength,
|
|||||||
if (!memcmp(p->arKey, arKey, nKeyLength)) {
|
if (!memcmp(p->arKey, arKey, nKeyLength)) {
|
||||||
entry *n;
|
entry *n;
|
||||||
|
|
||||||
n = (entry *) alloc_root(&ht->mem_root,sizeof(entry));
|
if (!(n = (entry *) alloc_root(&ht->mem_root,sizeof(entry))))
|
||||||
|
return FAILURE;
|
||||||
n->pNext = p->pData;
|
n->pNext = p->pData;
|
||||||
n->str = str;
|
n->str = str;
|
||||||
p->pData = n;
|
p->pData = n;
|
||||||
|
103
client/mysql.cc
103
client/mysql.cc
@ -172,7 +172,7 @@ static char *shared_memory_base_name=0;
|
|||||||
#endif
|
#endif
|
||||||
static uint opt_protocol=0;
|
static uint opt_protocol=0;
|
||||||
static CHARSET_INFO *charset_info= &my_charset_latin1;
|
static CHARSET_INFO *charset_info= &my_charset_latin1;
|
||||||
|
|
||||||
#include "sslopt-vars.h"
|
#include "sslopt-vars.h"
|
||||||
|
|
||||||
const char *default_dbug_option="d:t:o,/tmp/mysql.trace";
|
const char *default_dbug_option="d:t:o,/tmp/mysql.trace";
|
||||||
@ -330,6 +330,16 @@ static sig_handler mysql_end(int sig);
|
|||||||
int main(int argc,char *argv[])
|
int main(int argc,char *argv[])
|
||||||
{
|
{
|
||||||
char buff[80];
|
char buff[80];
|
||||||
|
char *defaults, *extra_defaults;
|
||||||
|
char *emb_argv[3];
|
||||||
|
int emb_argc= 1;
|
||||||
|
|
||||||
|
emb_argv[0]= argv[0];
|
||||||
|
get_defaults_files(argc, argv, &defaults, &extra_defaults);
|
||||||
|
if (defaults)
|
||||||
|
emb_argv[emb_argc++]= defaults;
|
||||||
|
if (extra_defaults)
|
||||||
|
emb_argv[emb_argc++]= extra_defaults;
|
||||||
|
|
||||||
MY_INIT(argv[0]);
|
MY_INIT(argv[0]);
|
||||||
DBUG_ENTER("main");
|
DBUG_ENTER("main");
|
||||||
@ -375,7 +385,7 @@ int main(int argc,char *argv[])
|
|||||||
my_end(0);
|
my_end(0);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
if (mysql_server_init(0, NULL, (char**) server_default_groups))
|
if (mysql_server_init(emb_argc, emb_argv, (char**) server_default_groups))
|
||||||
{
|
{
|
||||||
free_defaults(defaults_argv);
|
free_defaults(defaults_argv);
|
||||||
my_end(0);
|
my_end(0);
|
||||||
@ -1420,12 +1430,6 @@ static void build_completion_hash(bool rehash, bool write_info)
|
|||||||
if (status.batch || quick || !current_db)
|
if (status.batch || quick || !current_db)
|
||||||
DBUG_VOID_RETURN; // We don't need completion in batches
|
DBUG_VOID_RETURN; // We don't need completion in batches
|
||||||
|
|
||||||
if (tables)
|
|
||||||
{
|
|
||||||
mysql_free_result(tables);
|
|
||||||
tables=0;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* hash SQL commands */
|
/* hash SQL commands */
|
||||||
while (cmd->name) {
|
while (cmd->name) {
|
||||||
add_word(&ht,(char*) cmd->name);
|
add_word(&ht,(char*) cmd->name);
|
||||||
@ -1502,12 +1506,15 @@ You can turn off this feature to get a quicker startup with -A\n\n");
|
|||||||
if (!(field_names[i] = (char **) alloc_root(&hash_mem_root,
|
if (!(field_names[i] = (char **) alloc_root(&hash_mem_root,
|
||||||
sizeof(char *) *
|
sizeof(char *) *
|
||||||
(num_fields*2+1))))
|
(num_fields*2+1))))
|
||||||
break;
|
{
|
||||||
|
mysql_free_result(fields);
|
||||||
|
break;
|
||||||
|
}
|
||||||
field_names[i][num_fields*2]= '\0';
|
field_names[i][num_fields*2]= '\0';
|
||||||
j=0;
|
j=0;
|
||||||
while ((sql_field=mysql_fetch_field(fields)))
|
while ((sql_field=mysql_fetch_field(fields)))
|
||||||
{
|
{
|
||||||
sprintf(buf,"%s.%s",table_row[0],sql_field->name);
|
sprintf(buf,"%.64s.%.64s",table_row[0],sql_field->name);
|
||||||
field_names[i][j] = strdup_root(&hash_mem_root,buf);
|
field_names[i][j] = strdup_root(&hash_mem_root,buf);
|
||||||
add_word(&ht,field_names[i][j]);
|
add_word(&ht,field_names[i][j]);
|
||||||
field_names[i][num_fields+j] = strdup_root(&hash_mem_root,
|
field_names[i][num_fields+j] = strdup_root(&hash_mem_root,
|
||||||
@ -1574,6 +1581,22 @@ static int reconnect(void)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void get_current_db()
|
||||||
|
{
|
||||||
|
MYSQL_RES *res;
|
||||||
|
|
||||||
|
my_free(current_db, MYF(MY_ALLOW_ZERO_PTR));
|
||||||
|
current_db= NULL;
|
||||||
|
/* In case of error below current_db will be NULL */
|
||||||
|
if (!mysql_query(&mysql, "SELECT DATABASE()") &&
|
||||||
|
(res= mysql_use_result(&mysql)))
|
||||||
|
{
|
||||||
|
MYSQL_ROW row= mysql_fetch_row(res);
|
||||||
|
if (row[0])
|
||||||
|
current_db= my_strdup(row[0], MYF(MY_WME));
|
||||||
|
mysql_free_result(res);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/***************************************************************************
|
/***************************************************************************
|
||||||
The different commands
|
The different commands
|
||||||
@ -1584,7 +1607,7 @@ int mysql_real_query_for_lazy(const char *buf, int length)
|
|||||||
for (uint retry=0;; retry++)
|
for (uint retry=0;; retry++)
|
||||||
{
|
{
|
||||||
if (!mysql_real_query(&mysql,buf,length))
|
if (!mysql_real_query(&mysql,buf,length))
|
||||||
return 0;
|
return 0;
|
||||||
int error= put_error(&mysql);
|
int error= put_error(&mysql);
|
||||||
if (mysql_errno(&mysql) != CR_SERVER_GONE_ERROR || retry > 1 ||
|
if (mysql_errno(&mysql) != CR_SERVER_GONE_ERROR || retry > 1 ||
|
||||||
!opt_reconnect)
|
!opt_reconnect)
|
||||||
@ -1609,7 +1632,7 @@ static void print_help_item(MYSQL_ROW *cur, int num_name, int num_cat, char *las
|
|||||||
char ccat= (*cur)[num_cat][0];
|
char ccat= (*cur)[num_cat][0];
|
||||||
if (*last_char != ccat)
|
if (*last_char != ccat)
|
||||||
{
|
{
|
||||||
put_info(ccat == 'Y' ? "categories :" : "topics :", INFO_INFO);
|
put_info(ccat == 'Y' ? "categories:" : "topics:", INFO_INFO);
|
||||||
*last_char= ccat;
|
*last_char= ccat;
|
||||||
}
|
}
|
||||||
tee_fprintf(PAGER, " %s\n", (*cur)[num_name]);
|
tee_fprintf(PAGER, " %s\n", (*cur)[num_name]);
|
||||||
@ -1668,29 +1691,28 @@ static int com_server_help(String *buffer __attribute__((unused)),
|
|||||||
else if (num_fields >= 2 && num_rows)
|
else if (num_fields >= 2 && num_rows)
|
||||||
{
|
{
|
||||||
init_pager();
|
init_pager();
|
||||||
char last_char;
|
char last_char= 0;
|
||||||
|
|
||||||
int num_name= 0, num_cat= 0;
|
int num_name= 0, num_cat= 0;
|
||||||
LINT_INIT(num_name);
|
LINT_INIT(num_name);
|
||||||
LINT_INIT(num_cat);
|
LINT_INIT(num_cat);
|
||||||
|
|
||||||
if (num_fields == 2)
|
if (num_fields == 2)
|
||||||
{
|
{
|
||||||
put_info("Many help items for your request exist", INFO_INFO);
|
put_info("Many help items for your request exist.", INFO_INFO);
|
||||||
put_info("To make a more specific request, please type 'help <item>',\nwhere item is one of next", INFO_INFO);
|
put_info("To make a more specific request, please type 'help <item>',\nwhere <item> is one of the following", INFO_INFO);
|
||||||
num_name= 0;
|
num_name= 0;
|
||||||
num_cat= 1;
|
num_cat= 1;
|
||||||
last_char= '_';
|
|
||||||
}
|
}
|
||||||
else if ((cur= mysql_fetch_row(result)))
|
else if ((cur= mysql_fetch_row(result)))
|
||||||
{
|
{
|
||||||
tee_fprintf(PAGER, "You asked for help about help category: \"%s\"\n", cur[0]);
|
tee_fprintf(PAGER, "You asked for help about help category: \"%s\"\n", cur[0]);
|
||||||
put_info("For more information, type 'help <item>', where item is one of the following", INFO_INFO);
|
put_info("For more information, type 'help <item>', where <item> is one of the following", INFO_INFO);
|
||||||
num_name= 1;
|
num_name= 1;
|
||||||
num_cat= 2;
|
num_cat= 2;
|
||||||
print_help_item(&cur,1,2,&last_char);
|
print_help_item(&cur,1,2,&last_char);
|
||||||
}
|
}
|
||||||
|
|
||||||
while ((cur= mysql_fetch_row(result)))
|
while ((cur= mysql_fetch_row(result)))
|
||||||
print_help_item(&cur,num_name,num_cat,&last_char);
|
print_help_item(&cur,num_name,num_cat,&last_char);
|
||||||
tee_fprintf(PAGER, "\n");
|
tee_fprintf(PAGER, "\n");
|
||||||
@ -1899,6 +1921,10 @@ com_go(String *buffer,char *line __attribute__((unused)))
|
|||||||
if (err >= 1)
|
if (err >= 1)
|
||||||
error= put_error(&mysql);
|
error= put_error(&mysql);
|
||||||
|
|
||||||
|
if (!error && !status.batch &&
|
||||||
|
(mysql.server_status & SERVER_STATUS_DB_DROPPED))
|
||||||
|
get_current_db();
|
||||||
|
|
||||||
return error; /* New command follows */
|
return error; /* New command follows */
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2077,10 +2103,10 @@ print_table_data_html(MYSQL_RES *result)
|
|||||||
}
|
}
|
||||||
while ((cur = mysql_fetch_row(result)))
|
while ((cur = mysql_fetch_row(result)))
|
||||||
{
|
{
|
||||||
|
ulong *lengths=mysql_fetch_lengths(result);
|
||||||
(void) tee_fputs("<TR>", PAGER);
|
(void) tee_fputs("<TR>", PAGER);
|
||||||
for (uint i=0; i < mysql_num_fields(result); i++)
|
for (uint i=0; i < mysql_num_fields(result); i++)
|
||||||
{
|
{
|
||||||
ulong *lengths=mysql_fetch_lengths(result);
|
|
||||||
(void) tee_fputs("<TD>", PAGER);
|
(void) tee_fputs("<TD>", PAGER);
|
||||||
safe_put_field(cur[i],lengths[i]);
|
safe_put_field(cur[i],lengths[i]);
|
||||||
(void) tee_fputs("</TD>", PAGER);
|
(void) tee_fputs("</TD>", PAGER);
|
||||||
@ -2106,10 +2132,10 @@ print_table_data_xml(MYSQL_RES *result)
|
|||||||
fields = mysql_fetch_fields(result);
|
fields = mysql_fetch_fields(result);
|
||||||
while ((cur = mysql_fetch_row(result)))
|
while ((cur = mysql_fetch_row(result)))
|
||||||
{
|
{
|
||||||
|
ulong *lengths=mysql_fetch_lengths(result);
|
||||||
(void) tee_fputs("\n <row>\n", PAGER);
|
(void) tee_fputs("\n <row>\n", PAGER);
|
||||||
for (uint i=0; i < mysql_num_fields(result); i++)
|
for (uint i=0; i < mysql_num_fields(result); i++)
|
||||||
{
|
{
|
||||||
ulong *lengths=mysql_fetch_lengths(result);
|
|
||||||
tee_fprintf(PAGER, "\t<%s>", (fields[i].name ?
|
tee_fprintf(PAGER, "\t<%s>", (fields[i].name ?
|
||||||
(fields[i].name[0] ? fields[i].name :
|
(fields[i].name[0] ? fields[i].name :
|
||||||
" ") : "NULL"));
|
" ") : "NULL"));
|
||||||
@ -2513,7 +2539,7 @@ com_connect(String *buffer, char *line)
|
|||||||
{
|
{
|
||||||
sprintf(buff,"Connection id: %lu",mysql_thread_id(&mysql));
|
sprintf(buff,"Connection id: %lu",mysql_thread_id(&mysql));
|
||||||
put_info(buff,INFO_INFO);
|
put_info(buff,INFO_INFO);
|
||||||
sprintf(buff,"Current database: %s\n",
|
sprintf(buff,"Current database: %.128s\n",
|
||||||
current_db ? current_db : "*** NONE ***");
|
current_db ? current_db : "*** NONE ***");
|
||||||
put_info(buff,INFO_INFO);
|
put_info(buff,INFO_INFO);
|
||||||
}
|
}
|
||||||
@ -2615,24 +2641,7 @@ com_use(String *buffer __attribute__((unused)), char *line)
|
|||||||
under our feet, for example if DROP DATABASE or RENAME DATABASE
|
under our feet, for example if DROP DATABASE or RENAME DATABASE
|
||||||
(latter one not yet available by the time the comment was written)
|
(latter one not yet available by the time the comment was written)
|
||||||
*/
|
*/
|
||||||
/* Let's reset current_db, assume it's gone */
|
get_current_db();
|
||||||
my_free(current_db, MYF(MY_ALLOW_ZERO_PTR));
|
|
||||||
current_db= 0;
|
|
||||||
/*
|
|
||||||
We don't care about in case of an error below because current_db
|
|
||||||
was just set to 0.
|
|
||||||
*/
|
|
||||||
if (!mysql_query(&mysql, "SELECT DATABASE()") &&
|
|
||||||
(res= mysql_use_result(&mysql)))
|
|
||||||
{
|
|
||||||
row= mysql_fetch_row(res);
|
|
||||||
if (row[0])
|
|
||||||
{
|
|
||||||
current_db= my_strdup(row[0], MYF(MY_WME));
|
|
||||||
}
|
|
||||||
(void) mysql_fetch_row(res); // Read eof
|
|
||||||
mysql_free_result(res);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!current_db || cmp_database(charset_info, current_db,tmp))
|
if (!current_db || cmp_database(charset_info, current_db,tmp))
|
||||||
{
|
{
|
||||||
@ -2908,9 +2917,9 @@ com_status(String *buffer __attribute__((unused)),
|
|||||||
MYSQL_ROW cur=mysql_fetch_row(result);
|
MYSQL_ROW cur=mysql_fetch_row(result);
|
||||||
if (cur)
|
if (cur)
|
||||||
{
|
{
|
||||||
tee_fprintf(stdout, "Server characterset:\t%s\n", cur[0] ? cur[0] : "");
|
tee_fprintf(stdout, "Server characterset:\t%s\n", cur[2] ? cur[2] : "");
|
||||||
tee_fprintf(stdout, "Db characterset:\t%s\n", cur[3] ? cur[3] : "");
|
tee_fprintf(stdout, "Db characterset:\t%s\n", cur[3] ? cur[3] : "");
|
||||||
tee_fprintf(stdout, "Client characterset:\t%s\n", cur[2] ? cur[2] : "");
|
tee_fprintf(stdout, "Client characterset:\t%s\n", cur[0] ? cur[0] : "");
|
||||||
tee_fprintf(stdout, "Conn. characterset:\t%s\n", cur[1] ? cur[1] : "");
|
tee_fprintf(stdout, "Conn. characterset:\t%s\n", cur[1] ? cur[1] : "");
|
||||||
}
|
}
|
||||||
mysql_free_result(result);
|
mysql_free_result(result);
|
||||||
@ -3219,13 +3228,20 @@ static const char* construct_prompt()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case 'p':
|
case 'p':
|
||||||
|
{
|
||||||
#ifndef EMBEDDED_LIBRARY
|
#ifndef EMBEDDED_LIBRARY
|
||||||
if (!connected)
|
if (!connected)
|
||||||
{
|
{
|
||||||
processed_prompt.append("not_connected");
|
processed_prompt.append("not_connected");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (strstr(mysql_get_host_info(&mysql),"TCP/IP") ||
|
|
||||||
|
const char *host_info = mysql_get_host_info(&mysql);
|
||||||
|
if (strstr(host_info, "memory"))
|
||||||
|
{
|
||||||
|
processed_prompt.append( mysql.host );
|
||||||
|
}
|
||||||
|
else if (strstr(host_info,"TCP/IP") ||
|
||||||
!mysql.unix_socket)
|
!mysql.unix_socket)
|
||||||
add_int_to_prompt(mysql.port);
|
add_int_to_prompt(mysql.port);
|
||||||
else
|
else
|
||||||
@ -3234,6 +3250,7 @@ static const char* construct_prompt()
|
|||||||
processed_prompt.append(pos ? pos+1 : mysql.unix_socket);
|
processed_prompt.append(pos ? pos+1 : mysql.unix_socket);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case 'U':
|
case 'U':
|
||||||
if (!full_username)
|
if (!full_username)
|
||||||
|
@ -16,7 +16,6 @@
|
|||||||
|
|
||||||
/* maintaince of mysql databases */
|
/* maintaince of mysql databases */
|
||||||
|
|
||||||
|
|
||||||
#include "client_priv.h"
|
#include "client_priv.h"
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#ifdef THREAD
|
#ifdef THREAD
|
||||||
@ -25,12 +24,17 @@
|
|||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <mysql.h>
|
#include <mysql.h>
|
||||||
|
|
||||||
|
#ifdef LATER_HAVE_NDBCLUSTER_DB
|
||||||
|
#include "../ndb/src/mgmclient/ndb_mgmclient.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
#define ADMIN_VERSION "8.41"
|
#define ADMIN_VERSION "8.41"
|
||||||
#define MAX_MYSQL_VAR 256
|
#define MAX_MYSQL_VAR 256
|
||||||
#define SHUTDOWN_DEF_TIMEOUT 3600 /* Wait for shutdown */
|
#define SHUTDOWN_DEF_TIMEOUT 3600 /* Wait for shutdown */
|
||||||
#define MAX_TRUNC_LENGTH 3
|
#define MAX_TRUNC_LENGTH 3
|
||||||
|
|
||||||
char *host= NULL, *user= 0, *opt_password= 0;
|
char *host= NULL, *user= 0, *opt_password= 0,
|
||||||
|
*default_charset= NULL;
|
||||||
char truncated_var_names[MAX_MYSQL_VAR][MAX_TRUNC_LENGTH];
|
char truncated_var_names[MAX_MYSQL_VAR][MAX_TRUNC_LENGTH];
|
||||||
char ex_var_names[MAX_MYSQL_VAR][FN_REFLEN];
|
char ex_var_names[MAX_MYSQL_VAR][FN_REFLEN];
|
||||||
ulonglong last_values[MAX_MYSQL_VAR];
|
ulonglong last_values[MAX_MYSQL_VAR];
|
||||||
@ -42,6 +46,10 @@ static uint tcp_port = 0, option_wait = 0, option_silent=0, nr_iterations,
|
|||||||
opt_count_iterations= 0;
|
opt_count_iterations= 0;
|
||||||
static ulong opt_connect_timeout, opt_shutdown_timeout;
|
static ulong opt_connect_timeout, opt_shutdown_timeout;
|
||||||
static my_string unix_port=0;
|
static my_string unix_port=0;
|
||||||
|
#ifdef LATER_HAVE_NDBCLUSTER_DB
|
||||||
|
static my_bool opt_ndbcluster=0;
|
||||||
|
static char *opt_ndb_connectstring=0;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HAVE_SMEM
|
#ifdef HAVE_SMEM
|
||||||
static char *shared_memory_base_name=0;
|
static char *shared_memory_base_name=0;
|
||||||
@ -94,6 +102,9 @@ enum commands {
|
|||||||
ADMIN_PING, ADMIN_EXTENDED_STATUS, ADMIN_FLUSH_STATUS,
|
ADMIN_PING, ADMIN_EXTENDED_STATUS, ADMIN_FLUSH_STATUS,
|
||||||
ADMIN_FLUSH_PRIVILEGES, ADMIN_START_SLAVE, ADMIN_STOP_SLAVE,
|
ADMIN_FLUSH_PRIVILEGES, ADMIN_START_SLAVE, ADMIN_STOP_SLAVE,
|
||||||
ADMIN_FLUSH_THREADS, ADMIN_OLD_PASSWORD
|
ADMIN_FLUSH_THREADS, ADMIN_OLD_PASSWORD
|
||||||
|
#ifdef LATER_HAVE_NDBCLUSTER_DB
|
||||||
|
,ADMIN_NDB_MGM
|
||||||
|
#endif
|
||||||
};
|
};
|
||||||
static const char *command_names[]= {
|
static const char *command_names[]= {
|
||||||
"create", "drop", "shutdown",
|
"create", "drop", "shutdown",
|
||||||
@ -104,14 +115,21 @@ static const char *command_names[]= {
|
|||||||
"ping", "extended-status", "flush-status",
|
"ping", "extended-status", "flush-status",
|
||||||
"flush-privileges", "start-slave", "stop-slave",
|
"flush-privileges", "start-slave", "stop-slave",
|
||||||
"flush-threads","old-password",
|
"flush-threads","old-password",
|
||||||
|
#ifdef LATER_HAVE_NDBCLUSTER_DB
|
||||||
|
"ndb-mgm",
|
||||||
|
#endif
|
||||||
NullS
|
NullS
|
||||||
};
|
};
|
||||||
|
|
||||||
static TYPELIB command_typelib=
|
static TYPELIB command_typelib=
|
||||||
{ array_elements(command_names)-1,"commands", command_names};
|
{ array_elements(command_names)-1,"commands", command_names, NULL};
|
||||||
|
|
||||||
static struct my_option my_long_options[] =
|
static struct my_option my_long_options[] =
|
||||||
{
|
{
|
||||||
|
#ifdef __NETWARE__
|
||||||
|
{"autoclose", 'a', " Auto close the screen on exit for NetWare",
|
||||||
|
0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
|
#endif
|
||||||
{"count", 'c',
|
{"count", 'c',
|
||||||
"Number of iterations to make. This works with -i (--sleep) only.",
|
"Number of iterations to make. This works with -i (--sleep) only.",
|
||||||
(gptr*) &nr_iterations, (gptr*) &nr_iterations, 0, GET_UINT,
|
(gptr*) &nr_iterations, (gptr*) &nr_iterations, 0, GET_UINT,
|
||||||
@ -128,6 +146,9 @@ static struct my_option my_long_options[] =
|
|||||||
{"character-sets-dir", OPT_CHARSETS_DIR,
|
{"character-sets-dir", OPT_CHARSETS_DIR,
|
||||||
"Directory where character sets are.", (gptr*) &charsets_dir,
|
"Directory where character sets are.", (gptr*) &charsets_dir,
|
||||||
(gptr*) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
(gptr*) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
|
{"default-character-set", OPT_DEFAULT_CHARSET,
|
||||||
|
"Set the default character set.", (gptr*) &default_charset,
|
||||||
|
(gptr*) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"help", '?', "Display this help and exit.", 0, 0, 0, GET_NO_ARG,
|
{"help", '?', "Display this help and exit.", 0, 0, 0, GET_NO_ARG,
|
||||||
NO_ARG, 0, 0, 0, 0, 0, 0},
|
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"host", 'h', "Connect to host.", (gptr*) &host, (gptr*) &host, 0, GET_STR,
|
{"host", 'h', "Connect to host.", (gptr*) &host, (gptr*) &host, 0, GET_STR,
|
||||||
@ -184,6 +205,14 @@ static struct my_option my_long_options[] =
|
|||||||
{"shutdown_timeout", OPT_SHUTDOWN_TIMEOUT, "", (gptr*) &opt_shutdown_timeout,
|
{"shutdown_timeout", OPT_SHUTDOWN_TIMEOUT, "", (gptr*) &opt_shutdown_timeout,
|
||||||
(gptr*) &opt_shutdown_timeout, 0, GET_ULONG, REQUIRED_ARG,
|
(gptr*) &opt_shutdown_timeout, 0, GET_ULONG, REQUIRED_ARG,
|
||||||
SHUTDOWN_DEF_TIMEOUT, 0, 3600*12, 0, 1, 0},
|
SHUTDOWN_DEF_TIMEOUT, 0, 3600*12, 0, 1, 0},
|
||||||
|
#ifdef LATER_HAVE_NDBCLUSTER_DB
|
||||||
|
{"ndbcluster", OPT_NDBCLUSTER, ""
|
||||||
|
"", (gptr*) &opt_ndbcluster,
|
||||||
|
(gptr*) &opt_ndbcluster, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
|
{"ndb-connectstring", OPT_NDB_CONNECTSTRING, ""
|
||||||
|
"", (gptr*) &opt_ndb_connectstring,
|
||||||
|
(gptr*) &opt_ndb_connectstring, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
|
#endif
|
||||||
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
|
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -197,6 +226,11 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
|||||||
int error = 0;
|
int error = 0;
|
||||||
|
|
||||||
switch(optid) {
|
switch(optid) {
|
||||||
|
#ifdef __NETWARE__
|
||||||
|
case 'a':
|
||||||
|
setscreenmode(SCR_AUTOCLOSE_ON_EXIT); // auto close the screen /
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
case 'c':
|
case 'c':
|
||||||
opt_count_iterations= 1;
|
opt_count_iterations= 1;
|
||||||
break;
|
break;
|
||||||
@ -313,6 +347,8 @@ int main(int argc,char *argv[])
|
|||||||
if (shared_memory_base_name)
|
if (shared_memory_base_name)
|
||||||
mysql_options(&mysql,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name);
|
mysql_options(&mysql,MYSQL_SHARED_MEMORY_BASE_NAME,shared_memory_base_name);
|
||||||
#endif
|
#endif
|
||||||
|
if (default_charset)
|
||||||
|
mysql_options(&mysql, MYSQL_SET_CHARSET_NAME, default_charset);
|
||||||
if (sql_connect(&mysql, option_wait))
|
if (sql_connect(&mysql, option_wait))
|
||||||
{
|
{
|
||||||
unsigned int err= mysql_errno(&mysql);
|
unsigned int err= mysql_errno(&mysql);
|
||||||
@ -587,7 +623,7 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
|
|||||||
{
|
{
|
||||||
char *pos,buff[40];
|
char *pos,buff[40];
|
||||||
ulong sec;
|
ulong sec;
|
||||||
pos=strchr(status,' ');
|
pos= (char*) strchr(status,' ');
|
||||||
*pos++=0;
|
*pos++=0;
|
||||||
printf("%s\t\t\t",status); /* print label */
|
printf("%s\t\t\t",status); /* print label */
|
||||||
if ((status=str2int(pos,10,0,LONG_MAX,(long*) &sec)))
|
if ((status=str2int(pos,10,0,LONG_MAX,(long*) &sec)))
|
||||||
@ -795,10 +831,52 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
|
|||||||
}
|
}
|
||||||
if (argv[1][0])
|
if (argv[1][0])
|
||||||
{
|
{
|
||||||
if (find_type(argv[0], &command_typelib, 2) == ADMIN_OLD_PASSWORD)
|
char *pw= argv[1];
|
||||||
make_scrambled_password_323(crypted_pw, argv[1]);
|
bool old= (find_type(argv[0], &command_typelib, 2) ==
|
||||||
|
ADMIN_OLD_PASSWORD);
|
||||||
|
#ifdef __WIN__
|
||||||
|
uint pw_len= strlen(pw);
|
||||||
|
if (pw_len > 1 && pw[0] == '\'' && pw[pw_len-1] == '\'')
|
||||||
|
printf("Warning: single quotes were not trimmed from the password by"
|
||||||
|
" your command\nline client, as you might have expected.\n");
|
||||||
|
#endif
|
||||||
|
/*
|
||||||
|
If we don't already know to use an old-style password, see what
|
||||||
|
the server is using
|
||||||
|
*/
|
||||||
|
if (!old)
|
||||||
|
{
|
||||||
|
if (mysql_query(mysql, "SHOW VARIABLES LIKE 'old_passwords'"))
|
||||||
|
{
|
||||||
|
my_printf_error(0, "Could not determine old_passwords setting from server; error: '%s'",
|
||||||
|
MYF(ME_BELL),mysql_error(mysql));
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MYSQL_RES *res= mysql_store_result(mysql);
|
||||||
|
if (!res)
|
||||||
|
{
|
||||||
|
my_printf_error(0,
|
||||||
|
"Could not get old_passwords setting from "
|
||||||
|
"server; error: '%s'",
|
||||||
|
MYF(ME_BELL),mysql_error(mysql));
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
if (!mysql_num_rows(res))
|
||||||
|
old= 1;
|
||||||
|
else
|
||||||
|
{
|
||||||
|
MYSQL_ROW row= mysql_fetch_row(res);
|
||||||
|
old= !strncmp(row[1], "ON", 2);
|
||||||
|
}
|
||||||
|
mysql_free_result(res);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (old)
|
||||||
|
make_scrambled_password_323(crypted_pw, pw);
|
||||||
else
|
else
|
||||||
make_scrambled_password(crypted_pw, argv[1]);
|
make_scrambled_password(crypted_pw, pw);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
crypted_pw[0]=0; /* No password */
|
crypted_pw[0]=0; /* No password */
|
||||||
@ -882,6 +960,24 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
|
|||||||
}
|
}
|
||||||
mysql->reconnect=1; /* Automatic reconnect is default */
|
mysql->reconnect=1; /* Automatic reconnect is default */
|
||||||
break;
|
break;
|
||||||
|
#ifdef LATER_HAVE_NDBCLUSTER_DB
|
||||||
|
case ADMIN_NDB_MGM:
|
||||||
|
{
|
||||||
|
if (argc < 2)
|
||||||
|
{
|
||||||
|
my_printf_error(0,"Too few arguments to ndb-mgm",MYF(ME_BELL));
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
{
|
||||||
|
Ndb_mgmclient_handle cmd=
|
||||||
|
ndb_mgmclient_handle_create(opt_ndb_connectstring);
|
||||||
|
ndb_mgmclient_execute(cmd, --argc, ++argv);
|
||||||
|
ndb_mgmclient_handle_destroy(cmd);
|
||||||
|
}
|
||||||
|
argc= 0;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
#endif
|
||||||
default:
|
default:
|
||||||
my_printf_error(0,"Unknown command: '%-.60s'",MYF(ME_BELL),argv[0]);
|
my_printf_error(0,"Unknown command: '%-.60s'",MYF(ME_BELL),argv[0]);
|
||||||
return 1;
|
return 1;
|
||||||
@ -912,6 +1008,7 @@ static void usage(void)
|
|||||||
print_defaults("my",load_default_groups);
|
print_defaults("my",load_default_groups);
|
||||||
puts("\nWhere command is a one or more of: (Commands may be shortened)\n\
|
puts("\nWhere command is a one or more of: (Commands may be shortened)\n\
|
||||||
create databasename Create a new database\n\
|
create databasename Create a new database\n\
|
||||||
|
debug Instruct server to write debug information to log\n\
|
||||||
drop databasename Delete a database and all its tables\n\
|
drop databasename Delete a database and all its tables\n\
|
||||||
extended-status Gives an extended status message from the server\n\
|
extended-status Gives an extended status message from the server\n\
|
||||||
flush-hosts Flush all cached hosts\n\
|
flush-hosts Flush all cached hosts\n\
|
||||||
@ -1248,3 +1345,6 @@ static my_bool wait_pidfile(char *pidfile, time_t last_modified,
|
|||||||
}
|
}
|
||||||
DBUG_RETURN(error);
|
DBUG_RETURN(error);
|
||||||
}
|
}
|
||||||
|
#ifdef __GNUC__
|
||||||
|
FIX_GCC_LINKING_PROBLEM
|
||||||
|
#endif
|
@ -44,7 +44,7 @@ static const char *load_default_groups[]= { "mysqlbinlog","client",0 };
|
|||||||
|
|
||||||
void sql_print_error(const char *format, ...);
|
void sql_print_error(const char *format, ...);
|
||||||
|
|
||||||
static bool one_database=0, to_last_remote_log= 0;
|
static bool one_database=0, to_last_remote_log= 0, disable_log_bin= 0;
|
||||||
static const char* database= 0;
|
static const char* database= 0;
|
||||||
static my_bool force_opt= 0, short_form= 0, remote_opt= 0;
|
static my_bool force_opt= 0, short_form= 0, remote_opt= 0;
|
||||||
static ulonglong offset = 0;
|
static ulonglong offset = 0;
|
||||||
@ -204,7 +204,7 @@ int Load_log_processor::load_old_format_file(NET* net, const char*server_fname,
|
|||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
uint packet_len = my_net_read(net);
|
ulong packet_len = my_net_read(net);
|
||||||
if (packet_len == 0)
|
if (packet_len == 0)
|
||||||
{
|
{
|
||||||
if (my_net_write(net, "", 0) || net_flush(net))
|
if (my_net_write(net, "", 0) || net_flush(net))
|
||||||
@ -226,7 +226,13 @@ int Load_log_processor::load_old_format_file(NET* net, const char*server_fname,
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (my_write(file, (byte*) net->read_pos, packet_len,MYF(MY_WME|MY_NABP)))
|
if (packet_len > UINT_MAX)
|
||||||
|
{
|
||||||
|
sql_print_error("Illegal length of packet read from net");
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
if (my_write(file, (byte*) net->read_pos,
|
||||||
|
(uint) packet_len, MYF(MY_WME|MY_NABP)))
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -432,6 +438,13 @@ static struct my_option my_long_options[] =
|
|||||||
{"database", 'd', "List entries for just this database (local log only).",
|
{"database", 'd', "List entries for just this database (local log only).",
|
||||||
(gptr*) &database, (gptr*) &database, 0, GET_STR_ALLOC, REQUIRED_ARG,
|
(gptr*) &database, (gptr*) &database, 0, GET_STR_ALLOC, REQUIRED_ARG,
|
||||||
0, 0, 0, 0, 0, 0},
|
0, 0, 0, 0, 0, 0},
|
||||||
|
{"disable-log-bin", 'D', "Disable binary log. This is useful, if you "
|
||||||
|
"enabled --to-last-log and are sending the output to the same MySQL server. "
|
||||||
|
"This way you could avoid an endless loop. You would also like to use it "
|
||||||
|
"when restoring after a crash to avoid duplication of the statements you "
|
||||||
|
"already have. NOTE: you will need a SUPER privilege to use this option.",
|
||||||
|
(gptr*) &disable_log_bin, (gptr*) &disable_log_bin, 0, GET_BOOL,
|
||||||
|
NO_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
{"force-read", 'f', "Force reading unknown binlog events.",
|
{"force-read", 'f', "Force reading unknown binlog events.",
|
||||||
(gptr*) &force_opt, (gptr*) &force_opt, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
(gptr*) &force_opt, (gptr*) &force_opt, 0, GET_BOOL, NO_ARG, 0, 0, 0, 0,
|
||||||
0, 0},
|
0, 0},
|
||||||
@ -674,7 +687,7 @@ static int parse_args(int *argc, char*** argv)
|
|||||||
|
|
||||||
static MYSQL* safe_connect()
|
static MYSQL* safe_connect()
|
||||||
{
|
{
|
||||||
MYSQL *local_mysql = mysql_init(NULL);
|
MYSQL *local_mysql= mysql_init(NULL);
|
||||||
|
|
||||||
if (!local_mysql)
|
if (!local_mysql)
|
||||||
die("Failed on mysql_init");
|
die("Failed on mysql_init");
|
||||||
@ -682,8 +695,12 @@ static MYSQL* safe_connect()
|
|||||||
if (opt_protocol)
|
if (opt_protocol)
|
||||||
mysql_options(local_mysql, MYSQL_OPT_PROTOCOL, (char*) &opt_protocol);
|
mysql_options(local_mysql, MYSQL_OPT_PROTOCOL, (char*) &opt_protocol);
|
||||||
if (!mysql_real_connect(local_mysql, host, user, pass, 0, port, sock, 0))
|
if (!mysql_real_connect(local_mysql, host, user, pass, 0, port, sock, 0))
|
||||||
die("failed on connect: %s", mysql_error(local_mysql));
|
{
|
||||||
|
char errmsg[256];
|
||||||
|
strmake(errmsg, mysql_error(local_mysql), sizeof(errmsg)-1);
|
||||||
|
mysql_close(local_mysql);
|
||||||
|
die("failed on connect: %s", errmsg);
|
||||||
|
}
|
||||||
return local_mysql;
|
return local_mysql;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -705,9 +722,10 @@ static int check_master_version(MYSQL* mysql)
|
|||||||
if (mysql_query(mysql, "SELECT VERSION()") ||
|
if (mysql_query(mysql, "SELECT VERSION()") ||
|
||||||
!(res = mysql_store_result(mysql)))
|
!(res = mysql_store_result(mysql)))
|
||||||
{
|
{
|
||||||
|
char errmsg[256];
|
||||||
|
strmake(errmsg, mysql_error(mysql), sizeof(errmsg)-1);
|
||||||
mysql_close(mysql);
|
mysql_close(mysql);
|
||||||
die("Error checking master version: %s",
|
die("Error checking master version: %s", errmsg);
|
||||||
mysql_error(mysql));
|
|
||||||
}
|
}
|
||||||
if (!(row = mysql_fetch_row(res)))
|
if (!(row = mysql_fetch_row(res)))
|
||||||
{
|
{
|
||||||
@ -747,7 +765,8 @@ static int dump_remote_log_entries(const char* logname)
|
|||||||
{
|
{
|
||||||
char buf[128];
|
char buf[128];
|
||||||
char last_db[FN_REFLEN+1] = "";
|
char last_db[FN_REFLEN+1] = "";
|
||||||
uint len, logname_len;
|
ulong len;
|
||||||
|
uint logname_len;
|
||||||
NET* net;
|
NET* net;
|
||||||
int old_format;
|
int old_format;
|
||||||
int error= 0;
|
int error= 0;
|
||||||
@ -770,7 +789,15 @@ static int dump_remote_log_entries(const char* logname)
|
|||||||
*/
|
*/
|
||||||
int4store(buf, (uint32)start_position);
|
int4store(buf, (uint32)start_position);
|
||||||
int2store(buf + BIN_LOG_HEADER_SIZE, binlog_flags);
|
int2store(buf + BIN_LOG_HEADER_SIZE, binlog_flags);
|
||||||
logname_len = (uint) strlen(logname);
|
|
||||||
|
size_s tlen = strlen(logname);
|
||||||
|
if (tlen > UINT_MAX)
|
||||||
|
{
|
||||||
|
fprintf(stderr,"Log name too long\n");
|
||||||
|
error= 1;
|
||||||
|
goto err;
|
||||||
|
}
|
||||||
|
logname_len = (uint) tlen;
|
||||||
int4store(buf + 6, 0);
|
int4store(buf + 6, 0);
|
||||||
memcpy(buf + 10, logname, logname_len);
|
memcpy(buf + 10, logname, logname_len);
|
||||||
if (simple_command(mysql, COM_BINLOG_DUMP, buf, logname_len + 10, 1))
|
if (simple_command(mysql, COM_BINLOG_DUMP, buf, logname_len + 10, 1))
|
||||||
@ -1053,6 +1080,11 @@ int main(int argc, char** argv)
|
|||||||
|
|
||||||
fprintf(result_file,
|
fprintf(result_file,
|
||||||
"/*!40019 SET @@session.max_insert_delayed_threads=0*/;\n");
|
"/*!40019 SET @@session.max_insert_delayed_threads=0*/;\n");
|
||||||
|
|
||||||
|
if (disable_log_bin)
|
||||||
|
fprintf(result_file,
|
||||||
|
"/*!32316 SET @OLD_SQL_LOG_BIN=@@SQL_LOG_BIN, SQL_LOG_BIN=0*/;\n");
|
||||||
|
|
||||||
for (save_stop_position= stop_position, stop_position= ~(my_off_t)0 ;
|
for (save_stop_position= stop_position, stop_position= ~(my_off_t)0 ;
|
||||||
(--argc >= 0) && !stop_passed ; )
|
(--argc >= 0) && !stop_passed ; )
|
||||||
{
|
{
|
||||||
@ -1067,6 +1099,9 @@ int main(int argc, char** argv)
|
|||||||
start_position= BIN_LOG_HEADER_SIZE;
|
start_position= BIN_LOG_HEADER_SIZE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (disable_log_bin)
|
||||||
|
fprintf(result_file, "/*!32316 SET SQL_LOG_BIN=@OLD_SQL_LOG_BIN*/;\n");
|
||||||
|
|
||||||
if (tmpdir.list)
|
if (tmpdir.list)
|
||||||
free_tmpdir(&tmpdir);
|
free_tmpdir(&tmpdir);
|
||||||
if (result_file != stdout)
|
if (result_file != stdout)
|
||||||
|
@ -81,8 +81,13 @@ static struct my_option my_long_options[] =
|
|||||||
"To check several databases. Note the difference in usage; In this case no tables are given. All name arguments are regarded as databasenames.",
|
"To check several databases. Note the difference in usage; In this case no tables are given. All name arguments are regarded as databasenames.",
|
||||||
(gptr*) &opt_databases, (gptr*) &opt_databases, 0, GET_BOOL, NO_ARG,
|
(gptr*) &opt_databases, (gptr*) &opt_databases, 0, GET_BOOL, NO_ARG,
|
||||||
0, 0, 0, 0, 0, 0},
|
0, 0, 0, 0, 0, 0},
|
||||||
|
#ifdef DBUG_OFF
|
||||||
|
{"debug", '#', "This is a non-debug version. Catch this and exit.",
|
||||||
|
0, 0, 0, GET_DISABLED, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
|
#else
|
||||||
{"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.",
|
{"debug", '#', "Output debug log. Often this is 'd:t:o,filename'.",
|
||||||
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
|
#endif
|
||||||
{"default-character-set", OPT_DEFAULT_CHARSET,
|
{"default-character-set", OPT_DEFAULT_CHARSET,
|
||||||
"Set the default character set.", (gptr*) &default_charset,
|
"Set the default character set.", (gptr*) &default_charset,
|
||||||
(gptr*) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
(gptr*) &default_charset, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
|
||||||
@ -190,7 +195,7 @@ static void usage(void)
|
|||||||
puts("and you are welcome to modify and redistribute it under the GPL license.\n");
|
puts("and you are welcome to modify and redistribute it under the GPL license.\n");
|
||||||
puts("This program can be used to CHECK (-c,-m,-C), REPAIR (-r), ANALYZE (-a)");
|
puts("This program can be used to CHECK (-c,-m,-C), REPAIR (-r), ANALYZE (-a)");
|
||||||
puts("or OPTIMIZE (-o) tables. Some of the options (like -e or -q) can be");
|
puts("or OPTIMIZE (-o) tables. Some of the options (like -e or -q) can be");
|
||||||
puts("used at the same time. It works on MyISAM and in some cases on BDB tables.");
|
puts("used at the same time. Not all options are supported by all storage engines.");
|
||||||
puts("Please consult the MySQL manual for latest information about the");
|
puts("Please consult the MySQL manual for latest information about the");
|
||||||
puts("above. The options -c,-r,-a and -o are exclusive to each other, which");
|
puts("above. The options -c,-r,-a and -o are exclusive to each other, which");
|
||||||
puts("means that the last option will be used, if several was specified.\n");
|
puts("means that the last option will be used, if several was specified.\n");
|
||||||
|
File diff suppressed because it is too large
Load Diff
@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
**********************************************************************/
|
**********************************************************************/
|
||||||
|
|
||||||
#define MTEST_VERSION "2.3"
|
#define MTEST_VERSION "2.4"
|
||||||
|
|
||||||
#include <my_global.h>
|
#include <my_global.h>
|
||||||
#include <mysql_embed.h>
|
#include <mysql_embed.h>
|
||||||
@ -227,7 +227,7 @@ typedef struct
|
|||||||
int alloced;
|
int alloced;
|
||||||
} VAR;
|
} VAR;
|
||||||
|
|
||||||
#ifdef __NETWARE__
|
#if defined(__NETWARE__) || defined(__WIN__)
|
||||||
/*
|
/*
|
||||||
Netware doesn't proved environment variable substitution that is done
|
Netware doesn't proved environment variable substitution that is done
|
||||||
by the shell in unix environments. We do this in the following function:
|
by the shell in unix environments. We do this in the following function:
|
||||||
@ -243,6 +243,7 @@ VAR var_reg[10];
|
|||||||
HASH var_hash;
|
HASH var_hash;
|
||||||
my_bool disable_query_log=0, disable_result_log=0, disable_warnings=0;
|
my_bool disable_query_log=0, disable_result_log=0, disable_warnings=0;
|
||||||
my_bool disable_info= 1; /* By default off */
|
my_bool disable_info= 1; /* By default off */
|
||||||
|
my_bool abort_on_error= 1;
|
||||||
|
|
||||||
struct connection cons[MAX_CONS];
|
struct connection cons[MAX_CONS];
|
||||||
struct connection* cur_con, *next_con, *cons_end;
|
struct connection* cur_con, *next_con, *cons_end;
|
||||||
@ -274,6 +275,7 @@ Q_ENABLE_WARNINGS, Q_DISABLE_WARNINGS,
|
|||||||
Q_ENABLE_INFO, Q_DISABLE_INFO,
|
Q_ENABLE_INFO, Q_DISABLE_INFO,
|
||||||
Q_ENABLE_METADATA, Q_DISABLE_METADATA,
|
Q_ENABLE_METADATA, Q_DISABLE_METADATA,
|
||||||
Q_EXEC, Q_DELIMITER,
|
Q_EXEC, Q_DELIMITER,
|
||||||
|
Q_DISABLE_ABORT_ON_ERROR, Q_ENABLE_ABORT_ON_ERROR,
|
||||||
Q_DISPLAY_VERTICAL_RESULTS, Q_DISPLAY_HORIZONTAL_RESULTS,
|
Q_DISPLAY_VERTICAL_RESULTS, Q_DISPLAY_HORIZONTAL_RESULTS,
|
||||||
Q_QUERY_VERTICAL, Q_QUERY_HORIZONTAL,
|
Q_QUERY_VERTICAL, Q_QUERY_HORIZONTAL,
|
||||||
Q_START_TIMER, Q_END_TIMER,
|
Q_START_TIMER, Q_END_TIMER,
|
||||||
@ -352,6 +354,8 @@ const char *command_names[]=
|
|||||||
"disable_metadata",
|
"disable_metadata",
|
||||||
"exec",
|
"exec",
|
||||||
"delimiter",
|
"delimiter",
|
||||||
|
"disable_abort_on_error",
|
||||||
|
"enable_abort_on_error",
|
||||||
"vertical_results",
|
"vertical_results",
|
||||||
"horizontal_results",
|
"horizontal_results",
|
||||||
"query_vertical",
|
"query_vertical",
|
||||||
@ -365,7 +369,7 @@ const char *command_names[]=
|
|||||||
};
|
};
|
||||||
|
|
||||||
TYPELIB command_typelib= {array_elements(command_names),"",
|
TYPELIB command_typelib= {array_elements(command_names),"",
|
||||||
command_names};
|
command_names, 0};
|
||||||
|
|
||||||
DYNAMIC_STRING ds_res;
|
DYNAMIC_STRING ds_res;
|
||||||
static void die(const char *fmt, ...);
|
static void die(const char *fmt, ...);
|
||||||
@ -534,7 +538,6 @@ static void free_used_memory()
|
|||||||
mysql_server_end();
|
mysql_server_end();
|
||||||
if (ps_protocol)
|
if (ps_protocol)
|
||||||
ps_free_reg();
|
ps_free_reg();
|
||||||
my_end(MY_CHECK_ERROR);
|
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -552,6 +555,7 @@ static void die(const char* fmt, ...)
|
|||||||
}
|
}
|
||||||
va_end(args);
|
va_end(args);
|
||||||
free_used_memory();
|
free_used_memory();
|
||||||
|
my_end(MY_CHECK_ERROR);
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -564,6 +568,7 @@ static void abort_not_supported_test()
|
|||||||
if (!silent)
|
if (!silent)
|
||||||
printf("skipped\n");
|
printf("skipped\n");
|
||||||
free_used_memory();
|
free_used_memory();
|
||||||
|
my_end(MY_CHECK_ERROR);
|
||||||
exit(2);
|
exit(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -710,9 +715,10 @@ VAR* var_get(const char* var_name, const char** var_name_end, my_bool raw,
|
|||||||
die("Empty variable");
|
die("Empty variable");
|
||||||
}
|
}
|
||||||
length= (uint) (var_name - save_var_name);
|
length= (uint) (var_name - save_var_name);
|
||||||
|
if (length >= MAX_VAR_NAME)
|
||||||
|
die("Too long variable name: %s", save_var_name);
|
||||||
|
|
||||||
if (!(v = (VAR*) hash_search(&var_hash, save_var_name, length)) &&
|
if (!(v = (VAR*) hash_search(&var_hash, save_var_name, length)))
|
||||||
length < MAX_VAR_NAME)
|
|
||||||
{
|
{
|
||||||
char buff[MAX_VAR_NAME+1];
|
char buff[MAX_VAR_NAME+1];
|
||||||
strmake(buff, save_var_name, length);
|
strmake(buff, save_var_name, length);
|
||||||
@ -739,7 +745,7 @@ err:
|
|||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
static VAR* var_obtain(char* name, int len)
|
static VAR *var_obtain(const char* name, int len)
|
||||||
{
|
{
|
||||||
VAR* v;
|
VAR* v;
|
||||||
if ((v = (VAR*)hash_search(&var_hash, name, len)))
|
if ((v = (VAR*)hash_search(&var_hash, name, len)))
|
||||||
@ -749,28 +755,33 @@ static VAR* var_obtain(char* name, int len)
|
|||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
int var_set(char* var_name, char* var_name_end, char* var_val,
|
int var_set(const char *var_name, const char *var_name_end,
|
||||||
char* var_val_end)
|
const char *var_val, const char *var_val_end)
|
||||||
{
|
{
|
||||||
int digit;
|
int digit;
|
||||||
VAR* v;
|
VAR* v;
|
||||||
|
DBUG_ENTER("var_set");
|
||||||
|
DBUG_PRINT("enter", ("var_name: '%.*s' = '%.*s' (length: %d)",
|
||||||
|
(int) (var_name_end - var_name), var_name,
|
||||||
|
(int) (var_val_end - var_val), var_val,
|
||||||
|
(int) (var_val_end - var_val)));
|
||||||
|
|
||||||
if (*var_name++ != '$')
|
if (*var_name++ != '$')
|
||||||
{
|
{
|
||||||
--var_name;
|
var_name--;
|
||||||
*var_name_end = 0;
|
die("Variable name in %s does not start with '$'", var_name);
|
||||||
die("Variable name in %s does not start with '$'", var_name);
|
}
|
||||||
}
|
|
||||||
digit = *var_name - '0';
|
digit = *var_name - '0';
|
||||||
if (!(digit < 10 && digit >= 0))
|
if (!(digit < 10 && digit >= 0))
|
||||||
{
|
{
|
||||||
v = var_obtain(var_name, var_name_end - var_name);
|
v = var_obtain(var_name, (uint) (var_name_end - var_name));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
v = var_reg + digit;
|
v = var_reg + digit;
|
||||||
|
|
||||||
return eval_expr(v, var_val, (const char**)&var_val_end);
|
return eval_expr(v, var_val, (const char**)&var_val_end);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int open_file(const char* name)
|
int open_file(const char* name)
|
||||||
{
|
{
|
||||||
char buff[FN_REFLEN];
|
char buff[FN_REFLEN];
|
||||||
@ -940,7 +951,6 @@ static void do_exec(struct st_query* q)
|
|||||||
while (fgets(buf, sizeof(buf), res_file))
|
while (fgets(buf, sizeof(buf), res_file))
|
||||||
replace_dynstr_append_mem(ds, buf, strlen(buf));
|
replace_dynstr_append_mem(ds, buf, strlen(buf));
|
||||||
}
|
}
|
||||||
|
|
||||||
error= pclose(res_file);
|
error= pclose(res_file);
|
||||||
|
|
||||||
if (error != 0)
|
if (error != 0)
|
||||||
@ -1239,6 +1249,22 @@ int do_let(struct st_query* q)
|
|||||||
return var_set(var_name, var_name_end, var_val_start, q->end);
|
return var_set(var_name, var_name_end, var_val_start, q->end);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
Store an integer (typically the returncode of the last SQL)
|
||||||
|
statement in the mysqltest builtin variable $mysql_errno, by
|
||||||
|
simulating of a user statement "let $mysql_errno= <integer>"
|
||||||
|
*/
|
||||||
|
|
||||||
|
int var_set_errno(int sql_errno)
|
||||||
|
{
|
||||||
|
const char *var_name= "$mysql_errno";
|
||||||
|
char var_val[21];
|
||||||
|
uint length= my_sprintf(var_val, (var_val, "%d", sql_errno));
|
||||||
|
return var_set(var_name, var_name + 12, var_val, var_val + length);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
int do_rpl_probe(struct st_query* q __attribute__((unused)))
|
int do_rpl_probe(struct st_query* q __attribute__((unused)))
|
||||||
{
|
{
|
||||||
DBUG_ENTER("do_rpl_probe");
|
DBUG_ENTER("do_rpl_probe");
|
||||||
@ -1247,12 +1273,14 @@ int do_rpl_probe(struct st_query* q __attribute__((unused)))
|
|||||||
DBUG_RETURN(0);
|
DBUG_RETURN(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int do_enable_rpl_parse(struct st_query* q __attribute__((unused)))
|
int do_enable_rpl_parse(struct st_query* q __attribute__((unused)))
|
||||||
{
|
{
|
||||||
mysql_enable_rpl_parse(&cur_con->mysql);
|
mysql_enable_rpl_parse(&cur_con->mysql);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
int do_disable_rpl_parse(struct st_query* q __attribute__((unused)))
|
int do_disable_rpl_parse(struct st_query* q __attribute__((unused)))
|
||||||
{
|
{
|
||||||
mysql_disable_rpl_parse(&cur_con->mysql);
|
mysql_disable_rpl_parse(&cur_con->mysql);
|
||||||
@ -1996,7 +2024,7 @@ int read_query(struct st_query** q_ptr)
|
|||||||
memcpy((gptr) q->expected_errno, (gptr) global_expected_errno,
|
memcpy((gptr) q->expected_errno, (gptr) global_expected_errno,
|
||||||
sizeof(global_expected_errno));
|
sizeof(global_expected_errno));
|
||||||
q->expected_errors= global_expected_errors;
|
q->expected_errors= global_expected_errors;
|
||||||
q->abort_on_error= global_expected_errors == 0;
|
q->abort_on_error= (global_expected_errors == 0 && abort_on_error);
|
||||||
bzero((gptr) global_expected_errno, sizeof(global_expected_errno));
|
bzero((gptr) global_expected_errno, sizeof(global_expected_errno));
|
||||||
global_expected_errors=0;
|
global_expected_errors=0;
|
||||||
if (p[0] == '-' && p[1] == '-')
|
if (p[0] == '-' && p[1] == '-')
|
||||||
@ -2141,6 +2169,9 @@ static struct my_option my_long_options[] =
|
|||||||
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
|
{ 0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#include <help_start.h>
|
||||||
|
|
||||||
static void print_version(void)
|
static void print_version(void)
|
||||||
{
|
{
|
||||||
printf("%s Ver %s Distrib %s, for %s (%s)\n",my_progname,MTEST_VERSION,
|
printf("%s Ver %s Distrib %s, for %s (%s)\n",my_progname,MTEST_VERSION,
|
||||||
@ -2159,6 +2190,8 @@ void usage()
|
|||||||
my_print_variables(my_long_options);
|
my_print_variables(my_long_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#include <help_end.h>
|
||||||
|
|
||||||
|
|
||||||
static my_bool
|
static my_bool
|
||||||
get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||||
@ -2405,7 +2438,7 @@ static int run_query(MYSQL *mysql, struct st_query *q, int flags)
|
|||||||
|
|
||||||
if (ps_protocol_enabled && disable_info &&
|
if (ps_protocol_enabled && disable_info &&
|
||||||
(flags & QUERY_SEND) && (flags & QUERY_REAP) && ps_match_re(q->query))
|
(flags & QUERY_SEND) && (flags & QUERY_REAP) && ps_match_re(q->query))
|
||||||
return run_query_stmt (mysql, q, flags);
|
return run_query_stmt(mysql, q, flags);
|
||||||
return run_query_normal(mysql, q, flags);
|
return run_query_normal(mysql, q, flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2642,6 +2675,13 @@ end:
|
|||||||
dynstr_free(&ds_tmp);
|
dynstr_free(&ds_tmp);
|
||||||
if (q->type == Q_EVAL)
|
if (q->type == Q_EVAL)
|
||||||
dynstr_free(&eval_query);
|
dynstr_free(&eval_query);
|
||||||
|
|
||||||
|
/*
|
||||||
|
We save the return code (mysql_errno(mysql)) from the last call sent
|
||||||
|
to the server into the mysqltest builtin variable $mysql_errno. This
|
||||||
|
variable then can be used from the test case itself.
|
||||||
|
*/
|
||||||
|
var_set_errno(mysql_errno(mysql));
|
||||||
DBUG_RETURN(error);
|
DBUG_RETURN(error);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2991,6 +3031,7 @@ end:
|
|||||||
dynstr_free(&ds_tmp);
|
dynstr_free(&ds_tmp);
|
||||||
if (q->type == Q_EVAL)
|
if (q->type == Q_EVAL)
|
||||||
dynstr_free(&eval_query);
|
dynstr_free(&eval_query);
|
||||||
|
var_set_errno(mysql_stmt_errno(stmt));
|
||||||
mysql_stmt_close(stmt);
|
mysql_stmt_close(stmt);
|
||||||
DBUG_RETURN(error);
|
DBUG_RETURN(error);
|
||||||
}
|
}
|
||||||
@ -3298,7 +3339,7 @@ static VAR* var_from_env(const char *name, const char *def_val)
|
|||||||
if (!(tmp = getenv(name)))
|
if (!(tmp = getenv(name)))
|
||||||
tmp = def_val;
|
tmp = def_val;
|
||||||
|
|
||||||
v = var_init(0, name, 0, tmp, 0);
|
v = var_init(0, name, strlen(name), tmp, strlen(tmp));
|
||||||
my_hash_insert(&var_hash, (byte*)v);
|
my_hash_insert(&var_hash, (byte*)v);
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
@ -3317,7 +3358,8 @@ static void init_var_hash(MYSQL *mysql)
|
|||||||
my_hash_insert(&var_hash, (byte*) v);
|
my_hash_insert(&var_hash, (byte*) v);
|
||||||
v= var_init(0,"SERVER_VERSION", 0, mysql_get_server_info(mysql), 0);
|
v= var_init(0,"SERVER_VERSION", 0, mysql_get_server_info(mysql), 0);
|
||||||
my_hash_insert(&var_hash, (byte*) v);
|
my_hash_insert(&var_hash, (byte*) v);
|
||||||
|
v= var_init(0,"DB", 2, db, 0);
|
||||||
|
my_hash_insert(&var_hash, (byte*) v);
|
||||||
DBUG_VOID_RETURN;
|
DBUG_VOID_RETURN;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3395,6 +3437,13 @@ int main(int argc, char **argv)
|
|||||||
|
|
||||||
init_var_hash(&cur_con->mysql);
|
init_var_hash(&cur_con->mysql);
|
||||||
|
|
||||||
|
/*
|
||||||
|
Initialize $mysql_errno with -1, so we can
|
||||||
|
- distinguish it from valid values ( >= 0 ) and
|
||||||
|
- detect if there was never a command sent to the server
|
||||||
|
*/
|
||||||
|
var_set_errno(-1);
|
||||||
|
|
||||||
while (!read_query(&q))
|
while (!read_query(&q))
|
||||||
{
|
{
|
||||||
int current_line_inc = 1, processed = 0;
|
int current_line_inc = 1, processed = 0;
|
||||||
@ -3414,6 +3463,8 @@ int main(int argc, char **argv)
|
|||||||
case Q_DISABLE_RPL_PARSE: do_disable_rpl_parse(q); break;
|
case Q_DISABLE_RPL_PARSE: do_disable_rpl_parse(q); break;
|
||||||
case Q_ENABLE_QUERY_LOG: disable_query_log=0; break;
|
case Q_ENABLE_QUERY_LOG: disable_query_log=0; break;
|
||||||
case Q_DISABLE_QUERY_LOG: disable_query_log=1; break;
|
case Q_DISABLE_QUERY_LOG: disable_query_log=1; break;
|
||||||
|
case Q_ENABLE_ABORT_ON_ERROR: abort_on_error=1; break;
|
||||||
|
case Q_DISABLE_ABORT_ON_ERROR: abort_on_error=0; break;
|
||||||
case Q_ENABLE_RESULT_LOG: disable_result_log=0; break;
|
case Q_ENABLE_RESULT_LOG: disable_result_log=0; break;
|
||||||
case Q_DISABLE_RESULT_LOG: disable_result_log=1; break;
|
case Q_DISABLE_RESULT_LOG: disable_result_log=1; break;
|
||||||
case Q_ENABLE_WARNINGS: disable_warnings=0; break;
|
case Q_ENABLE_WARNINGS: disable_warnings=0; break;
|
||||||
@ -3611,6 +3662,7 @@ int main(int argc, char **argv)
|
|||||||
if (!got_end_timer)
|
if (!got_end_timer)
|
||||||
timer_output(); /* No end_timer cmd, end it */
|
timer_output(); /* No end_timer cmd, end it */
|
||||||
free_used_memory();
|
free_used_memory();
|
||||||
|
my_end(MY_CHECK_ERROR);
|
||||||
exit(error ? 1 : 0);
|
exit(error ? 1 : 0);
|
||||||
return error ? 1 : 0; /* Keep compiler happy */
|
return error ? 1 : 0; /* Keep compiler happy */
|
||||||
}
|
}
|
||||||
@ -4472,8 +4524,7 @@ static void get_replace_column(struct st_query *q)
|
|||||||
my_free(start, MYF(0));
|
my_free(start, MYF(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef __NETWARE__
|
#if defined(__NETWARE__) || defined(__WIN__)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Substitute environment variables with text.
|
Substitute environment variables with text.
|
||||||
|
|
||||||
@ -4557,6 +4608,9 @@ static char *subst_env_var(const char *str)
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
#undef popen /* Remove wrapper */
|
#undef popen /* Remove wrapper */
|
||||||
|
#ifdef __WIN__
|
||||||
|
#define popen _popen /* redefine for windows */
|
||||||
|
#endif
|
||||||
|
|
||||||
FILE *my_popen(const char *cmd, const char *mode __attribute__((unused)))
|
FILE *my_popen(const char *cmd, const char *mode __attribute__((unused)))
|
||||||
{
|
{
|
||||||
@ -4569,4 +4623,4 @@ FILE *my_popen(const char *cmd, const char *mode __attribute__((unused)))
|
|||||||
return res_file;
|
return res_file;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif /* __NETWARE__ */
|
#endif /* __NETWARE__ or __WIN__*/
|
||||||
|
@ -145,7 +145,7 @@ case $FLAG in
|
|||||||
#
|
#
|
||||||
-fh)
|
-fh)
|
||||||
cat $FILES | $AWK '/el_action_t/ { print $3 }' | \
|
cat $FILES | $AWK '/el_action_t/ { print $3 }' | \
|
||||||
sort | tr '[a-z]' '[A-Z]' | $AWK '
|
sort | tr abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ | $AWK '
|
||||||
BEGIN {
|
BEGIN {
|
||||||
printf("/* Automatically generated file, do not edit */\n");
|
printf("/* Automatically generated file, do not edit */\n");
|
||||||
printf("#ifndef _h_fcns_c\n#define _h_fcns_c\n");
|
printf("#ifndef _h_fcns_c\n#define _h_fcns_c\n");
|
||||||
|
@ -87,7 +87,8 @@ parse_line(EditLine *el, const char *line)
|
|||||||
int argc;
|
int argc;
|
||||||
Tokenizer *tok;
|
Tokenizer *tok;
|
||||||
|
|
||||||
tok = tok_init(NULL);
|
if (!(tok = tok_init(NULL)))
|
||||||
|
return -1;
|
||||||
tok_line(tok, line, &argc, &argv);
|
tok_line(tok, line, &argc, &argv);
|
||||||
argc = el_parse(el, argc, argv);
|
argc = el_parse(el, argc, argv);
|
||||||
tok_end(tok);
|
tok_end(tok);
|
||||||
|
@ -311,7 +311,7 @@ rl_generic_bind (type, keyseq, data, map)
|
|||||||
mapped to something, `abc' to be mapped to something else,
|
mapped to something, `abc' to be mapped to something else,
|
||||||
and the function bound to `a' to be executed when the user
|
and the function bound to `a' to be executed when the user
|
||||||
types `abx', leaving `bx' in the input queue. */
|
types `abx', leaving `bx' in the input queue. */
|
||||||
if (k.function /* && k.type == ISFUNC */)
|
if (k.function && ((k.type == ISFUNC && k.function != rl_do_lowercase_version) || k.type == ISMACR))
|
||||||
{
|
{
|
||||||
map[ANYOTHERKEY] = k;
|
map[ANYOTHERKEY] = k;
|
||||||
k.function = 0;
|
k.function = 0;
|
||||||
|
175
configure.in
175
configure.in
@ -4,7 +4,8 @@ dnl Process this file with autoconf to produce a configure script.
|
|||||||
AC_INIT(sql/mysqld.cc)
|
AC_INIT(sql/mysqld.cc)
|
||||||
AC_CANONICAL_SYSTEM
|
AC_CANONICAL_SYSTEM
|
||||||
# The Docs Makefile.am parses this line!
|
# The Docs Makefile.am parses this line!
|
||||||
AM_INIT_AUTOMAKE(mysql, 4.1.8)
|
# remember to also change ndb version below and update version.c in ndb
|
||||||
|
AM_INIT_AUTOMAKE(mysql, 4.1.11)
|
||||||
AM_CONFIG_HEADER(config.h)
|
AM_CONFIG_HEADER(config.h)
|
||||||
|
|
||||||
PROTOCOL_VERSION=10
|
PROTOCOL_VERSION=10
|
||||||
@ -13,16 +14,16 @@ DOT_FRM_VERSION=6
|
|||||||
SHARED_LIB_VERSION=14:0:0
|
SHARED_LIB_VERSION=14:0:0
|
||||||
|
|
||||||
# ndb version
|
# ndb version
|
||||||
NDB_VERSION_MAJOR=3
|
NDB_VERSION_MAJOR=4
|
||||||
NDB_VERSION_MINOR=5
|
NDB_VERSION_MINOR=1
|
||||||
NDB_VERSION_BUILD=3
|
NDB_VERSION_BUILD=11
|
||||||
NDB_VERSION_STATUS=""
|
NDB_VERSION_STATUS=""
|
||||||
|
|
||||||
# Set all version vars based on $VERSION. How do we do this more elegant ?
|
# Set all version vars based on $VERSION. How do we do this more elegant ?
|
||||||
# Remember that regexps needs to quote [ and ] since this is run through m4
|
# Remember that regexps needs to quote [ and ] since this is run through m4
|
||||||
MYSQL_NO_DASH_VERSION=`echo $VERSION | sed -e "s|[[a-z]]*-.*$||"`
|
MYSQL_NO_DASH_VERSION=`echo $VERSION | sed -e "s|[[a-z]]*-.*$||"`
|
||||||
MYSQL_BASE_VERSION=`echo $MYSQL_NO_DASH_VERSION | sed -e "s|\.[[^.]]*$||"`
|
MYSQL_BASE_VERSION=`echo $MYSQL_NO_DASH_VERSION | sed -e "s|\.[[^.]]*$||"`
|
||||||
MYSQL_VERSION_ID=`echo $MYSQL_NO_DASH_VERSION. | sed -e 's/\./ /g; s/ \([[0-9]]\) / 0\\1 /g; s/ //g'`
|
MYSQL_VERSION_ID=`echo $MYSQL_NO_DASH_VERSION. | sed -e 's/[[^0-9.]]//g; s/\./ /g; s/ \([[0-9]]\) / 0\\1 /g; s/ //g'`
|
||||||
|
|
||||||
# The port should be constant for a LONG time
|
# The port should be constant for a LONG time
|
||||||
MYSQL_TCP_PORT_DEFAULT=3306
|
MYSQL_TCP_PORT_DEFAULT=3306
|
||||||
@ -31,7 +32,7 @@ MYSQL_UNIX_ADDR_DEFAULT="/tmp/mysql.sock"
|
|||||||
# Remember to add a directory sql/share/LANGUAGE
|
# Remember to add a directory sql/share/LANGUAGE
|
||||||
AVAILABLE_LANGUAGES="\
|
AVAILABLE_LANGUAGES="\
|
||||||
czech danish dutch english estonian french german greek hungarian \
|
czech danish dutch english estonian french german greek hungarian \
|
||||||
italian japanese korean norwegian norwegian-ny polish portuguese \
|
italian japanese japanese-sjis korean norwegian norwegian-ny polish portuguese \
|
||||||
romanian russian serbian slovak spanish swedish ukrainian"
|
romanian russian serbian slovak spanish swedish ukrainian"
|
||||||
|
|
||||||
# Generate make rules for all error messages
|
# Generate make rules for all error messages
|
||||||
@ -479,7 +480,7 @@ if $PS p $$ 2> /dev/null | grep $0 > /dev/null
|
|||||||
then
|
then
|
||||||
FIND_PROC="$PS p \$\$PID | grep mysqld > /dev/null"
|
FIND_PROC="$PS p \$\$PID | grep mysqld > /dev/null"
|
||||||
# Solaris
|
# Solaris
|
||||||
elif $PS -p $$ 2> /dev/null | grep $0 > /dev/null
|
elif $PS -fp $$ 2> /dev/null | grep $0 > /dev/null
|
||||||
then
|
then
|
||||||
FIND_PROC="$PS -p \$\$PID | grep mysqld > /dev/null"
|
FIND_PROC="$PS -p \$\$PID | grep mysqld > /dev/null"
|
||||||
# BSD style
|
# BSD style
|
||||||
@ -770,7 +771,7 @@ AC_CHECK_HEADERS(fcntl.h float.h floatingpoint.h ieeefp.h limits.h \
|
|||||||
strings.h string.h synch.h sys/mman.h sys/socket.h netinet/in.h arpa/inet.h \
|
strings.h string.h synch.h sys/mman.h sys/socket.h netinet/in.h arpa/inet.h \
|
||||||
sys/timeb.h sys/types.h sys/un.h sys/vadvise.h sys/wait.h term.h \
|
sys/timeb.h sys/types.h sys/un.h sys/vadvise.h sys/wait.h term.h \
|
||||||
unistd.h utime.h sys/utime.h termio.h termios.h sched.h crypt.h alloca.h \
|
unistd.h utime.h sys/utime.h termio.h termios.h sched.h crypt.h alloca.h \
|
||||||
sys/ioctl.h malloc.h sys/malloc.h linux/config.h)
|
sys/ioctl.h malloc.h sys/malloc.h linux/config.h sys/resource.h sys/param.h)
|
||||||
|
|
||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
# Check for system libraries. Adds the library to $LIBS
|
# Check for system libraries. Adds the library to $LIBS
|
||||||
@ -923,9 +924,11 @@ if test "$ac_cv_header_termio_h" = "no" -a "$ac_cv_header_termios_h" = "no"
|
|||||||
then
|
then
|
||||||
AC_CHECK_FUNC(gtty, , AC_CHECK_LIB(compat, gtty))
|
AC_CHECK_FUNC(gtty, , AC_CHECK_LIB(compat, gtty))
|
||||||
fi
|
fi
|
||||||
# We make a special variable for client library's to avoid including
|
|
||||||
# thread libs in the client.
|
# We make a special variable for non-threaded version of LIBS to avoid
|
||||||
NON_THREADED_CLIENT_LIBS="$LIBS $ZLIB_LIBS"
|
# including thread libs into non-threaded version of MySQL client library.
|
||||||
|
# Later in this script LIBS will be augmented with a threads library.
|
||||||
|
NON_THREADED_LIBS="$LIBS"
|
||||||
|
|
||||||
AC_MSG_CHECKING([for int8])
|
AC_MSG_CHECKING([for int8])
|
||||||
case $SYSTEM_TYPE in
|
case $SYSTEM_TYPE in
|
||||||
@ -973,8 +976,11 @@ case $SYSTEM_TYPE-$MACHINE_TYPE-$ac_cv_prog_gcc in
|
|||||||
CFLAGS="$CFLAGS -DBIG_TABLES"
|
CFLAGS="$CFLAGS -DBIG_TABLES"
|
||||||
CXXFLAGS="$CXXFLAGS -DBIG_TABLES"
|
CXXFLAGS="$CXXFLAGS -DBIG_TABLES"
|
||||||
;;
|
;;
|
||||||
|
*) ;;
|
||||||
|
esac
|
||||||
|
case $SYSTEM_TYPE-$ac_cv_prog_gcc in
|
||||||
# workaround for Sun Forte compile problem for ndb
|
# workaround for Sun Forte compile problem for ndb
|
||||||
*solaris2.10*-sparc-no)
|
*solaris*-no)
|
||||||
ndb_cxxflags_fix="$ndb_cxxflags_fix -instances=static"
|
ndb_cxxflags_fix="$ndb_cxxflags_fix -instances=static"
|
||||||
;;
|
;;
|
||||||
*) ;;
|
*) ;;
|
||||||
@ -1035,8 +1041,8 @@ case $SYSTEM_TYPE in
|
|||||||
;;
|
;;
|
||||||
*hpux11.*)
|
*hpux11.*)
|
||||||
echo "Enabling workarounds for hpux 11"
|
echo "Enabling workarounds for hpux 11"
|
||||||
CFLAGS="$CFLAGS -DHPUX11 -DHAVE_BROKEN_PREAD -DDONT_USE_FINITE -DHAVE_BROKEN_GETPASS -DNO_FCNTL_NONBLOCK -DDO_NOT_REMOVE_THREAD_WRAPPERS -DHAVE_BROKEN_PTHREAD_COND_TIMEDWAIT"
|
CFLAGS="$CFLAGS -DHPUX11 -DSNPRINTF_RETURN_TRUNC -DHAVE_BROKEN_PREAD -DDONT_USE_FINITE -DHAVE_BROKEN_GETPASS -DNO_FCNTL_NONBLOCK -DDO_NOT_REMOVE_THREAD_WRAPPERS -DHAVE_BROKEN_PTHREAD_COND_TIMEDWAIT"
|
||||||
CXXFLAGS="$CXXFLAGS -DHPUX11 -DHAVE_BROKEN_PREAD -DDONT_USE_FINITE -D_INCLUDE_LONGLONG -DNO_FCNTL_NONBLOCK -DDO_NOT_REMOVE_THREAD_WRAPPERS -DHAVE_BROKEN_PTHREAD_COND_TIMEDWAIT"
|
CXXFLAGS="$CXXFLAGS -DHPUX11 -DSNPRINTF_RETURN_TRUNC -DHAVE_BROKEN_PREAD -DDONT_USE_FINITE -D_INCLUDE_LONGLONG -DNO_FCNTL_NONBLOCK -DDO_NOT_REMOVE_THREAD_WRAPPERS -DHAVE_BROKEN_PTHREAD_COND_TIMEDWAIT"
|
||||||
if test "$with_named_thread" = "no"
|
if test "$with_named_thread" = "no"
|
||||||
then
|
then
|
||||||
echo "Using --with-named-thread=-lpthread"
|
echo "Using --with-named-thread=-lpthread"
|
||||||
@ -1142,9 +1148,10 @@ dnl Is this the right match for DEC OSF on alpha?
|
|||||||
fi
|
fi
|
||||||
echo "Adding defines for OSF1"
|
echo "Adding defines for OSF1"
|
||||||
# gethostbyname_r is deprecated and doesn't work ok on OSF1
|
# gethostbyname_r is deprecated and doesn't work ok on OSF1
|
||||||
CFLAGS="$CFLAGS -DUNDEF_HAVE_GETHOSTBYNAME_R"
|
CFLAGS="$CFLAGS -DUNDEF_HAVE_GETHOSTBYNAME_R -DSNPRINTF_RETURN_TRUNC"
|
||||||
CXXFLAGS="$CXXFLAGS -DUNDEF_HAVE_GETHOSTBYNAME_R"
|
CXXFLAGS="$CXXFLAGS -DUNDEF_HAVE_GETHOSTBYNAME_R -DSNPRINTF_RETURN_TRUNC"
|
||||||
ndb_cxxflags_fix="$ndb_cxxflags_fix -I/usr/include.dtk"
|
# fix to handle include of <stdint.h> correctly on OSF1 with cxx compiler
|
||||||
|
CXXFLAGS="$CXXFLAGS -I/usr/include/cxx -I/usr/include/cxx_cname -I/usr/include -I/usr/include.dtk"
|
||||||
;;
|
;;
|
||||||
*netware*)
|
*netware*)
|
||||||
# No need for curses library so set it to null
|
# No need for curses library so set it to null
|
||||||
@ -1497,7 +1504,7 @@ then
|
|||||||
if test -f /usr/lib/libxnet.so -a "$SYSTEM_TYPE" = "sni-sysv4"
|
if test -f /usr/lib/libxnet.so -a "$SYSTEM_TYPE" = "sni-sysv4"
|
||||||
then
|
then
|
||||||
LIBS="-lxnet $LIBS"
|
LIBS="-lxnet $LIBS"
|
||||||
NON_THREADED_CLIENT_LIBS="$NON_THREADED_CLIENT_LIBS -lxnet"
|
NON_THREADED_LIBS="-lxnet $NON_THREADED_LIBS"
|
||||||
with_named_thread="-Kthread $LDFLAGS -lxnet"
|
with_named_thread="-Kthread $LDFLAGS -lxnet"
|
||||||
LD_FLAGS=""
|
LD_FLAGS=""
|
||||||
CFLAGS="-Kthread $CFLAGS"
|
CFLAGS="-Kthread $CFLAGS"
|
||||||
@ -1531,14 +1538,11 @@ then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
TOOLS_LIBS="$NON_THREADED_CLIENT_LIBS"
|
|
||||||
|
|
||||||
# Should we use named pthread library ?
|
# Should we use named pthread library ?
|
||||||
AC_MSG_CHECKING("named thread libs:")
|
AC_MSG_CHECKING("named thread libs:")
|
||||||
if test "$with_named_thread" != "no"
|
if test "$with_named_thread" != "no"
|
||||||
then
|
then
|
||||||
LIBS="$with_named_thread $LIBS $with_named_thread"
|
LIBS="$with_named_thread $LIBS $with_named_thread"
|
||||||
TOOLS_LIBS="$with_named_thread $TOOLS_LIBS $with_named_thread"
|
|
||||||
with_posix_threads="yes"
|
with_posix_threads="yes"
|
||||||
with_mit_threads="no"
|
with_mit_threads="no"
|
||||||
AC_MSG_RESULT("$with_named_thread")
|
AC_MSG_RESULT("$with_named_thread")
|
||||||
@ -1557,9 +1561,7 @@ else
|
|||||||
then
|
then
|
||||||
AC_MSG_CHECKING("for pthread_create in -lpthread");
|
AC_MSG_CHECKING("for pthread_create in -lpthread");
|
||||||
ac_save_LIBS="$LIBS"
|
ac_save_LIBS="$LIBS"
|
||||||
ac_save_TOOLS_LIBS="$TOOLS_LIBS"
|
|
||||||
LIBS="$LIBS -lpthread"
|
LIBS="$LIBS -lpthread"
|
||||||
TOOLS_LIBS="$TOOLS_LIBS -lpthread"
|
|
||||||
AC_TRY_LINK(
|
AC_TRY_LINK(
|
||||||
[#include <pthread.h>],
|
[#include <pthread.h>],
|
||||||
[ (void) pthread_create((pthread_t*) 0,(pthread_attr_t*) 0, 0, 0); ],
|
[ (void) pthread_create((pthread_t*) 0,(pthread_attr_t*) 0, 0, 0); ],
|
||||||
@ -1568,7 +1570,6 @@ else
|
|||||||
if test "$with_posix_threads" = "no"
|
if test "$with_posix_threads" = "no"
|
||||||
then
|
then
|
||||||
LIBS=" $ac_save_LIBS -lpthreads"
|
LIBS=" $ac_save_LIBS -lpthreads"
|
||||||
TOOLS_LIBS=" $ac_save_TOOLS_LIBS -lpthreads"
|
|
||||||
AC_MSG_CHECKING("for pthread_create in -lpthreads");
|
AC_MSG_CHECKING("for pthread_create in -lpthreads");
|
||||||
AC_TRY_LINK(
|
AC_TRY_LINK(
|
||||||
[#include <pthread.h>],
|
[#include <pthread.h>],
|
||||||
@ -1579,7 +1580,6 @@ else
|
|||||||
then
|
then
|
||||||
# This is for FreeBSD
|
# This is for FreeBSD
|
||||||
LIBS="$ac_save_LIBS -pthread"
|
LIBS="$ac_save_LIBS -pthread"
|
||||||
TOOLS_LIBS="$ac_save_TOOLS_LIBS -pthread"
|
|
||||||
AC_MSG_CHECKING("for pthread_create in -pthread");
|
AC_MSG_CHECKING("for pthread_create in -pthread");
|
||||||
AC_TRY_LINK(
|
AC_TRY_LINK(
|
||||||
[#include <pthread.h>],
|
[#include <pthread.h>],
|
||||||
@ -1590,7 +1590,6 @@ else
|
|||||||
then
|
then
|
||||||
with_mit_threads="yes"
|
with_mit_threads="yes"
|
||||||
LIBS="$ac_save_LIBS"
|
LIBS="$ac_save_LIBS"
|
||||||
TOOLS_LIBS="$ac_save_TOOLS_LIBS"
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
@ -1676,12 +1675,12 @@ if test "$with_debug" = "yes"
|
|||||||
then
|
then
|
||||||
# Medium debug.
|
# Medium debug.
|
||||||
CFLAGS="$DEBUG_CFLAGS $DEBUG_OPTIMIZE_CC -DDBUG_ON -DSAFE_MUTEX $CFLAGS"
|
CFLAGS="$DEBUG_CFLAGS $DEBUG_OPTIMIZE_CC -DDBUG_ON -DSAFE_MUTEX $CFLAGS"
|
||||||
CXXFLAGS="$DEBUG_CXXFLAGS $DEBUG_OPTIMIZE_CXX -DSAFE_MUTEX $CXXFLAGS"
|
CXXFLAGS="$DEBUG_CXXFLAGS $DEBUG_OPTIMIZE_CXX -DDBUG_ON -DSAFE_MUTEX $CXXFLAGS"
|
||||||
elif test "$with_debug" = "full"
|
elif test "$with_debug" = "full"
|
||||||
then
|
then
|
||||||
# Full debug. Very slow in some cases
|
# Full debug. Very slow in some cases
|
||||||
CFLAGS="$DEBUG_CFLAGS -DDBUG_ON -DSAFE_MUTEX -DSAFEMALLOC $CFLAGS"
|
CFLAGS="$DEBUG_CFLAGS -DDBUG_ON -DSAFE_MUTEX -DSAFEMALLOC -DUNIV_DEBUG $CFLAGS"
|
||||||
CXXFLAGS="$DEBUG_CXXFLAGS -DSAFE_MUTEX -DSAFEMALLOC $CXXFLAGS"
|
CXXFLAGS="$DEBUG_CXXFLAGS -DDBUG_ON -DSAFE_MUTEX -DSAFEMALLOC -DUNIV_DEBUG $CXXFLAGS"
|
||||||
else
|
else
|
||||||
# Optimized version. No debug
|
# Optimized version. No debug
|
||||||
CFLAGS="$OPTIMIZE_CFLAGS -DDBUG_OFF $CFLAGS"
|
CFLAGS="$OPTIMIZE_CFLAGS -DDBUG_OFF $CFLAGS"
|
||||||
@ -1913,15 +1912,31 @@ AC_CHECK_FUNCS(alarm bcmp bfill bmove bzero chsize cuserid fchmod fcntl \
|
|||||||
getcwd gethostbyaddr_r gethostbyname_r getpass getpassphrase getpwnam \
|
getcwd gethostbyaddr_r gethostbyname_r getpass getpassphrase getpwnam \
|
||||||
getpwuid getrlimit getrusage getwd gmtime_r index initgroups isnan \
|
getpwuid getrlimit getrusage getwd gmtime_r index initgroups isnan \
|
||||||
localtime_r locking longjmp lrand48 madvise mallinfo memcpy memmove \
|
localtime_r locking longjmp lrand48 madvise mallinfo memcpy memmove \
|
||||||
mkstemp mlockall perror poll pread pthread_attr_create clock_gettime \
|
mkstemp mlockall perror poll pread pthread_attr_create \
|
||||||
pthread_attr_getstacksize pthread_attr_setprio pthread_attr_setschedparam \
|
pthread_attr_getstacksize pthread_attr_setprio pthread_attr_setschedparam \
|
||||||
pthread_attr_setstacksize pthread_condattr_create pthread_getsequence_np \
|
pthread_attr_setstacksize pthread_condattr_create pthread_getsequence_np \
|
||||||
pthread_key_delete pthread_rwlock_rdlock pthread_setprio \
|
pthread_key_delete pthread_rwlock_rdlock pthread_setprio \
|
||||||
pthread_setprio_np pthread_setschedparam pthread_sigmask readlink \
|
pthread_setprio_np pthread_setschedparam pthread_sigmask readlink \
|
||||||
realpath rename rint rwlock_init setupterm sighold sigset sigthreadmask \
|
realpath rename rint rwlock_init setupterm \
|
||||||
|
shmget shmat shmdt shmctl sigaction sigemptyset sigaddset \
|
||||||
|
sighold sigset sigthreadmask \
|
||||||
snprintf socket stpcpy strcasecmp strerror strnlen strpbrk strstr strtol \
|
snprintf socket stpcpy strcasecmp strerror strnlen strpbrk strstr strtol \
|
||||||
strtoll strtoul strtoull tell tempnam thr_setconcurrency vidattr)
|
strtoll strtoul strtoull tell tempnam thr_setconcurrency vidattr)
|
||||||
|
|
||||||
|
#
|
||||||
|
#
|
||||||
|
#
|
||||||
|
case "$target" in
|
||||||
|
*-*-aix4* | *-*-sco*)
|
||||||
|
# (grr) aix 4.3 has a stub for clock_gettime, (returning ENOSYS)
|
||||||
|
# and using AC_TRY_RUN is hard when cross-compiling
|
||||||
|
# We also disable for SCO for the time being, the headers for the
|
||||||
|
# thread library we use conflicts with other headers.
|
||||||
|
;;
|
||||||
|
*) AC_CHECK_FUNCS(clock_gettime)
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
# isinf() could be a function or a macro (HPUX)
|
# isinf() could be a function or a macro (HPUX)
|
||||||
AC_MSG_CHECKING(for isinf with <math.h>)
|
AC_MSG_CHECKING(for isinf with <math.h>)
|
||||||
AC_TRY_LINK([#include <math.h>], [float f = 0.0; isinf(f)],
|
AC_TRY_LINK([#include <math.h>], [float f = 0.0; isinf(f)],
|
||||||
@ -2695,7 +2710,7 @@ case $default_charset in
|
|||||||
;;
|
;;
|
||||||
latin1)
|
latin1)
|
||||||
default_charset_default_collation="latin1_swedish_ci"
|
default_charset_default_collation="latin1_swedish_ci"
|
||||||
default_charset_collations="latin1_general_ci latin1_general_cs latin1_bin latin1_german1_ci latin1_german2_ci latin1_danish_ci latin1_swedish_ci"
|
default_charset_collations="latin1_general_ci latin1_general_cs latin1_bin latin1_german1_ci latin1_german2_ci latin1_danish_ci latin1_spanish_ci latin1_swedish_ci"
|
||||||
;;
|
;;
|
||||||
latin2)
|
latin2)
|
||||||
default_charset_default_collation="latin2_general_ci"
|
default_charset_default_collation="latin2_general_ci"
|
||||||
@ -2796,6 +2811,24 @@ AC_DEFINE_UNQUOTED([MYSQL_DEFAULT_CHARSET_NAME], ["$default_charset"],
|
|||||||
AC_DEFINE_UNQUOTED([MYSQL_DEFAULT_COLLATION_NAME], ["$default_collation"],
|
AC_DEFINE_UNQUOTED([MYSQL_DEFAULT_COLLATION_NAME], ["$default_collation"],
|
||||||
[Define the default charset name])
|
[Define the default charset name])
|
||||||
|
|
||||||
|
|
||||||
|
# Shall we build the UCA-based Unicode collations
|
||||||
|
AC_ARG_WITH(uca,
|
||||||
|
[ --without-uca Skip building of the national Unicode collations.],
|
||||||
|
[with_uca=$withval],
|
||||||
|
[with_uca=yes]
|
||||||
|
)
|
||||||
|
|
||||||
|
AC_MSG_CHECKING([whether to compile national Unicode collations])
|
||||||
|
|
||||||
|
if test "$with_uca" = "yes"
|
||||||
|
then
|
||||||
|
AC_MSG_RESULT(yes)
|
||||||
|
AC_DEFINE([HAVE_UCA_COLLATIONS], [1], [national Unicode collations])
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT(no)
|
||||||
|
fi
|
||||||
|
|
||||||
MYSQL_CHECK_ISAM
|
MYSQL_CHECK_ISAM
|
||||||
MYSQL_CHECK_BDB
|
MYSQL_CHECK_BDB
|
||||||
MYSQL_CHECK_INNODB
|
MYSQL_CHECK_INNODB
|
||||||
@ -2813,7 +2846,7 @@ dnl This probably should be cleaned up more - for now the threaded
|
|||||||
dnl client is just using plain-old libs.
|
dnl client is just using plain-old libs.
|
||||||
sql_client_dirs="libmysql strings regex client"
|
sql_client_dirs="libmysql strings regex client"
|
||||||
linked_client_targets="linked_libmysql_sources"
|
linked_client_targets="linked_libmysql_sources"
|
||||||
CLIENT_LIBS=$NON_THREADED_CLIENT_LIBS
|
|
||||||
if test "$THREAD_SAFE_CLIENT" != "no"
|
if test "$THREAD_SAFE_CLIENT" != "no"
|
||||||
then
|
then
|
||||||
sql_client_dirs="libmysql_r $sql_client_dirs"
|
sql_client_dirs="libmysql_r $sql_client_dirs"
|
||||||
@ -2821,9 +2854,11 @@ then
|
|||||||
AC_DEFINE([THREAD_SAFE_CLIENT], [1], [Should be client be thread safe])
|
AC_DEFINE([THREAD_SAFE_CLIENT], [1], [Should be client be thread safe])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
CLIENT_LIBS="$CLIENT_LIBS $STATIC_NSS_FLAGS"
|
CLIENT_LIBS="$NON_THREADED_LIBS $openssl_libs $ZLIB_LIBS $STATIC_NSS_FLAGS"
|
||||||
|
|
||||||
AC_SUBST(CLIENT_LIBS)
|
AC_SUBST(CLIENT_LIBS)
|
||||||
|
AC_SUBST(NON_THREADED_LIBS)
|
||||||
|
AC_SUBST(STATIC_NSS_FLAGS)
|
||||||
AC_SUBST(sql_client_dirs)
|
AC_SUBST(sql_client_dirs)
|
||||||
AC_SUBST(linked_client_targets)
|
AC_SUBST(linked_client_targets)
|
||||||
|
|
||||||
@ -2941,6 +2976,15 @@ EOF
|
|||||||
AC_CONFIG_SUBDIRS(innobase)
|
AC_CONFIG_SUBDIRS(innobase)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
case $SYSTEM_TYPE-$MACHINE_TYPE-$ac_cv_prog_gcc-$have_ndbcluster in
|
||||||
|
*solaris*-i?86-no-yes)
|
||||||
|
# ndb fail for whatever strange reason to link Sun Forte/x86
|
||||||
|
# unless using incremental linker
|
||||||
|
CXXFLAGS="$CXXFLAGS -xildon"
|
||||||
|
;;
|
||||||
|
*) ;;
|
||||||
|
esac
|
||||||
|
|
||||||
if test X"$have_ndbcluster" = Xyes
|
if test X"$have_ndbcluster" = Xyes
|
||||||
then
|
then
|
||||||
if test X"$mysql_cv_compress" != Xyes
|
if test X"$mysql_cv_compress" != Xyes
|
||||||
@ -2993,6 +3037,20 @@ AC_SUBST(sql_server_dirs)
|
|||||||
AC_SUBST(thread_dirs)
|
AC_SUBST(thread_dirs)
|
||||||
AC_SUBST(server_scripts)
|
AC_SUBST(server_scripts)
|
||||||
|
|
||||||
|
# Now that sql_client_dirs and sql_server_dirs are stable, determine the union.
|
||||||
|
# Start with the (longer) server list, add each client item not yet present.
|
||||||
|
sql_union_dirs=" $sql_server_dirs "
|
||||||
|
for DIR in $sql_client_dirs
|
||||||
|
do
|
||||||
|
if echo " $sql_union_dirs " | grep " $DIR " >/dev/null
|
||||||
|
then
|
||||||
|
: # already present, skip
|
||||||
|
else
|
||||||
|
sql_union_dirs="$sql_union_dirs $DIR "
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
AC_SUBST(sql_union_dirs)
|
||||||
|
|
||||||
#if test "$with_posix_threads" = "no" -o "$with_mit_threads" = "yes"
|
#if test "$with_posix_threads" = "no" -o "$with_mit_threads" = "yes"
|
||||||
#then
|
#then
|
||||||
# MIT pthreads does now support connecting with unix sockets
|
# MIT pthreads does now support connecting with unix sockets
|
||||||
@ -3002,8 +3060,6 @@ AC_SUBST(server_scripts)
|
|||||||
# Some usefull subst
|
# Some usefull subst
|
||||||
AC_SUBST(CC)
|
AC_SUBST(CC)
|
||||||
AC_SUBST(GXX)
|
AC_SUBST(GXX)
|
||||||
#Remove TOOLS_LIBS, because this is included in LIBRARIES
|
|
||||||
#AC_SUBST(TOOLS_LIBS)
|
|
||||||
|
|
||||||
# Set configuration options for make_binary_distribution
|
# Set configuration options for make_binary_distribution
|
||||||
case $SYSTEM_TYPE in
|
case $SYSTEM_TYPE in
|
||||||
@ -3020,32 +3076,62 @@ then
|
|||||||
MAKE_BINARY_DISTRIBUTION_OPTIONS="$MAKE_BINARY_DISTRIBUTION_OPTIONS --with-ndbcluster"
|
MAKE_BINARY_DISTRIBUTION_OPTIONS="$MAKE_BINARY_DISTRIBUTION_OPTIONS --with-ndbcluster"
|
||||||
|
|
||||||
CXXFLAGS="$CXXFLAGS \$(NDB_CXXFLAGS)"
|
CXXFLAGS="$CXXFLAGS \$(NDB_CXXFLAGS)"
|
||||||
if test "$with_debug" = "yes"
|
if test "$have_ndb_debug" = "default"
|
||||||
|
then
|
||||||
|
have_ndb_debug=$with_debug
|
||||||
|
fi
|
||||||
|
|
||||||
|
if test "$have_ndb_debug" = "yes"
|
||||||
then
|
then
|
||||||
# Medium debug.
|
# Medium debug.
|
||||||
NDB_DEFS="-DNDB_DEBUG -DVM_TRACE -DERROR_INSERT -DARRAY_GUARD"
|
NDB_DEFS="-DNDB_DEBUG -DVM_TRACE -DERROR_INSERT -DARRAY_GUARD"
|
||||||
elif test "$with_debug" = "full"
|
elif test "$have_ndb_debug" = "full"
|
||||||
then
|
then
|
||||||
NDB_DEFS="-DNDB_DEBUG_FULL -DVM_TRACE -DERROR_INSERT -DARRAY_GUARD"
|
NDB_DEFS="-DNDB_DEBUG_FULL -DVM_TRACE -DERROR_INSERT -DARRAY_GUARD"
|
||||||
else
|
else
|
||||||
NDB_DEFS="-DNDEBUG"
|
# no extra ndb debug but still do asserts if debug version
|
||||||
|
if test "$with_debug" = "yes" -o "$with_debug" = "full"
|
||||||
|
then
|
||||||
|
NDB_DEFS=""
|
||||||
|
else
|
||||||
|
NDB_DEFS="-DNDEBUG"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
AC_SUBST([NDB_DEFS])
|
AC_SUBST([NDB_DEFS])
|
||||||
AC_SUBST([ndb_cxxflags_fix])
|
AC_SUBST([ndb_cxxflags_fix])
|
||||||
|
|
||||||
|
|
||||||
|
if test X"$ndb_port" = Xdefault
|
||||||
|
then
|
||||||
|
ndb_port="1186"
|
||||||
|
fi
|
||||||
|
AC_SUBST([ndb_port])
|
||||||
|
|
||||||
if test X"$ndb_port_base" = Xdefault
|
if test X"$ndb_port_base" = Xdefault
|
||||||
then
|
then
|
||||||
ndb_port_base="2200"
|
ndb_port_base="2202"
|
||||||
fi
|
fi
|
||||||
AC_SUBST([ndb_port_base])
|
AC_SUBST([ndb_port_base])
|
||||||
|
|
||||||
ndb_transporter_opt_objs=""
|
ndb_transporter_opt_objs=""
|
||||||
if test X"$have_ndb_shm" = Xyes
|
if test "$ac_cv_func_shmget" = "yes" &&
|
||||||
|
test "$ac_cv_func_shmat" = "yes" &&
|
||||||
|
test "$ac_cv_func_shmdt" = "yes" &&
|
||||||
|
test "$ac_cv_func_shmctl" = "yes" &&
|
||||||
|
test "$ac_cv_func_sigaction" = "yes" &&
|
||||||
|
test "$ac_cv_func_sigemptyset" = "yes" &&
|
||||||
|
test "$ac_cv_func_sigaddset" = "yes" &&
|
||||||
|
test "$ac_cv_func_pthread_sigmask" = "yes"
|
||||||
then
|
then
|
||||||
ndb_transporter_opt_objs="$ndb_transporter_opt_objs SHM_Transporter.lo SHM_Transporter.unix.lo"
|
AC_DEFINE([NDB_SHM_TRANSPORTER], [1],
|
||||||
|
[Including Ndb Cluster DB shared memory transporter])
|
||||||
|
AC_MSG_RESULT([Including ndb shared memory transporter])
|
||||||
|
ndb_transporter_opt_objs="$ndb_transporter_opt_objs SHM_Transporter.lo SHM_Transporter.unix.lo"
|
||||||
|
else
|
||||||
|
AC_MSG_RESULT([Not including ndb shared memory transporter])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test X"$have_ndb_sci" = Xyes
|
if test X"$have_ndb_sci" = Xyes
|
||||||
then
|
then
|
||||||
ndb_transporter_opt_objs="$ndb_transporter_opt_objs SCI_Transporter.lo"
|
ndb_transporter_opt_objs="$ndb_transporter_opt_objs SCI_Transporter.lo"
|
||||||
@ -3076,7 +3162,6 @@ AC_CONFIG_FILES(ndb/Makefile ndb/include/Makefile dnl
|
|||||||
ndb/src/common/logger/Makefile dnl
|
ndb/src/common/logger/Makefile dnl
|
||||||
ndb/src/common/transporter/Makefile dnl
|
ndb/src/common/transporter/Makefile dnl
|
||||||
ndb/src/common/mgmcommon/Makefile dnl
|
ndb/src/common/mgmcommon/Makefile dnl
|
||||||
ndb/src/common/editline/Makefile dnl
|
|
||||||
ndb/src/kernel/Makefile dnl
|
ndb/src/kernel/Makefile dnl
|
||||||
ndb/src/kernel/error/Makefile dnl
|
ndb/src/kernel/error/Makefile dnl
|
||||||
ndb/src/kernel/blocks/Makefile dnl
|
ndb/src/kernel/blocks/Makefile dnl
|
||||||
@ -3092,7 +3177,6 @@ AC_CONFIG_FILES(ndb/Makefile ndb/include/Makefile dnl
|
|||||||
ndb/src/kernel/blocks/qmgr/Makefile dnl
|
ndb/src/kernel/blocks/qmgr/Makefile dnl
|
||||||
ndb/src/kernel/blocks/trix/Makefile dnl
|
ndb/src/kernel/blocks/trix/Makefile dnl
|
||||||
ndb/src/kernel/blocks/backup/Makefile dnl
|
ndb/src/kernel/blocks/backup/Makefile dnl
|
||||||
ndb/src/kernel/blocks/backup/restore/Makefile dnl
|
|
||||||
ndb/src/kernel/blocks/dbutil/Makefile dnl
|
ndb/src/kernel/blocks/dbutil/Makefile dnl
|
||||||
ndb/src/kernel/blocks/suma/Makefile dnl
|
ndb/src/kernel/blocks/suma/Makefile dnl
|
||||||
ndb/src/kernel/blocks/grep/Makefile dnl
|
ndb/src/kernel/blocks/grep/Makefile dnl
|
||||||
@ -3110,6 +3194,7 @@ AC_CONFIG_FILES(ndb/Makefile ndb/include/Makefile dnl
|
|||||||
ndb/test/ndbapi/bank/Makefile dnl
|
ndb/test/ndbapi/bank/Makefile dnl
|
||||||
ndb/test/tools/Makefile dnl
|
ndb/test/tools/Makefile dnl
|
||||||
ndb/test/run-test/Makefile mysql-test/ndb/Makefile dnl
|
ndb/test/run-test/Makefile mysql-test/ndb/Makefile dnl
|
||||||
|
ndb/include/ndb_version.h ndb/include/ndb_global.h dnl
|
||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -3127,7 +3212,7 @@ AC_CONFIG_FILES(Makefile extra/Makefile mysys/Makefile dnl
|
|||||||
sql-common/Makefile SSL/Makefile dnl
|
sql-common/Makefile SSL/Makefile dnl
|
||||||
dbug/Makefile scripts/Makefile dnl
|
dbug/Makefile scripts/Makefile dnl
|
||||||
include/Makefile sql-bench/Makefile tools/Makefile dnl
|
include/Makefile sql-bench/Makefile tools/Makefile dnl
|
||||||
tests/Makefile Docs/Makefile support-files/Makefile dnl
|
tests/Makefile Docs/Makefile Docs/Images/Makefile support-files/Makefile dnl
|
||||||
support-files/MacOSX/Makefile mysql-test/Makefile dnl
|
support-files/MacOSX/Makefile mysql-test/Makefile dnl
|
||||||
netware/Makefile dnl
|
netware/Makefile dnl
|
||||||
include/mysql_version.h dnl
|
include/mysql_version.h dnl
|
||||||
|
56
dbug/dbug.c
56
dbug/dbug.c
@ -227,14 +227,15 @@ static my_bool init_done = FALSE; /* Set to TRUE when initialization done */
|
|||||||
static struct state *stack=0;
|
static struct state *stack=0;
|
||||||
|
|
||||||
typedef struct st_code_state {
|
typedef struct st_code_state {
|
||||||
int lineno; /* Current debugger output line number */
|
|
||||||
int level; /* Current function nesting level */
|
|
||||||
const char *func; /* Name of current user function */
|
const char *func; /* Name of current user function */
|
||||||
const char *file; /* Name of current user file */
|
const char *file; /* Name of current user file */
|
||||||
char **framep; /* Pointer to current frame */
|
char **framep; /* Pointer to current frame */
|
||||||
int jmplevel; /* Remember nesting level at setjmp () */
|
|
||||||
const char *jmpfunc; /* Remember current function for setjmp */
|
const char *jmpfunc; /* Remember current function for setjmp */
|
||||||
const char *jmpfile; /* Remember current file for setjmp */
|
const char *jmpfile; /* Remember current file for setjmp */
|
||||||
|
int lineno; /* Current debugger output line number */
|
||||||
|
int level; /* Current function nesting level */
|
||||||
|
int disable_output; /* Set to it if output is disabled */
|
||||||
|
int jmplevel; /* Remember nesting level at setjmp () */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The following variables are used to hold the state information
|
* The following variables are used to hold the state information
|
||||||
@ -247,8 +248,8 @@ typedef struct st_code_state {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
uint u_line; /* User source code line number */
|
uint u_line; /* User source code line number */
|
||||||
const char *u_keyword; /* Keyword for current macro */
|
|
||||||
int locked; /* If locked with _db_lock_file */
|
int locked; /* If locked with _db_lock_file */
|
||||||
|
const char *u_keyword; /* Keyword for current macro */
|
||||||
} CODE_STATE;
|
} CODE_STATE;
|
||||||
|
|
||||||
/* Parse a debug command string */
|
/* Parse a debug command string */
|
||||||
@ -370,8 +371,10 @@ static CODE_STATE *code_state(void)
|
|||||||
#define code_state() (&static_code_state)
|
#define code_state() (&static_code_state)
|
||||||
#define pthread_mutex_lock(A) {}
|
#define pthread_mutex_lock(A) {}
|
||||||
#define pthread_mutex_unlock(A) {}
|
#define pthread_mutex_unlock(A) {}
|
||||||
static CODE_STATE static_code_state = { 0,0,"?func","?file",NULL,0,NULL,
|
static CODE_STATE static_code_state=
|
||||||
NULL,0,"?",0};
|
{
|
||||||
|
"?func", "?file", NULL, NullS, NullS, 0,0,0,0,0,0, NullS
|
||||||
|
};
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
@ -728,9 +731,12 @@ char ***_sframep_ __attribute__((unused)))
|
|||||||
if (DoProfile ())
|
if (DoProfile ())
|
||||||
{
|
{
|
||||||
long stackused;
|
long stackused;
|
||||||
if (*state->framep == NULL) {
|
if (*state->framep == NULL)
|
||||||
|
{
|
||||||
stackused = 0;
|
stackused = 0;
|
||||||
} else {
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
stackused = ((long)(*state->framep)) - ((long)(state->framep));
|
stackused = ((long)(*state->framep)) - ((long)(state->framep));
|
||||||
stackused = stackused > 0 ? stackused : -stackused;
|
stackused = stackused > 0 ? stackused : -stackused;
|
||||||
}
|
}
|
||||||
@ -744,7 +750,7 @@ char ***_sframep_ __attribute__((unused)))
|
|||||||
(void) fflush (_db_pfp_);
|
(void) fflush (_db_pfp_);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (DoTrace (state))
|
if (DoTrace(state))
|
||||||
{
|
{
|
||||||
if (!state->locked)
|
if (!state->locked)
|
||||||
pthread_mutex_lock(&THR_LOCK_dbug);
|
pthread_mutex_lock(&THR_LOCK_dbug);
|
||||||
@ -754,7 +760,7 @@ char ***_sframep_ __attribute__((unused)))
|
|||||||
dbug_flush (state); /* This does a unlock */
|
dbug_flush (state); /* This does a unlock */
|
||||||
}
|
}
|
||||||
#ifdef SAFEMALLOC
|
#ifdef SAFEMALLOC
|
||||||
if (stack -> flags & SANITY_CHECK_ON)
|
if (stack->flags & SANITY_CHECK_ON && !state->disable_output)
|
||||||
if (_sanity(_file_,_line_)) /* Check of safemalloc */
|
if (_sanity(_file_,_line_)) /* Check of safemalloc */
|
||||||
stack -> flags &= ~SANITY_CHECK_ON;
|
stack -> flags &= ~SANITY_CHECK_ON;
|
||||||
#endif
|
#endif
|
||||||
@ -809,9 +815,11 @@ uint *_slevel_)
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
#ifdef SAFEMALLOC
|
#ifdef SAFEMALLOC
|
||||||
if (stack -> flags & SANITY_CHECK_ON)
|
if (stack->flags & SANITY_CHECK_ON && !state->disable_output)
|
||||||
|
{
|
||||||
if (_sanity(*_sfile_,_line_))
|
if (_sanity(*_sfile_,_line_))
|
||||||
stack->flags &= ~SANITY_CHECK_ON;
|
stack->flags &= ~SANITY_CHECK_ON;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
#ifndef THREAD
|
#ifndef THREAD
|
||||||
if (DoProfile ())
|
if (DoProfile ())
|
||||||
@ -954,7 +962,6 @@ uint length)
|
|||||||
int pos;
|
int pos;
|
||||||
char dbuff[90];
|
char dbuff[90];
|
||||||
CODE_STATE *state;
|
CODE_STATE *state;
|
||||||
/* Sasha: pre-my_thread_init() safety */
|
|
||||||
if (!(state=code_state()))
|
if (!(state=code_state()))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -994,6 +1001,25 @@ uint length)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
Enable/Disable output for this thread
|
||||||
|
|
||||||
|
SYNOPSIS
|
||||||
|
_db_output_()
|
||||||
|
flag 1 = enable output, 0 = disable_output
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
void _db_output_(uint flag)
|
||||||
|
{
|
||||||
|
CODE_STATE *state;
|
||||||
|
if (!(state=code_state()))
|
||||||
|
return;
|
||||||
|
state->disable_output= !flag;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* FUNCTION
|
* FUNCTION
|
||||||
*
|
*
|
||||||
@ -1159,7 +1185,7 @@ static BOOLEAN DoTrace (CODE_STATE *state)
|
|||||||
{
|
{
|
||||||
reg2 BOOLEAN trace=FALSE;
|
reg2 BOOLEAN trace=FALSE;
|
||||||
|
|
||||||
if (TRACING &&
|
if (TRACING && !state->disable_output &&
|
||||||
state->level <= stack -> maxdepth &&
|
state->level <= stack -> maxdepth &&
|
||||||
InList (stack -> functions, state->func) &&
|
InList (stack -> functions, state->func) &&
|
||||||
InList (stack -> processes, _db_process_))
|
InList (stack -> processes, _db_process_))
|
||||||
@ -1195,7 +1221,7 @@ static BOOLEAN DoProfile ()
|
|||||||
state=code_state();
|
state=code_state();
|
||||||
|
|
||||||
profile = FALSE;
|
profile = FALSE;
|
||||||
if (PROFILING &&
|
if (PROFILING && !state->disable_output &&
|
||||||
state->level <= stack -> maxdepth &&
|
state->level <= stack -> maxdepth &&
|
||||||
InList (stack -> p_functions, state->func) &&
|
InList (stack -> p_functions, state->func) &&
|
||||||
InList (stack -> processes, _db_process_))
|
InList (stack -> processes, _db_process_))
|
||||||
@ -1242,7 +1268,7 @@ const char *keyword)
|
|||||||
if (!(state=code_state()))
|
if (!(state=code_state()))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
result = FALSE;
|
result = FALSE;
|
||||||
if (DEBUGGING &&
|
if (DEBUGGING && !state->disable_output &&
|
||||||
state->level <= stack -> maxdepth &&
|
state->level <= stack -> maxdepth &&
|
||||||
InList (stack -> functions, state->func) &&
|
InList (stack -> functions, state->func) &&
|
||||||
InList (stack -> keywords, keyword) &&
|
InList (stack -> keywords, keyword) &&
|
||||||
|
@ -55,6 +55,9 @@ static struct my_option my_long_options[] =
|
|||||||
{0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
|
{0, 0, 0, 0, 0, 0, GET_NO_ARG, NO_ARG, 0, 0, 0, 0, 0, 0}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#include <help_start.h>
|
||||||
|
|
||||||
static void usage(my_bool version)
|
static void usage(my_bool version)
|
||||||
{
|
{
|
||||||
printf("%s Ver 1.6 for %s at %s\n",my_progname,SYSTEM_TYPE,
|
printf("%s Ver 1.6 for %s at %s\n",my_progname,SYSTEM_TYPE,
|
||||||
@ -69,6 +72,8 @@ static void usage(my_bool version)
|
|||||||
printf("\nExample usage:\n%s --config-file=my client mysql\n", my_progname);
|
printf("\nExample usage:\n%s --config-file=my client mysql\n", my_progname);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#include <help_end.h>
|
||||||
|
|
||||||
|
|
||||||
static my_bool
|
static my_bool
|
||||||
get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||||
@ -115,25 +120,33 @@ int main(int argc, char **argv)
|
|||||||
int count, error;
|
int count, error;
|
||||||
char **load_default_groups, *tmp_arguments[2],
|
char **load_default_groups, *tmp_arguments[2],
|
||||||
**argument, **arguments;
|
**argument, **arguments;
|
||||||
|
char *defaults, *extra_defaults;
|
||||||
MY_INIT(argv[0]);
|
MY_INIT(argv[0]);
|
||||||
|
|
||||||
|
get_defaults_files(argc, argv, &defaults, &extra_defaults);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** Check out the args
|
** Check out the args
|
||||||
*/
|
*/
|
||||||
if (get_options(&argc,&argv))
|
|
||||||
exit(1);
|
|
||||||
if (!(load_default_groups=(char**) my_malloc((argc+2)*sizeof(char*),
|
if (!(load_default_groups=(char**) my_malloc((argc+2)*sizeof(char*),
|
||||||
MYF(MY_WME))))
|
MYF(MY_WME))))
|
||||||
exit(1);
|
exit(1);
|
||||||
|
if (get_options(&argc,&argv))
|
||||||
|
exit(1);
|
||||||
|
|
||||||
for (count=0; *argv ; argv++,count++)
|
for (count=0; *argv ; argv++,count++)
|
||||||
load_default_groups[count]= *argv;
|
load_default_groups[count]= *argv;
|
||||||
load_default_groups[count]=0;
|
load_default_groups[count]=0;
|
||||||
|
|
||||||
count=1;
|
count=0;
|
||||||
arguments=tmp_arguments;
|
arguments=tmp_arguments;
|
||||||
arguments[0]=my_progname;
|
arguments[count++]=my_progname;
|
||||||
arguments[1]=0;
|
if (extra_defaults)
|
||||||
|
arguments[count++]= extra_defaults;
|
||||||
|
if (defaults)
|
||||||
|
arguments[count++]= defaults;
|
||||||
|
arguments[count]= 0;
|
||||||
|
|
||||||
if ((error= load_defaults(config_file, (const char **) load_default_groups,
|
if ((error= load_defaults(config_file, (const char **) load_default_groups,
|
||||||
&count, &arguments)))
|
&count, &arguments)))
|
||||||
{
|
{
|
||||||
|
@ -69,7 +69,7 @@ static HA_ERRORS ha_errlist[]=
|
|||||||
{
|
{
|
||||||
{ 120,"Didn't find key on read or update" },
|
{ 120,"Didn't find key on read or update" },
|
||||||
{ 121,"Duplicate key on write or update" },
|
{ 121,"Duplicate key on write or update" },
|
||||||
{ 123,"Someone has changed the row since it was read; Update with is recoverable" },
|
{ 123,"Someone has changed the row since it was read (while the table was locked to prevent it)" },
|
||||||
{ 124,"Wrong index given to function" },
|
{ 124,"Wrong index given to function" },
|
||||||
{ 126,"Index file is crashed" },
|
{ 126,"Index file is crashed" },
|
||||||
{ 127,"Record-file is crashed" },
|
{ 127,"Record-file is crashed" },
|
||||||
@ -113,12 +113,15 @@ static HA_ERRORS ha_errlist[]=
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#include <help_start.h>
|
||||||
|
|
||||||
static void print_version(void)
|
static void print_version(void)
|
||||||
{
|
{
|
||||||
printf("%s Ver %s, for %s (%s)\n",my_progname,PERROR_VERSION,
|
printf("%s Ver %s, for %s (%s)\n",my_progname,PERROR_VERSION,
|
||||||
SYSTEM_TYPE,MACHINE_TYPE);
|
SYSTEM_TYPE,MACHINE_TYPE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void usage(void)
|
static void usage(void)
|
||||||
{
|
{
|
||||||
print_version();
|
print_version();
|
||||||
@ -130,6 +133,8 @@ static void usage(void)
|
|||||||
my_print_variables(my_long_options);
|
my_print_variables(my_long_options);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#include <help_end.h>
|
||||||
|
|
||||||
|
|
||||||
static my_bool
|
static my_bool
|
||||||
get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
|
||||||
@ -184,6 +189,7 @@ int main(int argc,char *argv[])
|
|||||||
{
|
{
|
||||||
int error,code,found;
|
int error,code,found;
|
||||||
const char *msg;
|
const char *msg;
|
||||||
|
char *unknown_error = 0;
|
||||||
MY_INIT(argv[0]);
|
MY_INIT(argv[0]);
|
||||||
|
|
||||||
if (get_options(&argc,&argv))
|
if (get_options(&argc,&argv))
|
||||||
@ -212,7 +218,14 @@ int main(int argc,char *argv[])
|
|||||||
string 'Unknown Error'. To avoid printing it we try to find the
|
string 'Unknown Error'. To avoid printing it we try to find the
|
||||||
error string by asking for an impossible big error message.
|
error string by asking for an impossible big error message.
|
||||||
*/
|
*/
|
||||||
const char *unknown_error= strerror(10000);
|
msg= strerror(10000);
|
||||||
|
|
||||||
|
/*
|
||||||
|
Allocate a buffer for unknown_error since strerror always returns
|
||||||
|
the same pointer on some platforms such as Windows
|
||||||
|
*/
|
||||||
|
unknown_error= malloc(strlen(msg)+1);
|
||||||
|
strmov(unknown_error, msg);
|
||||||
|
|
||||||
for ( ; argc-- > 0 ; argv++)
|
for ( ; argc-- > 0 ; argv++)
|
||||||
{
|
{
|
||||||
@ -232,16 +245,17 @@ int main(int argc,char *argv[])
|
|||||||
msg = strerror(code);
|
msg = strerror(code);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Don't print message for not existing error messages or for
|
We don't print the OS error message if it is the same as the
|
||||||
unknown errors. We test for 'Uknown Errors' just as an
|
unknown_error message we retrieved above, or it starts with
|
||||||
extra safety for Netware
|
'Unknown Error' (without regard to case).
|
||||||
*/
|
*/
|
||||||
if (msg && strcmp(msg, "Unknown Error") &&
|
if (msg &&
|
||||||
|
my_strnncoll(&my_charset_latin1, msg, 13, "Unknown Error", 13) &&
|
||||||
(!unknown_error || strcmp(msg, unknown_error)))
|
(!unknown_error || strcmp(msg, unknown_error)))
|
||||||
{
|
{
|
||||||
found=1;
|
found=1;
|
||||||
if (verbose)
|
if (verbose)
|
||||||
printf("Error code %3d: %s\n",code,msg);
|
printf("OS error code %3d: %s\n",code,msg);
|
||||||
else
|
else
|
||||||
puts(msg);
|
puts(msg);
|
||||||
}
|
}
|
||||||
@ -256,12 +270,17 @@ int main(int argc,char *argv[])
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (verbose)
|
if (verbose)
|
||||||
printf("MySQL error: %3d = %s\n",code,msg);
|
printf("MySQL error code %3d: %s\n",code,msg);
|
||||||
else
|
else
|
||||||
puts(msg);
|
puts(msg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* if we allocated a buffer for unknown_error, free it now */
|
||||||
|
if (unknown_error)
|
||||||
|
free(unknown_error);
|
||||||
|
|
||||||
exit(error);
|
exit(error);
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
@ -376,8 +376,8 @@ static REP_SET *make_new_set(REP_SETS *sets);
|
|||||||
static void make_sets_invisible(REP_SETS *sets);
|
static void make_sets_invisible(REP_SETS *sets);
|
||||||
static void free_last_set(REP_SETS *sets);
|
static void free_last_set(REP_SETS *sets);
|
||||||
static void free_sets(REP_SETS *sets);
|
static void free_sets(REP_SETS *sets);
|
||||||
static void set_bit(REP_SET *set, uint bit);
|
static void internal_set_bit(REP_SET *set, uint bit);
|
||||||
static void clear_bit(REP_SET *set, uint bit);
|
static void internal_clear_bit(REP_SET *set, uint bit);
|
||||||
static void or_bits(REP_SET *to,REP_SET *from);
|
static void or_bits(REP_SET *to,REP_SET *from);
|
||||||
static void copy_bits(REP_SET *to,REP_SET *from);
|
static void copy_bits(REP_SET *to,REP_SET *from);
|
||||||
static int cmp_bits(REP_SET *set1,REP_SET *set2);
|
static int cmp_bits(REP_SET *set1,REP_SET *set2);
|
||||||
@ -454,7 +454,7 @@ REPLACE *init_replace(my_string *from, my_string *to,uint count,
|
|||||||
{
|
{
|
||||||
if (from[i][0] == '\\' && from[i][1] == '^')
|
if (from[i][0] == '\\' && from[i][1] == '^')
|
||||||
{
|
{
|
||||||
set_bit(start_states,states+1);
|
internal_set_bit(start_states,states+1);
|
||||||
if (!from[i][2])
|
if (!from[i][2])
|
||||||
{
|
{
|
||||||
start_states->table_offset=i;
|
start_states->table_offset=i;
|
||||||
@ -463,8 +463,8 @@ REPLACE *init_replace(my_string *from, my_string *to,uint count,
|
|||||||
}
|
}
|
||||||
else if (from[i][0] == '\\' && from[i][1] == '$')
|
else if (from[i][0] == '\\' && from[i][1] == '$')
|
||||||
{
|
{
|
||||||
set_bit(start_states,states);
|
internal_set_bit(start_states,states);
|
||||||
set_bit(word_states,states);
|
internal_set_bit(word_states,states);
|
||||||
if (!from[i][2] && start_states->table_offset == (uint) ~0)
|
if (!from[i][2] && start_states->table_offset == (uint) ~0)
|
||||||
{
|
{
|
||||||
start_states->table_offset=i;
|
start_states->table_offset=i;
|
||||||
@ -473,11 +473,11 @@ REPLACE *init_replace(my_string *from, my_string *to,uint count,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
set_bit(word_states,states);
|
internal_set_bit(word_states,states);
|
||||||
if (from[i][0] == '\\' && (from[i][1] == 'b' && from[i][2]))
|
if (from[i][0] == '\\' && (from[i][1] == 'b' && from[i][2]))
|
||||||
set_bit(start_states,states+1);
|
internal_set_bit(start_states,states+1);
|
||||||
else
|
else
|
||||||
set_bit(start_states,states);
|
internal_set_bit(start_states,states);
|
||||||
}
|
}
|
||||||
for (pos=from[i], len=0; *pos ; pos++)
|
for (pos=from[i], len=0; *pos ; pos++)
|
||||||
{
|
{
|
||||||
@ -583,9 +583,9 @@ REPLACE *init_replace(my_string *from, my_string *to,uint count,
|
|||||||
follow[i].len > found_end)
|
follow[i].len > found_end)
|
||||||
found_end=follow[i].len;
|
found_end=follow[i].len;
|
||||||
if (chr && follow[i].chr)
|
if (chr && follow[i].chr)
|
||||||
set_bit(new_set,i+1); /* To next set */
|
internal_set_bit(new_set,i+1); /* To next set */
|
||||||
else
|
else
|
||||||
set_bit(new_set,i);
|
internal_set_bit(new_set,i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (found_end)
|
if (found_end)
|
||||||
@ -602,7 +602,7 @@ REPLACE *init_replace(my_string *from, my_string *to,uint count,
|
|||||||
if (follow[bit_nr-1].len < found_end ||
|
if (follow[bit_nr-1].len < found_end ||
|
||||||
(new_set->found_len &&
|
(new_set->found_len &&
|
||||||
(chr == 0 || !follow[bit_nr].chr)))
|
(chr == 0 || !follow[bit_nr].chr)))
|
||||||
clear_bit(new_set,i);
|
internal_clear_bit(new_set,i);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (chr == 0 || !follow[bit_nr].chr)
|
if (chr == 0 || !follow[bit_nr].chr)
|
||||||
@ -751,13 +751,13 @@ static void free_sets(REP_SETS *sets)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void set_bit(REP_SET *set, uint bit)
|
static void internal_set_bit(REP_SET *set, uint bit)
|
||||||
{
|
{
|
||||||
set->bits[bit / WORD_BIT] |= 1 << (bit % WORD_BIT);
|
set->bits[bit / WORD_BIT] |= 1 << (bit % WORD_BIT);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void clear_bit(REP_SET *set, uint bit)
|
static void internal_clear_bit(REP_SET *set, uint bit)
|
||||||
{
|
{
|
||||||
set->bits[bit / WORD_BIT] &= ~ (1 << (bit % WORD_BIT));
|
set->bits[bit / WORD_BIT] &= ~ (1 << (bit % WORD_BIT));
|
||||||
return;
|
return;
|
||||||
|
@ -65,12 +65,16 @@ static struct my_option my_long_options[] =
|
|||||||
|
|
||||||
static void verify_sort();
|
static void verify_sort();
|
||||||
|
|
||||||
|
|
||||||
|
#include <help_start.h>
|
||||||
|
|
||||||
static void print_version(void)
|
static void print_version(void)
|
||||||
{
|
{
|
||||||
printf("%s Ver %s Distrib %s, for %s (%s)\n",my_progname,DUMP_VERSION,
|
printf("%s Ver %s Distrib %s, for %s (%s)\n",my_progname,DUMP_VERSION,
|
||||||
MYSQL_SERVER_VERSION,SYSTEM_TYPE,MACHINE_TYPE);
|
MYSQL_SERVER_VERSION,SYSTEM_TYPE,MACHINE_TYPE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void usage()
|
static void usage()
|
||||||
{
|
{
|
||||||
print_version();
|
print_version();
|
||||||
@ -87,6 +91,7 @@ The numeric-dump-file should contain a numeric stack trace from mysqld.\n\
|
|||||||
If the numeric-dump-file is not given, the stack trace is read from stdin.\n");
|
If the numeric-dump-file is not given, the stack trace is read from stdin.\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#include <help_end.h>
|
||||||
|
|
||||||
|
|
||||||
static void die(const char* fmt, ...)
|
static void die(const char* fmt, ...)
|
||||||
|
@ -102,9 +102,11 @@ static int check_one_key(HP_KEYDEF *keydef, uint keynr, ulong records,
|
|||||||
int error;
|
int error;
|
||||||
uint i,found,max_links,seek,links;
|
uint i,found,max_links,seek,links;
|
||||||
uint rec_link; /* Only used with debugging */
|
uint rec_link; /* Only used with debugging */
|
||||||
|
uint hash_buckets_found;
|
||||||
HASH_INFO *hash_info;
|
HASH_INFO *hash_info;
|
||||||
|
|
||||||
error=0;
|
error=0;
|
||||||
|
hash_buckets_found= 0;
|
||||||
for (i=found=max_links=seek=0 ; i < records ; i++)
|
for (i=found=max_links=seek=0 ; i < records ; i++)
|
||||||
{
|
{
|
||||||
hash_info=hp_find_hash(&keydef->block,i);
|
hash_info=hp_find_hash(&keydef->block,i);
|
||||||
@ -128,21 +130,32 @@ static int check_one_key(HP_KEYDEF *keydef, uint keynr, ulong records,
|
|||||||
found++;
|
found++;
|
||||||
}
|
}
|
||||||
if (links > max_links) max_links=links;
|
if (links > max_links) max_links=links;
|
||||||
|
hash_buckets_found++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (found != records)
|
if (found != records)
|
||||||
{
|
{
|
||||||
DBUG_PRINT("error",("Found %ld of %ld records"));
|
DBUG_PRINT("error",("Found %ld of %ld records", found, records));
|
||||||
|
error=1;
|
||||||
|
}
|
||||||
|
if (keydef->hash_buckets != hash_buckets_found)
|
||||||
|
{
|
||||||
|
DBUG_PRINT("error",("Found %ld buckets, stats shows %ld buckets",
|
||||||
|
hash_buckets_found, keydef->hash_buckets));
|
||||||
error=1;
|
error=1;
|
||||||
}
|
}
|
||||||
DBUG_PRINT("info",
|
DBUG_PRINT("info",
|
||||||
("records: %ld seeks: %d max links: %d hitrate: %.2f",
|
("records: %ld seeks: %d max links: %d hitrate: %.2f "
|
||||||
|
"buckets: %d",
|
||||||
records,seek,max_links,
|
records,seek,max_links,
|
||||||
(float) seek / (float) (records ? records : 1)));
|
(float) seek / (float) (records ? records : 1),
|
||||||
|
hash_buckets_found));
|
||||||
if (print_status)
|
if (print_status)
|
||||||
printf("Key: %d records: %ld seeks: %d max links: %d hitrate: %.2f\n",
|
printf("Key: %d records: %ld seeks: %d max links: %d "
|
||||||
|
"hitrate: %.2f buckets: %d\n",
|
||||||
keynr, records, seek, max_links,
|
keynr, records, seek, max_links,
|
||||||
(float) seek / (float) (records ? records : 1));
|
(float) seek / (float) (records ? records : 1),
|
||||||
|
hash_buckets_found);
|
||||||
return error;
|
return error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -18,12 +18,19 @@
|
|||||||
|
|
||||||
#include "heapdef.h"
|
#include "heapdef.h"
|
||||||
|
|
||||||
/* Find record according to record-position */
|
/*
|
||||||
|
Find record according to record-position.
|
||||||
|
|
||||||
|
The record is located by factoring position number pos into (p_0, p_1, ...)
|
||||||
|
such that
|
||||||
|
pos = SUM_i(block->level_info[i].records_under_level * p_i)
|
||||||
|
{p_0, p_1, ...} serve as indexes to descend the blocks tree.
|
||||||
|
*/
|
||||||
|
|
||||||
byte *hp_find_block(HP_BLOCK *block, ulong pos)
|
byte *hp_find_block(HP_BLOCK *block, ulong pos)
|
||||||
{
|
{
|
||||||
reg1 int i;
|
reg1 int i;
|
||||||
reg3 HP_PTRS *ptr;
|
reg3 HP_PTRS *ptr; /* block base ptr */
|
||||||
|
|
||||||
for (i=block->levels-1, ptr=block->root ; i > 0 ; i--)
|
for (i=block->levels-1, ptr=block->root ; i > 0 ; i--)
|
||||||
{
|
{
|
||||||
@ -34,8 +41,18 @@ byte *hp_find_block(HP_BLOCK *block, ulong pos)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* get one new block-of-records. Alloc ptr to block if neaded */
|
/*
|
||||||
/* Interrupts are stopped to allow ha_panic in interrupts */
|
Get one new block-of-records. Alloc ptr to block if needed
|
||||||
|
SYNOPSIS
|
||||||
|
hp_get_new_block()
|
||||||
|
block HP_BLOCK tree-like block
|
||||||
|
alloc_length OUT Amount of memory allocated from the heap
|
||||||
|
|
||||||
|
Interrupts are stopped to allow ha_panic in interrupts
|
||||||
|
RETURN
|
||||||
|
0 OK
|
||||||
|
1 Out of memory
|
||||||
|
*/
|
||||||
|
|
||||||
int hp_get_new_block(HP_BLOCK *block, ulong *alloc_length)
|
int hp_get_new_block(HP_BLOCK *block, ulong *alloc_length)
|
||||||
{
|
{
|
||||||
@ -46,6 +63,18 @@ int hp_get_new_block(HP_BLOCK *block, ulong *alloc_length)
|
|||||||
if (block->level_info[i].free_ptrs_in_block)
|
if (block->level_info[i].free_ptrs_in_block)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
/*
|
||||||
|
Allocate space for leaf block plus space for upper level blocks up to
|
||||||
|
first level that has a free slot to put the pointer.
|
||||||
|
In some cases we actually allocate more then we need:
|
||||||
|
Consider e.g. a situation where we have one level 1 block and one level 0
|
||||||
|
block, the level 0 block is full and this function is called. We only
|
||||||
|
need a leaf block in this case. Nevertheless, we will get here with i=1
|
||||||
|
and will also allocate sizeof(HP_PTRS) for non-leaf block and will never
|
||||||
|
use this space.
|
||||||
|
This doesn't add much overhead - with current values of sizeof(HP_PTRS)
|
||||||
|
and my_default_record_cache_size we get about 1/128 unused memory.
|
||||||
|
*/
|
||||||
*alloc_length=sizeof(HP_PTRS)*i+block->records_in_block* block->recbuffer;
|
*alloc_length=sizeof(HP_PTRS)*i+block->records_in_block* block->recbuffer;
|
||||||
if (!(root=(HP_PTRS*) my_malloc(*alloc_length,MYF(0))))
|
if (!(root=(HP_PTRS*) my_malloc(*alloc_length,MYF(0))))
|
||||||
return 1;
|
return 1;
|
||||||
@ -60,21 +89,33 @@ int hp_get_new_block(HP_BLOCK *block, ulong *alloc_length)
|
|||||||
dont_break(); /* Dont allow SIGHUP or SIGINT */
|
dont_break(); /* Dont allow SIGHUP or SIGINT */
|
||||||
if ((uint) i == block->levels)
|
if ((uint) i == block->levels)
|
||||||
{
|
{
|
||||||
|
/* Adding a new level on top of the existing ones. */
|
||||||
block->levels=i+1;
|
block->levels=i+1;
|
||||||
|
/*
|
||||||
|
Use first allocated HP_PTRS as a top-level block. Put the current
|
||||||
|
block tree into the first slot of a new top-level block.
|
||||||
|
*/
|
||||||
block->level_info[i].free_ptrs_in_block=HP_PTRS_IN_NOD-1;
|
block->level_info[i].free_ptrs_in_block=HP_PTRS_IN_NOD-1;
|
||||||
((HP_PTRS**) root)[0]= block->root;
|
((HP_PTRS**) root)[0]= block->root;
|
||||||
block->root=block->level_info[i].last_blocks= root++;
|
block->root=block->level_info[i].last_blocks= root++;
|
||||||
}
|
}
|
||||||
|
/* Occupy the free slot we've found at level i */
|
||||||
block->level_info[i].last_blocks->
|
block->level_info[i].last_blocks->
|
||||||
blocks[HP_PTRS_IN_NOD - block->level_info[i].free_ptrs_in_block--]=
|
blocks[HP_PTRS_IN_NOD - block->level_info[i].free_ptrs_in_block--]=
|
||||||
(byte*) root;
|
(byte*) root;
|
||||||
|
|
||||||
|
/* Add a block subtree with each node having one left-most child */
|
||||||
for (j=i-1 ; j >0 ; j--)
|
for (j=i-1 ; j >0 ; j--)
|
||||||
{
|
{
|
||||||
block->level_info[j].last_blocks= root++;
|
block->level_info[j].last_blocks= root++;
|
||||||
block->level_info[j].last_blocks->blocks[0]=(byte*) root;
|
block->level_info[j].last_blocks->blocks[0]=(byte*) root;
|
||||||
block->level_info[j].free_ptrs_in_block=HP_PTRS_IN_NOD-1;
|
block->level_info[j].free_ptrs_in_block=HP_PTRS_IN_NOD-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
root now points to last (block->records_in_block* block->recbuffer)
|
||||||
|
allocated bytes. Use it as a leaf block.
|
||||||
|
*/
|
||||||
block->level_info[0].last_blocks= root;
|
block->level_info[0].last_blocks= root;
|
||||||
allow_break(); /* Allow SIGHUP & SIGINT */
|
allow_break(); /* Allow SIGHUP & SIGINT */
|
||||||
}
|
}
|
||||||
|
@ -97,6 +97,7 @@ void hp_clear_keys(HP_SHARE *info)
|
|||||||
VOID(hp_free_level(block,block->levels,block->root,(byte*) 0));
|
VOID(hp_free_level(block,block->levels,block->root,(byte*) 0));
|
||||||
block->levels=0;
|
block->levels=0;
|
||||||
block->last_allocated=0;
|
block->last_allocated=0;
|
||||||
|
keyinfo->hash_buckets= 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
info->index_length=0;
|
info->index_length=0;
|
||||||
|
@ -41,6 +41,13 @@ int heap_create(const char *name, uint keys, HP_KEYDEF *keydef,
|
|||||||
{
|
{
|
||||||
HP_KEYDEF *keyinfo;
|
HP_KEYDEF *keyinfo;
|
||||||
DBUG_PRINT("info",("Initializing new table"));
|
DBUG_PRINT("info",("Initializing new table"));
|
||||||
|
|
||||||
|
/*
|
||||||
|
We have to store sometimes byte* del_link in records,
|
||||||
|
so the record length should be at least sizeof(byte*)
|
||||||
|
*/
|
||||||
|
set_if_bigger(reclength, sizeof (byte*));
|
||||||
|
|
||||||
for (i= key_segs= max_length= 0, keyinfo= keydef; i < keys; i++, keyinfo++)
|
for (i= key_segs= max_length= 0, keyinfo= keydef; i < keys; i++, keyinfo++)
|
||||||
{
|
{
|
||||||
bzero((char*) &keyinfo->block,sizeof(keyinfo->block));
|
bzero((char*) &keyinfo->block,sizeof(keyinfo->block));
|
||||||
@ -116,22 +123,24 @@ int heap_create(const char *name, uint keys, HP_KEYDEF *keydef,
|
|||||||
keyseg->flag= 0;
|
keyseg->flag= 0;
|
||||||
keyseg->null_bit= 0;
|
keyseg->null_bit= 0;
|
||||||
keyseg++;
|
keyseg++;
|
||||||
|
|
||||||
init_tree(&keyinfo->rb_tree, 0, 0, sizeof(byte*),
|
init_tree(&keyinfo->rb_tree, 0, 0, sizeof(byte*),
|
||||||
(qsort_cmp2)keys_compare, 1, NULL, NULL);
|
(qsort_cmp2)keys_compare, 1, NULL, NULL);
|
||||||
keyinfo->delete_key= hp_rb_delete_key;
|
keyinfo->delete_key= hp_rb_delete_key;
|
||||||
keyinfo->write_key= hp_rb_write_key;
|
keyinfo->write_key= hp_rb_write_key;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
init_block(&keyinfo->block, sizeof(HASH_INFO), min_records,
|
init_block(&keyinfo->block, sizeof(HASH_INFO), min_records,
|
||||||
max_records);
|
max_records);
|
||||||
keyinfo->delete_key= hp_delete_key;
|
keyinfo->delete_key= hp_delete_key;
|
||||||
keyinfo->write_key= hp_write_key;
|
keyinfo->write_key= hp_write_key;
|
||||||
|
keyinfo->hash_buckets= 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
share->min_records= min_records;
|
share->min_records= min_records;
|
||||||
share->max_records= max_records;
|
share->max_records= max_records;
|
||||||
|
share->max_table_size= create_info->max_table_size;
|
||||||
share->data_length= share->index_length= 0;
|
share->data_length= share->index_length= 0;
|
||||||
share->reclength= reclength;
|
share->reclength= reclength;
|
||||||
share->blength= 1;
|
share->blength= 1;
|
||||||
|
@ -97,8 +97,8 @@ int hp_rb_delete_key(HP_INFO *info, register HP_KEYDEF *keyinfo,
|
|||||||
flag Is set if we want's to correct info->current_ptr
|
flag Is set if we want's to correct info->current_ptr
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
0 ok
|
0 Ok
|
||||||
# error number
|
other Error code
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int hp_delete_key(HP_INFO *info, register HP_KEYDEF *keyinfo,
|
int hp_delete_key(HP_INFO *info, register HP_KEYDEF *keyinfo,
|
||||||
@ -151,6 +151,8 @@ int hp_delete_key(HP_INFO *info, register HP_KEYDEF *keyinfo,
|
|||||||
pos->ptr_to_rec=empty->ptr_to_rec;
|
pos->ptr_to_rec=empty->ptr_to_rec;
|
||||||
pos->next_key=empty->next_key;
|
pos->next_key=empty->next_key;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
keyinfo->hash_buckets--;
|
||||||
|
|
||||||
if (empty == lastpos) /* deleted last hash key */
|
if (empty == lastpos) /* deleted last hash key */
|
||||||
DBUG_RETURN (0);
|
DBUG_RETURN (0);
|
||||||
@ -187,7 +189,11 @@ int hp_delete_key(HP_INFO *info, register HP_KEYDEF *keyinfo,
|
|||||||
}
|
}
|
||||||
pos3= pos; /* Link pos->next after lastpos */
|
pos3= pos; /* Link pos->next after lastpos */
|
||||||
}
|
}
|
||||||
else pos3= 0; /* Different positions merge */
|
else
|
||||||
|
{
|
||||||
|
pos3= 0; /* Different positions merge */
|
||||||
|
keyinfo->hash_buckets--;
|
||||||
|
}
|
||||||
|
|
||||||
empty[0]=lastpos[0];
|
empty[0]=lastpos[0];
|
||||||
hp_movelink(pos3, empty, pos->next_key);
|
hp_movelink(pos3, empty, pos->next_key);
|
||||||
|
@ -196,7 +196,18 @@ byte *hp_search_next(HP_INFO *info, HP_KEYDEF *keyinfo, const byte *key,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Calculate pos according to keys */
|
/*
|
||||||
|
Calculate position number for hash value.
|
||||||
|
SYNOPSIS
|
||||||
|
hp_mask()
|
||||||
|
hashnr Hash value
|
||||||
|
buffmax Value such that
|
||||||
|
2^(n-1) < maxlength <= 2^n = buffmax
|
||||||
|
maxlength
|
||||||
|
|
||||||
|
RETURN
|
||||||
|
Array index, in [0..maxlength)
|
||||||
|
*/
|
||||||
|
|
||||||
ulong hp_mask(ulong hashnr, ulong buffmax, ulong maxlength)
|
ulong hp_mask(ulong hashnr, ulong buffmax, ulong maxlength)
|
||||||
{
|
{
|
||||||
@ -205,7 +216,12 @@ ulong hp_mask(ulong hashnr, ulong buffmax, ulong maxlength)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Change link from pos to new_link */
|
/*
|
||||||
|
Change
|
||||||
|
next_link -> ... -> X -> pos
|
||||||
|
to
|
||||||
|
next_link -> ... -> X -> newlink
|
||||||
|
*/
|
||||||
|
|
||||||
void hp_movelink(HASH_INFO *pos, HASH_INFO *next_link, HASH_INFO *newlink)
|
void hp_movelink(HASH_INFO *pos, HASH_INFO *next_link, HASH_INFO *newlink)
|
||||||
{
|
{
|
||||||
|
@ -52,6 +52,7 @@ int heap_rfirst(HP_INFO *info, byte *record, int inx)
|
|||||||
my_errno=HA_ERR_END_OF_FILE;
|
my_errno=HA_ERR_END_OF_FILE;
|
||||||
DBUG_RETURN(my_errno);
|
DBUG_RETURN(my_errno);
|
||||||
}
|
}
|
||||||
|
DBUG_ASSERT(0); /* TODO fix it */
|
||||||
info->current_record=0;
|
info->current_record=0;
|
||||||
info->current_hash_ptr=0;
|
info->current_hash_ptr=0;
|
||||||
info->update=HA_STATE_PREV_FOUND;
|
info->update=HA_STATE_PREV_FOUND;
|
||||||
|
101
heap/hp_write.c
101
heap/hp_write.c
@ -36,7 +36,6 @@ int heap_write(HP_INFO *info, const byte *record)
|
|||||||
byte *pos;
|
byte *pos;
|
||||||
HP_SHARE *share=info->s;
|
HP_SHARE *share=info->s;
|
||||||
DBUG_ENTER("heap_write");
|
DBUG_ENTER("heap_write");
|
||||||
|
|
||||||
#ifndef DBUG_OFF
|
#ifndef DBUG_OFF
|
||||||
if (info->mode & O_RDONLY)
|
if (info->mode & O_RDONLY)
|
||||||
{
|
{
|
||||||
@ -144,7 +143,8 @@ static byte *next_free_record_pos(HP_SHARE *info)
|
|||||||
}
|
}
|
||||||
if (!(block_pos=(info->records % info->block.records_in_block)))
|
if (!(block_pos=(info->records % info->block.records_in_block)))
|
||||||
{
|
{
|
||||||
if (info->records > info->max_records && info->max_records)
|
if ((info->records > info->max_records && info->max_records) ||
|
||||||
|
(info->data_length + info->index_length >= info->max_table_size))
|
||||||
{
|
{
|
||||||
my_errno=HA_ERR_RECORD_FILE_FULL;
|
my_errno=HA_ERR_RECORD_FILE_FULL;
|
||||||
DBUG_RETURN(NULL);
|
DBUG_RETURN(NULL);
|
||||||
@ -160,7 +160,31 @@ static byte *next_free_record_pos(HP_SHARE *info)
|
|||||||
block_pos*info->block.recbuffer);
|
block_pos*info->block.recbuffer);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Write a hash-key to the hash-index */
|
|
||||||
|
/*
|
||||||
|
Write a hash-key to the hash-index
|
||||||
|
SYNOPSIS
|
||||||
|
info Heap table info
|
||||||
|
keyinfo Key info
|
||||||
|
record Table record to added
|
||||||
|
recpos Memory buffer where the table record will be stored if added
|
||||||
|
successfully
|
||||||
|
NOTE
|
||||||
|
Hash index uses HP_BLOCK structure as a 'growable array' of HASH_INFO
|
||||||
|
structs. Array size == number of entries in hash index.
|
||||||
|
hp_mask(hp_rec_hashnr()) maps hash entries values to hash array positions.
|
||||||
|
If there are several hash entries with the same hash array position P,
|
||||||
|
they are connected in a linked list via HASH_INFO::next_key. The first
|
||||||
|
list element is located at position P, next elements are located at
|
||||||
|
positions for which there is no record that should be located at that
|
||||||
|
position. The order of elements in the list is arbitrary.
|
||||||
|
|
||||||
|
RETURN
|
||||||
|
0 - OK
|
||||||
|
-1 - Out of memory
|
||||||
|
HA_ERR_FOUND_DUPP_KEY - Duplicate record on unique key. The record was
|
||||||
|
still added and the caller must call hp_delete_key for it.
|
||||||
|
*/
|
||||||
|
|
||||||
int hp_write_key(HP_INFO *info, HP_KEYDEF *keyinfo,
|
int hp_write_key(HP_INFO *info, HP_KEYDEF *keyinfo,
|
||||||
const byte *record, byte *recpos)
|
const byte *record, byte *recpos)
|
||||||
@ -180,19 +204,54 @@ int hp_write_key(HP_INFO *info, HP_KEYDEF *keyinfo,
|
|||||||
DBUG_RETURN(-1); /* No more memory */
|
DBUG_RETURN(-1); /* No more memory */
|
||||||
halfbuff= (long) share->blength >> 1;
|
halfbuff= (long) share->blength >> 1;
|
||||||
pos= hp_find_hash(&keyinfo->block,(first_index=share->records-halfbuff));
|
pos= hp_find_hash(&keyinfo->block,(first_index=share->records-halfbuff));
|
||||||
|
|
||||||
|
/*
|
||||||
|
We're about to add one more hash array position, with hash_mask=#records.
|
||||||
|
The number of hash positions will change and some entries might need to
|
||||||
|
be relocated to the newly added position. Those entries are currently
|
||||||
|
members of the list that starts at #first_index position (this is
|
||||||
|
guaranteed by properties of hp_mask(hp_rec_hashnr(X)) mapping function)
|
||||||
|
At #first_index position currently there may be either:
|
||||||
|
a) An entry with hashnr != first_index. We don't need to move it.
|
||||||
|
or
|
||||||
|
b) A list of items with hash_mask=first_index. The list contains entries
|
||||||
|
of 2 types:
|
||||||
|
1) entries that should be relocated to the list that starts at new
|
||||||
|
position we're adding ('uppper' list)
|
||||||
|
2) entries that should be left in the list starting at #first_index
|
||||||
|
position ('lower' list)
|
||||||
|
*/
|
||||||
if (pos != empty) /* If some records */
|
if (pos != empty) /* If some records */
|
||||||
{
|
{
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
hashnr = hp_rec_hashnr(keyinfo, pos->ptr_to_rec);
|
hashnr = hp_rec_hashnr(keyinfo, pos->ptr_to_rec);
|
||||||
if (flag == 0) /* First loop; Check if ok */
|
if (flag == 0)
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
First loop, bail out if we're dealing with case a) from above
|
||||||
|
comment
|
||||||
|
*/
|
||||||
if (hp_mask(hashnr, share->blength, share->records) != first_index)
|
if (hp_mask(hashnr, share->blength, share->records) != first_index)
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
/*
|
||||||
|
flag & LOWFIND - found a record that should be put into lower position
|
||||||
|
flag & LOWUSED - lower position occupied by the record
|
||||||
|
Same for HIGHFIND and HIGHUSED and 'upper' position
|
||||||
|
|
||||||
|
gpos - ptr to last element in lower position's list
|
||||||
|
gpos2 - ptr to last element in upper position's list
|
||||||
|
|
||||||
|
ptr_to_rec - ptr to last entry that should go into lower list.
|
||||||
|
ptr_to_rec2 - same for upper list.
|
||||||
|
*/
|
||||||
if (!(hashnr & halfbuff))
|
if (!(hashnr & halfbuff))
|
||||||
{ /* Key will not move */
|
{
|
||||||
|
/* Key should be put into 'lower' list */
|
||||||
if (!(flag & LOWFIND))
|
if (!(flag & LOWFIND))
|
||||||
{
|
{
|
||||||
|
/* key is the first element to go into lower position */
|
||||||
if (flag & HIGHFIND)
|
if (flag & HIGHFIND)
|
||||||
{
|
{
|
||||||
flag=LOWFIND | HIGHFIND;
|
flag=LOWFIND | HIGHFIND;
|
||||||
@ -203,16 +262,21 @@ int hp_write_key(HP_INFO *info, HP_KEYDEF *keyinfo,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
flag=LOWFIND | LOWUSED; /* key isn't changed */
|
/*
|
||||||
|
We can only get here at first iteration: key is at 'lower'
|
||||||
|
position pos and should be left here.
|
||||||
|
*/
|
||||||
|
flag=LOWFIND | LOWUSED;
|
||||||
gpos=pos;
|
gpos=pos;
|
||||||
ptr_to_rec=pos->ptr_to_rec;
|
ptr_to_rec=pos->ptr_to_rec;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
/* Already have another key for lower position */
|
||||||
if (!(flag & LOWUSED))
|
if (!(flag & LOWUSED))
|
||||||
{
|
{
|
||||||
/* Change link of previous LOW-key */
|
/* Change link of previous lower-list key */
|
||||||
gpos->ptr_to_rec=ptr_to_rec;
|
gpos->ptr_to_rec=ptr_to_rec;
|
||||||
gpos->next_key=pos;
|
gpos->next_key=pos;
|
||||||
flag= (flag & HIGHFIND) | (LOWFIND | LOWUSED);
|
flag= (flag & HIGHFIND) | (LOWFIND | LOWUSED);
|
||||||
@ -222,19 +286,21 @@ int hp_write_key(HP_INFO *info, HP_KEYDEF *keyinfo,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{ /* key will be moved */
|
{
|
||||||
|
/* key will be put into 'higher' list */
|
||||||
if (!(flag & HIGHFIND))
|
if (!(flag & HIGHFIND))
|
||||||
{
|
{
|
||||||
flag= (flag & LOWFIND) | HIGHFIND;
|
flag= (flag & LOWFIND) | HIGHFIND;
|
||||||
/* key shall be moved to the last (empty) position */
|
/* key shall be moved to the last (empty) position */
|
||||||
gpos2 = empty; empty=pos;
|
gpos2= empty;
|
||||||
|
empty= pos;
|
||||||
ptr_to_rec2=pos->ptr_to_rec;
|
ptr_to_rec2=pos->ptr_to_rec;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!(flag & HIGHUSED))
|
if (!(flag & HIGHUSED))
|
||||||
{
|
{
|
||||||
/* Change link of previous hash-key and save */
|
/* Change link of previous upper-list key and save */
|
||||||
gpos2->ptr_to_rec=ptr_to_rec2;
|
gpos2->ptr_to_rec=ptr_to_rec2;
|
||||||
gpos2->next_key=pos;
|
gpos2->next_key=pos;
|
||||||
flag= (flag & LOWFIND) | (HIGHFIND | HIGHUSED);
|
flag= (flag & LOWFIND) | (HIGHFIND | HIGHUSED);
|
||||||
@ -245,6 +311,15 @@ int hp_write_key(HP_INFO *info, HP_KEYDEF *keyinfo,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
while ((pos=pos->next_key));
|
while ((pos=pos->next_key));
|
||||||
|
|
||||||
|
if ((flag & (LOWFIND | HIGHFIND)) == (LOWFIND | HIGHFIND))
|
||||||
|
{
|
||||||
|
/*
|
||||||
|
If both 'higher' and 'lower' list have at least one element, now
|
||||||
|
there are two hash buckets instead of one.
|
||||||
|
*/
|
||||||
|
keyinfo->hash_buckets++;
|
||||||
|
}
|
||||||
|
|
||||||
if ((flag & (LOWFIND | LOWUSED)) == LOWFIND)
|
if ((flag & (LOWFIND | LOWUSED)) == LOWFIND)
|
||||||
{
|
{
|
||||||
@ -265,6 +340,7 @@ int hp_write_key(HP_INFO *info, HP_KEYDEF *keyinfo,
|
|||||||
{
|
{
|
||||||
pos->ptr_to_rec=recpos;
|
pos->ptr_to_rec=recpos;
|
||||||
pos->next_key=0;
|
pos->next_key=0;
|
||||||
|
keyinfo->hash_buckets++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -280,6 +356,7 @@ int hp_write_key(HP_INFO *info, HP_KEYDEF *keyinfo,
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
keyinfo->hash_buckets++;
|
||||||
pos->ptr_to_rec=recpos;
|
pos->ptr_to_rec=recpos;
|
||||||
pos->next_key=0;
|
pos->next_key=0;
|
||||||
hp_movelink(pos, gpos, empty);
|
hp_movelink(pos, gpos, empty);
|
||||||
|
@ -31,18 +31,25 @@ functions */
|
|||||||
|
|
||||||
#define HAVE_SMEM 1
|
#define HAVE_SMEM 1
|
||||||
|
|
||||||
#if defined(__NT__)
|
#if defined(_WIN64) || defined(WIN64)
|
||||||
#define SYSTEM_TYPE "NT"
|
#define SYSTEM_TYPE "Win64"
|
||||||
#elif defined(__WIN2000__)
|
#elif defined(_WIN32) || defined(WIN32)
|
||||||
#define SYSTEM_TYPE "WIN2000"
|
#define SYSTEM_TYPE "Win32"
|
||||||
#else
|
#else
|
||||||
#define SYSTEM_TYPE "Win95/Win98"
|
#define SYSTEM_TYPE "Windows"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_WIN64) || defined(WIN64)
|
#if defined(_M_IA64)
|
||||||
#define MACHINE_TYPE "ia64" /* Define to machine type name */
|
#define MACHINE_TYPE "ia64"
|
||||||
|
#elif defined(_M_IX86)
|
||||||
|
#define MACHINE_TYPE "ia32"
|
||||||
|
#elif defined(_M_ALPHA)
|
||||||
|
#define MACHINE_TYPE "axp"
|
||||||
#else
|
#else
|
||||||
#define MACHINE_TYPE "i32" /* Define to machine type name */
|
#define MACHINE_TYPE "unknown" /* Define to machine type name */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if !(defined(_WIN64) || defined(WIN64))
|
||||||
#ifndef _WIN32
|
#ifndef _WIN32
|
||||||
#define _WIN32 /* Compatible with old source */
|
#define _WIN32 /* Compatible with old source */
|
||||||
#endif
|
#endif
|
||||||
@ -175,6 +182,8 @@ typedef uint rf_SetTimer;
|
|||||||
#define sigset(A,B) signal((A),(B))
|
#define sigset(A,B) signal((A),(B))
|
||||||
#define finite(A) _finite(A)
|
#define finite(A) _finite(A)
|
||||||
#define sleep(A) Sleep((A)*1000)
|
#define sleep(A) Sleep((A)*1000)
|
||||||
|
#define popen(A) popen(A,B) _popen((A),(B))
|
||||||
|
#define pclose(A) _pclose(A)
|
||||||
|
|
||||||
#ifndef __BORLANDC__
|
#ifndef __BORLANDC__
|
||||||
#define access(A,B) _access(A,B)
|
#define access(A,B) _access(A,B)
|
||||||
@ -393,4 +402,5 @@ inline double ulonglong2double(ulonglong value)
|
|||||||
#define HAVE_CHARSET_ucs2 1
|
#define HAVE_CHARSET_ucs2 1
|
||||||
#define HAVE_CHARSET_ujis 1
|
#define HAVE_CHARSET_ujis 1
|
||||||
#define HAVE_CHARSET_utf8 1
|
#define HAVE_CHARSET_utf8 1
|
||||||
|
#define HAVE_UCA_COLLATIONS 1
|
||||||
|
|
||||||
|
@ -90,3 +90,4 @@ extern const char *client_errors[]; /* Error messages */
|
|||||||
#define CR_SECURE_AUTH 2049
|
#define CR_SECURE_AUTH 2049
|
||||||
#define CR_FETCH_CANCELED 2050
|
#define CR_FETCH_CANCELED 2050
|
||||||
#define CR_NO_DATA 2051
|
#define CR_NO_DATA 2051
|
||||||
|
#define CR_NO_STMT_METADATA 2052
|
||||||
|
@ -62,7 +62,7 @@ void ft_free_stopwords(void);
|
|||||||
#define FT_SORTED 2
|
#define FT_SORTED 2
|
||||||
#define FT_EXPAND 4 /* query expansion */
|
#define FT_EXPAND 4 /* query expansion */
|
||||||
|
|
||||||
FT_INFO *ft_init_search(uint,void *, uint, byte *, uint, byte *);
|
FT_INFO *ft_init_search(uint,void *, uint, byte *, uint,CHARSET_INFO *, byte *);
|
||||||
my_bool ft_boolean_check_syntax_string(const byte *);
|
my_bool ft_boolean_check_syntax_string(const byte *);
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -47,7 +47,7 @@ my_bool _hash_init(HASH *hash, CHARSET_INFO *charset,
|
|||||||
uint key_length, hash_get_key get_key,
|
uint key_length, hash_get_key get_key,
|
||||||
void (*free_element)(void*), uint flags CALLER_INFO_PROTO);
|
void (*free_element)(void*), uint flags CALLER_INFO_PROTO);
|
||||||
void hash_free(HASH *tree);
|
void hash_free(HASH *tree);
|
||||||
void hash_reset(HASH *hash);
|
void my_hash_reset(HASH *hash);
|
||||||
byte *hash_element(HASH *hash,uint idx);
|
byte *hash_element(HASH *hash,uint idx);
|
||||||
gptr hash_search(HASH *info,const byte *key,uint length);
|
gptr hash_search(HASH *info,const byte *key,uint length);
|
||||||
gptr hash_next(HASH *info,const byte *key,uint length);
|
gptr hash_next(HASH *info,const byte *key,uint length);
|
||||||
|
@ -63,18 +63,48 @@ typedef struct st_heap_ptrs
|
|||||||
|
|
||||||
struct st_level_info
|
struct st_level_info
|
||||||
{
|
{
|
||||||
uint free_ptrs_in_block,records_under_level;
|
/* Number of unused slots in *last_blocks HP_PTRS block (0 for 0th level) */
|
||||||
HP_PTRS *last_blocks; /* pointers to HP_PTRS or records */
|
uint free_ptrs_in_block;
|
||||||
|
|
||||||
|
/*
|
||||||
|
Maximum number of records that can be 'contained' inside of each element
|
||||||
|
of last_blocks array. For level 0 - 1, for level 1 - HP_PTRS_IN_NOD, for
|
||||||
|
level 2 - HP_PTRS_IN_NOD^2 and so forth.
|
||||||
|
*/
|
||||||
|
uint records_under_level;
|
||||||
|
|
||||||
|
/*
|
||||||
|
Ptr to last allocated HP_PTRS (or records buffer for level 0) on this
|
||||||
|
level.
|
||||||
|
*/
|
||||||
|
HP_PTRS *last_blocks;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct st_heap_block /* The data is saved in blocks */
|
|
||||||
|
/*
|
||||||
|
Heap table records and hash index entries are stored in HP_BLOCKs.
|
||||||
|
HP_BLOCK is used as a 'growable array' of fixed-size records. Size of record
|
||||||
|
is recbuffer bytes.
|
||||||
|
The internal representation is as follows:
|
||||||
|
HP_BLOCK is a hierarchical structure of 'blocks'.
|
||||||
|
A block at level 0 is an array records_in_block records.
|
||||||
|
A block at higher level is an HP_PTRS structure with pointers to blocks at
|
||||||
|
lower levels.
|
||||||
|
At the highest level there is one top block. It is stored in HP_BLOCK::root.
|
||||||
|
|
||||||
|
See hp_find_block for a description of how record pointer is obtained from
|
||||||
|
its index.
|
||||||
|
See hp_get_new_block
|
||||||
|
*/
|
||||||
|
|
||||||
|
typedef struct st_heap_block
|
||||||
{
|
{
|
||||||
HP_PTRS *root;
|
HP_PTRS *root; /* Top-level block */
|
||||||
struct st_level_info level_info[HP_MAX_LEVELS+1];
|
struct st_level_info level_info[HP_MAX_LEVELS+1];
|
||||||
uint levels;
|
uint levels; /* number of used levels */
|
||||||
uint records_in_block; /* Records in a heap-block */
|
uint records_in_block; /* Records in one heap-block */
|
||||||
uint recbuffer; /* Length of one saved record */
|
uint recbuffer; /* Length of one saved record */
|
||||||
ulong last_allocated; /* Blocks allocated, used by keys */
|
ulong last_allocated; /* number of records there is allocated space for */
|
||||||
} HP_BLOCK;
|
} HP_BLOCK;
|
||||||
|
|
||||||
struct st_heap_info; /* For referense */
|
struct st_heap_info; /* For referense */
|
||||||
@ -87,11 +117,16 @@ typedef struct st_hp_keydef /* Key definition with open */
|
|||||||
uint8 algorithm; /* HASH / BTREE */
|
uint8 algorithm; /* HASH / BTREE */
|
||||||
HA_KEYSEG *seg;
|
HA_KEYSEG *seg;
|
||||||
HP_BLOCK block; /* Where keys are saved */
|
HP_BLOCK block; /* Where keys are saved */
|
||||||
|
/*
|
||||||
|
Number of buckets used in hash table. Used only to provide
|
||||||
|
#records estimates for heap key scans.
|
||||||
|
*/
|
||||||
|
ha_rows hash_buckets;
|
||||||
TREE rb_tree;
|
TREE rb_tree;
|
||||||
int (*write_key)(struct st_heap_info *info, struct st_hp_keydef *keyinfo,
|
int (*write_key)(struct st_heap_info *info, struct st_hp_keydef *keyinfo,
|
||||||
const byte *record, byte *recpos);
|
const byte *record, byte *recpos);
|
||||||
int (*delete_key)(struct st_heap_info *info, struct st_hp_keydef *keyinfo,
|
int (*delete_key)(struct st_heap_info *info, struct st_hp_keydef *keyinfo,
|
||||||
const byte *record, byte *recpos, int flag);
|
const byte *record, byte *recpos, int flag);
|
||||||
uint (*get_key_length)(struct st_hp_keydef *keydef, const byte *key);
|
uint (*get_key_length)(struct st_hp_keydef *keydef, const byte *key);
|
||||||
} HP_KEYDEF;
|
} HP_KEYDEF;
|
||||||
|
|
||||||
@ -100,9 +135,9 @@ typedef struct st_heap_share
|
|||||||
HP_BLOCK block;
|
HP_BLOCK block;
|
||||||
HP_KEYDEF *keydef;
|
HP_KEYDEF *keydef;
|
||||||
ulong min_records,max_records; /* Params to open */
|
ulong min_records,max_records; /* Params to open */
|
||||||
ulong data_length,index_length;
|
ulong data_length,index_length,max_table_size;
|
||||||
uint records; /* records */
|
uint records; /* records */
|
||||||
uint blength;
|
uint blength; /* records rounded up to 2^n */
|
||||||
uint deleted; /* Deleted records in database */
|
uint deleted; /* Deleted records in database */
|
||||||
uint reclength; /* Length of one record */
|
uint reclength; /* Length of one record */
|
||||||
uint changed;
|
uint changed;
|
||||||
@ -150,6 +185,7 @@ typedef struct st_heap_create_info
|
|||||||
{
|
{
|
||||||
uint auto_key;
|
uint auto_key;
|
||||||
uint auto_key_type;
|
uint auto_key_type;
|
||||||
|
ulong max_table_size;
|
||||||
ulonglong auto_increment;
|
ulonglong auto_increment;
|
||||||
} HP_CREATE_INFO;
|
} HP_CREATE_INFO;
|
||||||
|
|
||||||
|
@ -2,5 +2,6 @@
|
|||||||
#undef printf
|
#undef printf
|
||||||
#undef puts
|
#undef puts
|
||||||
#undef fputs
|
#undef fputs
|
||||||
|
#undef fputc
|
||||||
#undef putchar
|
#undef putchar
|
||||||
#endif
|
#endif
|
||||||
|
@ -4,4 +4,6 @@
|
|||||||
#define printf consoleprintf
|
#define printf consoleprintf
|
||||||
#define puts(s) consoleprintf("%s\n",s)
|
#define puts(s) consoleprintf("%s\n",s)
|
||||||
#define fputs(s,f) puts(s)
|
#define fputs(s,f) puts(s)
|
||||||
|
#define fputc(s,f) consoleprintf("%c", s)
|
||||||
|
#define putchar(s) consoleprintf("%c", s)
|
||||||
#endif
|
#endif
|
||||||
|
@ -88,12 +88,13 @@ typedef struct st_key_cache
|
|||||||
ulong param_division_limit; /* min. percentage of warm blocks */
|
ulong param_division_limit; /* min. percentage of warm blocks */
|
||||||
ulong param_age_threshold; /* determines when hot block is downgraded */
|
ulong param_age_threshold; /* determines when hot block is downgraded */
|
||||||
|
|
||||||
/* Statistics variables */
|
/* Statistics variables. These are reset in reset_key_cache_counters(). */
|
||||||
ulong global_blocks_changed; /* number of currently dirty blocks */
|
ulong global_blocks_changed; /* number of currently dirty blocks */
|
||||||
ulong global_cache_w_requests;/* number of write requests (write hits) */
|
ulong global_cache_w_requests;/* number of write requests (write hits) */
|
||||||
ulong global_cache_write; /* number of writes from the cache to files */
|
ulong global_cache_write; /* number of writes from the cache to files */
|
||||||
ulong global_cache_r_requests;/* number of read requests (read hits) */
|
ulong global_cache_r_requests;/* number of read requests (read hits) */
|
||||||
ulong global_cache_read; /* number of reads from files to the cache */
|
ulong global_cache_read; /* number of reads from files to the cache */
|
||||||
|
|
||||||
int blocks; /* max number of blocks in the cache */
|
int blocks; /* max number of blocks in the cache */
|
||||||
my_bool in_init; /* Set to 1 in MySQL during init/resize */
|
my_bool in_init; /* Set to 1 in MySQL during init/resize */
|
||||||
} KEY_CACHE;
|
} KEY_CACHE;
|
||||||
@ -132,5 +133,7 @@ extern my_bool multi_key_cache_set(const byte *key, uint length,
|
|||||||
KEY_CACHE *key_cache);
|
KEY_CACHE *key_cache);
|
||||||
extern void multi_key_cache_change(KEY_CACHE *old_data,
|
extern void multi_key_cache_change(KEY_CACHE *old_data,
|
||||||
KEY_CACHE *new_data);
|
KEY_CACHE *new_data);
|
||||||
|
extern int reset_key_cache_counters(const char *name,
|
||||||
|
KEY_CACHE *key_cache);
|
||||||
C_MODE_END
|
C_MODE_END
|
||||||
#endif /* _keycache_h */
|
#endif /* _keycache_h */
|
||||||
|
@ -63,7 +63,7 @@ typedef struct unicase_info_st
|
|||||||
#define MY_CS_UNICODE 128 /* is a charset is full unicode */
|
#define MY_CS_UNICODE 128 /* is a charset is full unicode */
|
||||||
#define MY_CS_READY 256 /* if a charset is initialized */
|
#define MY_CS_READY 256 /* if a charset is initialized */
|
||||||
#define MY_CS_AVAILABLE 512 /* If either compiled-in or loaded*/
|
#define MY_CS_AVAILABLE 512 /* If either compiled-in or loaded*/
|
||||||
|
#define MY_CS_CSSORT 1024 /* if case sensitive sort order */
|
||||||
#define MY_CHARSET_UNDEFINED 0
|
#define MY_CHARSET_UNDEFINED 0
|
||||||
|
|
||||||
|
|
||||||
|
@ -215,7 +215,7 @@ extern char *strstr(const char *, const char *);
|
|||||||
extern int is_prefix(const char *, const char *);
|
extern int is_prefix(const char *, const char *);
|
||||||
|
|
||||||
/* Conversion routines */
|
/* Conversion routines */
|
||||||
double my_strtod(const char *str, char **end);
|
double my_strtod(const char *str, char **end, int *error);
|
||||||
double my_atof(const char *nptr);
|
double my_atof(const char *nptr);
|
||||||
|
|
||||||
extern char *llstr(longlong value,char *buff);
|
extern char *llstr(longlong value,char *buff);
|
||||||
|
@ -291,6 +291,7 @@ enum ha_base_keytype {
|
|||||||
#define HA_ERR_NO_SUCH_TABLE 155 /* The table does not exist in engine */
|
#define HA_ERR_NO_SUCH_TABLE 155 /* The table does not exist in engine */
|
||||||
#define HA_ERR_TABLE_EXIST 156 /* The table existed in storage engine */
|
#define HA_ERR_TABLE_EXIST 156 /* The table existed in storage engine */
|
||||||
#define HA_ERR_NO_CONNECTION 157 /* Could not connect to storage engine */
|
#define HA_ERR_NO_CONNECTION 157 /* Could not connect to storage engine */
|
||||||
|
#define HA_ERR_NULL_IN_SPATIAL 158 /* NULLs are not supported in spatial index */
|
||||||
|
|
||||||
/* Other constants */
|
/* Other constants */
|
||||||
|
|
||||||
@ -339,6 +340,7 @@ enum ha_base_keytype {
|
|||||||
#define HA_STATE_BUFF_SAVED 512 /* If current keybuff is info->buff */
|
#define HA_STATE_BUFF_SAVED 512 /* If current keybuff is info->buff */
|
||||||
#define HA_STATE_ROW_CHANGED 1024 /* To invalide ROW cache */
|
#define HA_STATE_ROW_CHANGED 1024 /* To invalide ROW cache */
|
||||||
#define HA_STATE_EXTEND_BLOCK 2048
|
#define HA_STATE_EXTEND_BLOCK 2048
|
||||||
|
#define HA_STATE_RNEXT_SAME 4096 /* rnext_same was called */
|
||||||
|
|
||||||
enum en_fieldtype {
|
enum en_fieldtype {
|
||||||
FIELD_LAST=-1,FIELD_NORMAL,FIELD_SKIP_ENDSPACE,FIELD_SKIP_PRESPACE,
|
FIELD_LAST=-1,FIELD_NORMAL,FIELD_SKIP_ENDSPACE,FIELD_SKIP_PRESPACE,
|
||||||
|
@ -38,6 +38,7 @@ extern void _db_pargs_(uint _line_,const char *keyword);
|
|||||||
extern void _db_doprnt_ _VARARGS((const char *format,...));
|
extern void _db_doprnt_ _VARARGS((const char *format,...));
|
||||||
extern void _db_dump_(uint _line_,const char *keyword,const char *memory,
|
extern void _db_dump_(uint _line_,const char *keyword,const char *memory,
|
||||||
uint length);
|
uint length);
|
||||||
|
extern void _db_output_();
|
||||||
extern void _db_lock_file();
|
extern void _db_lock_file();
|
||||||
extern void _db_unlock_file();
|
extern void _db_unlock_file();
|
||||||
|
|
||||||
@ -66,6 +67,7 @@ extern void _db_unlock_file();
|
|||||||
#define DEBUGGER_ON _no_db_=0
|
#define DEBUGGER_ON _no_db_=0
|
||||||
#define DBUG_LOCK_FILE { _db_lock_file(); }
|
#define DBUG_LOCK_FILE { _db_lock_file(); }
|
||||||
#define DBUG_UNLOCK_FILE { _db_unlock_file(); }
|
#define DBUG_UNLOCK_FILE { _db_unlock_file(); }
|
||||||
|
#define DBUG_OUTPUT(A) { _db_output_(A); }
|
||||||
#define DBUG_ASSERT(A) assert(A)
|
#define DBUG_ASSERT(A) assert(A)
|
||||||
#else /* No debugger */
|
#else /* No debugger */
|
||||||
|
|
||||||
@ -86,6 +88,7 @@ extern void _db_unlock_file();
|
|||||||
#define DEBUGGER_ON
|
#define DEBUGGER_ON
|
||||||
#define DBUG_LOCK_FILE
|
#define DBUG_LOCK_FILE
|
||||||
#define DBUG_UNLOCK_FILE
|
#define DBUG_UNLOCK_FILE
|
||||||
|
#define DBUG_OUTPUT(A)
|
||||||
#define DBUG_ASSERT(A) {}
|
#define DBUG_ASSERT(A) {}
|
||||||
#endif
|
#endif
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
@ -135,7 +135,13 @@
|
|||||||
#ifdef HAVE_UNIXWARE7_THREADS
|
#ifdef HAVE_UNIXWARE7_THREADS
|
||||||
#include <thread.h>
|
#include <thread.h>
|
||||||
#else
|
#else
|
||||||
|
#if defined(HPUX10) || defined(HPUX11)
|
||||||
|
C_MODE_START /* HPUX needs this, signal.h bug */
|
||||||
|
#include <pthread.h>
|
||||||
|
C_MODE_END
|
||||||
|
#else
|
||||||
#include <pthread.h> /* AIX must have this included first */
|
#include <pthread.h> /* AIX must have this included first */
|
||||||
|
#endif
|
||||||
#endif /* HAVE_UNIXWARE7_THREADS */
|
#endif /* HAVE_UNIXWARE7_THREADS */
|
||||||
#endif /* HAVE_mit_thread */
|
#endif /* HAVE_mit_thread */
|
||||||
#if !defined(SCO) && !defined(_REENTRANT)
|
#if !defined(SCO) && !defined(_REENTRANT)
|
||||||
@ -194,10 +200,10 @@ C_MODE_END
|
|||||||
/* Fix problem when linking c++ programs with gcc 3.x */
|
/* Fix problem when linking c++ programs with gcc 3.x */
|
||||||
#ifdef DEFINE_CXA_PURE_VIRTUAL
|
#ifdef DEFINE_CXA_PURE_VIRTUAL
|
||||||
#define FIX_GCC_LINKING_PROBLEM \
|
#define FIX_GCC_LINKING_PROBLEM \
|
||||||
extern "C" { int __cxa_pure_virtual() {\
|
C_MODE_START int __cxa_pure_virtual() {\
|
||||||
DBUG_ASSERT("Pure virtual method called." == "Aborted");\
|
DBUG_ASSERT("Pure virtual method called." == "Aborted");\
|
||||||
return 0;\
|
return 0;\
|
||||||
} }
|
} C_MODE_END
|
||||||
#else
|
#else
|
||||||
#define FIX_GCC_LINKING_PROBLEM
|
#define FIX_GCC_LINKING_PROBLEM
|
||||||
#endif
|
#endif
|
||||||
@ -370,6 +376,12 @@ int __void__;
|
|||||||
#define LINT_INIT(var)
|
#define LINT_INIT(var)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(_lint) || defined(FORCE_INIT_OF_VARS) || defined(HAVE_purify)
|
||||||
|
#define PURIFY_OR_LINT_INIT(var) var=0
|
||||||
|
#else
|
||||||
|
#define PURIFY_OR_LINT_INIT(var)
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Define some useful general macros */
|
/* Define some useful general macros */
|
||||||
#if defined(__cplusplus) && defined(__GNUC__)
|
#if defined(__cplusplus) && defined(__GNUC__)
|
||||||
#define max(a, b) ((a) >? (b))
|
#define max(a, b) ((a) >? (b))
|
||||||
@ -524,7 +536,11 @@ typedef SOCKET_SIZE_TYPE size_socket;
|
|||||||
#define FN_LEN 256 /* Max file name len */
|
#define FN_LEN 256 /* Max file name len */
|
||||||
#define FN_HEADLEN 253 /* Max length of filepart of file name */
|
#define FN_HEADLEN 253 /* Max length of filepart of file name */
|
||||||
#define FN_EXTLEN 20 /* Max length of extension (part of FN_LEN) */
|
#define FN_EXTLEN 20 /* Max length of extension (part of FN_LEN) */
|
||||||
|
#ifdef PATH_MAX
|
||||||
|
#define FN_REFLEN PATH_MAX/* Max length of full path-name */
|
||||||
|
#else
|
||||||
#define FN_REFLEN 512 /* Max length of full path-name */
|
#define FN_REFLEN 512 /* Max length of full path-name */
|
||||||
|
#endif
|
||||||
#define FN_EXTCHAR '.'
|
#define FN_EXTCHAR '.'
|
||||||
#define FN_HOMELIB '~' /* ~/ is used as abbrev for home dir */
|
#define FN_HOMELIB '~' /* ~/ is used as abbrev for home dir */
|
||||||
#define FN_CURLIB '.' /* ./ is used as abbrev for current dir */
|
#define FN_CURLIB '.' /* ./ is used as abbrev for current dir */
|
||||||
@ -1066,7 +1082,7 @@ do { doubleget_union _tmp; \
|
|||||||
#define float4store(V,M) memcpy_fixed((byte*) V,(byte*) (&M),sizeof(float))
|
#define float4store(V,M) memcpy_fixed((byte*) V,(byte*) (&M),sizeof(float))
|
||||||
|
|
||||||
#if defined(__FLOAT_WORD_ORDER) && (__FLOAT_WORD_ORDER == __BIG_ENDIAN)
|
#if defined(__FLOAT_WORD_ORDER) && (__FLOAT_WORD_ORDER == __BIG_ENDIAN)
|
||||||
#define doublestore(T,V) do { *(T)= ((byte *) &V)[4];\
|
#define doublestore(T,V) do { *(((char*)T)+0)=(char) ((byte *) &V)[4];\
|
||||||
*(((char*)T)+1)=(char) ((byte *) &V)[5];\
|
*(((char*)T)+1)=(char) ((byte *) &V)[5];\
|
||||||
*(((char*)T)+2)=(char) ((byte *) &V)[6];\
|
*(((char*)T)+2)=(char) ((byte *) &V)[6];\
|
||||||
*(((char*)T)+3)=(char) ((byte *) &V)[7];\
|
*(((char*)T)+3)=(char) ((byte *) &V)[7];\
|
||||||
|
@ -33,8 +33,8 @@ extern LIST *list_delete(LIST *root,LIST *element);
|
|||||||
extern LIST *list_cons(void *data,LIST *root);
|
extern LIST *list_cons(void *data,LIST *root);
|
||||||
extern LIST *list_reverse(LIST *root);
|
extern LIST *list_reverse(LIST *root);
|
||||||
extern void list_free(LIST *root,unsigned int free_data);
|
extern void list_free(LIST *root,unsigned int free_data);
|
||||||
extern unsigned int list_length(LIST *list);
|
extern unsigned int list_length(LIST *);
|
||||||
extern int list_walk(LIST *list,list_walk_action action,gptr argument);
|
extern int list_walk(LIST *,list_walk_action action,gptr argument);
|
||||||
|
|
||||||
#define rest(a) ((a)->next)
|
#define rest(a) ((a)->next)
|
||||||
#define list_push(a,b) (a)=list_cons((b),(a))
|
#define list_push(a,b) (a)=list_cons((b),(a))
|
||||||
|
@ -631,15 +631,17 @@ extern int pthread_dummy(int);
|
|||||||
/* All thread specific variables are in the following struct */
|
/* All thread specific variables are in the following struct */
|
||||||
|
|
||||||
#define THREAD_NAME_SIZE 10
|
#define THREAD_NAME_SIZE 10
|
||||||
|
#ifndef DEFAULT_THREAD_STACK
|
||||||
#if defined(__ia64__)
|
#if defined(__ia64__)
|
||||||
/*
|
/*
|
||||||
MySQL can survive with 32K, but some glibc libraries require > 128K stack
|
MySQL can survive with 32K, but some glibc libraries require > 128K stack
|
||||||
To resolve hostnames
|
To resolve hostnames
|
||||||
*/
|
*/
|
||||||
#define DEFAULT_THREAD_STACK (192*1024L)
|
#define DEFAULT_THREAD_STACK (256*1024L)
|
||||||
#else
|
#else
|
||||||
#define DEFAULT_THREAD_STACK (192*1024)
|
#define DEFAULT_THREAD_STACK (192*1024)
|
||||||
#endif
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
struct st_my_thread_var
|
struct st_my_thread_var
|
||||||
{
|
{
|
||||||
|
@ -214,6 +214,7 @@ extern ulong my_cache_w_requests, my_cache_write, my_cache_r_requests,
|
|||||||
my_cache_read;
|
my_cache_read;
|
||||||
extern ulong my_blocks_used, my_blocks_changed;
|
extern ulong my_blocks_used, my_blocks_changed;
|
||||||
extern ulong my_file_opened,my_stream_opened, my_tmp_file_created;
|
extern ulong my_file_opened,my_stream_opened, my_tmp_file_created;
|
||||||
|
extern uint mysys_usage_id;
|
||||||
extern my_bool my_init_done;
|
extern my_bool my_init_done;
|
||||||
|
|
||||||
/* Point to current my_message() */
|
/* Point to current my_message() */
|
||||||
@ -657,6 +658,7 @@ extern int init_io_cache(IO_CACHE *info,File file,uint cachesize,
|
|||||||
extern my_bool reinit_io_cache(IO_CACHE *info,enum cache_type type,
|
extern my_bool reinit_io_cache(IO_CACHE *info,enum cache_type type,
|
||||||
my_off_t seek_offset,pbool use_async_io,
|
my_off_t seek_offset,pbool use_async_io,
|
||||||
pbool clear_cache);
|
pbool clear_cache);
|
||||||
|
extern void setup_io_cache(IO_CACHE* info);
|
||||||
extern int _my_b_read(IO_CACHE *info,byte *Buffer,uint Count);
|
extern int _my_b_read(IO_CACHE *info,byte *Buffer,uint Count);
|
||||||
#ifdef THREAD
|
#ifdef THREAD
|
||||||
extern int _my_b_read_r(IO_CACHE *info,byte *Buffer,uint Count);
|
extern int _my_b_read_r(IO_CACHE *info,byte *Buffer,uint Count);
|
||||||
@ -737,6 +739,8 @@ extern void reset_root_defaults(MEM_ROOT *mem_root, uint block_size,
|
|||||||
extern char *strdup_root(MEM_ROOT *root,const char *str);
|
extern char *strdup_root(MEM_ROOT *root,const char *str);
|
||||||
extern char *strmake_root(MEM_ROOT *root,const char *str,uint len);
|
extern char *strmake_root(MEM_ROOT *root,const char *str,uint len);
|
||||||
extern char *memdup_root(MEM_ROOT *root,const char *str,uint len);
|
extern char *memdup_root(MEM_ROOT *root,const char *str,uint len);
|
||||||
|
extern void get_defaults_files(int argc, char **argv,
|
||||||
|
char **defaults, char **extra_defaults);
|
||||||
extern int load_defaults(const char *conf_file, const char **groups,
|
extern int load_defaults(const char *conf_file, const char **groups,
|
||||||
int *argc, char ***argv);
|
int *argc, char ***argv);
|
||||||
extern void free_defaults(char **argv);
|
extern void free_defaults(char **argv);
|
||||||
|
@ -58,14 +58,15 @@ void init_time(void);
|
|||||||
my_time_t
|
my_time_t
|
||||||
my_system_gmt_sec(const MYSQL_TIME *t, long *my_timezone, bool *in_dst_time_gap);
|
my_system_gmt_sec(const MYSQL_TIME *t, long *my_timezone, bool *in_dst_time_gap);
|
||||||
|
|
||||||
void set_zero_time(MYSQL_TIME *tm);
|
void set_zero_time(MYSQL_TIME *tm, enum enum_mysql_timestamp_type time_type);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Required buffer length for my_time_to_str, my_date_to_str,
|
Required buffer length for my_time_to_str, my_date_to_str,
|
||||||
my_datetime_to_str and TIME_to_string functions. Note, that the
|
my_datetime_to_str and TIME_to_string functions. Note, that the
|
||||||
caller is still responsible to check that given TIME structure
|
caller is still responsible to check that given TIME structure
|
||||||
has values in valid ranges, otherwise size of the buffer could
|
has values in valid ranges, otherwise size of the buffer could
|
||||||
be not enough.
|
be not enough. We also rely on the fact that even wrong values
|
||||||
|
sent using binary protocol fit in this buffer.
|
||||||
*/
|
*/
|
||||||
#define MAX_DATE_STRING_REP_LENGTH 30
|
#define MAX_DATE_STRING_REP_LENGTH 30
|
||||||
|
|
||||||
|
@ -334,6 +334,17 @@ typedef struct st_mysql_parameters
|
|||||||
*/
|
*/
|
||||||
int STDCALL mysql_server_init(int argc, char **argv, char **groups);
|
int STDCALL mysql_server_init(int argc, char **argv, char **groups);
|
||||||
void STDCALL mysql_server_end(void);
|
void STDCALL mysql_server_end(void);
|
||||||
|
/*
|
||||||
|
mysql_server_init/end need to be called when using libmysqld or
|
||||||
|
libmysqlclient (exactly, mysql_server_init() is called by mysql_init() so
|
||||||
|
you don't need to call it explicitely; but you need to call
|
||||||
|
mysql_server_end() to free memory). The names are a bit misleading
|
||||||
|
(mysql_SERVER* to be used when using libmysqlCLIENT). So we add more general
|
||||||
|
names which suit well whether you're using libmysqld or libmysqlclient. We
|
||||||
|
intend to promote these aliases over the mysql_server* ones.
|
||||||
|
*/
|
||||||
|
#define mysql_library_init mysql_server_init
|
||||||
|
#define mysql_library_end mysql_server_end
|
||||||
|
|
||||||
MYSQL_PARAMETERS *STDCALL mysql_get_parameters(void);
|
MYSQL_PARAMETERS *STDCALL mysql_get_parameters(void);
|
||||||
|
|
||||||
@ -490,6 +501,8 @@ MYSQL_RES * STDCALL mysql_list_fields(MYSQL *mysql, const char *table,
|
|||||||
const char *wild);
|
const char *wild);
|
||||||
unsigned long STDCALL mysql_escape_string(char *to,const char *from,
|
unsigned long STDCALL mysql_escape_string(char *to,const char *from,
|
||||||
unsigned long from_length);
|
unsigned long from_length);
|
||||||
|
unsigned long STDCALL mysql_hex_string(char *to,const char *from,
|
||||||
|
unsigned long from_length);
|
||||||
unsigned long STDCALL mysql_real_escape_string(MYSQL *mysql,
|
unsigned long STDCALL mysql_real_escape_string(MYSQL *mysql,
|
||||||
char *to,const char *from,
|
char *to,const char *from,
|
||||||
unsigned long length);
|
unsigned long length);
|
||||||
@ -642,23 +655,6 @@ typedef struct st_mysql_methods
|
|||||||
#endif
|
#endif
|
||||||
} MYSQL_METHODS;
|
} 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);
|
|
||||||
#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);
|
MYSQL_STMT * STDCALL mysql_stmt_init(MYSQL *mysql);
|
||||||
int STDCALL mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query,
|
int STDCALL mysql_stmt_prepare(MYSQL_STMT *stmt, const char *query,
|
||||||
|
@ -130,6 +130,7 @@ enum enum_server_command
|
|||||||
#define SERVER_MORE_RESULTS_EXISTS 8 /* Multi query - next query exists */
|
#define SERVER_MORE_RESULTS_EXISTS 8 /* Multi query - next query exists */
|
||||||
#define SERVER_QUERY_NO_GOOD_INDEX_USED 16
|
#define SERVER_QUERY_NO_GOOD_INDEX_USED 16
|
||||||
#define SERVER_QUERY_NO_INDEX_USED 32
|
#define SERVER_QUERY_NO_INDEX_USED 32
|
||||||
|
#define SERVER_STATUS_DB_DROPPED 256 /* A database was dropped */
|
||||||
|
|
||||||
#define MYSQL_ERRMSG_SIZE 512
|
#define MYSQL_ERRMSG_SIZE 512
|
||||||
#define NET_READ_TIMEOUT 30 /* Timeout on read */
|
#define NET_READ_TIMEOUT 30 /* Timeout on read */
|
||||||
@ -282,13 +283,7 @@ void my_net_local_init(NET *net);
|
|||||||
void net_end(NET *net);
|
void net_end(NET *net);
|
||||||
void net_clear(NET *net);
|
void net_clear(NET *net);
|
||||||
my_bool net_realloc(NET *net, unsigned long length);
|
my_bool net_realloc(NET *net, unsigned long length);
|
||||||
|
|
||||||
#ifndef EMBEDDED_LIBRARY /* To be removed by HF */
|
|
||||||
my_bool net_flush(NET *net);
|
my_bool net_flush(NET *net);
|
||||||
#else
|
|
||||||
#define net_flush(A)
|
|
||||||
#endif
|
|
||||||
|
|
||||||
my_bool my_net_write(NET *net,const char *packet,unsigned long len);
|
my_bool my_net_write(NET *net,const char *packet,unsigned long len);
|
||||||
my_bool net_write_command(NET *net,unsigned char command,
|
my_bool net_write_command(NET *net,unsigned char command,
|
||||||
const char *header, unsigned long head_len,
|
const char *header, unsigned long head_len,
|
||||||
|
@ -33,6 +33,18 @@ enum enum_mysql_timestamp_type
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
Structure which is used to represent datetime values inside MySQL.
|
||||||
|
|
||||||
|
We assume that values in this structure are normalized, i.e. year <= 9999,
|
||||||
|
month <= 12, day <= 31, hour <= 23, hour <= 59, hour <= 59. Many functions
|
||||||
|
in server such as my_system_gmt_sec() or make_time() family of functions
|
||||||
|
rely on this (actually now usage of make_*() family relies on a bit weaker
|
||||||
|
restriction). Also functions that produce MYSQL_TIME as result ensure this.
|
||||||
|
There is one exception to this rule though if this structure holds time
|
||||||
|
value (time_type == MYSQL_TIMESTAMP_TIME) days and hour member can hold
|
||||||
|
bigger values.
|
||||||
|
*/
|
||||||
typedef struct st_mysql_time
|
typedef struct st_mysql_time
|
||||||
{
|
{
|
||||||
unsigned int year, month, day, hour, minute, second;
|
unsigned int year, month, day, hour, minute, second;
|
||||||
|
@ -21,7 +21,7 @@ extern "C" {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define GLOB 0 /* Error maps */
|
#define GLOB 0 /* Error maps */
|
||||||
#define GLOBERRS 28 /* Max number of error messages in map's */
|
#define GLOBERRS 29 /* Max number of error messages in map's */
|
||||||
#define EE(X) globerrs[ X ] /* Defines to add error to right map */
|
#define EE(X) globerrs[ X ] /* Defines to add error to right map */
|
||||||
|
|
||||||
extern const char * NEAR globerrs[]; /* my_error_messages is here */
|
extern const char * NEAR globerrs[]; /* my_error_messages is here */
|
||||||
@ -54,6 +54,7 @@ extern const char * NEAR globerrs[]; /* my_error_messages is here */
|
|||||||
#define EE_CANT_SYMLINK 25
|
#define EE_CANT_SYMLINK 25
|
||||||
#define EE_REALPATH 26
|
#define EE_REALPATH 26
|
||||||
#define EE_SYNC 27
|
#define EE_SYNC 27
|
||||||
|
#define EE_UNKNOWN_COLLATION 28
|
||||||
|
|
||||||
/* exit codes for all MySQL programs */
|
/* exit codes for all MySQL programs */
|
||||||
|
|
||||||
|
@ -32,9 +32,6 @@ C_MODE_END
|
|||||||
#endif
|
#endif
|
||||||
#if defined(USE_RAID)
|
#if defined(USE_RAID)
|
||||||
|
|
||||||
#ifdef __GNUC__
|
|
||||||
#pragma interface /* gcc class implementation */
|
|
||||||
#endif
|
|
||||||
#include "my_dir.h"
|
#include "my_dir.h"
|
||||||
|
|
||||||
/* Trap all occurences of my_...() in source and use our wrapper around this function */
|
/* Trap all occurences of my_...() in source and use our wrapper around this function */
|
||||||
@ -92,6 +89,10 @@ extern "C" {
|
|||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef __GNUC__
|
||||||
|
#pragma interface /* gcc class implementation */
|
||||||
|
#endif
|
||||||
|
|
||||||
class RaidName {
|
class RaidName {
|
||||||
public:
|
public:
|
||||||
RaidName(const char *FileName);
|
RaidName(const char *FileName);
|
||||||
|
@ -39,16 +39,17 @@ enum enum_vio_type
|
|||||||
|
|
||||||
Vio* vio_new(my_socket sd, enum enum_vio_type type, my_bool localhost);
|
Vio* vio_new(my_socket sd, enum enum_vio_type type, my_bool localhost);
|
||||||
#ifdef __WIN__
|
#ifdef __WIN__
|
||||||
Vio* vio_new_win32pipe(HANDLE hPipe);
|
Vio* vio_new_win32pipe(HANDLE hPipe);
|
||||||
Vio* vio_new_win32shared_memory(NET *net,HANDLE handle_file_map,
|
Vio* vio_new_win32shared_memory(NET *net,HANDLE handle_file_map,
|
||||||
HANDLE handle_map,
|
HANDLE handle_map,
|
||||||
HANDLE event_server_wrote,
|
HANDLE event_server_wrote,
|
||||||
HANDLE event_server_read,
|
HANDLE event_server_read,
|
||||||
HANDLE event_client_wrote,
|
HANDLE event_client_wrote,
|
||||||
HANDLE event_client_read);
|
HANDLE event_client_read,
|
||||||
int vio_read_pipe(Vio *vio, gptr buf, int size);
|
HANDLE event_conn_closed);
|
||||||
int vio_write_pipe(Vio *vio, const gptr buf, int size);
|
int vio_read_pipe(Vio *vio, gptr buf, int size);
|
||||||
int vio_close_pipe(Vio * vio);
|
int vio_write_pipe(Vio *vio, const gptr buf, int size);
|
||||||
|
int vio_close_pipe(Vio * vio);
|
||||||
#else
|
#else
|
||||||
#define HANDLE void *
|
#define HANDLE void *
|
||||||
#endif /* __WIN__ */
|
#endif /* __WIN__ */
|
||||||
@ -197,6 +198,7 @@ struct st_vio
|
|||||||
HANDLE event_server_read;
|
HANDLE event_server_read;
|
||||||
HANDLE event_client_wrote;
|
HANDLE event_client_wrote;
|
||||||
HANDLE event_client_read;
|
HANDLE event_client_read;
|
||||||
|
HANDLE event_conn_closed;
|
||||||
long shared_memory_remain;
|
long shared_memory_remain;
|
||||||
char *shared_memory_pos;
|
char *shared_memory_pos;
|
||||||
NET *net;
|
NET *net;
|
||||||
|
@ -547,8 +547,9 @@ buf_pool_init(
|
|||||||
}
|
}
|
||||||
/*----------------------------------------*/
|
/*----------------------------------------*/
|
||||||
} else {
|
} else {
|
||||||
buf_pool->frame_mem = ut_malloc(
|
buf_pool->frame_mem = ut_malloc_low(
|
||||||
UNIV_PAGE_SIZE * (n_frames + 1));
|
UNIV_PAGE_SIZE * (n_frames + 1),
|
||||||
|
TRUE, FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (buf_pool->frame_mem == NULL) {
|
if (buf_pool->frame_mem == NULL) {
|
||||||
|
@ -42,6 +42,10 @@ initial segment in buf_LRU_get_recent_limit */
|
|||||||
|
|
||||||
#define BUF_LRU_INITIAL_RATIO 8
|
#define BUF_LRU_INITIAL_RATIO 8
|
||||||
|
|
||||||
|
/* If we switch on the InnoDB monitor because there are too few available
|
||||||
|
frames in the buffer pool, we set this to TRUE */
|
||||||
|
ibool buf_lru_switched_on_innodb_mon = FALSE;
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
Takes a block out of the LRU list and page hash table and sets the block
|
Takes a block out of the LRU list and page hash table and sets the block
|
||||||
state to BUF_BLOCK_REMOVE_HASH. */
|
state to BUF_BLOCK_REMOVE_HASH. */
|
||||||
@ -287,6 +291,32 @@ buf_LRU_try_free_flushed_blocks(void)
|
|||||||
mutex_exit(&(buf_pool->mutex));
|
mutex_exit(&(buf_pool->mutex));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**********************************************************************
|
||||||
|
Returns TRUE if less than 15 % of the buffer pool is available. This can be
|
||||||
|
used in heuristics to prevent huge transactions eating up the whole buffer
|
||||||
|
pool for their locks. */
|
||||||
|
|
||||||
|
ibool
|
||||||
|
buf_LRU_buf_pool_running_out(void)
|
||||||
|
/*==============================*/
|
||||||
|
/* out: TRUE if less than 15 % of buffer pool
|
||||||
|
left */
|
||||||
|
{
|
||||||
|
ibool ret = FALSE;
|
||||||
|
|
||||||
|
mutex_enter(&(buf_pool->mutex));
|
||||||
|
|
||||||
|
if (!recv_recovery_on && UT_LIST_GET_LEN(buf_pool->free)
|
||||||
|
+ UT_LIST_GET_LEN(buf_pool->LRU) < buf_pool->max_size / 7) {
|
||||||
|
|
||||||
|
ret = TRUE;
|
||||||
|
}
|
||||||
|
|
||||||
|
mutex_exit(&(buf_pool->mutex));
|
||||||
|
|
||||||
|
return(ret);
|
||||||
|
}
|
||||||
|
|
||||||
/**********************************************************************
|
/**********************************************************************
|
||||||
Returns a free block from buf_pool. The block is taken off the free list.
|
Returns a free block from buf_pool. The block is taken off the free list.
|
||||||
If it is empty, blocks are moved from the end of the LRU list to the free
|
If it is empty, blocks are moved from the end of the LRU list to the free
|
||||||
@ -325,7 +355,8 @@ loop:
|
|||||||
|
|
||||||
} else if (!recv_recovery_on && UT_LIST_GET_LEN(buf_pool->free)
|
} else if (!recv_recovery_on && UT_LIST_GET_LEN(buf_pool->free)
|
||||||
+ UT_LIST_GET_LEN(buf_pool->LRU) < buf_pool->max_size / 5) {
|
+ UT_LIST_GET_LEN(buf_pool->LRU) < buf_pool->max_size / 5) {
|
||||||
if (!srv_print_innodb_monitor) {
|
|
||||||
|
if (!buf_lru_switched_on_innodb_mon) {
|
||||||
|
|
||||||
/* Over 80 % of the buffer pool is occupied by lock
|
/* Over 80 % of the buffer pool is occupied by lock
|
||||||
heaps or the adaptive hash index. This may be a memory
|
heaps or the adaptive hash index. This may be a memory
|
||||||
@ -342,16 +373,18 @@ loop:
|
|||||||
"InnoDB: lock heap and hash index sizes.\n",
|
"InnoDB: lock heap and hash index sizes.\n",
|
||||||
(ulong) (buf_pool->curr_size / (1024 * 1024 / UNIV_PAGE_SIZE)));
|
(ulong) (buf_pool->curr_size / (1024 * 1024 / UNIV_PAGE_SIZE)));
|
||||||
|
|
||||||
|
buf_lru_switched_on_innodb_mon = TRUE;
|
||||||
srv_print_innodb_monitor = TRUE;
|
srv_print_innodb_monitor = TRUE;
|
||||||
os_event_set(srv_lock_timeout_thread_event);
|
os_event_set(srv_lock_timeout_thread_event);
|
||||||
}
|
}
|
||||||
} else if (!recv_recovery_on && UT_LIST_GET_LEN(buf_pool->free)
|
} else if (buf_lru_switched_on_innodb_mon) {
|
||||||
+ UT_LIST_GET_LEN(buf_pool->LRU) < buf_pool->max_size / 4) {
|
|
||||||
|
|
||||||
/* Switch off the InnoDB Monitor; this is a simple way
|
/* Switch off the InnoDB Monitor; this is a simple way
|
||||||
to stop the monitor if the situation becomes less urgent,
|
to stop the monitor if the situation becomes less urgent,
|
||||||
but may also surprise users! */
|
but may also surprise users if the user also switched on the
|
||||||
|
monitor! */
|
||||||
|
|
||||||
|
buf_lru_switched_on_innodb_mon = FALSE;
|
||||||
srv_print_innodb_monitor = FALSE;
|
srv_print_innodb_monitor = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -326,7 +326,7 @@ buf_read_page(
|
|||||||
if (err == DB_TABLESPACE_DELETED) {
|
if (err == DB_TABLESPACE_DELETED) {
|
||||||
ut_print_timestamp(stderr);
|
ut_print_timestamp(stderr);
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
" InnoDB: error: trying to access tablespace %lu page no. %lu,\n"
|
" InnoDB: Error: trying to access tablespace %lu page no. %lu,\n"
|
||||||
"InnoDB: but the tablespace does not exist or is just being dropped.\n",
|
"InnoDB: but the tablespace does not exist or is just being dropped.\n",
|
||||||
(ulong) space, (ulong) offset);
|
(ulong) space, (ulong) offset);
|
||||||
}
|
}
|
||||||
@ -679,7 +679,9 @@ buf_read_recv_pages(
|
|||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"InnoDB: Error: InnoDB has waited for 50 seconds for pending\n"
|
"InnoDB: Error: InnoDB has waited for 50 seconds for pending\n"
|
||||||
"InnoDB: reads to the buffer pool to be finished.\n"
|
"InnoDB: reads to the buffer pool to be finished.\n"
|
||||||
"InnoDB: Number of pending reads %lu\n", (ulong) buf_pool->n_pend_reads);
|
"InnoDB: Number of pending reads %lu, pending pread calls %lu\n",
|
||||||
|
(ulong) buf_pool->n_pend_reads,
|
||||||
|
(ulong)os_file_n_pending_preads);
|
||||||
|
|
||||||
os_aio_print_debug = TRUE;
|
os_aio_print_debug = TRUE;
|
||||||
}
|
}
|
||||||
|
@ -41,7 +41,9 @@ AC_CHECK_SIZEOF(long, 4)
|
|||||||
AC_CHECK_SIZEOF(void*, 4)
|
AC_CHECK_SIZEOF(void*, 4)
|
||||||
AC_CHECK_FUNCS(sched_yield)
|
AC_CHECK_FUNCS(sched_yield)
|
||||||
AC_CHECK_FUNCS(fdatasync)
|
AC_CHECK_FUNCS(fdatasync)
|
||||||
#AC_CHECK_FUNCS(localtime_r) # Already checked by MySQL
|
AC_CHECK_FUNCS(localtime_r)
|
||||||
|
#AC_CHECK_FUNCS(readdir_r) MySQL checks that it has also the right args.
|
||||||
|
# Some versions of Unix only take 2 arguments.
|
||||||
#AC_C_INLINE Already checked in MySQL
|
#AC_C_INLINE Already checked in MySQL
|
||||||
AC_C_BIGENDIAN
|
AC_C_BIGENDIAN
|
||||||
|
|
||||||
@ -110,6 +112,9 @@ esac
|
|||||||
case "$target" in
|
case "$target" in
|
||||||
i[[4567]]86-*-*)
|
i[[4567]]86-*-*)
|
||||||
CFLAGS="$CFLAGS -DUNIV_INTEL_X86";;
|
CFLAGS="$CFLAGS -DUNIV_INTEL_X86";;
|
||||||
|
# The compiler on Linux/S390 does not seem to have inlining
|
||||||
|
s390-*-*)
|
||||||
|
CFLAGS="$CFLAGS -DUNIV_MUST_NOT_INLINE";;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
AC_OUTPUT(Makefile os/Makefile ut/Makefile btr/Makefile dnl
|
AC_OUTPUT(Makefile os/Makefile ut/Makefile btr/Makefile dnl
|
||||||
|
@ -165,6 +165,17 @@ dtype_is_non_binary_string_type(
|
|||||||
return(FALSE);
|
return(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*************************************************************************
|
||||||
|
Gets the MySQL charset-collation code for MySQL string types. */
|
||||||
|
|
||||||
|
ulint
|
||||||
|
dtype_get_charset_coll_noninline(
|
||||||
|
/*=============================*/
|
||||||
|
ulint prtype) /* in: precise data type */
|
||||||
|
{
|
||||||
|
return(dtype_get_charset_coll(prtype));
|
||||||
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
Forms a precise type from the < 4.1.2 format precise type plus the
|
Forms a precise type from the < 4.1.2 format precise type plus the
|
||||||
charset-collation code. */
|
charset-collation code. */
|
||||||
|
@ -81,6 +81,17 @@ dict_create_sys_tables_tuple(
|
|||||||
|
|
||||||
dfield_set_data(dfield, ptr, 8);
|
dfield_set_data(dfield, ptr, 8);
|
||||||
/* 7: MIX_LEN --------------------------*/
|
/* 7: MIX_LEN --------------------------*/
|
||||||
|
|
||||||
|
/* Track corruption reported on mailing list Jan 14, 2005 */
|
||||||
|
if (table->mix_len != 0 && table->mix_len != 0x80000000) {
|
||||||
|
fprintf(stderr,
|
||||||
|
"InnoDB: Error: mix_len is %lu in table %s\n", (ulong)table->mix_len,
|
||||||
|
table->name);
|
||||||
|
mem_analyze_corruption((byte*)&(table->mix_len));
|
||||||
|
|
||||||
|
ut_error;
|
||||||
|
}
|
||||||
|
|
||||||
dfield = dtuple_get_nth_field(entry, 5);
|
dfield = dtuple_get_nth_field(entry, 5);
|
||||||
|
|
||||||
ptr = mem_heap_alloc(heap, 4);
|
ptr = mem_heap_alloc(heap, 4);
|
||||||
@ -1067,6 +1078,12 @@ dict_create_or_check_foreign_constraint_tables(void)
|
|||||||
there are 2 secondary indexes on SYS_FOREIGN, and they
|
there are 2 secondary indexes on SYS_FOREIGN, and they
|
||||||
are defined just like below */
|
are defined just like below */
|
||||||
|
|
||||||
|
/* NOTE: when designing InnoDB's foreign key support in 2001, we made
|
||||||
|
an error and made the table names and the foreign key id of type
|
||||||
|
'CHAR' (internally, really a VARCHAR). We should have made the type
|
||||||
|
VARBINARY, like in other InnoDB system tables, to get a clean
|
||||||
|
design. */
|
||||||
|
|
||||||
str =
|
str =
|
||||||
"PROCEDURE CREATE_FOREIGN_SYS_TABLES_PROC () IS\n"
|
"PROCEDURE CREATE_FOREIGN_SYS_TABLES_PROC () IS\n"
|
||||||
"BEGIN\n"
|
"BEGIN\n"
|
||||||
@ -1284,9 +1301,17 @@ loop:
|
|||||||
fputs(".\nA foreign key constraint of name ", ef);
|
fputs(".\nA foreign key constraint of name ", ef);
|
||||||
ut_print_name(ef, trx, foreign->id);
|
ut_print_name(ef, trx, foreign->id);
|
||||||
fputs("\nalready exists."
|
fputs("\nalready exists."
|
||||||
" (Note that internally InnoDB adds 'databasename/'\n"
|
" (Note that internally InnoDB adds 'databasename/'\n"
|
||||||
"in front of the user-defined constraint name).\n",
|
"in front of the user-defined constraint name).\n",
|
||||||
ef);
|
ef);
|
||||||
|
fputs("Note that InnoDB's FOREIGN KEY system tables store\n"
|
||||||
|
"constraint names as case-insensitive, with the\n"
|
||||||
|
"MySQL standard latin1_swedish_ci collation. If you\n"
|
||||||
|
"create tables or databases whose names differ only in\n"
|
||||||
|
"the character case, then collisions in constraint\n"
|
||||||
|
"names can occur. Workaround: name your constraints\n"
|
||||||
|
"explicitly with unique names.\n",
|
||||||
|
ef);
|
||||||
|
|
||||||
mutex_exit(&dict_foreign_err_mutex);
|
mutex_exit(&dict_foreign_err_mutex);
|
||||||
|
|
||||||
|
@ -156,7 +156,7 @@ dict_index_build_internal_non_clust(
|
|||||||
dict_index_t* index); /* in: user representation of a non-clustered
|
dict_index_t* index); /* in: user representation of a non-clustered
|
||||||
index */
|
index */
|
||||||
/**************************************************************************
|
/**************************************************************************
|
||||||
Removes a foreign constraint struct from the dictionet cache. */
|
Removes a foreign constraint struct from the dictionary cache. */
|
||||||
static
|
static
|
||||||
void
|
void
|
||||||
dict_foreign_remove_from_cache(
|
dict_foreign_remove_from_cache(
|
||||||
@ -606,7 +606,7 @@ dict_table_get_on_id(
|
|||||||
dict_table_t* table;
|
dict_table_t* table;
|
||||||
|
|
||||||
if (ut_dulint_cmp(table_id, DICT_FIELDS_ID) <= 0
|
if (ut_dulint_cmp(table_id, DICT_FIELDS_ID) <= 0
|
||||||
|| trx->dict_operation) {
|
|| trx->dict_operation_lock_mode == RW_X_LATCH) {
|
||||||
/* It is a system table which will always exist in the table
|
/* It is a system table which will always exist in the table
|
||||||
cache: we avoid acquiring the dictionary mutex, because
|
cache: we avoid acquiring the dictionary mutex, because
|
||||||
if we are doing a rollback to handle an error in TABLE
|
if we are doing a rollback to handle an error in TABLE
|
||||||
@ -2266,8 +2266,8 @@ dict_foreign_add_to_cache(
|
|||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
Scans from pointer onwards. Stops if is at the start of a copy of
|
Scans from pointer onwards. Stops if is at the start of a copy of
|
||||||
'string' where characters are compared without case sensitivity. Stops
|
'string' where characters are compared without case sensitivity, and
|
||||||
also at '\0'. */
|
only outside `` or "" quotes. Stops also at '\0'. */
|
||||||
|
|
||||||
const char*
|
const char*
|
||||||
dict_scan_to(
|
dict_scan_to(
|
||||||
@ -2276,31 +2276,34 @@ dict_scan_to(
|
|||||||
const char* ptr, /* in: scan from */
|
const char* ptr, /* in: scan from */
|
||||||
const char* string) /* in: look for this */
|
const char* string) /* in: look for this */
|
||||||
{
|
{
|
||||||
ibool success;
|
char quote = '\0';
|
||||||
ulint i;
|
|
||||||
loop:
|
|
||||||
if (*ptr == '\0') {
|
|
||||||
return(ptr);
|
|
||||||
}
|
|
||||||
|
|
||||||
success = TRUE;
|
|
||||||
|
|
||||||
for (i = 0; i < ut_strlen(string); i++) {
|
|
||||||
if (toupper((ulint)(ptr[i])) != toupper((ulint)(string[i]))) {
|
|
||||||
success = FALSE;
|
|
||||||
|
|
||||||
|
for (; *ptr; ptr++) {
|
||||||
|
if (*ptr == quote) {
|
||||||
|
/* Closing quote character: do not look for
|
||||||
|
starting quote or the keyword. */
|
||||||
|
quote = '\0';
|
||||||
|
} else if (quote) {
|
||||||
|
/* Within quotes: do nothing. */
|
||||||
|
} else if (*ptr == '`' || *ptr == '"') {
|
||||||
|
/* Starting quote: remember the quote character. */
|
||||||
|
quote = *ptr;
|
||||||
|
} else {
|
||||||
|
/* Outside quotes: look for the keyword. */
|
||||||
|
ulint i;
|
||||||
|
for (i = 0; string[i]; i++) {
|
||||||
|
if (toupper((ulint)(ptr[i]))
|
||||||
|
!= toupper((ulint)(string[i]))) {
|
||||||
|
goto nomatch;
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
nomatch:
|
||||||
|
;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (success) {
|
return(ptr);
|
||||||
|
|
||||||
return(ptr);
|
|
||||||
}
|
|
||||||
|
|
||||||
ptr++;
|
|
||||||
|
|
||||||
goto loop;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
@ -2361,6 +2364,8 @@ dict_scan_id(
|
|||||||
ulint len = 0;
|
ulint len = 0;
|
||||||
const char* s;
|
const char* s;
|
||||||
char* d;
|
char* d;
|
||||||
|
ulint id_len;
|
||||||
|
byte* b;
|
||||||
|
|
||||||
*id = NULL;
|
*id = NULL;
|
||||||
|
|
||||||
@ -2422,6 +2427,28 @@ dict_scan_id(
|
|||||||
*id = s;
|
*id = s;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (heap && !quote) {
|
||||||
|
/* EMS MySQL Manager sometimes adds characters 0xA0 (in
|
||||||
|
latin1, a 'non-breakable space') to the end of a table name.
|
||||||
|
But isspace(0xA0) is not true, which confuses our foreign key
|
||||||
|
parser. After the UTF-8 conversion in ha_innodb.cc, bytes 0xC2
|
||||||
|
and 0xA0 are at the end of the string.
|
||||||
|
|
||||||
|
TODO: we should lex the string using thd->charset_info, and
|
||||||
|
my_isspace(). Only after that, convert id names to UTF-8. */
|
||||||
|
|
||||||
|
b = (byte*)(*id);
|
||||||
|
id_len = strlen(b);
|
||||||
|
|
||||||
|
if (id_len >= 3 && b[id_len - 1] == 0xA0
|
||||||
|
&& b[id_len - 2] == 0xC2) {
|
||||||
|
|
||||||
|
/* Strip the 2 last bytes */
|
||||||
|
|
||||||
|
b[id_len - 2] = '\0';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return(ptr);
|
return(ptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2476,7 +2503,7 @@ dict_scan_col(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
Scans the referenced table name from an SQL string. */
|
Scans a table name from an SQL string. */
|
||||||
static
|
static
|
||||||
const char*
|
const char*
|
||||||
dict_scan_table_name(
|
dict_scan_table_name(
|
||||||
@ -2487,7 +2514,7 @@ dict_scan_table_name(
|
|||||||
const char* name, /* in: foreign key table name */
|
const char* name, /* in: foreign key table name */
|
||||||
ibool* success,/* out: TRUE if ok name found */
|
ibool* success,/* out: TRUE if ok name found */
|
||||||
mem_heap_t* heap, /* in: heap where to allocate the id */
|
mem_heap_t* heap, /* in: heap where to allocate the id */
|
||||||
const char** ref_name)/* out,own: the referenced table name;
|
const char** ref_name)/* out,own: the table name;
|
||||||
NULL if no name was scannable */
|
NULL if no name was scannable */
|
||||||
{
|
{
|
||||||
const char* database_name = NULL;
|
const char* database_name = NULL;
|
||||||
@ -2644,7 +2671,8 @@ scan_more:
|
|||||||
/* Starting quote: remember the quote character. */
|
/* Starting quote: remember the quote character. */
|
||||||
quote = *sptr;
|
quote = *sptr;
|
||||||
} else if (*sptr == '#'
|
} else if (*sptr == '#'
|
||||||
|| (0 == memcmp("-- ", sptr, 3))) {
|
|| (sptr[0] == '-' && sptr[1] == '-' &&
|
||||||
|
sptr[2] == ' ')) {
|
||||||
for (;;) {
|
for (;;) {
|
||||||
/* In Unix a newline is 0x0A while in Windows
|
/* In Unix a newline is 0x0A while in Windows
|
||||||
it is 0x0D followed by 0x0A */
|
it is 0x0D followed by 0x0A */
|
||||||
@ -2868,22 +2896,22 @@ loop:
|
|||||||
constraint_name = NULL;
|
constraint_name = NULL;
|
||||||
|
|
||||||
if (ptr1 < ptr2) {
|
if (ptr1 < ptr2) {
|
||||||
/* The user has specified a constraint name. Pick it so
|
/* The user may have specified a constraint name. Pick it so
|
||||||
that we can store 'databasename/constraintname' as the id of
|
that we can store 'databasename/constraintname' as the id of
|
||||||
the id of the constraint to system tables. */
|
of the constraint to system tables. */
|
||||||
ptr = ptr1;
|
ptr = ptr1;
|
||||||
|
|
||||||
ptr = dict_accept(ptr, "CONSTRAINT", &success);
|
ptr = dict_accept(ptr, "CONSTRAINT", &success);
|
||||||
|
|
||||||
ut_a(success);
|
ut_a(success);
|
||||||
|
|
||||||
if (!isspace(*ptr)) {
|
if (!isspace(*ptr) && *ptr != '"' && *ptr != '`') {
|
||||||
goto loop;
|
goto loop;
|
||||||
}
|
}
|
||||||
|
|
||||||
do {
|
while (isspace(*ptr)) {
|
||||||
ptr++;
|
ptr++;
|
||||||
} while (isspace(*ptr));
|
}
|
||||||
|
|
||||||
/* read constraint name unless got "CONSTRAINT FOREIGN" */
|
/* read constraint name unless got "CONSTRAINT FOREIGN" */
|
||||||
if (ptr != ptr2) {
|
if (ptr != ptr2) {
|
||||||
@ -2907,6 +2935,10 @@ loop:
|
|||||||
|
|
||||||
ptr = dict_accept(ptr, "FOREIGN", &success);
|
ptr = dict_accept(ptr, "FOREIGN", &success);
|
||||||
|
|
||||||
|
if (!success) {
|
||||||
|
goto loop;
|
||||||
|
}
|
||||||
|
|
||||||
if (!isspace(*ptr)) {
|
if (!isspace(*ptr)) {
|
||||||
goto loop;
|
goto loop;
|
||||||
}
|
}
|
||||||
|
@ -19,7 +19,9 @@ Created 4/24/1996 Heikki Tuuri
|
|||||||
#include "mach0data.h"
|
#include "mach0data.h"
|
||||||
#include "dict0dict.h"
|
#include "dict0dict.h"
|
||||||
#include "dict0boot.h"
|
#include "dict0boot.h"
|
||||||
|
#include "rem0cmp.h"
|
||||||
#include "srv0start.h"
|
#include "srv0start.h"
|
||||||
|
#include "srv0srv.h"
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
Finds the first table name in the given database. */
|
Finds the first table name in the given database. */
|
||||||
@ -123,6 +125,13 @@ dict_print(void)
|
|||||||
ulint len;
|
ulint len;
|
||||||
mtr_t mtr;
|
mtr_t mtr;
|
||||||
|
|
||||||
|
/* Enlarge the fatal semaphore wait timeout during the InnoDB table
|
||||||
|
monitor printout */
|
||||||
|
|
||||||
|
mutex_enter(&kernel_mutex);
|
||||||
|
srv_fatal_semaphore_wait_threshold += 7200; /* 2 hours */
|
||||||
|
mutex_exit(&kernel_mutex);
|
||||||
|
|
||||||
mutex_enter(&(dict_sys->mutex));
|
mutex_enter(&(dict_sys->mutex));
|
||||||
|
|
||||||
mtr_start(&mtr);
|
mtr_start(&mtr);
|
||||||
@ -145,6 +154,12 @@ loop:
|
|||||||
|
|
||||||
mutex_exit(&(dict_sys->mutex));
|
mutex_exit(&(dict_sys->mutex));
|
||||||
|
|
||||||
|
/* Restore the fatal semaphore wait timeout */
|
||||||
|
|
||||||
|
mutex_enter(&kernel_mutex);
|
||||||
|
srv_fatal_semaphore_wait_threshold -= 7200; /* 2 hours */
|
||||||
|
mutex_exit(&kernel_mutex);
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -190,12 +205,14 @@ loop:
|
|||||||
In a crash recovery we already have all the tablespace objects created.
|
In a crash recovery we already have all the tablespace objects created.
|
||||||
This function compares the space id information in the InnoDB data dictionary
|
This function compares the space id information in the InnoDB data dictionary
|
||||||
to what we already read with fil_load_single_table_tablespaces().
|
to what we already read with fil_load_single_table_tablespaces().
|
||||||
In a normal startup we just scan the biggest space id, and store it to
|
|
||||||
fil_system. */
|
In a normal startup, we create the tablespace objects for every table in
|
||||||
|
InnoDB's data dictionary, if the corresponding .ibd file exists.
|
||||||
|
We also scan the biggest space id, and store it to fil_system. */
|
||||||
|
|
||||||
void
|
void
|
||||||
dict_check_tablespaces_or_store_max_id(
|
dict_check_tablespaces_and_store_max_id(
|
||||||
/*===================================*/
|
/*====================================*/
|
||||||
ibool in_crash_recovery) /* in: are we doing a crash recovery */
|
ibool in_crash_recovery) /* in: are we doing a crash recovery */
|
||||||
{
|
{
|
||||||
dict_table_t* sys_tables;
|
dict_table_t* sys_tables;
|
||||||
@ -265,6 +282,14 @@ loop:
|
|||||||
FALSE, TRUE, TRUE);
|
FALSE, TRUE, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (space_id != 0 && !in_crash_recovery) {
|
||||||
|
/* It is a normal database startup: create the space
|
||||||
|
object and check that the .ibd file exists. */
|
||||||
|
|
||||||
|
fil_open_single_table_tablespace(FALSE, space_id,
|
||||||
|
name);
|
||||||
|
}
|
||||||
|
|
||||||
mem_free(name);
|
mem_free(name);
|
||||||
|
|
||||||
if (space_id > max_space_id) {
|
if (space_id > max_space_id) {
|
||||||
@ -704,6 +729,7 @@ dict_load_table(
|
|||||||
ulint space;
|
ulint space;
|
||||||
ulint n_cols;
|
ulint n_cols;
|
||||||
ulint err;
|
ulint err;
|
||||||
|
ulint mix_len;
|
||||||
mtr_t mtr;
|
mtr_t mtr;
|
||||||
|
|
||||||
#ifdef UNIV_SYNC_DEBUG
|
#ifdef UNIV_SYNC_DEBUG
|
||||||
@ -750,6 +776,38 @@ dict_load_table(
|
|||||||
return(NULL);
|
return(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Track a corruption bug reported on the MySQL mailing list Jan 14,
|
||||||
|
2005: mix_len had a value different from 0 */
|
||||||
|
|
||||||
|
field = rec_get_nth_field(rec, 7, &len);
|
||||||
|
ut_a(len == 4);
|
||||||
|
|
||||||
|
mix_len = mach_read_from_4(field);
|
||||||
|
|
||||||
|
if (mix_len != 0 && mix_len != 0x80000000) {
|
||||||
|
ut_print_timestamp(stderr);
|
||||||
|
|
||||||
|
fprintf(stderr,
|
||||||
|
" InnoDB: table %s has a nonsensical mix len %lu\n",
|
||||||
|
name, (ulong)mix_len);
|
||||||
|
}
|
||||||
|
|
||||||
|
#if MYSQL_VERSION_ID < 50300
|
||||||
|
/* Starting from MySQL 5.0.3, the high-order bit of MIX_LEN is the
|
||||||
|
"compact format" flag. */
|
||||||
|
field = rec_get_nth_field(rec, 7, &len);
|
||||||
|
if (mach_read_from_1(field) & 0x80) {
|
||||||
|
btr_pcur_close(&pcur);
|
||||||
|
mtr_commit(&mtr);
|
||||||
|
mem_heap_free(heap);
|
||||||
|
ut_print_timestamp(stderr);
|
||||||
|
fprintf(stderr,
|
||||||
|
" InnoDB: table %s is in the new compact format\n"
|
||||||
|
"InnoDB: of MySQL 5.0.3 or later\n", name);
|
||||||
|
return(NULL);
|
||||||
|
}
|
||||||
|
#endif /* MYSQL_VERSION_ID < 50300 */
|
||||||
|
|
||||||
ut_a(0 == ut_strcmp("SPACE",
|
ut_a(0 == ut_strcmp("SPACE",
|
||||||
dict_field_get_col(
|
dict_field_get_col(
|
||||||
dict_index_get_nth_field(
|
dict_index_get_nth_field(
|
||||||
@ -765,8 +823,18 @@ dict_load_table(
|
|||||||
/* Ok; (if we did a crash recovery then the tablespace
|
/* Ok; (if we did a crash recovery then the tablespace
|
||||||
can already be in the memory cache) */
|
can already be in the memory cache) */
|
||||||
} else {
|
} else {
|
||||||
|
/* In >= 4.1.9, InnoDB scans the data dictionary also
|
||||||
|
at a normal mysqld startup. It is an error if the
|
||||||
|
space object does not exist in memory. */
|
||||||
|
|
||||||
|
ut_print_timestamp(stderr);
|
||||||
|
fprintf(stderr,
|
||||||
|
" InnoDB: error: space object of table %s,\n"
|
||||||
|
"InnoDB: space id %lu did not exist in memory. Retrying an open.\n",
|
||||||
|
name, (ulong)space);
|
||||||
/* Try to open the tablespace */
|
/* Try to open the tablespace */
|
||||||
if (!fil_open_single_table_tablespace(space, name)) {
|
if (!fil_open_single_table_tablespace(TRUE,
|
||||||
|
space, name)) {
|
||||||
/* We failed to find a sensible tablespace
|
/* We failed to find a sensible tablespace
|
||||||
file */
|
file */
|
||||||
|
|
||||||
@ -1242,12 +1310,26 @@ loop:
|
|||||||
rec = btr_pcur_get_rec(&pcur);
|
rec = btr_pcur_get_rec(&pcur);
|
||||||
field = rec_get_nth_field(rec, 0, &len);
|
field = rec_get_nth_field(rec, 0, &len);
|
||||||
|
|
||||||
/* Check if the table name in record is the one searched for */
|
/* Check if the table name in the record is the one searched for; the
|
||||||
if (len != ut_strlen(table_name)
|
following call does the comparison in the latin1_swedish_ci
|
||||||
|| 0 != ut_memcmp(field, table_name, len)) {
|
charset-collation, in a case-insensitive way. */
|
||||||
|
|
||||||
|
if (0 != cmp_data_data(dfield_get_type(dfield),
|
||||||
|
dfield_get_data(dfield), dfield_get_len(dfield),
|
||||||
|
field, len)) {
|
||||||
|
|
||||||
goto load_next_index;
|
goto load_next_index;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Since table names in SYS_FOREIGN are stored in a case-insensitive
|
||||||
|
order, we have to check that the table name matches also in a binary
|
||||||
|
string comparison. On Unix, MySQL allows table names that only differ
|
||||||
|
in character case. */
|
||||||
|
|
||||||
|
if (0 != ut_memcmp(field, table_name, len)) {
|
||||||
|
|
||||||
|
goto next_rec;
|
||||||
|
}
|
||||||
|
|
||||||
if (rec_get_deleted_flag(rec)) {
|
if (rec_get_deleted_flag(rec)) {
|
||||||
|
|
||||||
|
@ -627,7 +627,11 @@ eval_concat(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*********************************************************************
|
/*********************************************************************
|
||||||
Evaluates a predefined function node. */
|
Evaluates a predefined function node. If the first argument is an integer,
|
||||||
|
this function looks at the second argument which is the integer length in
|
||||||
|
bytes, and converts the integer to a VARCHAR.
|
||||||
|
If the first argument is of some other type, this function converts it to
|
||||||
|
BINARY. */
|
||||||
UNIV_INLINE
|
UNIV_INLINE
|
||||||
void
|
void
|
||||||
eval_to_binary(
|
eval_to_binary(
|
||||||
@ -638,12 +642,24 @@ eval_to_binary(
|
|||||||
que_node_t* arg2;
|
que_node_t* arg2;
|
||||||
dfield_t* dfield;
|
dfield_t* dfield;
|
||||||
byte* str1;
|
byte* str1;
|
||||||
|
ulint len;
|
||||||
ulint len1;
|
ulint len1;
|
||||||
|
|
||||||
arg1 = func_node->args;
|
arg1 = func_node->args;
|
||||||
|
|
||||||
str1 = dfield_get_data(que_node_get_val(arg1));
|
str1 = dfield_get_data(que_node_get_val(arg1));
|
||||||
|
|
||||||
|
if (dtype_get_mtype(que_node_get_data_type(arg1)) != DATA_INT) {
|
||||||
|
|
||||||
|
len = dfield_get_len(que_node_get_val(arg1));
|
||||||
|
|
||||||
|
dfield = que_node_get_val(func_node);
|
||||||
|
|
||||||
|
dfield_set_data(dfield, str1, len);
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
arg2 = que_node_get_next(arg1);
|
arg2 = que_node_get_next(arg1);
|
||||||
|
|
||||||
len1 = (ulint)eval_node_get_int_val(arg2);
|
len1 = (ulint)eval_node_get_int_val(arg2);
|
||||||
|
@ -106,7 +106,7 @@ struct fil_node_struct {
|
|||||||
device or a raw disk partition */
|
device or a raw disk partition */
|
||||||
ulint size; /* size of the file in database pages, 0 if
|
ulint size; /* size of the file in database pages, 0 if
|
||||||
not known yet; the possible last incomplete
|
not known yet; the possible last incomplete
|
||||||
megabyte is ignored if space == 0 */
|
megabyte may be ignored if space == 0 */
|
||||||
ulint n_pending;
|
ulint n_pending;
|
||||||
/* count of pending i/o's on this file;
|
/* count of pending i/o's on this file;
|
||||||
closing of the file is not allowed if
|
closing of the file is not allowed if
|
||||||
@ -160,7 +160,9 @@ struct fil_space_struct {
|
|||||||
UT_LIST_BASE_NODE_T(fil_node_t) chain;
|
UT_LIST_BASE_NODE_T(fil_node_t) chain;
|
||||||
/* base node for the file chain */
|
/* base node for the file chain */
|
||||||
ulint size; /* space size in pages; 0 if a single-table
|
ulint size; /* space size in pages; 0 if a single-table
|
||||||
tablespace whose size we do not know yet */
|
tablespace whose size we do not know yet;
|
||||||
|
last incomplete megabytes in data files may be
|
||||||
|
ignored if space == 0 */
|
||||||
ulint n_reserved_extents;
|
ulint n_reserved_extents;
|
||||||
/* number of reserved free extents for
|
/* number of reserved free extents for
|
||||||
ongoing operations like B-tree page split */
|
ongoing operations like B-tree page split */
|
||||||
@ -464,6 +466,10 @@ fil_node_open_file(
|
|||||||
ulint size_low;
|
ulint size_low;
|
||||||
ulint size_high;
|
ulint size_high;
|
||||||
ibool ret;
|
ibool ret;
|
||||||
|
byte* buf2;
|
||||||
|
byte* page;
|
||||||
|
ibool success;
|
||||||
|
ulint space_id;
|
||||||
|
|
||||||
#ifdef UNIV_SYNC_DEBUG
|
#ifdef UNIV_SYNC_DEBUG
|
||||||
ut_ad(mutex_own(&(system->mutex)));
|
ut_ad(mutex_own(&(system->mutex)));
|
||||||
@ -471,8 +477,102 @@ fil_node_open_file(
|
|||||||
ut_a(node->n_pending == 0);
|
ut_a(node->n_pending == 0);
|
||||||
ut_a(node->open == FALSE);
|
ut_a(node->open == FALSE);
|
||||||
|
|
||||||
|
if (node->size == 0) {
|
||||||
|
/* It must be a single-table tablespace and we do not know the
|
||||||
|
size of the file yet. First we open the file in the normal
|
||||||
|
mode, no async I/O here, for simplicity. Then do some checks,
|
||||||
|
and close the file again.
|
||||||
|
NOTE that we could not use the simple file read function
|
||||||
|
os_file_read() in Windows to read from a file opened for
|
||||||
|
async I/O! */
|
||||||
|
|
||||||
|
node->handle = os_file_create_simple_no_error_handling(
|
||||||
|
node->name, OS_FILE_OPEN,
|
||||||
|
OS_FILE_READ_ONLY, &success);
|
||||||
|
if (!success) {
|
||||||
|
/* The following call prints an error message */
|
||||||
|
os_file_get_last_error(TRUE);
|
||||||
|
|
||||||
|
ut_print_timestamp(stderr);
|
||||||
|
|
||||||
|
fprintf(stderr,
|
||||||
|
" InnoDB: Fatal error: cannot open %s\n."
|
||||||
|
"InnoDB: Have you deleted .ibd files under a running mysqld server?\n",
|
||||||
|
node->name);
|
||||||
|
ut_a(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
ut_a(space->purpose != FIL_LOG);
|
||||||
|
ut_a(space->id != 0);
|
||||||
|
|
||||||
|
os_file_get_size(node->handle, &size_low, &size_high);
|
||||||
|
|
||||||
|
size_bytes = (((ib_longlong)size_high) << 32)
|
||||||
|
+ (ib_longlong)size_low;
|
||||||
|
#ifdef UNIV_HOTBACKUP
|
||||||
|
node->size = (ulint) (size_bytes / UNIV_PAGE_SIZE);
|
||||||
|
|
||||||
|
#else
|
||||||
|
if (size_bytes < FIL_IBD_FILE_INITIAL_SIZE * UNIV_PAGE_SIZE) {
|
||||||
|
fprintf(stderr,
|
||||||
|
"InnoDB: Error: the size of single-table tablespace file %s\n"
|
||||||
|
"InnoDB: is only %lu %lu, should be at least %lu!", node->name,
|
||||||
|
(ulong) size_high,
|
||||||
|
(ulong) size_low, (ulong) (4 * UNIV_PAGE_SIZE));
|
||||||
|
|
||||||
|
ut_a(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Read the first page of the tablespace */
|
||||||
|
|
||||||
|
buf2 = ut_malloc(2 * UNIV_PAGE_SIZE);
|
||||||
|
/* Align the memory for file i/o if we might have O_DIRECT
|
||||||
|
set */
|
||||||
|
page = ut_align(buf2, UNIV_PAGE_SIZE);
|
||||||
|
|
||||||
|
success = os_file_read(node->handle, page, 0, 0,
|
||||||
|
UNIV_PAGE_SIZE);
|
||||||
|
space_id = fsp_header_get_space_id(page);
|
||||||
|
|
||||||
|
ut_free(buf2);
|
||||||
|
|
||||||
|
/* Close the file now that we have read the space id from it */
|
||||||
|
|
||||||
|
os_file_close(node->handle);
|
||||||
|
|
||||||
|
if (space_id == ULINT_UNDEFINED || space_id == 0) {
|
||||||
|
fprintf(stderr,
|
||||||
|
"InnoDB: Error: tablespace id %lu in file %s is not sensible\n",
|
||||||
|
(ulong) space_id,
|
||||||
|
node->name);
|
||||||
|
|
||||||
|
ut_a(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (space_id != space->id) {
|
||||||
|
fprintf(stderr,
|
||||||
|
"InnoDB: Error: tablespace id is %lu in the data dictionary\n"
|
||||||
|
"InnoDB: but in file %s it is %lu!\n", space->id, node->name, space_id);
|
||||||
|
|
||||||
|
ut_a(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (size_bytes >= FSP_EXTENT_SIZE * UNIV_PAGE_SIZE) {
|
||||||
|
node->size = (ulint) ((size_bytes / (1024 * 1024))
|
||||||
|
* ((1024 * 1024) / UNIV_PAGE_SIZE));
|
||||||
|
} else {
|
||||||
|
node->size = (ulint) (size_bytes / UNIV_PAGE_SIZE);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
space->size += node->size;
|
||||||
|
}
|
||||||
|
|
||||||
/* printf("Opening file %s\n", node->name); */
|
/* printf("Opening file %s\n", node->name); */
|
||||||
|
|
||||||
|
/* Open the file for reading and writing, in Windows normally in the
|
||||||
|
unbuffered async I/O mode, though global variables may make
|
||||||
|
os_file_create() to fall back to the normal file I/O mode. */
|
||||||
|
|
||||||
if (space->purpose == FIL_LOG) {
|
if (space->purpose == FIL_LOG) {
|
||||||
node->handle = os_file_create(node->name, OS_FILE_OPEN,
|
node->handle = os_file_create(node->name, OS_FILE_OPEN,
|
||||||
OS_FILE_AIO, OS_LOG_FILE, &ret);
|
OS_FILE_AIO, OS_LOG_FILE, &ret);
|
||||||
@ -491,30 +591,6 @@ fil_node_open_file(
|
|||||||
|
|
||||||
system->n_open++;
|
system->n_open++;
|
||||||
|
|
||||||
if (node->size == 0) {
|
|
||||||
os_file_get_size(node->handle, &size_low, &size_high);
|
|
||||||
|
|
||||||
size_bytes = (((ib_longlong)size_high) << 32)
|
|
||||||
+ (ib_longlong)size_low;
|
|
||||||
#ifdef UNIV_HOTBACKUP
|
|
||||||
node->size = (ulint) (size_bytes / UNIV_PAGE_SIZE);
|
|
||||||
|
|
||||||
#else
|
|
||||||
/* It must be a single-table tablespace and we do not know the
|
|
||||||
size of the file yet */
|
|
||||||
|
|
||||||
ut_a(space->id != 0);
|
|
||||||
|
|
||||||
if (size_bytes >= FSP_EXTENT_SIZE * UNIV_PAGE_SIZE) {
|
|
||||||
node->size = (ulint) ((size_bytes / (1024 * 1024))
|
|
||||||
* ((1024 * 1024) / UNIV_PAGE_SIZE));
|
|
||||||
} else {
|
|
||||||
node->size = (ulint) (size_bytes / UNIV_PAGE_SIZE);
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
space->size += node->size;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (space->purpose == FIL_TABLESPACE && space->id != 0) {
|
if (space->purpose == FIL_TABLESPACE && space->id != 0) {
|
||||||
/* Put the node to the LRU list */
|
/* Put the node to the LRU list */
|
||||||
UT_LIST_ADD_FIRST(LRU, system->LRU, node);
|
UT_LIST_ADD_FIRST(LRU, system->LRU, node);
|
||||||
@ -609,9 +685,9 @@ fil_try_to_close_file_in_LRU(
|
|||||||
fputs("InnoDB: cannot close file ", stderr);
|
fputs("InnoDB: cannot close file ", stderr);
|
||||||
ut_print_filename(stderr, node->name);
|
ut_print_filename(stderr, node->name);
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
", because mod_count %lld != fl_count %lld\n",
|
", because mod_count %ld != fl_count %ld\n",
|
||||||
node->modification_counter,
|
(ulong) node->modification_counter,
|
||||||
node->flush_counter);
|
(ulong) node->flush_counter);
|
||||||
}
|
}
|
||||||
|
|
||||||
node = UT_LIST_GET_PREV(LRU, node);
|
node = UT_LIST_GET_PREV(LRU, node);
|
||||||
@ -2485,21 +2561,29 @@ func_exit:
|
|||||||
}
|
}
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
Tries to open a single-table tablespace and checks the space id is right in
|
Tries to open a single-table tablespace and optionally checks the space id is
|
||||||
it. If does not succeed, prints an error message to the .err log. This
|
right in it. If does not succeed, prints an error message to the .err log. This
|
||||||
function is used to open the tablespace when we load a table definition
|
function is used to open a tablespace when we start up mysqld, and also in
|
||||||
to the dictionary cache. NOTE that we assume this operation is used under the
|
IMPORT TABLESPACE.
|
||||||
protection of the dictionary mutex, so that two users cannot race here. This
|
NOTE that we assume this operation is used either at the database startup
|
||||||
operation does not leave the file associated with the tablespace open, but
|
or under the protection of the dictionary mutex, so that two users cannot
|
||||||
closes it after we have looked at the space id in it. */
|
race here. This operation does not leave the file associated with the
|
||||||
|
tablespace open, but closes it after we have looked at the space id in it. */
|
||||||
|
|
||||||
ibool
|
ibool
|
||||||
fil_open_single_table_tablespace(
|
fil_open_single_table_tablespace(
|
||||||
/*=============================*/
|
/*=============================*/
|
||||||
/* out: TRUE if success */
|
/* out: TRUE if success */
|
||||||
ulint id, /* in: space id */
|
ibool check_space_id, /* in: should we check that the space
|
||||||
const char* name) /* in: table name in the
|
id in the file is right; we assume
|
||||||
databasename/tablename format */
|
that this function runs much faster
|
||||||
|
if no check is made, since accessing
|
||||||
|
the file inode probably is much
|
||||||
|
faster (the OS caches them) than
|
||||||
|
accessing the first page of the file */
|
||||||
|
ulint id, /* in: space id */
|
||||||
|
const char* name) /* in: table name in the
|
||||||
|
databasename/tablename format */
|
||||||
{
|
{
|
||||||
os_file_t file;
|
os_file_t file;
|
||||||
char* filepath;
|
char* filepath;
|
||||||
@ -2538,6 +2622,12 @@ fil_open_single_table_tablespace(
|
|||||||
return(FALSE);
|
return(FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!check_space_id) {
|
||||||
|
space_id = id;
|
||||||
|
|
||||||
|
goto skip_check;
|
||||||
|
}
|
||||||
|
|
||||||
/* Read the first page of the tablespace */
|
/* Read the first page of the tablespace */
|
||||||
|
|
||||||
buf2 = ut_malloc(2 * UNIV_PAGE_SIZE);
|
buf2 = ut_malloc(2 * UNIV_PAGE_SIZE);
|
||||||
@ -2550,6 +2640,8 @@ fil_open_single_table_tablespace(
|
|||||||
|
|
||||||
space_id = fsp_header_get_space_id(page);
|
space_id = fsp_header_get_space_id(page);
|
||||||
|
|
||||||
|
ut_free(buf2);
|
||||||
|
|
||||||
if (space_id != id) {
|
if (space_id != id) {
|
||||||
ut_print_timestamp(stderr);
|
ut_print_timestamp(stderr);
|
||||||
|
|
||||||
@ -2570,6 +2662,7 @@ fil_open_single_table_tablespace(
|
|||||||
goto func_exit;
|
goto func_exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
skip_check:
|
||||||
success = fil_space_create(filepath, space_id, FIL_TABLESPACE);
|
success = fil_space_create(filepath, space_id, FIL_TABLESPACE);
|
||||||
|
|
||||||
if (!success) {
|
if (!success) {
|
||||||
@ -2582,7 +2675,6 @@ fil_open_single_table_tablespace(
|
|||||||
fil_node_create(filepath, 0, space_id, FALSE);
|
fil_node_create(filepath, 0, space_id, FALSE);
|
||||||
func_exit:
|
func_exit:
|
||||||
os_file_close(file);
|
os_file_close(file);
|
||||||
ut_free(buf2);
|
|
||||||
mem_free(filepath);
|
mem_free(filepath);
|
||||||
|
|
||||||
return(ret);
|
return(ret);
|
||||||
@ -2649,7 +2741,7 @@ fil_load_single_table_tablespace(
|
|||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"InnoDB: Error: could not open single-table tablespace file\n"
|
"InnoDB: Error: could not open single-table tablespace file\n"
|
||||||
"InnoDB: %s!\n"
|
"InnoDB: %s!\n"
|
||||||
"InnoDB: We do not continue crash recovery, because the table will become\n"
|
"InnoDB: We do not continue the crash recovery, because the table may become\n"
|
||||||
"InnoDB: corrupt if we cannot apply the log records in the InnoDB log to it.\n"
|
"InnoDB: corrupt if we cannot apply the log records in the InnoDB log to it.\n"
|
||||||
"InnoDB: To fix the problem and start mysqld:\n"
|
"InnoDB: To fix the problem and start mysqld:\n"
|
||||||
"InnoDB: 1) If there is a permission problem in the file and mysqld cannot\n"
|
"InnoDB: 1) If there is a permission problem in the file and mysqld cannot\n"
|
||||||
@ -2820,8 +2912,9 @@ fil_load_single_table_tablespace(
|
|||||||
goto func_exit;
|
goto func_exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We do not measure the size of the file, that is why we pass the 0
|
/* We do not use the size information we have about the file, because
|
||||||
below */
|
the rounding formula for extents and pages is somewhat complex; we
|
||||||
|
let fil_node_open() do that task. */
|
||||||
|
|
||||||
fil_node_create(filepath, 0, space_id, FALSE);
|
fil_node_create(filepath, 0, space_id, FALSE);
|
||||||
func_exit:
|
func_exit:
|
||||||
@ -2909,8 +3002,8 @@ fil_load_single_table_tablespaces(void)
|
|||||||
/* printf(
|
/* printf(
|
||||||
" Looking at file %s\n", fileinfo.name); */
|
" Looking at file %s\n", fileinfo.name); */
|
||||||
|
|
||||||
if (fileinfo.type == OS_FILE_TYPE_DIR
|
if (fileinfo.type == OS_FILE_TYPE_DIR) {
|
||||||
|| dbinfo.type == OS_FILE_TYPE_UNKNOWN) {
|
|
||||||
goto next_file_item;
|
goto next_file_item;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3255,7 +3348,7 @@ fil_extend_space_to_desired_size(
|
|||||||
ulint* actual_size, /* out: size of the space after extension;
|
ulint* actual_size, /* out: size of the space after extension;
|
||||||
if we ran out of disk space this may be lower
|
if we ran out of disk space this may be lower
|
||||||
than the desired size */
|
than the desired size */
|
||||||
ulint space_id, /* in: space id, must be != 0 */
|
ulint space_id, /* in: space id */
|
||||||
ulint size_after_extend)/* in: desired size in pages after the
|
ulint size_after_extend)/* in: desired size in pages after the
|
||||||
extension; if the current space size is bigger
|
extension; if the current space size is bigger
|
||||||
than this already, the function does nothing */
|
than this already, the function does nothing */
|
||||||
@ -3352,6 +3445,17 @@ fil_extend_space_to_desired_size(
|
|||||||
fil_node_complete_io(node, system, OS_FILE_WRITE);
|
fil_node_complete_io(node, system, OS_FILE_WRITE);
|
||||||
|
|
||||||
*actual_size = space->size;
|
*actual_size = space->size;
|
||||||
|
|
||||||
|
if (space_id == 0) {
|
||||||
|
ulint pages_per_mb = (1024 * 1024) / UNIV_PAGE_SIZE;
|
||||||
|
|
||||||
|
/* Keep the last data file size info up to date, rounded to
|
||||||
|
full megabytes */
|
||||||
|
|
||||||
|
srv_data_file_sizes[srv_n_data_files - 1] =
|
||||||
|
(node->size / pages_per_mb) * pages_per_mb;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
printf("Extended %s to %lu, actual size %lu pages\n", space->name,
|
printf("Extended %s to %lu, actual size %lu pages\n", space->name,
|
||||||
size_after_extend, *actual_size); */
|
size_after_extend, *actual_size); */
|
||||||
@ -3696,13 +3800,6 @@ fil_io(
|
|||||||
node = UT_LIST_GET_FIRST(space->chain);
|
node = UT_LIST_GET_FIRST(space->chain);
|
||||||
|
|
||||||
for (;;) {
|
for (;;) {
|
||||||
if (space->id != 0 && node->size == 0) {
|
|
||||||
/* We do not know the size of a single-table tablespace
|
|
||||||
before we open the file */
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (node == NULL) {
|
if (node == NULL) {
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"InnoDB: Error: trying to access page number %lu in space %lu,\n"
|
"InnoDB: Error: trying to access page number %lu in space %lu,\n"
|
||||||
@ -3716,6 +3813,13 @@ fil_io(
|
|||||||
ut_error;
|
ut_error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (space->id != 0 && node->size == 0) {
|
||||||
|
/* We do not know the size of a single-table tablespace
|
||||||
|
before we open the file */
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (node->size > block_offset) {
|
if (node->size > block_offset) {
|
||||||
/* Found! */
|
/* Found! */
|
||||||
break;
|
break;
|
||||||
@ -4035,7 +4139,8 @@ fil_flush_file_spaces(
|
|||||||
space = UT_LIST_GET_FIRST(system->space_list);
|
space = UT_LIST_GET_FIRST(system->space_list);
|
||||||
|
|
||||||
while (space) {
|
while (space) {
|
||||||
if (space->purpose == purpose) {
|
if (space->purpose == purpose && !space->is_being_deleted) {
|
||||||
|
|
||||||
space->n_pending_flushes++; /* prevent dropping of the
|
space->n_pending_flushes++; /* prevent dropping of the
|
||||||
space while we are
|
space while we are
|
||||||
flushing */
|
flushing */
|
||||||
|
@ -2866,6 +2866,8 @@ ibuf_delete_rec(
|
|||||||
|
|
||||||
#ifdef UNIV_IBUF_DEBUG
|
#ifdef UNIV_IBUF_DEBUG
|
||||||
ibuf_count_set(space, page_no, ibuf_count_get(space, page_no) - 1);
|
ibuf_count_set(space, page_no, ibuf_count_get(space, page_no) - 1);
|
||||||
|
#else
|
||||||
|
UT_NOT_USED(space);
|
||||||
#endif
|
#endif
|
||||||
ibuf_data_sizes_update(ibuf_data, root, mtr);
|
ibuf_data_sizes_update(ibuf_data, root, mtr);
|
||||||
|
|
||||||
@ -3267,11 +3269,11 @@ leave_loop:
|
|||||||
ibuf_data->n_merged_recs += n_inserts;
|
ibuf_data->n_merged_recs += n_inserts;
|
||||||
|
|
||||||
mutex_exit(&ibuf_mutex);
|
mutex_exit(&ibuf_mutex);
|
||||||
|
/*
|
||||||
fprintf(stderr,
|
fprintf(stderr,
|
||||||
"InnoDB: Discarded %lu ibuf entries for space %lu\n",
|
"InnoDB: Discarded %lu ibuf entries for space %lu\n",
|
||||||
(ulong) n_inserts, (ulong) space);
|
(ulong) n_inserts, (ulong) space);
|
||||||
|
*/
|
||||||
ibuf_exit();
|
ibuf_exit();
|
||||||
|
|
||||||
mem_heap_free(heap);
|
mem_heap_free(heap);
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user