include/mysql_com.h:
  Auto merged
mysql-test/r/view.result:
  Auto merged
mysql-test/t/view.test:
  Auto merged
sql/item.cc:
  Auto merged
sql/protocol.cc:
  Auto merged
sql/sql_parse.cc:
  Auto merged
sql/sql_select.cc:
  Auto merged
This commit is contained in:
unknown 2005-02-10 18:01:06 +02:00
commit 72eb17f18d
362 changed files with 17652 additions and 4369 deletions

View file

@ -254,11 +254,14 @@ bkpush.log
bkpush.log*
build.log
build_tags.sh
client/decimal.c
client/insert_test
client/log_event.cc
client/log_event.h
client/mf_iocache.c
client/mf_iocache.cc
client/my_decimal.cc
client/my_decimal.h
client/mysql
client/mysqladmin
client/mysqladmin.c
@ -328,9 +331,12 @@ help.h
include/my_config.h
include/my_global.h
include/mysql_version.h
include/mysqld_ername.h
include/mysqld_error.h
include/readline
include/readline/*.h
include/readline/readline.h
include/sql_state.h
include/widec.h
innobase/autom4te-2.53.cache/*
innobase/autom4te-2.53.cache/output.0
@ -432,6 +438,7 @@ libmysqld/log_event.cc
libmysqld/md5.c
libmysqld/mf_iocache.cc
libmysqld/mini_client.cc
libmysqld/my_decimal.cc
libmysqld/my_time.c
libmysqld/net_pkg.cc
libmysqld/net_serv.cc
@ -985,6 +992,7 @@ support-files/mysql-3.23.29-gamma.spec
support-files/mysql-log-rotate
support-files/mysql.server
support-files/mysql.spec
support-files/ndb-config-2-node.ini
tags
test/ndbapi/bank/bankCreator
test/ndbapi/bank/bankMakeGL
@ -1052,6 +1060,3 @@ vio/test-ssl
vio/test-sslclient
vio/test-sslserver
vio/viotest-ssl
include/mysqld_ername.h
include/mysqld_error.h
include/sql_state.h

View file

@ -9,5 +9,5 @@ then
(cd gemini && aclocal && autoheader && aclocal && automake && autoconf)
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

View file

@ -1,7 +1,7 @@
#! /bin/sh
path=`dirname $0`
. "$path/SETUP.sh"
. "$path/SETUP.sh" $@ --with-debug=full
extra_flags="$pentium_cflags $debug_cflags"
c_warnings="$c_warnings $debug_extra_warnings"

View file

@ -1,7 +1,7 @@
#! /bin/sh
path=`dirname $0`
. "$path/SETUP.sh"
. "$path/SETUP.sh" $@ --with-debug=full
extra_flags="$pentium_cflags $debug_cflags $max_cflags"
c_warnings="$c_warnings $debug_extra_warnings"

View file

@ -1,29 +1,110 @@
#! /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
do
case "$1" in
--debug) EXTRA_CONFIG_FLAGS=--with-debug; shift ;;
--debug) EXTRA_CONFIG_FLAGS=--with-debug ;;
--purify) mode=purify ;;
--purecov*) mode=purecov ;;
--quantify) mode=quantify ;;
--cxxfilt) shift ; cxxfilt=$1 ;;
-h | --help )
echo "Usage: $0 [-h|-n] [configure-options]"
echo " --debug Compile with DBUG enabled"
echo "Usage: $0 [ options ]"
echo "Where the 'options' are"
echo " --help | -h Display this help"
echo " --debug Compile with DBUG enabled"
echo " --purify Only prepare for Purify"
echo " --purecov Only prepare for PureCover"
echo " --quantify Only prepare for Quantify"
echo " --cxxfilt <cxxfilt> Path to cxxfilt/c++filt program"
echo " This program is needed for gcc 3.X"
exit 0 ;;
*) echo "No such option '$1'" ; exit ;;
*) echo "No such option '$1'" ; exit 1 ;;
esac
shift
done
gmake -k clean || true
/bin/rm -f */.deps/*.P config.cache
aclocal && autoheader && aclocal && automake && autoconf
# (cd bdb/dist && sh s_all)
(cd bdb/dist && sh s_all)
(cd innobase && aclocal && autoheader && aclocal && automake && autoconf)
CFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -DHAVE_purify -DEXTRA_DEBUG -O2" CXX=gcc CXXLD=g++ CXXFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -DHAVE_purify -DEXTRA_DEBUG -O2" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --without-berkeley-db --with-embedded-server --with-innodb $EXTRA_CONFIG_FLAGS
CFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wimplicit-int -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -DHAVE_purify -DEXTRA_DEBUG -O2" CXX=gcc CXXLD=g++ CXXFLAGS="-g -Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti -DHAVE_purify -DEXTRA_DEBUG -O2" ./configure --prefix=/usr/local/mysql --enable-assembler --with-extra-charsets=complex --enable-thread-safe-client --with-berkeley-db --with-embedded-server --with-innodb $EXTRA_CONFIG_FLAGS
gmake -j 4
cd sql ; mv mysqld mysqld-org ;
gmake CXXLD="purify -best-effort g++" mysqld ; mv mysqld mysqld-purify
gmake CXXLD="quantify -best-effort g++" mysqld ; mv mysqld mysqld-quantify
gmake CXXLD="purecov -best-effort g++" mysqld ; mv mysqld mysqld-purecov
mv mysqld-org mysqld
# ----------------------------------------------------------------------
#set -x
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
# ----------------------------------------------------------------------

View file

@ -457,6 +457,398 @@ ccarkner@nslinuxw10.bedford.progress.com|mysql-test/r/isolation.result|200103271
ccarkner@nslinuxw10.bedford.progress.com|mysql-test/t/isolation.test|20010327145543|39049|6a39e4138dd4a456
jani@hynda.mysql.fi|client/mysqlcheck|20010419221207|26716|363e3278166d84ec
jcole@tetra.bedford.progress.com|BitKeeper/etc/logging_ok|20001004201211|30554
magnus@neptunus.(none)|ndb/src/client/Makefile|20040414084436|02010|6c2778d2bf4954a2
magnus@neptunus.(none)|ndb/src/client/odbc/Extra.mk|20040414082358|47442|eabbb28986ca817d
magnus@neptunus.(none)|ndb/src/client/odbc/Makefile|20040414084435|33394|9bc928a18aa88d66
magnus@neptunus.(none)|ndb/src/client/odbc/NdbOdbc.cpp|20040414082358|49599|aa491b06c9172d11
magnus@neptunus.(none)|ndb/src/client/odbc/NdbOdbc.def|20040414082358|51708|cd3eed2c4a0121e9
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/CodeGen.cpp|20040414082358|53823|170c83c0765b9160
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/CodeGen.hpp|20040414082358|56074|738f834f80cceba8
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_base.cpp|20040414082358|58196|96f8ceaac8138bfe
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_base.hpp|20040414082358|60340|794baaed32588409
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_column.cpp|20040414082358|62566|5dd0e5c1215bd8bf
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_column.hpp|20040414082358|64739|5d5816d1c496e588
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_comp_op.cpp|20040414082358|01507|6ab02cc3b1e08985
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_comp_op.hpp|20040414082358|03757|37cf1e4cee3a6bf1
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_create_index.cpp|20040414082358|06374|d1f95c5917afab9
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_create_index.hpp|20040414082358|08625|12bcb33350fc35c1
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_create_row.cpp|20040414082358|11036|33f73454f8ddf2d5
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_create_row.hpp|20040414082358|13441|38cb00cc1baa9ee7
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_create_table.cpp|20040414082358|15724|c25e7cc06414a927
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_create_table.hpp|20040414082358|18032|9648f467f3f0418e
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_data_type.cpp|20040414082358|20759|9e46a7ef85345d4
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_data_type.hpp|20040414082358|23055|5e8928968d3c0107
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_ddl.cpp|20040414082358|25484|c38ee5368efaf688
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_ddl.hpp|20040414082358|27775|75482ddd87b65036
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_ddl_column.cpp|20040414082358|32443|c524862773dd9f38
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_ddl_column.hpp|20040414082358|33650|c9e534e381b21599
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_ddl_constr.cpp|20040414082359|02893|80ae32f83a6c2f00
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_ddl_constr.hpp|20040414082359|05185|bca16806c57bc97e
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_ddl_row.cpp|20040414082359|07481|ec2fbc3b8ab08a52
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_ddl_row.hpp|20040414082359|09844|c18a43b3770ad25a
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_delete.cpp|20040414082359|12149|feac77b440d04327
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_delete.hpp|20040414082359|14544|c852ee069a761aab
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_delete_index.cpp|20040414082359|17020|17ed96eca90fe4e7
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_delete_index.hpp|20040414082359|19336|18a9bb119b04636
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_delete_lookup.cpp|20040414082359|23008|1a3728f8c896684
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_delete_lookup.hpp|20040414082359|26530|1be71525ed9ee69
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_delete_scan.cpp|20040414082359|29062|b040ad7670c24eb5
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_delete_scan.hpp|20040414082359|31380|b9a11b4ec895d159
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_dml.cpp|20040414082359|33830|6826ad60f0f566e7
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_dml.hpp|20040414082359|36167|8fdbf19ad3174ca2
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_dml_column.cpp|20040414082359|38509|b71ce6186edf1655
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_dml_column.hpp|20040414082359|40901|a843b3418b30b7a3
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_dml_row.cpp|20040414082359|43239|17c791507b36cc06
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_dml_row.hpp|20040414082359|46942|33c4cffdd238728d
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_drop_index.cpp|20040414082359|54231|fc5cab67ae58d9f6
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_drop_index.hpp|20040414082359|55474|377c9eb280ec2ee2
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_drop_table.cpp|20040414082359|57899|9637d93efa68996a
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_drop_table.hpp|20040414082359|60249|d671379125e4bbbe
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_expr.cpp|20040414082359|64572|fafd271880c70cf3
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_expr.hpp|20040414082359|01410|9e8243e99e0ec84
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_expr_column.cpp|20040414082359|03836|4c4fbcd5741cc8cf
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_expr_column.hpp|20040414082359|06355|9c4cbbdf432dc475
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_expr_const.cpp|20040414082359|08702|bdb29dcd94ac5e73
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_expr_const.hpp|20040414082359|12473|9c8789cff376b832
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_expr_conv.cpp|20040414082359|15160|d252fbfe8ef55fff
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_expr_conv.hpp|20040414082359|18741|5cbea39eecb92a43
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_expr_func.cpp|20040414082359|21099|5d3996f062fa3f52
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_expr_func.hpp|20040414082359|23589|22aee1e4f92c49b9
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_expr_op.cpp|20040414082359|25965|e1aaa0244f2efa4
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_expr_op.hpp|20040414082359|28432|4eb8c02dd0602f
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_expr_param.cpp|20040414082359|30810|a5e94ee7c5821611
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_expr_param.hpp|20040414082359|33263|ec441ad8ef21aa2b
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_expr_row.cpp|20040414082400|01179|bc73d8f9c681d418
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_expr_row.hpp|20040414082400|03567|c541c49ea8c0c4f2
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_idx_column.cpp|20040414082400|06012|7d4d074ce5daea0a
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_idx_column.hpp|20040414082400|08377|caabaafa34722be7
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_insert.cpp|20040414082400|10799|7d0ef7cc8f657fd5
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_insert.hpp|20040414082400|14354|cc96fa9b81169471
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_pred.cpp|20040414082400|16798|56faa755aa42ddfa
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_pred.hpp|20040414082400|19159|eada43753e8b1e6c
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_pred_op.cpp|20040414082400|21533|47d693dde1a6d907
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_pred_op.hpp|20040414082400|23992|b42256983d2bda7b
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_query.cpp|20040414082400|26355|4ac293821c9b4602
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_query.hpp|20040414082400|28888|f86fbd9a108206c0
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_query_count.cpp|20040414082400|31247|9fa96a57d2dde660
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_query_count.hpp|20040414082400|33607|bdbe6e4734abc0c5
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_query_distinct.cpp|20040414082400|37150|3ba18528aa67b9dd
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_query_distinct.hpp|20040414082400|39517|c12b2b7ff6b2e7b3
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_query_filter.cpp|20040414082400|41984|a3d067d5d8fb40c
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_query_filter.hpp|20040414082400|44363|d0a341f2e40f0183
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_query_group.cpp|20040414082400|46860|4443c844308f9a98
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_query_group.hpp|20040414082400|49266|ba4691be942c6e2a
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_query_index.cpp|20040414082400|51663|f0312c9e2f22daf6
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_query_index.hpp|20040414082400|54471|6baaf1abbb704bb1
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_query_join.cpp|20040414082400|56943|36e07422c67d6838
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_query_join.hpp|20040414082400|59419|c4d17d18c4e3b4a0
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_query_lookup.cpp|20040414082400|61998|3d80e3ddbdae531d
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_query_lookup.hpp|20040414082400|00081|73332533e5196630
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_query_project.cpp|20040414082400|01373|ebc22f71bb7ec98c
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_query_project.hpp|20040414082400|03788|2734cdf1f907e0a4
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_query_range.cpp|20040414082400|06316|62ddafd2d17063cc
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_query_range.hpp|20040414082400|09865|81546843616efefa
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_query_repeat.cpp|20040414082400|11154|ce8f2a065897d6e3
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_query_repeat.hpp|20040414082400|13697|c20e10d0db9ad53c
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_query_scan.cpp|20040414082400|16320|855e56d6f56de938
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_query_scan.hpp|20040414082400|20784|b93c277da5b2509b
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_query_sort.cpp|20040414082400|24684|c08fc07f739de097
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_query_sort.hpp|20040414082400|25997|84edb5e128eda962
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_query_sys.cpp|20040414082400|28427|1d6a4a1cec789001
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_query_sys.hpp|20040414082400|31003|f5182823da25f097
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_root.cpp|20040414082400|33423|4c26a01ced583e41
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_root.hpp|20040414082401|01466|de1fd878505d9e26
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_select.cpp|20040414082401|04049|75b2a39f282d8ef5
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_select.hpp|20040414082401|06512|f9fadc322d78033a
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_set_row.cpp|20040414082401|08991|1bda7e6f86f18aef
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_set_row.hpp|20040414082401|12465|32ac3de384b91229
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_stmt.cpp|20040414082401|13817|c0e9903aa90df90b
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_stmt.hpp|20040414082401|17310|fab11fc487e74d05
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_table.cpp|20040414082401|20990|c46b7a6e2ecf4f61
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_table.hpp|20040414082401|22331|a48d57a0375a6d56
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_table_list.cpp|20040414082402|33460|40948eccedfae7bb
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_table_list.hpp|20040414082402|34739|c1e880e9949d3a
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_update.cpp|20040414082402|37093|ed36f4a7a928a91b
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_update.hpp|20040414082402|39546|c1de760c7b580b0c
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_update_index.cpp|20040414082402|42086|a0c6ad33ffbbc00e
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_update_index.hpp|20040414082402|44472|b57bbe5c8d927df9
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_update_lookup.cpp|20040414082402|46928|3491782088e97384
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_update_lookup.hpp|20040414082402|49343|ee335822c3496863
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_update_scan.cpp|20040414082402|51785|35e5b7d4619b3e09
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Code_update_scan.hpp|20040414082402|54180|287f193ad48fbefd
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/Makefile|20040414084435|20906|420b8378d374f069
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/SimpleGram.ypp|20040414082402|57791|6301cedf92524710
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/SimpleParser.cpp|20040414082402|60351|549f93e2a7fd01b5
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/SimpleParser.hpp|20040414082402|62814|4fdff7ee3839efc4
magnus@neptunus.(none)|ndb/src/client/odbc/codegen/SimpleScan.lpp|20040414082402|65230|e11862b97fe39faf
magnus@neptunus.(none)|ndb/src/client/odbc/common/AttrArea.cpp|20040414082402|03357|1570da617a1a6c4b
magnus@neptunus.(none)|ndb/src/client/odbc/common/AttrArea.hpp|20040414082402|06048|f3d78ccd37af4e6
magnus@neptunus.(none)|ndb/src/client/odbc/common/CodeTree.cpp|20040414082402|08438|1a4912632b0a61ee
magnus@neptunus.(none)|ndb/src/client/odbc/common/CodeTree.hpp|20040414082402|10916|dcb603cce390eafa
magnus@neptunus.(none)|ndb/src/client/odbc/common/ConnArea.cpp|20040414082402|13287|103182cf445f0bc3
magnus@neptunus.(none)|ndb/src/client/odbc/common/ConnArea.hpp|20040414082402|16782|ffe99deedf7dc1ee
magnus@neptunus.(none)|ndb/src/client/odbc/common/Ctx.cpp|20040414082402|18121|ce1c13ba8a312eba
magnus@neptunus.(none)|ndb/src/client/odbc/common/Ctx.hpp|20040414082402|20500|bc88aba55ab71063
magnus@neptunus.(none)|ndb/src/client/odbc/common/DataField.cpp|20040414082402|22982|6bb1fe1cb971c8f9
magnus@neptunus.(none)|ndb/src/client/odbc/common/DataField.hpp|20040414082402|25733|d324898a9a86463d
magnus@neptunus.(none)|ndb/src/client/odbc/common/DataRow.cpp|20040414082402|29367|8764a23cee4f9481
magnus@neptunus.(none)|ndb/src/client/odbc/common/DataRow.hpp|20040414082402|31983|66a65eee1a1b2f23
magnus@neptunus.(none)|ndb/src/client/odbc/common/DataType.cpp|20040414082402|34382|29b8ddd51fdd3a2f
magnus@neptunus.(none)|ndb/src/client/odbc/common/DataType.hpp|20040414082403|02299|adef26bc1dc940eb
magnus@neptunus.(none)|ndb/src/client/odbc/common/DescArea.cpp|20040414082403|04653|aab4edd7e336acdd
magnus@neptunus.(none)|ndb/src/client/odbc/common/DescArea.hpp|20040414082403|07055|20ba9b6484762f0f
magnus@neptunus.(none)|ndb/src/client/odbc/common/DiagArea.cpp|20040414082403|09406|e3662d8977947e67
magnus@neptunus.(none)|ndb/src/client/odbc/common/DiagArea.hpp|20040414082403|11824|1c6595b5fac06eb2
magnus@neptunus.(none)|ndb/src/client/odbc/common/Makefile|20040414084435|27122|8505f6b38fe5c219
magnus@neptunus.(none)|ndb/src/client/odbc/common/OdbcData.cpp|20040414082403|16621|e557009c1ed1e017
magnus@neptunus.(none)|ndb/src/client/odbc/common/OdbcData.hpp|20040414082403|19077|2125814c1293c0b3
magnus@neptunus.(none)|ndb/src/client/odbc/common/ResultArea.cpp|20040414082403|21436|8bcc2a2d9a98b9b0
magnus@neptunus.(none)|ndb/src/client/odbc/common/ResultArea.hpp|20040414082403|23832|8d4646b94be475d1
magnus@neptunus.(none)|ndb/src/client/odbc/common/Sqlstate.cpp|20040414082403|26171|b844144af963c22c
magnus@neptunus.(none)|ndb/src/client/odbc/common/Sqlstate.hpp|20040414082403|29665|60006ee1c27c6e5
magnus@neptunus.(none)|ndb/src/client/odbc/common/StmtArea.cpp|20040414082403|32310|5c5f8613156e06b2
magnus@neptunus.(none)|ndb/src/client/odbc/common/StmtArea.hpp|20040414082403|34785|9662e56ae164eb7f
magnus@neptunus.(none)|ndb/src/client/odbc/common/StmtInfo.cpp|20040414082403|37141|54ee4040e5807214
magnus@neptunus.(none)|ndb/src/client/odbc/common/StmtInfo.hpp|20040414082403|39465|6698d657391692fc
magnus@neptunus.(none)|ndb/src/client/odbc/common/common.cpp|20040414082403|41862|4792b9ecddd99482
magnus@neptunus.(none)|ndb/src/client/odbc/common/common.hpp|20040414082403|45229|25369fa6c80eff53
magnus@neptunus.(none)|ndb/src/client/odbc/dictionary/DictCatalog.cpp|20040414082403|46524|9804b0ff3eac2f8
magnus@neptunus.(none)|ndb/src/client/odbc/dictionary/DictCatalog.hpp|20040414082403|50152|cace2fb2f6bb65e5
magnus@neptunus.(none)|ndb/src/client/odbc/dictionary/DictColumn.cpp|20040414082403|56647|b69d90c53e5b618
magnus@neptunus.(none)|ndb/src/client/odbc/dictionary/DictColumn.hpp|20040414082403|58973|c2da1b7bd0408bd1
magnus@neptunus.(none)|ndb/src/client/odbc/dictionary/DictIndex.cpp|20040414082403|62455|a456d3039e6a39e3
magnus@neptunus.(none)|ndb/src/client/odbc/dictionary/DictIndex.hpp|20040414082403|64865|f53b91a41bb96663
magnus@neptunus.(none)|ndb/src/client/odbc/dictionary/DictSchema.cpp|20040414082403|01679|639403c84a47dfdd
magnus@neptunus.(none)|ndb/src/client/odbc/dictionary/DictSchema.hpp|20040414082403|04043|5aa7dc8ade17e94c
magnus@neptunus.(none)|ndb/src/client/odbc/dictionary/DictSys.cpp|20040414082403|06523|fb89465b10c32bb0
magnus@neptunus.(none)|ndb/src/client/odbc/dictionary/DictSys.hpp|20040414082403|08917|76583ba8aa88fd6f
magnus@neptunus.(none)|ndb/src/client/odbc/dictionary/DictTable.cpp|20040414082403|11346|8f4a9ee5a8038f87
magnus@neptunus.(none)|ndb/src/client/odbc/dictionary/DictTable.hpp|20040414082403|13733|cf99a9ac3dd49206
magnus@neptunus.(none)|ndb/src/client/odbc/dictionary/Makefile|20040414084435|30267|4c1a6148787bdc2f
magnus@neptunus.(none)|ndb/src/client/odbc/docs/class.fig|20040414082403|16124|c0754ccad74d380a
magnus@neptunus.(none)|ndb/src/client/odbc/docs/descfield.pl|20040414082403|18935|e0bd59c2824824cc
magnus@neptunus.(none)|ndb/src/client/odbc/docs/diag.txt|20040414082403|21798|b66a7e227391335f
magnus@neptunus.(none)|ndb/src/client/odbc/docs/getinfo.pl|20040414082403|24266|2142ecf1567a66f6
magnus@neptunus.(none)|ndb/src/client/odbc/docs/gettypeinfo.pl|20040414082403|27572|2ea4c0589eac4e73
magnus@neptunus.(none)|ndb/src/client/odbc/docs/handleattr.pl|20040414082403|31383|b0c2a2901b68342e
magnus@neptunus.(none)|ndb/src/client/odbc/docs/main.hpp|20040414082404|00011|7b15eb7ffad488a0
magnus@neptunus.(none)|ndb/src/client/odbc/docs/ndbodbc.html|20040414082404|02501|a2f14fdd978b62cc
magnus@neptunus.(none)|ndb/src/client/odbc/docs/select.fig|20040414082404|04967|34f5222b5012e1d7
magnus@neptunus.(none)|ndb/src/client/odbc/docs/systables.pl|20040414082404|07386|1fa2191648bdb629
magnus@neptunus.(none)|ndb/src/client/odbc/docs/type.txt|20040414082404|10311|feec700c81f5095f
magnus@neptunus.(none)|ndb/src/client/odbc/driver/Func.data|20040414082404|12860|9e75f15d921063f3
magnus@neptunus.(none)|ndb/src/client/odbc/driver/Func.pl|20040414082404|16530|aefb901bc3941d32
magnus@neptunus.(none)|ndb/src/client/odbc/driver/Makefile|20040414084435|24049|80d21270fc3ad931
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLAllocConnect.cpp|20040414082404|18964|246af836b028d810
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLAllocEnv.cpp|20040414082404|21279|eaf36cf2285ec2ac
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLAllocHandle.cpp|20040414082404|23612|c0921921e84d1a10
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLAllocHandleStd.cpp|20040414082404|27069|7d145f6e3640d913
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLAllocStmt.cpp|20040414082404|29405|362331ef456ec879
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLBindCol.cpp|20040414082404|31826|fec3a78088d4951d
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLBindParam.cpp|20040414082404|34178|a50b619a23efaab
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLBindParameter.cpp|20040414082404|36965|533b1992496e2775
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLBrowseConnect.cpp|20040414082404|39327|120b61a1ff6edee3
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLBulkOperations.cpp|20040414082404|41701|7a96be04250a388
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLCancel.cpp|20040414082404|45242|27eab683f6fa6ec6
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLCloseCursor.cpp|20040414082404|47634|6cbf193aadaf1058
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLColAttribute.cpp|20040414082404|51528|f2c858b16a9360d
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLColAttributes.cpp|20040414082404|53928|d4007908ee1309d
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLColumnPrivileges.cpp|20040414082404|56456|39a3020da4c3485b
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLColumns.cpp|20040414082404|58871|1c31107df60bb544
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLConnect.cpp|20040414082404|62974|868e02a519b72743
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLCopyDesc.cpp|20040414082404|64271|286522b25a029761
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLDataSources.cpp|20040414082404|01136|12792108aac5b2ca
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLDescribeCol.cpp|20040414082404|03611|1d1faafbcd3ecb3c
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLDescribeParam.cpp|20040414082404|06014|70b016fa795ed275
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLDisconnect.cpp|20040414082404|08470|9fb4c3d7a84db50a
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLDriverConnect.cpp|20040414082404|10866|8dad42af7d17a9d9
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLDrivers.cpp|20040414082404|13335|400e7453e70f6e99
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLEndTran.cpp|20040414082404|15741|c37cce04cc303c01
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLError.cpp|20040414082404|18143|593b81885c15187b
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLExecDirect.cpp|20040414082404|20664|5e6274e76315339d
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLExecute.cpp|20040414082404|24388|1692a85f8639f71
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLExtendedFetch.cpp|20040414082404|27134|8b9d604580a83cfd
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLFetch.cpp|20040414082404|29534|fa1606aa2dd901db
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLFetchScroll.cpp|20040414082404|31991|cdb16803511963a1
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLForeignKeys.cpp|20040414082405|00096|4b8a9af2f6bf92cb
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLFreeConnect.cpp|20040414082405|02501|92359420501ebc5b
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLFreeEnv.cpp|20040414082405|04956|64f1776817464807
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLFreeHandle.cpp|20040414082405|07349|2dc029edf912c2d
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLFreeStmt.cpp|20040414082405|09791|8f8cb0a43c02a67
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLGetConnectAttr.cpp|20040414082405|13307|b29ff18aeedd8966
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLGetConnectOption.cpp|20040414082405|15755|3e0bc4e1af95c682
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLGetCursorName.cpp|20040414082405|19268|8266b920671b6d01
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLGetData.cpp|20040414082405|21785|3d837348460c219d
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLGetDescField.cpp|20040414082405|24186|62828192a7d1d954
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLGetDescRec.cpp|20040414082405|26589|f54cc69bcd1238ad
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLGetDiagField.cpp|20040414082405|29075|673e1ea0f9d5121f
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLGetDiagRec.cpp|20040414082405|31498|bea0f68f5b940ab8
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLGetEnvAttr.cpp|20040414082405|33972|e742277d8bdf234d
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLGetFunctions.cpp|20040414082405|36391|72de050fbfb4a9bb
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLGetInfo.cpp|20040414082405|38935|e4e09d6bedbf02b1
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLGetStmtAttr.cpp|20040414082405|41363|de7dabc8c2acea7
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLGetStmtOption.cpp|20040414082405|43806|2ff900ebdd167077
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLGetTypeInfo.cpp|20040414082405|46378|333196b07473dff6
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLMoreResults.cpp|20040414082405|48899|483d94cb57379e81
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLNativeSql.cpp|20040414082405|51374|eeae6067f4a85c
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLNumParams.cpp|20040414082405|57810|8921304c3bcf4835
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLNumResultCols.cpp|20040414082405|59136|4d2b6527ffe81059
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLParamData.cpp|20040414082405|62648|163b046513f1e4ae
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLParamOptions.cpp|20040414082405|64040|bdcbccb961fff044
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLPrepare.cpp|20040414082405|00921|1d339fe24888087
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLPrimaryKeys.cpp|20040414082405|03420|5d7b2a0ae08a267
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLProcedureColumns.cpp|20040414082405|05843|c7a0535e9f50ff39
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLProcedures.cpp|20040414082405|08319|c59d025b22e2d1a6
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLPutData.cpp|20040414082405|11934|9dbf69ea9d369dbd
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLRowCount.cpp|20040414082405|14434|d4ac5b273afdb154
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLSetConnectAttr.cpp|20040414082405|16860|c2c520c34c41bd88
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLSetConnectOption.cpp|20040414082405|19298|dadc980d9f9cad1b
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLSetCursorName.cpp|20040414082405|21855|ccfc33dd2cf6abeb
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLSetDescField.cpp|20040414082405|24355|c4db694d1b9e8f77
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLSetDescRec.cpp|20040414082405|26866|f8dd72467d5012ab
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLSetEnvAttr.cpp|20040414082405|29480|7b50aeae6228c2db
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLSetParam.cpp|20040414082405|31915|e0dd2d5e8d3ec450
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLSetPos.cpp|20040414082405|34406|39a3e69960041aa7
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLSetScrollOptions.cpp|20040414082406|03524|6f8250379bb0cac8
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLSetStmtAttr.cpp|20040414082406|06008|e99b7e6025a1ae1f
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLSetStmtOption.cpp|20040414082406|10068|87af3125a48c27fa
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLSpecialColumns.cpp|20040414082406|12486|1877b4c368825de5
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLStatistics.cpp|20040414082406|14949|87e0359f237aa66a
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLTablePrivileges.cpp|20040414082406|17508|fa16ea0fffa4edeb
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLTables.cpp|20040414082406|20645|c8b201068baec393
magnus@neptunus.(none)|ndb/src/client/odbc/driver/SQLTransact.cpp|20040414082406|23280|eb33c2f66ee85738
magnus@neptunus.(none)|ndb/src/client/odbc/driver/driver.cpp|20040414082406|25724|f8f1eeec35b08f18
magnus@neptunus.(none)|ndb/src/client/odbc/driver/driver.hpp|20040414082406|29359|f108f4eef34ec8ea
magnus@neptunus.(none)|ndb/src/client/odbc/executor/Exec_comp_op.cpp|20040414082406|31800|eacbd7512b32d68b
magnus@neptunus.(none)|ndb/src/client/odbc/executor/Exec_create_index.cpp|20040414082406|35482|c6b8e670198adfa9
magnus@neptunus.(none)|ndb/src/client/odbc/executor/Exec_create_table.cpp|20040414082406|37927|76904d417bc0a59a
magnus@neptunus.(none)|ndb/src/client/odbc/executor/Exec_delete_index.cpp|20040414082406|40489|1ffe5af6eb160a68
magnus@neptunus.(none)|ndb/src/client/odbc/executor/Exec_delete_lookup.cpp|20040414082406|43115|5d24028ce16b6623
magnus@neptunus.(none)|ndb/src/client/odbc/executor/Exec_delete_scan.cpp|20040414082406|46919|810aa4058f73c941
magnus@neptunus.(none)|ndb/src/client/odbc/executor/Exec_drop_index.cpp|20040414082406|49349|3a3871ec6ee48c28
magnus@neptunus.(none)|ndb/src/client/odbc/executor/Exec_drop_table.cpp|20040414082406|51862|639a2faba4da14f4
magnus@neptunus.(none)|ndb/src/client/odbc/executor/Exec_expr_conv.cpp|20040414082406|54314|b5452bd4fbd7c945
magnus@neptunus.(none)|ndb/src/client/odbc/executor/Exec_expr_func.cpp|20040414082406|56759|c78ab0e67d54f38c
magnus@neptunus.(none)|ndb/src/client/odbc/executor/Exec_expr_op.cpp|20040414082406|59381|5e341b2e63495ba4
magnus@neptunus.(none)|ndb/src/client/odbc/executor/Exec_insert.cpp|20040414082406|61884|71dd4bf2fb913f2e
magnus@neptunus.(none)|ndb/src/client/odbc/executor/Exec_pred_op.cpp|20040414082406|64460|ebe7b65ba81e5185
magnus@neptunus.(none)|ndb/src/client/odbc/executor/Exec_query_index.cpp|20040414082406|01584|4cada676fa178001
magnus@neptunus.(none)|ndb/src/client/odbc/executor/Exec_query_lookup.cpp|20040414082406|05431|79dfe29b088d832
magnus@neptunus.(none)|ndb/src/client/odbc/executor/Exec_query_range.cpp|20040414082406|06819|7c4e148e81a292d6
magnus@neptunus.(none)|ndb/src/client/odbc/executor/Exec_query_scan.cpp|20040414082406|09339|7c66194f7f93346f
magnus@neptunus.(none)|ndb/src/client/odbc/executor/Exec_query_sys.cpp|20040414082406|11968|d66abe07cd519163
magnus@neptunus.(none)|ndb/src/client/odbc/executor/Exec_update_index.cpp|20040414082406|14543|86140a945f790890
magnus@neptunus.(none)|ndb/src/client/odbc/executor/Exec_update_lookup.cpp|20040414082406|17085|b7a7387620cf42ab
magnus@neptunus.(none)|ndb/src/client/odbc/executor/Exec_update_scan.cpp|20040414082406|19743|2285c72106cffe0
magnus@neptunus.(none)|ndb/src/client/odbc/executor/Executor.cpp|20040414082406|22273|ccb54cc8ffe18bae
magnus@neptunus.(none)|ndb/src/client/odbc/executor/Executor.hpp|20040414082406|24762|c94d916ae5af2506
magnus@neptunus.(none)|ndb/src/client/odbc/executor/Makefile|20040414084435|12419|a08f437558c2d3b4
magnus@neptunus.(none)|ndb/src/client/odbc/handles/AttrDbc.cpp|20040414082406|27307|24a034fbb22cdb23
magnus@neptunus.(none)|ndb/src/client/odbc/handles/AttrEnv.cpp|20040414082406|30042|7d74bcba78e149d0
magnus@neptunus.(none)|ndb/src/client/odbc/handles/AttrRoot.cpp|20040414082406|32507|5def5d7e228eedf0
magnus@neptunus.(none)|ndb/src/client/odbc/handles/AttrStmt.cpp|20040414082407|00551|5363ba63b35ff8f4
magnus@neptunus.(none)|ndb/src/client/odbc/handles/DescSpec.cpp|20040414082407|03310|cd50c1c855f1905
magnus@neptunus.(none)|ndb/src/client/odbc/handles/FuncTab.cpp|20040414082407|05927|e77abea11a532708
magnus@neptunus.(none)|ndb/src/client/odbc/handles/HandleBase.cpp|20040414082407|08362|2ba63dce2dfec07b
magnus@neptunus.(none)|ndb/src/client/odbc/handles/HandleBase.hpp|20040414082407|10820|8cf9a1e94d272328
magnus@neptunus.(none)|ndb/src/client/odbc/handles/HandleDbc.cpp|20040414082407|13361|2a79fea6477b2c63
magnus@neptunus.(none)|ndb/src/client/odbc/handles/HandleDbc.hpp|20040414082407|15852|9abc692ac6b0abb3
magnus@neptunus.(none)|ndb/src/client/odbc/handles/HandleDesc.cpp|20040414082407|18335|e77eb1d73d171a98
magnus@neptunus.(none)|ndb/src/client/odbc/handles/HandleDesc.hpp|20040414082407|20794|553aeb842b3da88e
magnus@neptunus.(none)|ndb/src/client/odbc/handles/HandleEnv.cpp|20040414082407|23207|6b96fc6b188f252b
magnus@neptunus.(none)|ndb/src/client/odbc/handles/HandleEnv.hpp|20040414082407|25666|572a7b4af6816f8b
magnus@neptunus.(none)|ndb/src/client/odbc/handles/HandleRoot.cpp|20040414082407|28085|aa5044f74554fa9c
magnus@neptunus.(none)|ndb/src/client/odbc/handles/HandleRoot.hpp|20040414082407|30587|2fcfca742c13cfb3
magnus@neptunus.(none)|ndb/src/client/odbc/handles/HandleStmt.cpp|20040414082407|33024|782f96bda9eaf13c
magnus@neptunus.(none)|ndb/src/client/odbc/handles/HandleStmt.hpp|20040414082407|35570|6508fc97f3c772e1
magnus@neptunus.(none)|ndb/src/client/odbc/handles/InfoTab.cpp|20040414082407|38088|f89104b9c6fe7489
magnus@neptunus.(none)|ndb/src/client/odbc/handles/Makefile|20040414084435|15527|3d8d1529ad26ce76
magnus@neptunus.(none)|ndb/src/client/odbc/handles/PoolNdb.cpp|20040414082407|40567|793fa032699b7d98
magnus@neptunus.(none)|ndb/src/client/odbc/handles/PoolNdb.hpp|20040414082407|43172|db9e1a04d2fe705d
magnus@neptunus.(none)|ndb/src/client/odbc/handles/handles.hpp|20040414082407|45564|bfe0b6a7a95ac142
magnus@neptunus.(none)|ndb/src/ndbbaseclient/Makefile|20040414084439|01640|4b92d5e5b416dd0
magnus@neptunus.(none)|ndb/src/ndbbaseclient/ndbbaseclient_dummy.cpp|20040414082426|08918|daee9eb6acbc94
magnus@neptunus.(none)|ndb/src/ndbclient/Makefile|20040414084438|29978|f993f3afae0d4308
magnus@neptunus.(none)|ndb/src/ndbclient/ndbclient_dummy.cpp|20040414082426|11587|73154070f5d0bfbf
magnus@neptunus.(none)|ndb/src/newtonapi/Makefile|20040414084438|17704|bcbd9a7282094cc
magnus@neptunus.(none)|ndb/src/newtonapi/dba_binding.cpp|20040414082426|14355|dcc4fb57f9ab6cba
magnus@neptunus.(none)|ndb/src/newtonapi/dba_bulkread.cpp|20040414082426|17142|4ddfe02a93d2ba11
magnus@neptunus.(none)|ndb/src/newtonapi/dba_config.cpp|20040414082426|19935|38acf2ad3a932420
magnus@neptunus.(none)|ndb/src/newtonapi/dba_dac.cpp|20040414082426|10457|4615e3d0d8a15bff
magnus@neptunus.(none)|ndb/src/newtonapi/dba_error.cpp|20040414082426|12319|a58b4a1628a2d4b9
magnus@neptunus.(none)|ndb/src/newtonapi/dba_init.cpp|20040414082426|15064|80da7e3fa0775346
magnus@neptunus.(none)|ndb/src/newtonapi/dba_internal.hpp|20040414082426|17987|54884404e30c8823
magnus@neptunus.(none)|ndb/src/newtonapi/dba_process.cpp|20040414082426|22216|509e54294bc7efd2
magnus@neptunus.(none)|ndb/src/newtonapi/dba_process.hpp|20040414082426|24005|f0ddefb3b2d6a662
magnus@neptunus.(none)|ndb/src/newtonapi/dba_schema.cpp|20040414082426|26757|1c3b8399853c108
magnus@neptunus.(none)|ndb/src/rep/ExtSender.cpp|20040414082426|29555|1851d559cfddae43
magnus@neptunus.(none)|ndb/src/rep/ExtSender.hpp|20040414082426|32345|10ae62ec85ee6692
magnus@neptunus.(none)|ndb/src/rep/Makefile|20040414084438|44449|954f853c2d812c2c
magnus@neptunus.(none)|ndb/src/rep/NodeConnectInfo.hpp|20040414082427|00605|9c4318dd55f3f84
magnus@neptunus.(none)|ndb/src/rep/README|20040414082427|03407|6939b06d192a6b99
magnus@neptunus.(none)|ndb/src/rep/RepApiInterpreter.cpp|20040414082427|06188|8ba561cb831ae353
magnus@neptunus.(none)|ndb/src/rep/RepApiInterpreter.hpp|20040414082427|08968|31be5af2ba72d263
magnus@neptunus.(none)|ndb/src/rep/RepApiService.cpp|20040414082427|11699|93d4005333167a0f
magnus@neptunus.(none)|ndb/src/rep/RepApiService.hpp|20040414082432|07265|42f5ffb7e3baa54e
magnus@neptunus.(none)|ndb/src/rep/RepCommandInterpreter.cpp|20040414082432|10009|f661a8ff312213f8
magnus@neptunus.(none)|ndb/src/rep/RepCommandInterpreter.hpp|20040414082432|12750|fb6f22895e8c8679
magnus@neptunus.(none)|ndb/src/rep/RepComponents.cpp|20040414082432|16488|fb067aee8e5a4a1f
magnus@neptunus.(none)|ndb/src/rep/RepComponents.hpp|20040414082432|19179|9e632beac4f8bbf8
magnus@neptunus.(none)|ndb/src/rep/RepMain.cpp|20040414082432|21936|de79cb7b6f3acd18
magnus@neptunus.(none)|ndb/src/rep/Requestor.cpp|20040414082432|24636|c653fa987f84ce43
magnus@neptunus.(none)|ndb/src/rep/Requestor.hpp|20040414082432|27340|a499054c9a128dbd
magnus@neptunus.(none)|ndb/src/rep/RequestorSubscriptions.cpp|20040414082432|30099|f0643f7cc9aa9654
magnus@neptunus.(none)|ndb/src/rep/SignalQueue.cpp|20040414082432|32849|6d32d876acc1a598
magnus@neptunus.(none)|ndb/src/rep/SignalQueue.hpp|20040414082432|35536|b92204ff36f399d1
magnus@neptunus.(none)|ndb/src/rep/TODO|20040414082432|38233|187896dd2e5dfd02
magnus@neptunus.(none)|ndb/src/rep/adapters/AppNDB.cpp|20040414082432|46457|1db5eafacdeda3b7
magnus@neptunus.(none)|ndb/src/rep/adapters/AppNDB.hpp|20040414082432|49233|2c3081224b4ff75f
magnus@neptunus.(none)|ndb/src/rep/adapters/ExtAPI.cpp|20040414082432|51989|d98f38669b10ca97
magnus@neptunus.(none)|ndb/src/rep/adapters/ExtAPI.hpp|20040414082432|54656|32bcb96bcd2d60c
magnus@neptunus.(none)|ndb/src/rep/adapters/ExtNDB.cpp|20040414082432|57410|38cccb80529c02c6
magnus@neptunus.(none)|ndb/src/rep/adapters/ExtNDB.hpp|20040414082432|60222|ee245e7e2c707685
magnus@neptunus.(none)|ndb/src/rep/adapters/Makefile|20040414084438|21912|bcb9d87fd69a7911
magnus@neptunus.(none)|ndb/src/rep/adapters/TableInfoPs.hpp|20040414082432|62988|56b1f8f75fe7cb1c
magnus@neptunus.(none)|ndb/src/rep/dbug_hack.cpp|20040414082432|40989|f090906a24103f0
magnus@neptunus.(none)|ndb/src/rep/rep_version.hpp|20040414082432|43779|82a23fe4dbb13cab
magnus@neptunus.(none)|ndb/src/rep/repapi/Makefile|20040414084438|41386|25c4b35b84d945b4
magnus@neptunus.(none)|ndb/src/rep/repapi/repapi.cpp|20040414082432|00155|82b9b00c67cfdcf7
magnus@neptunus.(none)|ndb/src/rep/repapi/repapi.h|20040414082432|02987|6f8cf6b53a86a5ae
magnus@neptunus.(none)|ndb/src/rep/state/Channel.cpp|20040414082432|05711|1d5f62245962b839
magnus@neptunus.(none)|ndb/src/rep/state/Channel.hpp|20040414082432|08527|71c1d63ef4b2cbfe
magnus@neptunus.(none)|ndb/src/rep/state/Interval.cpp|20040414082432|11324|3d079ca9cc21124d
magnus@neptunus.(none)|ndb/src/rep/state/Interval.hpp|20040414082432|14048|85aa46fc419bb109
magnus@neptunus.(none)|ndb/src/rep/state/Makefile|20040414084438|33082|6a9cedaeedcc4650
magnus@neptunus.(none)|ndb/src/rep/state/RepState.cpp|20040414082432|16760|3d60b0a46e9477c1
magnus@neptunus.(none)|ndb/src/rep/state/RepState.hpp|20040414082432|19671|94d7c472c8a7367
magnus@neptunus.(none)|ndb/src/rep/state/RepStateEvent.cpp|20040414082432|22494|f51d7eb7b7aca0b
magnus@neptunus.(none)|ndb/src/rep/state/RepStateRequests.cpp|20040414082432|25234|393882166df6929
magnus@neptunus.(none)|ndb/src/rep/state/testInterval/Makefile|20040414084438|35164|e33e587a7947ac36
magnus@neptunus.(none)|ndb/src/rep/state/testInterval/testInterval.cpp|20040414082432|27995|993f4118f616e80
magnus@neptunus.(none)|ndb/src/rep/state/testRepState/Makefile|20040414084438|28225|f5a6d9415d7e0977
magnus@neptunus.(none)|ndb/src/rep/state/testRepState/testRequestor.cpp|20040414082432|30850|4a943fae5be63c79
magnus@neptunus.(none)|ndb/src/rep/state/testRepState/testRequestor.hpp|20040414082432|33580|583208c83ff5b554
magnus@neptunus.(none)|ndb/src/rep/storage/GCIBuffer.cpp|20040414082433|01915|6e8c6f38ab63d1d6
magnus@neptunus.(none)|ndb/src/rep/storage/GCIBuffer.hpp|20040414082433|04667|703e2016a7ec616f
magnus@neptunus.(none)|ndb/src/rep/storage/GCIContainer.cpp|20040414082433|07490|9c53acd16fc5ac74
magnus@neptunus.(none)|ndb/src/rep/storage/GCIContainer.hpp|20040414082433|10275|ac28cea9114659fd
magnus@neptunus.(none)|ndb/src/rep/storage/GCIContainerPS.cpp|20040414082433|13103|116168903a2c617a
magnus@neptunus.(none)|ndb/src/rep/storage/GCIContainerPS.hpp|20040414082433|15896|9a801ffe939e192e
magnus@neptunus.(none)|ndb/src/rep/storage/GCIPage.cpp|20040414082433|18724|42fa918fbf36828a
magnus@neptunus.(none)|ndb/src/rep/storage/GCIPage.hpp|20040414082433|22604|4197e2278326515e
magnus@neptunus.(none)|ndb/src/rep/storage/LogRecord.hpp|20040414082433|25752|11644fe7c5f5d36
magnus@neptunus.(none)|ndb/src/rep/storage/Makefile|20040414084438|25055|a955d34726662aba
magnus@neptunus.(none)|ndb/src/rep/storage/NodeConnectInfo.hpp|20040414082433|28517|35a7682fd9dba464
magnus@neptunus.(none)|ndb/src/rep/storage/NodeGroup.cpp|20040414082433|31343|adebbefb11cd1670
magnus@neptunus.(none)|ndb/src/rep/storage/NodeGroup.hpp|20040414082433|34127|3fcddc2da5d10e45
magnus@neptunus.(none)|ndb/src/rep/storage/NodeGroupInfo.cpp|20040414082433|36945|b1130e3c42777658
magnus@neptunus.(none)|ndb/src/rep/storage/NodeGroupInfo.hpp|20040414082433|39718|7fd3b74f4b59a503
magnus@neptunus.(none)|ndb/src/rep/transfer/Makefile|20040414084438|38260|6b43df78ea480db1
magnus@neptunus.(none)|ndb/src/rep/transfer/TransPS.cpp|20040414082433|43592|7a88ca746987ac10
magnus@neptunus.(none)|ndb/src/rep/transfer/TransPS.hpp|20040414082433|46546|846b26eaa80632a1
magnus@neptunus.(none)|ndb/src/rep/transfer/TransSS.cpp|20040414082433|49370|8f12a062b240eecf
magnus@neptunus.(none)|ndb/src/rep/transfer/TransSS.hpp|20040414082433|52255|7718b5e4ce9a4007
magnus@neptunus.(none)|ndb/src/rep/transfer/TransSSSubscriptions.cpp|20040414082433|55067|6bc55e474f33e023
magnus@neptunus.(none)|ndb/tools/ndbnet/Makefile.PL|20040414082442|56473|81be90388548652f
magnus@neptunus.(none)|ndb/tools/ndbnet/lib/NDB/Net.pm|20040414082442|02828|425c84165071d5f6
magnus@neptunus.(none)|ndb/tools/ndbnet/lib/NDB/Net/Base.pm|20040414082442|11671|50a6f0d38fa1a57c
@ -789,26 +1181,15 @@ sasha@mysql.sashanet.com|build-tags|20011125054855|05181|7afb7e785b80f97
sasha@mysql.sashanet.com|build-tags|20011201050944|25384|b6f6fff142121618
sasha@mysql.sashanet.com|libmysql_r/acconfig.h|20001128060846|51084|65f1202b3b5c345f
sasha@mysql.sashanet.com|mysql-test/README.gcov|20001012045950|28177|5a6da067a30780ce
sasha@mysql.sashanet.com|mysql-test/README.gcov|20001214012355|41825|2de7575ca81155e5
sasha@mysql.sashanet.com|mysql-test/README|20001010001022|12739|108667adaeabe3f5
sasha@mysql.sashanet.com|mysql-test/r/3.23/alt000001.result|20001122072330|24729|393103dbf15f35c9
sasha@mysql.sashanet.com|mysql-test/r/3.23/ins000001.result|20001018175743|49824|f45c599efdf8352b
sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000001.a.result|20001118063528|39426|2987b17db06808c3
sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000001.b.result|20001118063528|44057|62e1fa91167cacc3
sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000002.result|20001118063528|46039|109f5ceed1e0d64
sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000003.result|20001118063528|48148|68d6ee00beaa011
sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000004.a.result|20001118063528|50132|3415f066cb91c460
sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000004.b.result|20001118063528|52094|352b35351551485
sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000005.result|20001118063528|54071|a50962bc2340ab9a
sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000006.result|20001118063528|56081|5653051e8ce6b4aa
sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000007.result|20001121063807|21606|e0c3b6134e0884da
sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000008.result|20001121063807|23636|c5cfee19ca5a7da9
sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000009.result|20001121063807|25633|ed8042446ab97926
sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000010.result|20001122072330|29430|3228109b8965b0f8
sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000011.result|20001125024912|48851|c29dce30aa97f265
sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000012.result|20001126062901|05938|35d6596da7b90fc5
sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000012.status.result|20001126062901|09395|bbbd650b5beea32f
sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000013.result|20001202171150|03876|ac5024e6cf6daac6
sasha@mysql.sashanet.com|mysql-test/r/3.23/rpl000013.status.result|20001202171150|06069|6bee190c298cc9fd
sasha@mysql.sashanet.com|mysql-test/r/3.23/sel000003.result|20001011230020|64653|d7b657b1e3a286a7
sasha@mysql.sashanet.com|mysql-test/r/3.23/sel000100.res|20001205131218|23520|84ed46856cb3a69f
@ -817,7 +1198,6 @@ sasha@mysql.sashanet.com|mysql-test/r/binlog-backup-restore.result|2001042423392
sasha@mysql.sashanet.com|mysql-test/r/df_crash.result|20010406010433|59989|4a3dbee64843953d
sasha@mysql.sashanet.com|mysql-test/r/identity.result|20010910233028|16331|e41453a364242503
sasha@mysql.sashanet.com|mysql-test/r/mrg000002.result|20001212152450|11492|745be0854aaaaf5e
sasha@mysql.sashanet.com|mysql-test/r/slave-running.result|20001208141122|24303|f73e49462cf59e1f
sasha@mysql.sashanet.com|mysql-test/r/slave-stopped.result|20001208141122|28916|25c134b1a4f1993a
sasha@mysql.sashanet.com|mysql-test/std_data/m.MRG|20001212152450|17736|3f5632c37af00f18
sasha@mysql.sashanet.com|mysql-test/std_data/m.frm|20001212152450|13897|e351dfe0b6824c0c

View file

@ -128,6 +128,7 @@ miguel@light.
miguel@light.local
miguel@sartre.local
mikael@mc04.(none)
mikael@orca.ndb.mysql.com
mikron@c-fb0ae253.1238-1-64736c10.cust.bredbandsbolaget.se
mikron@mikael-ronstr-ms-dator.local
mleich@mysql.com
@ -150,8 +151,10 @@ monty@tramp.mysql.fi
monty@work.mysql.com
mronstrom@build.mysql.com
mronstrom@mysql.com
mskold@bk-internal.mysql.com
mskold@mysql.com
msvensson@build.mysql.com
msvensson@neptunus.homeip.net
mwagner@cash.mwagner.org
mwagner@evoq.mwagner.org
mwagner@here.mwagner.org
@ -160,6 +163,7 @@ mwagner@work.mysql.com
mydev@mysql.com
mysql@home.(none)
mysql@mc04.(none)
mysqldev@bk-internal.mysql.com
mysqldev@build.mysql2.com
mysqldev@melody.local
mysqldev@mysql.com
@ -196,6 +200,7 @@ ram@gw.mysql.r18.ru
ram@gw.udmsearch.izhnet.ru
ram@mysql.r18.ru
ram@ram.(none)
ramil@mysql.com
ranger@regul.home.lan
rburnett@build.mysql.com
reggie@bob.(none)

View file

@ -210,10 +210,16 @@ if (-d $target_dir)
}
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.= "-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!");
}
}

View file

@ -7,7 +7,7 @@ use Sys::Hostname;
@config_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_tmp=$opt_version_suffix="";
$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;
@ -17,6 +17,7 @@ GetOptions(
"bdb",
"build-thread=i",
"bundled-zlib",
"comment=s",
"config-env=s" => \@config_env,
"config-extra-env=s" => \@config_extra_env,
"config-options=s" => \@config_options,
@ -111,6 +112,7 @@ $log="$pwd/Logs/$host-$major.$minor$opt_version_suffix.log";
$opt_distribution =~ /(mysql[^\/]*)\.tar/;
$ver=$1;
$gcc_version=which("gcc");
$opt_comment= "Official MySQL$opt_version_suffix binary" unless $opt_comment;
if (defined($gcc_version) && ! $opt_config_env)
{
$tmp=`$gcc_version -v 2>&1`;
@ -305,7 +307,7 @@ if ($opt_stage <= 1)
}
$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")
{
safe_system("cp -r $pwd/$host/include-mysql/* $pwd/$host/$ver/include");
@ -532,6 +534,10 @@ When running several Do-compile runs in parallel, each build
should have its own thread ID, so running the test suites
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>
To set up the environment, like 'CC=cc CXX=gcc CXXFLAGS=-O3'
@ -689,16 +695,20 @@ sub abort
if ($opt_user)
{
$mail_header_file="$opt_tmp/do-command.$$";
open(TMP,">$mail_header_file");
# Take the last 40 lines of the build log
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 "To: $email\n";
print TMP "Subject: $host($uname): $ver$opt_version_suffix compilation failed\n\n";
print TMP @log;
close TMP;
system("tail -n 40 $log > $log.mail");
system("cat $mail_header_file $log.mail | $sendmail -t -f $email");
unlink($mail_header_file);
unlink("$log.mail");
system("$sendmail -t -f $email < $mail_file");
unlink($mail_file);
}
exit 1;
}

183
Build-tools/Do-solaris-pkg Normal file
View 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 "");
}

View file

@ -109,6 +109,12 @@ sub add_copyright
$line_copyright= "! ";
$end_copyright= "";
}
elsif ($ARGV =~ /\.sql$/)
{
$start_copyright="-- ";
$line_copyright= "-- ";
$end_copyright= "";
}
elsif ($ARGV =~ /\.asm$/)
{
$start_copyright="; ";

View file

@ -735,15 +735,15 @@ Package=<4>
###############################################################################
Project: "mysqltest"=.\client\mysqltest.dsp - Package Owner=<4>
Package=<5>
Project: "mysqltest"=.\client\mysqltest.dsp - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
}}}
Package=<4>
{{{ Begin Project Dependency
Project_Dep_Name libmysql
End Project Dependency
Begin Project Dependency
@ -754,24 +754,40 @@ Package=<4>
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>
{{{
}}}
Package=<4>
{{{
Begin Project Dependency
Project: "mysql_test_run_new"=".\mysql-test\mysql_test_run_new.dsp" - Package Owner=<4>
Package=<5>
{{{
}}}
Package=<4>
{{{ Begin Project Dependency
Project_Dep_Name mysqltest
End Project Dependency
Begin Project Dependency
Project_Dep_Name mysqladmin
End Project Dependency
Begin Project Dependency
Project_Dep_Name mysql_client_test
End Project Dependency
}}}
###############################################################################
Global:

View 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/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/client_test.pch" /Fo".\Release/" /Fd".\Release/" /c /GX
# ADD BASE MTL /nologo /tlb".\Release\client_test.tlb" /win32
# ADD MTL /nologo /tlb".\Release\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\client_test.exe" /incremental:no /pdb:".\Release\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\client_test.exe" /incremental:no /pdb:".\Release\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

View file

@ -34,7 +34,8 @@ mysqltest_SOURCES= mysqltest.c $(top_srcdir)/mysys/my_getsystime.c
mysqltest_LDADD = $(top_builddir)/regex/libregex.a $(LDADD)
mysqlbinlog_SOURCES = mysqlbinlog.cc $(top_srcdir)/mysys/mf_tempdir.c
mysqlmanagerc_SOURCES = mysqlmanagerc.c
sql_src=log_event.h mysql_priv.h log_event.cc
sql_src=log_event.h mysql_priv.h log_event.cc my_decimal.h my_decimal.cc
strings_src=decimal.c
# Fix for mit-threads
DEFS = -DUNDEF_THREADS_HACK
@ -43,7 +44,11 @@ link_sources:
for f in $(sql_src) ; do \
rm -f $(srcdir)/$$f; \
@LN_CP_F@ $(top_srcdir)/sql/$$f $(srcdir)/$$f; \
done;
done; \
for f in $(strings_src) ; do \
rm -f $(srcdir)/$$f; \
@LN_CP_F@ $(top_srcdir)/strings/$$f $(srcdir)/$$f; \
done;
# Don't update the files from bitkeeper
%::SCCS/s.%

View file

@ -155,6 +155,8 @@ static char mysql_charsets_dir[FN_REFLEN+1];
static const char *xmlmeta[] = {
"&", "&amp;",
"<", "&lt;",
">", "&gt;",
"\"", "&quot;",
0, 0
};
static const char *day_names[]={"Sun","Mon","Tue","Wed","Thu","Fri","Sat"};
@ -2126,13 +2128,11 @@ print_table_data_xml(MYSQL_RES *result)
(void) tee_fputs("\n <row>\n", PAGER);
for (uint i=0; i < mysql_num_fields(result); i++)
{
tee_fprintf(PAGER, "\t<%s>", (fields[i].name ?
(fields[i].name[0] ? fields[i].name :
" &nbsp; ") : "NULL"));
tee_fprintf(PAGER, "\t<field name=\"");
xmlencode_print(fields[i].name, strlen(fields[i].name));
tee_fprintf(PAGER, "\">");
xmlencode_print(cur[i], lengths[i]);
tee_fprintf(PAGER, "</%s>\n", (fields[i].name ?
(fields[i].name[0] ? fields[i].name :
" &nbsp; ") : "NULL"));
tee_fprintf(PAGER, "</field>\n");
}
(void) tee_fputs(" </row>\n", PAGER);
}

View file

@ -1009,6 +1009,7 @@ static void usage(void)
print_defaults("my",load_default_groups);
puts("\nWhere command is a one or more of: (Commands may be shortened)\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\
extended-status Gives an extended status message from the server\n\
flush-hosts Flush all cached hosts\n\

View file

@ -488,6 +488,15 @@ end:
static struct my_option my_long_options[] =
{
/*
mysqlbinlog needs charsets knowledge, to be able to convert a charset
number found in binlog to a charset name (to be able to print things
like this:
SET @`a`:=_cp850 0x4DFC6C6C6572 COLLATE `cp850_general_ci`;
*/
{"character-sets-dir", OPT_CHARSETS_DIR,
"Directory where character sets are.", (gptr*) &charsets_dir,
(gptr*) &charsets_dir, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
#ifndef DBUG_OFF
{"debug", '#', "Output debug log.", (gptr*) &default_dbug_option,
(gptr*) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
@ -1271,8 +1280,14 @@ int main(int argc, char** argv)
*/
#ifdef __WIN__
#include "my_decimal.h"
#include "decimal.c"
#include "my_decimal.cpp"
#include "log_event.cpp"
#else
#include "my_decimal.h"
#include "decimal.c"
#include "my_decimal.cc"
#include "log_event.cc"
#endif

View file

@ -195,7 +195,7 @@ static void usage(void)
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("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("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");

View file

@ -493,7 +493,7 @@ static void write_header(FILE *sql_file, char *db_name)
");
}
fprintf(sql_file,
"/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE=\"%s%s%s\" */;\n",
"/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='%s%s%s' */;\n",
path?"":"NO_AUTO_VALUE_ON_ZERO",compatible_mode_normal_str[0]==0?"":",",
compatible_mode_normal_str);
check_io(sql_file);
@ -867,7 +867,7 @@ static int dbConnect(char *host, char *user,char *passwd)
cannot reconnect.
*/
sock->reconnect= 0;
sprintf(buff, "/*!40100 SET @@SQL_MODE=\"%s\" */",
sprintf(buff, "/*!40100 SET @@SQL_MODE='%s' */",
compatible_mode_normal_str);
if (mysql_query_with_error_report(sock, 0, buff))
{
@ -2195,27 +2195,27 @@ static my_bool dump_all_views_in_db(char *database)
RETURN
void
*/
static void get_actual_table_name( const char *old_table_name,
char *new_table_name,
int buf_size )
static void get_actual_table_name(const char *old_table_name,
char *new_table_name,
int buf_size)
{
MYSQL_RES *tableRes;
MYSQL_ROW row;
char query[ NAME_LEN + 50 ];
MYSQL_RES *tableRes;
MYSQL_ROW row;
char query[ NAME_LEN + 50 ];
DBUG_ENTER("get_actual_table_name");
DBUG_ENTER("get_actual_table_name");
sprintf( query, "SHOW TABLES LIKE '%s'", old_table_name);
if (mysql_query_with_error_report(sock, 0, query))
{
safe_exit(EX_MYSQLERR);
}
sprintf( query, "SHOW TABLES LIKE '%s'", old_table_name );
if (mysql_query_with_error_report(sock, 0, query))
{
safe_exit(EX_MYSQLERR);
}
tableRes = mysql_store_result( sock );
row = mysql_fetch_row( tableRes );
strncpy( new_table_name, row[0], buf_size );
mysql_free_result(tableRes);
} /* get_actual_table_name */
tableRes= mysql_store_result( sock );
row= mysql_fetch_row( tableRes );
strmake(new_table_name, row[0], buf_size-1);
mysql_free_result(tableRes);
}
static int dump_selected_tables(char *db, char **table_names, int tables)

View file

@ -405,3 +405,20 @@ AC_DEFINE_UNQUOTED([MYSQL_DEFAULT_CHARSET_NAME], ["$default_charset"],
[Define the default charset name])
AC_DEFINE_UNQUOTED([MYSQL_DEFAULT_COLLATION_NAME], ["$default_collation"],
[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

View file

@ -3,6 +3,8 @@ dnl Define zlib paths to point at bundled zlib
AC_DEFUN([MYSQL_USE_BUNDLED_ZLIB], [
ZLIB_INCLUDES="-I\$(top_srcdir)/zlib"
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"
AC_SUBST([zlib_dir])
mysql_cv_compress="yes"
@ -44,8 +46,13 @@ dnl $prefix/lib. If zlib headers or binaries weren't found at $prefix, the
dnl macro bails out with error.
dnl
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 ZLIB_LIBS (i. e. -L/path/to/zlib/lib -lz).
dnl and configure variables ZLIB_INCLUDES (i.e. -I/path/to/zlib/include),
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_MSG_CHECKING([for zlib compression library])
@ -94,7 +101,11 @@ case $SYSTEM_TYPE in
;;
esac
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_DEPS])
AC_SUBST([ZLIB_INCLUDES])
AC_DEFINE([HAVE_COMPRESS], [1], [Define to enable compression support])
fi

View file

@ -918,9 +918,11 @@ if test "$ac_cv_header_termio_h" = "no" -a "$ac_cv_header_termios_h" = "no"
then
AC_CHECK_FUNC(gtty, , AC_CHECK_LIB(compat, gtty))
fi
# We make a special variable for client library's to avoid including
# thread libs in the client.
NON_THREADED_CLIENT_LIBS="$LIBS $ZLIB_LIBS"
# We make a special variable for non-threaded version of LIBS to avoid
# 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])
case $SYSTEM_TYPE in
@ -1497,7 +1499,7 @@ then
if test -f /usr/lib/libxnet.so -a "$SYSTEM_TYPE" = "sni-sysv4"
then
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"
LD_FLAGS=""
CFLAGS="-Kthread $CFLAGS"
@ -2444,7 +2446,7 @@ dnl This probably should be cleaned up more - for now the threaded
dnl client is just using plain-old libs.
sql_client_dirs="libmysql strings regex client"
linked_client_targets="linked_libmysql_sources"
CLIENT_LIBS=$NON_THREADED_CLIENT_LIBS
if test "$THREAD_SAFE_CLIENT" != "no"
then
sql_client_dirs="libmysql_r $sql_client_dirs"
@ -2452,9 +2454,11 @@ then
AC_DEFINE([THREAD_SAFE_CLIENT], [1], [Should be client be thread safe])
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(NON_THREADED_LIBS)
AC_SUBST(STATIC_NSS_FLAGS)
AC_SUBST(sql_client_dirs)
AC_SUBST(linked_client_targets)

View file

@ -189,6 +189,7 @@ int main(int argc,char *argv[])
{
int error,code,found;
const char *msg;
char *unknown_error = 0;
MY_INIT(argv[0]);
if (get_options(&argc,&argv))
@ -217,7 +218,14 @@ int main(int argc,char *argv[])
string 'Unknown Error'. To avoid printing it we try to find the
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++)
{
@ -267,6 +275,11 @@ int main(int argc,char *argv[])
}
}
}
/* if we allocated a buffer for unknown_error, free it now */
if (unknown_error)
free(unknown_error);
exit(error);
return error;
}

View file

@ -26,7 +26,9 @@ typedef struct st_decimal {
decimal_digit *buf;
} decimal;
int decimal2string(decimal *from, char *to, int *to_len);
int decimal2string(decimal *from, char *to, int *to_len,
int fixed_precision, int fixed_decimals,
char filler);
int string2decimal(char *from, decimal *to, char **end);
int string2decimal_fixed(char *from, decimal *to, char **end);
int decimal2ulonglong(decimal *from, ulonglong *to);
@ -35,6 +37,7 @@ int decimal2longlong(decimal *from, longlong *to);
int longlong2decimal(longlong from, decimal *to);
int decimal2double(decimal *from, double *to);
int double2decimal(double from, decimal *to);
void decimal_optimize_fraction(decimal *from);
int decimal2bin(decimal *from, char *to, int precision, int scale);
int bin2decimal(char *from, decimal *to, int precision, int scale);
@ -50,6 +53,7 @@ int decimal_div(decimal *from1, decimal *from2, decimal *to, int scale_incr);
int decimal_mod(decimal *from1, decimal *from2, decimal *to);
int decimal_round(decimal *from, decimal *to, int new_scale, decimal_round_mode mode);
int decimal_is_zero(decimal *from);
void max_decimal(int precision, int frac, decimal *to);
/* set a decimal to zero */
@ -65,7 +69,8 @@ int decimal_is_zero(decimal *from);
of the decimal (including decimal dot, possible sign and \0)
*/
#define decimal_string_size(dec) ((dec)->intg + (dec)->frac + ((dec)->frac > 0) + 2)
#define decimal_string_size(dec) (((dec)->intg ? (dec)->intg : 1) + \
(dec)->frac + ((dec)->frac > 0) + 2)
/* negate a decimal */
#define decimal_neg(dec) do { (dec)->sign^=1; } while(0)

View file

@ -62,7 +62,7 @@ void ft_free_stopwords(void);
#define FT_SORTED 2
#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 *);
#ifdef __cplusplus

View file

@ -135,7 +135,13 @@
#ifdef HAVE_UNIXWARE7_THREADS
#include <thread.h>
#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 */
#endif
#endif /* HAVE_UNIXWARE7_THREADS */
#endif /* HAVE_mit_thread */
#if !defined(SCO) && !defined(_REENTRANT)

View file

@ -337,6 +337,17 @@ typedef struct st_mysql_parameters
*/
int STDCALL mysql_server_init(int argc, char **argv, char **groups);
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);

View file

@ -216,6 +216,7 @@ enum enum_field_types { MYSQL_TYPE_DECIMAL, MYSQL_TYPE_TINY,
MYSQL_TYPE_DATETIME, MYSQL_TYPE_YEAR,
MYSQL_TYPE_NEWDATE, MYSQL_TYPE_VARCHAR,
MYSQL_TYPE_BIT,
MYSQL_TYPE_NEWDECIMAL=246,
MYSQL_TYPE_ENUM=247,
MYSQL_TYPE_SET=248,
MYSQL_TYPE_TINY_BLOB=249,
@ -231,6 +232,7 @@ enum enum_field_types { MYSQL_TYPE_DECIMAL, MYSQL_TYPE_TINY,
/* For backward compatibility */
#define CLIENT_MULTI_QUERIES CLIENT_MULTI_STATEMENTS
#define FIELD_TYPE_DECIMAL MYSQL_TYPE_DECIMAL
#define FIELD_TYPE_NEWDECIMAL MYSQL_TYPE_NEWDECIMAL
#define FIELD_TYPE_TINY MYSQL_TYPE_TINY
#define FIELD_TYPE_SHORT MYSQL_TYPE_SHORT
#define FIELD_TYPE_LONG MYSQL_TYPE_LONG
@ -346,7 +348,8 @@ struct rand_struct {
/* The following is for user defined functions */
enum Item_result {STRING_RESULT, REAL_RESULT, INT_RESULT, ROW_RESULT};
enum Item_result {STRING_RESULT, REAL_RESULT, INT_RESULT, ROW_RESULT,
DECIMAL_RESULT};
typedef struct st_udf_args
{

View file

@ -686,7 +686,9 @@ buf_read_recv_pages(
fprintf(stderr,
"InnoDB: Error: InnoDB has waited for 50 seconds for pending\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;
}

View file

@ -81,6 +81,7 @@ dtype_get_at_most_n_mbchars(
ulint data_len,
const char* str)
{
#ifndef UNIV_HOTBACKUP
ut_a(data_len != UNIV_SQL_NULL);
if (dtype_str_needs_mysql_cmp(dtype)) {
@ -99,6 +100,12 @@ dtype_get_at_most_n_mbchars(
}
return(data_len);
#else /* UNIV_HOTBACKUP */
/* This function depends on MySQL code that is not included in
InnoDB Hot Backup builds. Besides, this function should never
be called in InnoDB Hot Backup. */
ut_error;
#endif /* UNIV_HOTBACKUP */
}
/*************************************************************************

View file

@ -53,6 +53,7 @@ rw_lock_t dict_operation_lock; /* table create, drop, etc. reserve
/* Identifies generated InnoDB foreign key names */
static char dict_ibfk[] = "_ibfk_";
#ifndef UNIV_HOTBACKUP
/**********************************************************************
Compares NUL-terminated UTF-8 strings case insensitively.
@ -76,6 +77,7 @@ void
innobase_casedn_str(
/*================*/
char* a); /* in/out: string to put in lower case */
#endif /* !UNIV_HOTBACKUP */
/**************************************************************************
Adds a column to the data dictionary hash table. */
@ -2095,6 +2097,7 @@ dict_foreign_find_index(
dict_index_t* types_idx)/* in: NULL or an index to whose types the
column types must match */
{
#ifndef UNIV_HOTBACKUP
dict_index_t* index;
const char* col_name;
ulint i;
@ -2139,6 +2142,12 @@ dict_foreign_find_index(
}
return(NULL);
#else /* UNIV_HOTBACKUP */
/* This function depends on MySQL code that is not included in
InnoDB Hot Backup builds. Besides, this function should never
be called in InnoDB Hot Backup. */
ut_error;
#endif /* UNIV_HOTBACKUP */
}
/**************************************************************************
@ -2492,6 +2501,7 @@ dict_scan_col(
const char** name) /* out,own: the column name; NULL if no name
was scannable */
{
#ifndef UNIV_HOTBACKUP
dict_col_t* col;
ulint i;
@ -2525,6 +2535,12 @@ dict_scan_col(
}
return(ptr);
#else /* UNIV_HOTBACKUP */
/* This function depends on MySQL code that is not included in
InnoDB Hot Backup builds. Besides, this function should never
be called in InnoDB Hot Backup. */
ut_error;
#endif /* UNIV_HOTBACKUP */
}
/*************************************************************************
@ -2542,6 +2558,7 @@ dict_scan_table_name(
const char** ref_name)/* out,own: the table name;
NULL if no name was scannable */
{
#ifndef UNIV_HOTBACKUP
const char* database_name = NULL;
ulint database_name_len = 0;
const char* table_name = NULL;
@ -2623,6 +2640,12 @@ dict_scan_table_name(
*table = dict_table_get_low(ref);
return(ptr);
#else /* UNIV_HOTBACKUP */
/* This function depends on MySQL code that is not included in
InnoDB Hot Backup builds. Besides, this function should never
be called in InnoDB Hot Backup. */
ut_error;
#endif /* UNIV_HOTBACKUP */
}
/*************************************************************************

View file

@ -8,7 +8,9 @@ Created 4/24/1996 Heikki Tuuri
*******************************************************/
#include "dict0load.h"
#ifndef UNIV_HOTBACKUP
#include "mysql_version.h"
#endif /* !UNIV_HOTBACKUP */
#ifdef UNIV_NONINL
#include "dict0load.ic"
@ -792,6 +794,7 @@ dict_load_table(
name, (ulong)mix_len);
}
#ifndef UNIV_HOTBACKUP
#if MYSQL_VERSION_ID < 50003
/* Starting from MySQL 5.0.3, the high-order bit of MIX_LEN is the
"compact format" flag. */
@ -807,6 +810,7 @@ dict_load_table(
return(NULL);
}
#endif /* MYSQL_VERSION_ID < 50300 */
#endif /* !UNIV_HOTBACKUP */
ut_a(0 == ut_strcmp("SPACE",
dict_field_get_col(

View file

@ -3013,8 +3013,8 @@ fil_load_single_table_tablespaces(void)
/* printf(
" Looking at file %s\n", fileinfo.name); */
if (fileinfo.type == OS_FILE_TYPE_DIR
|| dbinfo.type == OS_FILE_TYPE_UNKNOWN) {
if (fileinfo.type == OS_FILE_TYPE_DIR) {
goto next_file_item;
}

View file

@ -273,6 +273,7 @@ dtype_get_fixed_size(
/* out: fixed size, or 0 */
dtype_t* type) /* in: type */
{
#ifndef UNIV_HOTBACKUP
ulint mtype;
mtype = dtype_get_mtype(type);
@ -321,6 +322,12 @@ dtype_get_fixed_size(
}
return(0);
#else /* UNIV_HOTBACKUP */
/* This function depends on MySQL code that is not included in
InnoDB Hot Backup builds. Besides, this function should never
be called in InnoDB Hot Backup. */
ut_error;
#endif /* UNIV_HOTBACKUP */
}
/***************************************************************************

View file

@ -279,7 +279,15 @@ rec_get_next_offs(
/* Note that for 64 KiB pages, field_value can 'wrap around'
and the debug assertion is not valid */
ut_ad((int16_t)field_value
/* In the following assertion, field_value is interpreted
as signed 16-bit integer in 2's complement arithmetics.
If all platforms defined int16_t in the standard headers,
the expression could be written simpler as
(int16_t) field_value + ut_align_offset(...) < UNIV_PAGE_SIZE
*/
ut_ad((field_value >= 32768
? field_value - 65536
: field_value)
+ ut_align_offset(rec, UNIV_PAGE_SIZE)
< UNIV_PAGE_SIZE);
#endif

View file

@ -294,6 +294,12 @@ srv_boot(void);
/*==========*/
/* out: DB_SUCCESS or error code */
/*************************************************************************
Initializes the server. */
void
srv_init(void);
/*==========*/
/*************************************************************************
Frees the OS fast mutex created in srv_boot(). */
void

View file

@ -53,6 +53,16 @@ srv_parse_log_group_home_dirs(
error */
char* str, /* in: character string */
char*** log_group_home_dirs); /* out, own: log group home dirs */
/*************************************************************************
Adds a slash or a backslash to the end of a string if it is missing
and the string is not empty. */
char*
srv_add_path_separator_if_needed(
/*=============================*/
/* out: string which has the separator if the
string is not empty */
char* str); /* in: null-terminated character string */
/********************************************************************
Starts Innobase and creates a new database if database files
are not found and the user wants. Server parameters are

View file

@ -17,7 +17,9 @@ Created 9/5/1995 Heikki Tuuri
#include "os0sync.h"
#include "sync0arr.h"
#ifndef UNIV_HOTBACKUP
extern my_bool timed_mutexes;
#endif /* UNIV_HOTBACKUP */
/**********************************************************************
Initializes the synchronization data structures. */
@ -475,6 +477,7 @@ struct mutex_struct {
const char* cfile_name;/* File name where mutex created */
ulint cline; /* Line where created */
ulint magic_n;
#ifndef UNIV_HOTBACKUP
ulong count_using; /* count of times mutex used */
ulong count_spin_loop; /* count of spin loops */
ulong count_spin_rounds; /* count of spin rounds */
@ -484,6 +487,7 @@ struct mutex_struct {
ulonglong lmax_spent_time; /* mutex os_wait timer msec */
const char* cmutex_name;/* mutex name */
ulint mutex_type;/* 0 - usual mutex 1 - rw_lock mutex */
#endif /* !UNIV_HOTBACKUP */
};
#define MUTEX_MAGIC_N (ulint)979585

View file

@ -250,7 +250,9 @@ mutex_enter_func(
/* Note that we do not peek at the value of lock_word before trying
the atomic test_and_set; we could peek, and possibly save time. */
#ifndef UNIV_HOTBACKUP
mutex->count_using++;
#endif /* UNIV_HOTBACKUP */
if (!mutex_test_and_set(mutex))
{

View file

@ -225,6 +225,21 @@ trx_savepoint_for_mysql(
position corresponding to this
connection at the time of the
savepoint */
/***********************************************************************
Releases a named savepoint. Savepoints which
were set after this savepoint are deleted. */
ulint
trx_release_savepoint_for_mysql(
/*================================*/
/* out: if no savepoint
of the name found then
DB_NO_SAVEPOINT,
otherwise DB_SUCCESS */
trx_t* trx, /* in: transaction handle */
const char* savepoint_name); /* in: savepoint name */
/***********************************************************************
Frees savepoint structs. */

View file

@ -173,10 +173,10 @@ their transaction objects for a recovery. */
int
trx_recover_for_mysql(
/*=================*/
/*==================*/
/* out: number of prepared transactions */
XID* xid_list, /* in/out: prepared transactions */
uint len); /* in: number of slots in xid_list */
ulint len); /* in: number of slots in xid_list */
/***********************************************************************
This function is used to commit one X/Open XA distributed transaction

View file

@ -80,10 +80,6 @@ memory is read outside the allocated blocks. */
/* Make a non-inline debug version */
#ifdef DBUG_ON
#define UNIV_DEBUG
#endif /* DBUG_ON */
/*
#define UNIV_DEBUG
#define UNIV_MEM_DEBUG

View file

@ -694,7 +694,7 @@ lock_is_table_exclusive(
trx_t* trx) /* in: transaction */
{
lock_t* lock;
bool ok = FALSE;
ibool ok = FALSE;
ut_ad(table && trx);
@ -4219,7 +4219,8 @@ lock_get_n_rec_locks(void)
return(n_locks);
}
#ifndef UNIV_HOTBACKUP
/*************************************************************************
Prints info of locks for all transactions. */
@ -4743,7 +4744,7 @@ lock_validate(void)
return(TRUE);
}
#endif /* !UNIV_HOTBACKUP */
/*============ RECORD LOCK CHECKS FOR ROW OPERATIONS ====================*/
/*************************************************************************

View file

@ -711,12 +711,12 @@ http://www.mysql.com/doc/en/Windows_symbolic_links.html */
} else if (lpFindFileData->dwFileAttributes
& FILE_ATTRIBUTE_DIRECTORY) {
info->type = OS_FILE_TYPE_DIR;
} else if (lpFindFileData->dwFileAttributes
& FILE_ATTRIBUTE_NORMAL) {
/* TODO: are FILE_ATTRIBUTE_NORMAL files really all normal files? */
info->type = OS_FILE_TYPE_FILE;
} else {
info->type = OS_FILE_TYPE_UNKNOWN;
/* It is probably safest to assume that all other
file types are normal. Better to check them rather
than blindly skip them. */
info->type = OS_FILE_TYPE_FILE;
}
}
@ -834,7 +834,7 @@ os_file_create_directory(
rcode = CreateDirectory(pathname, NULL);
if (!(rcode != 0 ||
(GetLastError() == ERROR_FILE_EXISTS && !fail_if_exists))) {
(GetLastError() == ERROR_ALREADY_EXISTS && !fail_if_exists))) {
/* failure */
os_file_handle_error(pathname, "CreateDirectory");
@ -918,8 +918,9 @@ try_again:
file = CreateFile(name,
access,
FILE_SHARE_READ,/* file can be read also by other
processes */
FILE_SHARE_READ | FILE_SHARE_WRITE,
/* file can be read ansd written also
by other processes */
NULL, /* default security attributes */
create_flag,
attributes,
@ -1024,7 +1025,7 @@ os_file_create_simple_no_error_handling(
DWORD create_flag;
DWORD access;
DWORD attributes = 0;
DWORD share_mode = FILE_SHARE_READ;
DWORD share_mode = FILE_SHARE_READ | FILE_SHARE_WRITE;
ut_a(name);
@ -1347,7 +1348,7 @@ loop:
return(TRUE);
}
if (GetLastError() == ERROR_PATH_NOT_FOUND) {
if (GetLastError() == ERROR_FILE_NOT_FOUND) {
/* the file does not exist, this not an error */
return(TRUE);
@ -1408,7 +1409,7 @@ loop:
return(TRUE);
}
if (GetLastError() == ERROR_PATH_NOT_FOUND) {
if (GetLastError() == ERROR_FILE_NOT_FOUND) {
/* If the file does not exist, we classify this as a 'mild'
error and return */

View file

@ -311,9 +311,6 @@ page_cur_search_with_match(
low_matched_bytes = cur_matched_bytes;
} else if (cmp == -1) {
offsets = rec_get_offsets(mid_rec, index, offsets,
dtuple_get_n_fields_cmp(tuple), &heap);
if (mode == PAGE_CUR_LE_OR_EXTENDS
&& page_cur_rec_field_extends(tuple, mid_rec,
offsets, cur_matched_fields)) {
@ -366,9 +363,6 @@ page_cur_search_with_match(
low_matched_bytes = cur_matched_bytes;
} else if (cmp == -1) {
offsets = rec_get_offsets(mid_rec, index, offsets,
dtuple_get_n_fields_cmp(tuple), &heap);
if (mode == PAGE_CUR_LE_OR_EXTENDS
&& page_cur_rec_field_extends(tuple, mid_rec,
offsets, cur_matched_fields)) {

View file

@ -51,14 +51,19 @@ innobase_invalidate_query_cache(
chars count */
/**********************************************************************
This function returns true if SQL-query in the current thread
This function returns true if
1) SQL-query in the current thread
is either REPLACE or LOAD DATA INFILE REPLACE.
2) SQL-query in the current thread
is INSERT ON DUPLICATE KEY UPDATE.
NOTE that /mysql/innobase/row/row0ins.c must contain the
prototype for this function ! */
ibool
innobase_query_is_replace(void);
/*===========================*/
innobase_query_is_update(void);
/*************************************************************************
Creates an insert node struct. */
@ -1541,6 +1546,7 @@ row_ins_scan_sec_index_for_duplicate(
dtuple_t* entry, /* in: index entry */
que_thr_t* thr) /* in: query thread */
{
#ifndef UNIV_HOTBACKUP
ulint n_unique;
ulint i;
int cmp;
@ -1597,12 +1603,12 @@ row_ins_scan_sec_index_for_duplicate(
offsets = rec_get_offsets(rec, index, offsets,
ULINT_UNDEFINED, &heap);
if (innobase_query_is_replace()) {
if (innobase_query_is_update()) {
/* The manual defines the REPLACE semantics that it
is either an INSERT or DELETE(s) for duplicate key
+ INSERT. Therefore, we should take X-lock for
duplicates */
/* If the SQL-query will update or replace
duplicate key we will take X-lock for
duplicates ( REPLACE, LOAD DATAFILE REPLACE,
INSERT ON DUPLICATE KEY UPDATE). */
err = row_ins_set_exclusive_rec_lock(LOCK_ORDINARY,
rec, index, offsets, thr);
@ -1657,6 +1663,12 @@ next_rec:
dtuple_set_n_fields_cmp(entry, n_fields_cmp);
return(err);
#else /* UNIV_HOTBACKUP */
/* This function depends on MySQL code that is not included in
InnoDB Hot Backup builds. Besides, this function should never
be called in InnoDB Hot Backup. */
ut_error;
#endif /* UNIV_HOTBACKUP */
}
/*******************************************************************
@ -1676,6 +1688,7 @@ row_ins_duplicate_error_in_clust(
que_thr_t* thr, /* in: query thread */
mtr_t* mtr) /* in: mtr */
{
#ifndef UNIV_HOTBACKUP
ulint err;
rec_t* rec;
page_t* page;
@ -1720,12 +1733,12 @@ row_ins_duplicate_error_in_clust(
sure that in roll-forward we get the same duplicate
errors as in original execution */
if (innobase_query_is_replace()) {
if (innobase_query_is_update()) {
/* The manual defines the REPLACE semantics
that it is either an INSERT or DELETE(s)
for duplicate key + INSERT. Therefore, we
should take X-lock for duplicates */
/* If the SQL-query will update or replace
duplicate key we will take X-lock for
duplicates ( REPLACE, LOAD DATAFILE REPLACE,
INSERT ON DUPLICATE KEY UPDATE). */
err = row_ins_set_exclusive_rec_lock(
LOCK_REC_NOT_GAP,rec,cursor->index,
@ -1759,12 +1772,12 @@ row_ins_duplicate_error_in_clust(
offsets = rec_get_offsets(rec, cursor->index, offsets,
ULINT_UNDEFINED, &heap);
/* The manual defines the REPLACE semantics that it
is either an INSERT or DELETE(s) for duplicate key
+ INSERT. Therefore, we should take X-lock for
duplicates. */
if (innobase_query_is_update()) {
if (innobase_query_is_replace()) {
/* If the SQL-query will update or replace
duplicate key we will take X-lock for
duplicates ( REPLACE, LOAD DATAFILE REPLACE,
INSERT ON DUPLICATE KEY UPDATE). */
err = row_ins_set_exclusive_rec_lock(
LOCK_REC_NOT_GAP, rec,
@ -1796,6 +1809,12 @@ row_ins_duplicate_error_in_clust(
err = DB_SUCCESS;
func_exit:
return(err);
#else /* UNIV_HOTBACKUP */
/* This function depends on MySQL code that is not included in
InnoDB Hot Backup builds. Besides, this function should never
be called in InnoDB Hot Backup. */
ut_error;
#endif /* UNIV_HOTBACKUP */
}
/*******************************************************************

View file

@ -260,6 +260,7 @@ row_mysql_handle_errors(
que_thr_t* thr, /* in: query thread */
trx_savept_t* savept) /* in: savepoint or NULL */
{
#ifndef UNIV_HOTBACKUP
ulint err;
handle_new_error:
@ -359,6 +360,12 @@ handle_new_error:
trx->error_state = DB_SUCCESS;
return(FALSE);
#else /* UNIV_HOTBACKUP */
/* This function depends on MySQL code that is not included in
InnoDB Hot Backup builds. Besides, this function should never
be called in InnoDB Hot Backup. */
ut_error;
#endif /* UNIV_HOTBACKUP */
}
/************************************************************************
@ -2072,6 +2079,7 @@ row_add_table_to_background_drop_list(
return(TRUE);
}
#ifndef UNIV_HOTBACKUP
/*************************************************************************
Discards the tablespace of a table which stored in an .ibd file. Discarding
means that this function deletes the .ibd file and assigns a new table id for
@ -2433,7 +2441,6 @@ row_truncate_table_for_mysql(
{
dict_foreign_t* foreign;
ulint err;
ibool locked_dictionary = FALSE;
mem_heap_t* heap;
byte* buf;
dtuple_t* tuple;
@ -2451,13 +2458,15 @@ operations could try to access non-existent pages.
1) SQL queries, INSERT, SELECT, ...: we must get an exclusive MySQL table lock
on the table before we can do TRUNCATE TABLE. Then there are no running
queries on the table.
queries on the table. This is guaranteed, because in
ha_innobase::store_lock(), we do not weaken the TL_WRITE lock requested
by MySQL when executing SQLCOM_TRUNCATE.
2) Purge and rollback: we assign a new table id for the table. Since purge and
rollback look for the table based on the table id, they see the table as
'dropped' and discard their operations.
3) Insert buffer: TRUNCATE TABLE is analogous to DROP TABLE, so we do not
have to remove insert buffer records, as the insert buffer works at a low
level. If a freed page is later reallocated, the allocator will remove
level. If a freed page is later reallocated, the allocator will remove
the ibuf entries for it.
TODO: when we truncate *.ibd files (analogous to DISCARD TABLESPACE), we
@ -2465,10 +2474,10 @@ will have to remove we remove all entries for the table in the insert
buffer tree!
4) Linear readahead and random readahead: we use the same method as in 3) to
discard ongoing operations. (This will only be relevant for TRUNCATE TABLE
discard ongoing operations. (This will only be relevant for TRUNCATE TABLE
by DISCARD TABLESPACE.)
5) FOREIGN KEY operations: if table->n_foreign_key_checks_running > 0, we
do not allow the TRUNCATE. We also reserve the data dictionary latch. */
do not allow the TRUNCATE. We also reserve the data dictionary latch. */
static const char renumber_tablespace_proc[] =
"PROCEDURE RENUMBER_TABLESPACE_PROC () IS\n"
@ -2516,14 +2525,11 @@ do not allow the TRUNCATE. We also reserve the data dictionary latch. */
/* Serialize data dictionary operations with dictionary mutex:
no deadlocks can occur then in these operations */
if (trx->dict_operation_lock_mode != RW_X_LATCH) {
/* Prevent foreign key checks etc. while we are truncating the
table */
ut_a(trx->dict_operation_lock_mode == 0);
/* Prevent foreign key checks etc. while we are truncating the
table */
row_mysql_lock_data_dictionary(trx);
locked_dictionary = TRUE;
}
row_mysql_lock_data_dictionary(trx);
#ifdef UNIV_SYNC_DEBUG
ut_ad(mutex_own(&(dict_sys->mutex)));
@ -2551,8 +2557,8 @@ do not allow the TRUNCATE. We also reserve the data dictionary latch. */
fputs(" Cannot truncate table ", ef);
ut_print_name(ef, trx, table->name);
fputs("\n"
"because it is referenced by ", ef);
fputs(" by DROP+CREATE\n"
"InnoDB: because it is referenced by ", ef);
ut_print_name(ef, trx, foreign->foreign_table_name);
putc('\n', ef);
mutex_exit(&dict_foreign_err_mutex);
@ -2569,10 +2575,10 @@ do not allow the TRUNCATE. We also reserve the data dictionary latch. */
if (table->n_foreign_key_checks_running > 0) {
ut_print_timestamp(stderr);
fputs(" InnoDB: You are trying to truncate table ", stderr);
fputs(" InnoDB: Cannot truncate table ", stderr);
ut_print_name(stderr, trx, table->name);
fputs("\n"
"InnoDB: though there is a foreign key check running on it.\n",
fputs(" by DROP+CREATE\n"
"InnoDB: because there is a foreign key check running on it.\n",
stderr);
err = DB_ERROR;
@ -2686,9 +2692,7 @@ fputs(" InnoDB: Unable to assign a new identifier to table ", stderr);
funct_exit:
if (locked_dictionary) {
row_mysql_unlock_data_dictionary(trx);
}
row_mysql_unlock_data_dictionary(trx);
trx->op_info = "";
@ -2696,6 +2700,7 @@ funct_exit:
return((int) err);
}
#endif /* !UNIV_HOTBACKUP */
/*************************************************************************
Drops a table for MySQL. If the name of the table to be dropped is equal
@ -3092,7 +3097,9 @@ funct_exit:
trx->op_info = "";
#ifndef UNIV_HOTBACKUP
srv_wake_master_thread();
#endif /* !UNIV_HOTBACKUP */
return((int) err);
}

View file

@ -848,7 +848,7 @@ srv_get_thread_type(void)
/*************************************************************************
Initializes the server. */
static
void
srv_init(void)
/*==========*/
@ -1310,6 +1310,7 @@ srv_boot(void)
return(DB_SUCCESS);
}
#ifndef UNIV_HOTBACKUP
/*************************************************************************
Reserves a slot in the thread table for the current MySQL OS thread.
NOTE! The kernel mutex has to be reserved by the caller! */
@ -1368,6 +1369,7 @@ srv_table_reserve_slot_for_mysql(void)
return(slot);
}
#endif /* !UNIV_HOTBACKUP */
/*******************************************************************
Puts a MySQL OS thread to wait for a lock to be released. If an error
@ -1382,6 +1384,7 @@ srv_suspend_mysql_thread(
que_thr_t* thr) /* in: query thread associated with the MySQL
OS thread */
{
#ifndef UNIV_HOTBACKUP
srv_slot_t* slot;
os_event_t event;
double wait_time;
@ -1520,6 +1523,12 @@ srv_suspend_mysql_thread(
trx->error_state = DB_LOCK_WAIT_TIMEOUT;
}
#else /* UNIV_HOTBACKUP */
/* This function depends on MySQL code that is not included in
InnoDB Hot Backup builds. Besides, this function should never
be called in InnoDB Hot Backup. */
ut_error;
#endif /* UNIV_HOTBACKUP */
}
/************************************************************************
@ -1532,6 +1541,7 @@ srv_release_mysql_thread_if_suspended(
que_thr_t* thr) /* in: query thread associated with the
MySQL OS thread */
{
#ifndef UNIV_HOTBACKUP
srv_slot_t* slot;
ulint i;
@ -1553,8 +1563,15 @@ srv_release_mysql_thread_if_suspended(
}
/* not found */
#else /* UNIV_HOTBACKUP */
/* This function depends on MySQL code that is not included in
InnoDB Hot Backup builds. Besides, this function should never
be called in InnoDB Hot Backup. */
ut_error;
#endif /* UNIV_HOTBACKUP */
}
#ifndef UNIV_HOTBACKUP
/**********************************************************************
Refreshes the values used to calculate per-second averages. */
static
@ -2576,3 +2593,4 @@ suspend_thread:
return(0);
#endif
}
#endif /* !UNIV_HOTBACKUP */

View file

@ -479,7 +479,6 @@ srv_normalize_path_for_win(
Adds a slash or a backslash to the end of a string if it is missing
and the string is not empty. */
static
char*
srv_add_path_separator_if_needed(
/*=============================*/
@ -531,6 +530,7 @@ srv_calc_high32(
return(file_size >> (32 - UNIV_PAGE_SIZE_SHIFT));
}
#ifndef UNIV_HOTBACKUP
/*************************************************************************
Creates or opens the log files and closes them. */
static
@ -1834,4 +1834,5 @@ void set_panic_flag_for_netware()
extern ibool panic_shutdown;
panic_shutdown = TRUE;
}
#endif
#endif /* __NETWARE__ */
#endif /* !UNIV_HOTBACKUP */

View file

@ -102,8 +102,10 @@ rw_lock_create_func(
lock->mutex.cfile_name = cfile_name;
lock->mutex.cline = cline;
#ifndef UNIV_HOTBACKUP
lock->mutex.cmutex_name = cmutex_name;
lock->mutex.mutex_type = 1;
#endif /* !UNIV_HOTBACKUP */
rw_lock_set_waiters(lock, 0);
rw_lock_set_writer(lock, RW_LOCK_NOT_LOCKED);

View file

@ -215,6 +215,7 @@ mutex_create_func(
mutex->level = SYNC_LEVEL_NONE;
mutex->cfile_name = cfile_name;
mutex->cline = cline;
#ifndef UNIV_HOTBACKUP
mutex->cmutex_name= cmutex_name;
mutex->count_using= 0;
mutex->mutex_type= 0;
@ -224,7 +225,7 @@ mutex_create_func(
mutex->count_spin_rounds= 0;
mutex->count_os_wait= 0;
mutex->count_os_yield= 0;
#endif /* !UNIV_HOTBACKUP */
/* Check that lock_word is aligned; this is important on Intel */
ut_ad(((ulint)(&(mutex->lock_word))) % 4 == 0);
@ -372,9 +373,9 @@ mutex_spin_wait(
ulint ltime_diff;
ulint sec;
ulint ms;
#ifndef UNIV_HOTBACKUP
uint timer_started = 0;
#endif /* !UNIV_HOTBACKUP */
ut_ad(mutex);
mutex_loop:
@ -388,8 +389,10 @@ mutex_loop:
memory word. */
spin_loop:
#ifndef UNIV_HOTBACKUP
mutex_spin_wait_count++;
mutex->count_spin_loop++;
#endif /* !UNIV_HOTBACKUP */
while (mutex_get_lock_word(mutex) != 0 && i < SYNC_SPIN_ROUNDS)
{
@ -403,6 +406,7 @@ spin_loop:
if (i == SYNC_SPIN_ROUNDS)
{
#ifndef UNIV_HOTBACKUP
mutex->count_os_yield++;
if (timed_mutexes == 1 && timer_started==0)
{
@ -410,6 +414,7 @@ spin_loop:
lstart_time= (ib_longlong)sec * 1000000 + ms;
timer_started = 1;
}
#endif /* !UNIV_HOTBACKUP */
os_thread_yield();
}
@ -422,7 +427,9 @@ spin_loop:
mutex_spin_round_count += i;
#ifndef UNIV_HOTBACKUP
mutex->count_spin_rounds += i;
#endif /* !UNIV_HOTBACKUP */
if (mutex_test_and_set(mutex) == 0)
{
@ -504,8 +511,8 @@ Now there is no risk of infinite wait on the event. */
mutex_system_call_count++;
mutex_os_wait_count++;
#ifndef UNIV_HOTBACKUP
mutex->count_os_wait++;
/*
!!!!! Sometimes os_wait can be called without os_thread_yield
*/
@ -516,12 +523,13 @@ Now there is no risk of infinite wait on the event. */
lstart_time= (ib_longlong)sec * 1000000 + ms;
timer_started = 1;
}
#endif /* !UNIV_HOTBACKUP */
sync_array_wait_event(sync_primary_wait_array, index);
goto mutex_loop;
finish_timing:
#ifndef UNIV_HOTBACKUP
if (timed_mutexes == 1 && timer_started==1)
{
ut_usectime(&sec, &ms);
@ -534,6 +542,7 @@ finish_timing:
mutex->lmax_spent_time= ltime_diff;
}
}
#endif /* !UNIV_HOTBACKUP */
return;
}

View file

@ -52,6 +52,7 @@ trx_general_rollback_for_mysql(
trx_savept_t* savept) /* in: pointer to savepoint undo number, if
partial rollback requested */
{
#ifndef UNIV_HOTBACKUP
mem_heap_t* heap;
que_thr_t* thr;
roll_node_t* roll_node;
@ -103,6 +104,12 @@ trx_general_rollback_for_mysql(
srv_active_wake_master_thread();
return((int) trx->error_state);
#else /* UNIV_HOTBACKUP */
/* This function depends on MySQL code that is not included in
InnoDB Hot Backup builds. Besides, this function should never
be called in InnoDB Hot Backup. */
ut_error;
#endif /* UNIV_HOTBACKUP */
}
/***********************************************************************
@ -316,6 +323,51 @@ trx_savepoint_for_mysql(
return(DB_SUCCESS);
}
/***********************************************************************
Releases a named savepoint. Savepoints which
were set after this savepoint are deleted. */
ulint
trx_release_savepoint_for_mysql(
/*============================*/
/* out: if no savepoint
of the name found then
DB_NO_SAVEPOINT,
otherwise DB_SUCCESS */
trx_t* trx, /* in: transaction handle */
const char* savepoint_name) /* in: savepoint name */
{
trx_named_savept_t* savep;
savep = UT_LIST_GET_FIRST(trx->trx_savepoints);
while (savep != NULL) {
if (0 == ut_strcmp(savep->name, savepoint_name)) {
/* Found */
break;
}
savep = UT_LIST_GET_NEXT(trx_savepoints, savep);
}
if (savep == NULL) {
return(DB_NO_SAVEPOINT);
}
/* We can now free all savepoints strictly later than this one */
trx_roll_savepoints_free(trx, savep);
/* Now we can free this savepoint too */
UT_LIST_REMOVE(trx_savepoints, trx->trx_savepoints, savep);
mem_free(savep->name);
mem_free(savep);
return(DB_SUCCESS);
}
/***********************************************************************
Returns a transaction savepoint taken at this point in time. */

View file

@ -1844,7 +1844,7 @@ trx_recover_for_mysql(
/* out: number of prepared transactions
stored in xid_list */
XID* xid_list, /* in/out: prepared transactions */
uint len) /* in: number of slots in xid_list */
ulint len) /* in: number of slots in xid_list */
{
trx_t* trx;
int num_of_transactions = 0;

View file

@ -44,13 +44,13 @@ ut_get_high32(
/* out: a >> 32 */
ulint a) /* in: ulint */
{
#if SIZEOF_LONG == 4
UT_NOT_USED(a);
ib_longlong i;
return 0;
#else
return(a >> 32);
#endif
i = (ib_longlong)a;
i = i >> 32;
return((ulint)i);
}
/************************************************************
@ -416,7 +416,11 @@ ut_print_namel(
{
const char* s = name;
const char* e = s + namelen;
#ifdef UNIV_HOTBACKUP
int q = '"';
#else
int q = mysql_get_identifier_quote_char(trx, name, namelen);
#endif
if (q == EOF) {
fwrite(name, 1, namelen, f);
return;

View file

@ -3186,6 +3186,8 @@ my_bool STDCALL mysql_stmt_bind_param(MYSQL_STMT *stmt, MYSQL_BIND *bind)
case MYSQL_TYPE_VARCHAR:
case MYSQL_TYPE_VAR_STRING:
case MYSQL_TYPE_STRING:
case MYSQL_TYPE_DECIMAL:
case MYSQL_TYPE_NEWDECIMAL:
param->store_param_func= store_param_str;
/*
For variable length types user must set either length or
@ -3512,6 +3514,8 @@ static void fetch_string_with_conversion(MYSQL_BIND *param, char *value,
case MYSQL_TYPE_MEDIUM_BLOB:
case MYSQL_TYPE_LONG_BLOB:
case MYSQL_TYPE_BLOB:
case MYSQL_TYPE_DECIMAL:
case MYSQL_TYPE_NEWDECIMAL:
default:
{
/*
@ -4249,6 +4253,8 @@ static my_bool setup_one_fetch_function(MYSQL_BIND *param, MYSQL_FIELD *field)
break;
case MYSQL_TYPE_VAR_STRING:
case MYSQL_TYPE_STRING:
case MYSQL_TYPE_DECIMAL:
case MYSQL_TYPE_NEWDECIMAL:
DBUG_ASSERT(param->buffer_length != 0);
param->fetch_result= fetch_result_str;
break;
@ -4308,6 +4314,7 @@ static my_bool setup_one_fetch_function(MYSQL_BIND *param, MYSQL_FIELD *field)
field->max_length= MAX_DATE_STRING_REP_LENGTH;
break;
case MYSQL_TYPE_DECIMAL:
case MYSQL_TYPE_NEWDECIMAL:
case MYSQL_TYPE_ENUM:
case MYSQL_TYPE_SET:
case MYSQL_TYPE_GEOMETRY:

View file

@ -62,7 +62,7 @@ sqlsources = derror.cc field.cc field_conv.cc strfunc.cc filesort.cc \
unireg.cc uniques.cc stacktrace.c sql_union.cc hash_filo.cc \
spatial.cc gstream.cc sql_help.cc tztime.cc protocol_cursor.cc \
sp_head.cc sp_pcontext.cc sp.cc sp_cache.cc sp_rcontext.cc \
parse_file.cc sql_view.cc sql_trigger.cc
parse_file.cc sql_view.cc sql_trigger.cc my_decimal.cc
libmysqld_int_a_SOURCES= $(libmysqld_sources) $(libmysqlsources) $(sqlsources) $(sqlexamplessources)
libmysqld_a_SOURCES=

View file

@ -366,6 +366,7 @@ static void _ftb_init_index_search(FT_INFO *ftb)
reset_tree(& ftb->no_dupes);
}
ftbw->off=0; /* in case of reinit */
if (_ft2_search(ftb, ftbw, 1))
return;
}
@ -374,7 +375,7 @@ static void _ftb_init_index_search(FT_INFO *ftb)
FT_INFO * ft_init_boolean_search(MI_INFO *info, uint keynr, byte *query,
uint query_len)
uint query_len, CHARSET_INFO *cs)
{
FTB *ftb;
FTB_EXPR *ftbe;
@ -386,8 +387,8 @@ FT_INFO * ft_init_boolean_search(MI_INFO *info, uint keynr, byte *query,
ftb->state=UNINITIALIZED;
ftb->info=info;
ftb->keynr=keynr;
ftb->charset= ((keynr==NO_SUCH_KEY) ?
default_charset_info : info->s->keyinfo[keynr].seg->charset);
ftb->charset=cs;
DBUG_ASSERT(keynr==NO_SUCH_KEY || cs == info->s->keyinfo[keynr].seg->charset);
ftb->with_scan=0;
ftb->lastpos=HA_OFFSET_ERROR;
bzero(& ftb->no_dupes, sizeof(TREE));

View file

@ -57,11 +57,12 @@ const struct _ft_vft _ft_vft_boolean = {
FT_INFO *ft_init_search(uint flags, void *info, uint keynr,
byte *query, uint query_len, byte *record)
byte *query, uint query_len, CHARSET_INFO *cs,
byte *record)
{
FT_INFO *res;
if (flags & FT_BOOL)
res= ft_init_boolean_search((MI_INFO *)info, keynr, query, query_len);
res= ft_init_boolean_search((MI_INFO *)info, keynr, query, query_len,cs);
else
res= ft_init_nlq_search((MI_INFO *)info, keynr, query, query_len, flags,
record);

View file

@ -131,7 +131,7 @@ FT_WORD * _mi_ft_parserecord(MI_INFO *, uint, const byte *);
uint _mi_ft_parse(TREE *, MI_INFO *, uint, const byte *, my_bool);
FT_INFO *ft_init_nlq_search(MI_INFO *, uint, byte *, uint, uint, byte *);
FT_INFO *ft_init_boolean_search(MI_INFO *, uint, byte *, uint);
FT_INFO *ft_init_boolean_search(MI_INFO *, uint, byte *, uint, CHARSET_INFO *);
extern const struct _ft_vft _ft_vft_nlq;
int ft_nlq_read_next(FT_INFO *, char *);

View file

@ -47,7 +47,7 @@ dist-hook:
$(distdir)/std_data
$(INSTALL_DATA) $(srcdir)/t/*.test $(srcdir)/t/*.opt $(srcdir)/t/*.sh $(srcdir)/t/*.slave-mi $(distdir)/t
$(INSTALL_DATA) $(srcdir)/include/*.inc $(distdir)/include
$(INSTALL_DATA) $(srcdir)/r/*.result $(srcdir)/r/*.require $(distdir)/r
$(INSTALL_DATA) $(srcdir)/r/*.result $(srcdir)/r/*.result.es $(srcdir)/r/*.require $(distdir)/r
$(INSTALL_DATA) $(srcdir)/std_data/Moscow_leap $(distdir)/std_data
$(INSTALL_DATA) $(srcdir)/std_data/*.dat $(srcdir)/std_data/*.000001 $(distdir)/std_data
$(INSTALL_DATA) $(srcdir)/std_data/des_key_file $(distdir)/std_data
@ -65,7 +65,7 @@ install-data-local:
$(INSTALL_DATA) $(srcdir)/t/*.opt $(DESTDIR)$(testdir)/t
$(INSTALL_DATA) $(srcdir)/t/*.sh $(DESTDIR)$(testdir)/t
$(INSTALL_DATA) $(srcdir)/t/*.slave-mi $(DESTDIR)$(testdir)/t
$(INSTALL_DATA) $(srcdir)/r/*.result $(DESTDIR)$(testdir)/r
$(INSTALL_DATA) $(srcdir)/r/*.result $(srcdir)/r/*.result.es $(DESTDIR)$(testdir)/r
$(INSTALL_DATA) $(srcdir)/r/*.require $(DESTDIR)$(testdir)/r
$(INSTALL_DATA) $(srcdir)/include/*.inc $(DESTDIR)$(testdir)/include
$(INSTALL_DATA) $(srcdir)/std_data/*.dat $(DESTDIR)$(testdir)/std_data

View file

@ -0,0 +1,4 @@
-- require r/have_cp932.require
disable_query_log;
show collation like "cp932_japanese_ci";
enable_query_log;

View file

@ -0,0 +1,4 @@
-- require r/have_eucjpms.require
disable_query_log;
show collation like "eucjpms_japanese_ci";
enable_query_log;

View file

@ -0,0 +1,28 @@
# Setup connections to both MySQL Servers connected to the cluster
connect (server1,127.0.0.1,root,,test,$MASTER_MYPORT,);
connect (server2,127.0.0.1,root,,test,$MASTER_MYPORT1,);
# Check that server1 has NDB support
connection server1;
disable_query_log;
--disable_warnings
drop table if exists t1, t2;
--enable_warnings
flush tables;
@r/have_ndb.require show variables like "have_ndbcluster";
@r/server_id.require show variables like "server_id";
enable_query_log;
# Check that server2 has NDB support
connection server2;
disable_query_log;
--disable_warnings
drop table if exists t1, t2;
--enable_warnings
flush tables;
@r/have_ndb.require show variables like "have_ndbcluster";
@r/server_id1.require show variables like "server_id";
enable_query_log;
# Set the default connection to 'server1'
connection server1;

View file

@ -1,7 +1,6 @@
--exec test x$NDB_STATUS_OK = x1
-- require r/have_ndb.require
disable_query_log;
show variables like "have_ndbcluster";
enable_query_log;
#connect (server1,127.0.0.1,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK);
#connect (server2,127.0.0.1,root,,test,$MASTER_MYPORT1,$MASTER_MYSOCK1);
#connection server1;

270
mysql-test/lib/mtr_cases.pl Normal file
View file

@ -0,0 +1,270 @@
# -*- cperl -*-
# This is a library file used by the Perl version of mysql-test-run,
# and is part of the translation of the Bourne shell script with the
# same name.
use strict;
sub collect_test_cases ($);
sub collect_one_test_case ($$$$$);
##############################################################################
#
# Collect information about test cases we are to run
#
##############################################################################
sub collect_test_cases ($) {
my $suite= shift; # Test suite name
my $testdir;
my $resdir;
if ( $suite eq "main" )
{
$testdir= "$::glob_mysql_test_dir/t";
$resdir= "$::glob_mysql_test_dir/r";
}
else
{
$testdir= "$::glob_mysql_test_dir/suite/$suite/t";
$resdir= "$::glob_mysql_test_dir/suite/$suite/r";
}
my $cases = []; # Array of hash, will be array of C struct
opendir(TESTDIR, $testdir) or mtr_error("Can't open dir \"$testdir\": $!");
if ( @::opt_cases )
{
foreach my $tname ( @::opt_cases ) { # Run in specified order, no sort
my $elem= "$tname.test";
if ( ! -f "$testdir/$elem")
{
mtr_error("Test case $tname ($testdir/$elem) is not found");
}
collect_one_test_case($testdir,$resdir,$tname,$elem,$cases);
}
closedir TESTDIR;
}
else
{
foreach my $elem ( sort readdir(TESTDIR) ) {
my $tname= mtr_match_extension($elem,"test");
next if ! defined $tname;
next if $::opt_do_test and ! defined mtr_match_prefix($elem,$::opt_do_test);
collect_one_test_case($testdir,$resdir,$tname,$elem,$cases);
}
closedir TESTDIR;
}
# To speed things up, we sort first in if the test require a restart
# or not, second in alphanumeric order.
# @$cases = sort {
# if ( $a->{'master_restart'} and $b->{'master_restart'} or
# ! $a->{'master_restart'} and ! $b->{'master_restart'} )
# {
# return $a->{'name'} cmp $b->{'name'};
# }
# if ( $a->{'master_restart'} )
# {
# return 1; # Is greater
# }
# else
# {
# return -1; # Is less
# }
# } @$cases;
return $cases;
}
##############################################################################
#
# Collect information about a single test case
#
##############################################################################
sub collect_one_test_case($$$$$) {
my $testdir= shift;
my $resdir= shift;
my $tname= shift;
my $elem= shift;
my $cases= shift;
my $path= "$testdir/$elem";
# ----------------------------------------------------------------------
# Skip some tests silently
# ----------------------------------------------------------------------
if ( $::opt_start_from and $tname lt $::opt_start_from )
{
return;
}
# ----------------------------------------------------------------------
# Skip some tests but include in list, just mark them to skip
# ----------------------------------------------------------------------
my $tinfo= {};
$tinfo->{'name'}= $tname;
$tinfo->{'result_file'}= "$resdir/$tname.result";
push(@$cases, $tinfo);
if ( $::opt_skip_test and defined mtr_match_prefix($tname,$::opt_skip_test) )
{
$tinfo->{'skip'}= 1;
return;
}
# FIXME temporary solution, we have a hard coded list of test cases to
# skip if we are using the embedded server
if ( $::glob_use_embedded_server and
mtr_match_any_exact($tname,\@::skip_if_embedded_server) )
{
$tinfo->{'skip'}= 1;
return;
}
# ----------------------------------------------------------------------
# Collect information about test case
# ----------------------------------------------------------------------
$tinfo->{'path'}= $path;
$tinfo->{'timezone'}= "GMT-3"; # for UNIX_TIMESTAMP tests to work
if ( defined mtr_match_prefix($tname,"rpl") )
{
if ( $::opt_skip_rpl )
{
$tinfo->{'skip'}= 1;
return;
}
$tinfo->{'slave_num'}= 1; # Default, use one slave
# FIXME currently we always restart slaves
$tinfo->{'slave_restart'}= 1;
if ( $tname eq 'rpl_failsafe' or $tname eq 'rpl_chain_temp_table' )
{
# $tinfo->{'slave_num'}= 3; # Not 3 ? Check old code, strange
}
}
# FIXME what about embedded_server + ndbcluster, skip ?!
my $master_opt_file= "$testdir/$tname-master.opt";
my $slave_opt_file= "$testdir/$tname-slave.opt";
my $slave_mi_file= "$testdir/$tname.slave-mi";
my $master_sh= "$testdir/$tname-master.sh";
my $slave_sh= "$testdir/$tname-slave.sh";
my $disabled= "$testdir/$tname.disabled";
$tinfo->{'master_opt'}= [];
$tinfo->{'slave_opt'}= [];
$tinfo->{'slave_mi'}= [];
if ( -f $master_opt_file )
{
$tinfo->{'master_restart'}= 1; # We think so for now
# This is a dirty hack from old mysql-test-run, we use the opt file
# to flag other things as well, it is not a opt list at all
my $extra_master_opt= mtr_get_opts_from_file($master_opt_file);
foreach my $opt (@$extra_master_opt)
{
my $value;
$value= mtr_match_prefix($opt, "--timezone=");
if ( defined $value )
{
$tinfo->{'timezone'}= $value;
$extra_master_opt= [];
$tinfo->{'master_restart'}= 0;
last;
}
$value= mtr_match_prefix($opt, "--result-file=");
if ( defined $value )
{
$tinfo->{'result_file'}= "r/$value.result";
if ( $::opt_result_ext and $::opt_record or
-f "$tinfo->{'result_file'}$::opt_result_ext")
{
$tinfo->{'result_file'}.= $::opt_result_ext;
}
$extra_master_opt= [];
$tinfo->{'master_restart'}= 0;
last;
}
}
$tinfo->{'master_opt'}= $extra_master_opt;
}
if ( -f $slave_opt_file )
{
$tinfo->{'slave_opt'}= mtr_get_opts_from_file($slave_opt_file);
$tinfo->{'slave_restart'}= 1;
}
if ( -f $slave_mi_file )
{
$tinfo->{'slave_mi'}= mtr_get_opts_from_file($slave_mi_file);
$tinfo->{'slave_restart'}= 1;
}
if ( -f $master_sh )
{
if ( $::glob_win32_perl )
{
$tinfo->{'skip'}= 1;
}
else
{
$tinfo->{'master_sh'}= $master_sh;
$tinfo->{'master_restart'}= 1;
}
}
if ( -f $slave_sh )
{
if ( $::glob_win32_perl )
{
$tinfo->{'skip'}= 1;
}
else
{
$tinfo->{'slave_sh'}= $slave_sh;
$tinfo->{'slave_restart'}= 1;
}
}
if ( -f $disabled )
{
$tinfo->{'skip'}= 1;
$tinfo->{'disable'}= 1; # Sub type of 'skip'
$tinfo->{'comment'}= mtr_fromfile($disabled);
}
# We can't restart a running server that may be in use
if ( $::glob_use_running_server and
( $tinfo->{'master_restart'} or $tinfo->{'slave_restart'} ) )
{
$tinfo->{'skip'}= 1;
}
}
1;

View file

@ -8,6 +8,7 @@ use strict;
sub mtr_get_pid_from_file ($);
sub mtr_get_opts_from_file ($);
sub mtr_fromfile ($);
sub mtr_tofile ($@);
sub mtr_tonewfile($@);
@ -107,6 +108,8 @@ sub mtr_fromfile ($) {
open(FILE,"<",$file) or mtr_error("can't open file \"$file\": $!");
my $text= join('', <FILE>);
close FILE;
$text =~ s/^\s+//; # Remove starting space, incl newlines
$text =~ s/\s+$//; # Remove ending space, incl newlines
return $text;
}

View file

@ -5,14 +5,19 @@
# same name.
#use Carp qw(cluck);
use Socket;
use Errno;
use strict;
use POSIX ":sys_wait_h";
#use POSIX ":sys_wait_h";
use POSIX 'WNOHANG';
sub mtr_run ($$$$$$);
sub mtr_spawn ($$$$$$);
sub mtr_stop_mysqld_servers ($$);
sub mtr_stop_mysqld_servers ($);
sub mtr_kill_leftovers ();
sub mtr_record_dead_children ();
sub sleep_until_file_created ($$$);
# static in C
sub spawn_impl ($$$$$$$);
@ -34,7 +39,18 @@ sub mtr_run ($$$$$$) {
my $error= shift;
my $pid_file= shift;
return spawn_impl($path,$arg_list_t,1,$input,$output,$error,$pid_file);
return spawn_impl($path,$arg_list_t,'run',$input,$output,$error,$pid_file);
}
sub mtr_run_test ($$$$$$) {
my $path= shift;
my $arg_list_t= shift;
my $input= shift;
my $output= shift;
my $error= shift;
my $pid_file= shift;
return spawn_impl($path,$arg_list_t,'test',$input,$output,$error,$pid_file);
}
sub mtr_spawn ($$$$$$) {
@ -45,7 +61,7 @@ sub mtr_spawn ($$$$$$) {
my $error= shift;
my $pid_file= shift;
return spawn_impl($path,$arg_list_t,0,$input,$output,$error,$pid_file);
return spawn_impl($path,$arg_list_t,'spawn',$input,$output,$error,$pid_file);
}
@ -58,7 +74,7 @@ sub mtr_spawn ($$$$$$) {
sub spawn_impl ($$$$$$$) {
my $path= shift;
my $arg_list_t= shift;
my $join= shift;
my $mode= shift;
my $input= shift;
my $output= shift;
my $error= shift;
@ -71,107 +87,203 @@ sub spawn_impl ($$$$$$$) {
print STDERR "#### ", "STDIN $input\n" if $input;
print STDERR "#### ", "STDOUT $output\n" if $output;
print STDERR "#### ", "STDERR $error\n" if $error;
if ( $join )
{
print STDERR "#### ", "RUN ";
}
else
{
print STDERR "#### ", "SPAWN ";
}
print STDERR "$path ", join(" ",@$arg_list_t), "\n";
print STDERR "#### ", "$mode : $path ", join(" ",@$arg_list_t), "\n";
print STDERR "#### ", "-" x 78, "\n";
}
my $pid= fork();
if ( ! defined $pid )
FORK:
{
mtr_error("$path ($pid) can't be forked");
}
my $pid= fork();
if ( $pid )
{
# Parent, i.e. the main script
if ( $join )
if ( ! defined $pid )
{
# We run a command and wait for the result
# FIXME this need to be improved
my $res= waitpid($pid,0);
if ( $! == $!{EAGAIN} ) # See "perldoc Errno"
{
mtr_debug("Got EAGAIN from fork(), sleep 1 second and redo");
sleep(1);
redo FORK;
}
else
{
mtr_error("$path ($pid) can't be forked");
}
}
if ( $res == -1 )
if ( $pid )
{
spawn_parent_impl($pid,$mode,$path);
}
else
{
# Child, redirect output and exec
# FIXME I tried POSIX::setsid() here to detach and, I hoped,
# avoid zombies. But everything went wild, somehow the parent
# became a deamon as well, and was hard to kill ;-)
# Need to catch SIGCHLD and do waitpid or something instead......
$SIG{INT}= 'DEFAULT'; # Parent do some stuff, we don't
if ( $output )
{
if ( ! open(STDOUT,">",$output) )
{
mtr_error("can't redirect STDOUT to \"$output\": $!");
}
}
if ( $error )
{
if ( $output eq $error )
{
if ( ! open(STDERR,">&STDOUT") )
{
mtr_error("can't dup STDOUT: $!");
}
}
else
{
if ( ! open(STDERR,">",$error) )
{
mtr_error("can't redirect STDERR to \"$output\": $!");
}
}
}
if ( $input )
{
if ( ! open(STDIN,"<",$input) )
{
mtr_error("can't redirect STDIN to \"$input\": $!");
}
}
exec($path,@$arg_list_t);
}
}
}
sub spawn_parent_impl {
my $pid= shift;
my $mode= shift;
my $path= shift;
if ( $mode eq 'run' or $mode eq 'test' )
{
my $exit_value= -1;
my $signal_num= 0;
my $dumped_core= 0;
if ( $mode eq 'run' )
{
# Simple run of command, we wait for it to return
my $ret_pid= waitpid($pid,0);
if ( $ret_pid <= 0 )
{
mtr_error("$path ($pid) got lost somehow");
}
my $exit_value= $? >> 8;
my $signal_num= $? & 127;
my $dumped_core= $? & 128;
if ( $signal_num )
{
mtr_error("$path ($pid) got signal $signal_num");
}
if ( $dumped_core )
{
mtr_error("$path ($pid) dumped core");
}
$exit_value= $? >> 8;
$signal_num= $? & 127;
$dumped_core= $? & 128;
return $exit_value;
}
else
{
# We spawned a process we don't wait for
return $pid;
# We run mysqltest and wait for it to return. But we try to
# catch dying mysqld processes as well.
#
# We do blocking waitpid() until we get the return from the
# "mysqltest" call. But if a mysqld process dies that we
# started, we take this as an error, and kill mysqltest.
#
# FIXME is this as it should be? Can't mysqld terminate
# normally from running a test case?
my $ret_pid; # What waitpid() returns
while ( ($ret_pid= waitpid(-1,0)) != -1 )
{
# Someone terminated, don't know who. Collect
# status info first before $? is lost,
# but not $exit_value, this is flagged from
#
if ( $ret_pid == $pid )
{
# We got termination of mysqltest, we are done
$exit_value= $? >> 8;
$signal_num= $? & 127;
$dumped_core= $? & 128;
last;
}
# If one of the mysqld processes died, we want to
# mark this, and kill the mysqltest process.
foreach my $idx (0..1)
{
if ( $::master->[$idx]->{'pid'} eq $ret_pid )
{
mtr_debug("child $ret_pid was master[$idx], " .
"exit during mysqltest run");
$::master->[$idx]->{'pid'}= 0;
last;
}
}
foreach my $idx (0..2)
{
if ( $::slave->[$idx]->{'pid'} eq $ret_pid )
{
mtr_debug("child $ret_pid was slave[$idx], " .
"exit during mysqltest run");
$::slave->[$idx]->{'pid'}= 0;
last;
}
}
mtr_debug("waitpid() catched exit of unknown child $ret_pid, " .
"exit during mysqltest run");
}
if ( $ret_pid != $pid )
{
# We terminated the waiting because a "mysqld" process died.
# Kill the mysqltest process.
kill(9,$pid);
$ret_pid= waitpid($pid,0);
if ( $ret_pid == -1 )
{
mtr_error("$path ($pid) got lost somehow");
}
}
return $exit_value;
}
}
else
{
# Child, redirect output and exec
# FIXME I tried POSIX::setsid() here to detach and, I hoped,
# avoid zombies. But everything went wild, somehow the parent
# became a deamon as well, and was hard to kill ;-)
# Need to catch SIGCHLD and do waitpid or something instead......
$SIG{INT}= 'DEFAULT'; # Parent do some stuff, we don't
if ( $output )
{
if ( ! open(STDOUT,">",$output) )
{
mtr_error("can't redirect STDOUT to \"$output\": $!");
}
}
if ( $error )
{
if ( $output eq $error )
{
if ( ! open(STDERR,">&STDOUT") )
{
mtr_error("can't dup STDOUT: $!");
}
}
else
{
if ( ! open(STDERR,">",$error) )
{
mtr_error("can't redirect STDERR to \"$output\": $!");
}
}
}
if ( $input )
{
if ( ! open(STDIN,"<",$input) )
{
mtr_error("can't redirect STDIN to \"$input\": $!");
}
}
exec($path,@$arg_list_t);
# We spawned a process we don't wait for
return $pid;
}
}
##############################################################################
#
# Kill processes left from previous runs
#
##############################################################################
# We just "ping" on the ports, and if we can't do a socket connect
# we assume the server is dead. So we don't *really* know a server
# is dead, we just hope that it after letting the listen port go,
# it is dead enough for us to start a new server.
sub mtr_kill_leftovers () {
# First, kill all masters and slaves that would conflict with
@ -199,10 +311,23 @@ sub mtr_kill_leftovers () {
});
}
mtr_stop_mysqld_servers(\@args, 1);
mtr_mysqladmin_shutdown(\@args);
# We now have tried to terminate nice. We have waited for the listen
# port to be free, but can't really tell if the mysqld process died
# or not. We now try to find the process PID from the PID file, and
# send a kill to that process. Note that Perl let kill(0,@pids) be
# a way to just return the numer of processes the kernel can send
# signals to. So this can be used (except on Cygwin) to determine
# if there are processes left running that we cound out might exists.
#
# But still after all this work, all we know is that we have
# the ports free.
# We scan the "var/run/" directory for other process id's to kill
my $rundir= "$::glob_mysql_test_dir/var/run"; # FIXME $path_run_dir or something
# FIXME $path_run_dir or something
my $rundir= "$::glob_mysql_test_dir/var/run";
if ( -d $rundir )
{
@ -218,193 +343,157 @@ sub mtr_kill_leftovers () {
if ( -f $pidfile )
{
my $pid= mtr_get_pid_from_file($pidfile);
if ( ! unlink($pidfile) )
# Race, could have been removed between I tested with -f
# and the unlink() below, so I better check again with -f
if ( ! unlink($pidfile) and -f $pidfile )
{
mtr_error("can't remove $pidfile");
}
push(@pids, $pid);
if ( $::glob_cygwin_perl or kill(0, $pid) )
{
push(@pids, $pid); # We know (cygwin guess) it exists
}
}
}
closedir(RUNDIR);
start_reap_all();
if ( $::glob_cygwin_perl )
if ( @pids )
{
# We have no (easy) way of knowing the Cygwin controlling
# process, in the PID file we only have the Windows process id.
system("kill -f " . join(" ",@pids)); # Hope for the best....
}
else
{
my $retries= 10; # 10 seconds
do
if ( $::glob_cygwin_perl )
{
kill(9, @pids);
} while ( $retries-- and kill(0, @pids) );
# We have no (easy) way of knowing the Cygwin controlling
# process, in the PID file we only have the Windows process id.
system("kill -f " . join(" ",@pids)); # Hope for the best....
mtr_debug("Sleep 5 seconds waiting for processes to die");
sleep(5);
}
else
{
my $retries= 10; # 10 seconds
do
{
kill(9, @pids);
mtr_debug("Sleep 1 second waiting for processes to die");
sleep(1) # Wait one second
} while ( $retries-- and kill(0, @pids) );
if ( kill(0, @pids) )
{
mtr_error("can't kill processes " . join(" ", @pids));
if ( kill(0, @pids) ) # Check if some left
{
# FIXME maybe just mtr_warning() ?
mtr_error("can't kill process(es) " . join(" ", @pids));
}
}
}
}
stop_reap_all();
# We may have failed everything, bug we now check again if we have
# the listen ports free to use, and if they are free, just go for it.
foreach my $srv ( @args )
{
if ( mtr_ping_mysqld_server($srv->{'port'}, $srv->{'sockfile'}) )
{
mtr_error("can't kill old mysqld holding port $srv->{'port'}");
}
}
}
##############################################################################
#
# Shut down mysqld servers
# Shut down mysqld servers we have started from this run of this script
#
##############################################################################
# To speed things we kill servers in parallel.
# The argument is a list of 'pidfiles' and 'socketfiles'.
# We use the pidfiles and socketfiles to try to terminate the servers.
# This is not perfect, there could still be other server processes
# left.
# To speed things we kill servers in parallel. The argument is a list
# of 'ports', 'pids', 'pidfiles' and 'socketfiles'.
# Force flag is to be set only for killing mysqld servers this script
# didn't create in this run, i.e. initial cleanup before we start working.
# If force flag is set, we try to kill all with mysqladmin, and
# give up if we have no PIDs.
# FIXME On Cygwin, and maybe some other platforms, $srv->{'pid'} and
# $srv->{'pidfile'} will not be the same PID. We need to try to kill
# both I think.
# FIXME On some operating systems, $srv->{'pid'} and $srv->{'pidfile'}
# will not be the same PID. We need to try to kill both I think.
sub mtr_stop_mysqld_servers ($$) {
sub mtr_stop_mysqld_servers ($) {
my $spec= shift;
my $force= shift;
# ----------------------------------------------------------------------
# If the process was not started from this file, we got no PID,
# we try to find it in the PID file.
# First try nice normal shutdown using 'mysqladmin'
# ----------------------------------------------------------------------
my $any_pid= 0; # If we have any PIDs
mtr_mysqladmin_shutdown($spec);
# ----------------------------------------------------------------------
# We loop with waitpid() nonblocking to see how many of the ones we
# are to kill, actually got killed by mtr_mysqladmin_shutdown().
# Note that we don't rely on this, the mysqld server might have stop
# listening to the port, but still be alive. But it is a start.
# ----------------------------------------------------------------------
foreach my $srv ( @$spec )
{
if ( ! $srv->{'pid'} and -f $srv->{'pidfile'} )
if ( $srv->{'pid'} and (waitpid($srv->{'pid'},&WNOHANG) == $srv->{'pid'}) )
{
$srv->{'pid'}= mtr_get_pid_from_file($srv->{'pidfile'});
}
if ( $srv->{'pid'} )
{
$any_pid= 1;
$srv->{'pid'}= 0;
}
}
# If the processes where started from this script, and we know
# no PIDs, then we don't have to do anything.
# ----------------------------------------------------------------------
# We know the process was started from this file, so there is a PID
# saved, or else we have nothing to do.
# Might be that is is recorded to be missing, but we failed to
# take away the PID file earlier, then we do it now.
# ----------------------------------------------------------------------
if ( ! $any_pid and ! $force )
my %mysqld_pids;
foreach my $srv ( @$spec )
{
if ( $srv->{'pid'} )
{
$mysqld_pids{$srv->{'pid'}}= 1;
}
else
{
# Race, could have been removed between I tested with -f
# and the unlink() below, so I better check again with -f
if ( -f $srv->{'pidfile'} and ! unlink($srv->{'pidfile'}) and
-f $srv->{'pidfile'} )
{
mtr_error("can't remove $srv->{'pidfile'}");
}
}
}
# ----------------------------------------------------------------------
# If the processes where started from this script, and we had no PIDS
# then we don't have to do anything.
# ----------------------------------------------------------------------
if ( ! keys %mysqld_pids )
{
# cluck "This is how we got here!";
return;
}
# ----------------------------------------------------------------------
# First try nice normal shutdown using 'mysqladmin'
# ----------------------------------------------------------------------
start_reap_all(); # Don't require waitpid() of children
foreach my $srv ( @$spec )
{
if ( -e $srv->{'sockfile'} or $srv->{'port'} )
{
# FIXME wrong log.....
# FIXME, stderr.....
# Shutdown time must be high as slave may be in reconnect
my $args;
mtr_init_args(\$args);
mtr_add_arg($args, "--no-defaults");
mtr_add_arg($args, "--user=%s", $::opt_user);
mtr_add_arg($args, "--password=");
if ( -e $srv->{'sockfile'} )
{
mtr_add_arg($args, "--socket=%s", $srv->{'sockfile'});
}
if ( $srv->{'port'} )
{
mtr_add_arg($args, "--port=%s", $srv->{'port'});
}
mtr_add_arg($args, "--connect_timeout=5");
mtr_add_arg($args, "--shutdown_timeout=20");
mtr_add_arg($args, "--protocol=tcp"); # FIXME new thing, will it help?!
mtr_add_arg($args, "shutdown");
# We don't wait for termination of mysqladmin
mtr_spawn($::exe_mysqladmin, $args,
"", $::path_manager_log, $::path_manager_log, "");
}
}
# Wait for them all to remove their pid and socket file
PIDSOCKFILEREMOVED:
for (my $loop= $::opt_sleep_time_for_delete; $loop; $loop--)
{
my $pidsockfiles_left= 0;
foreach my $srv ( @$spec )
{
if ( -e $srv->{'sockfile'} or -f $srv->{'pidfile'} )
{
$pidsockfiles_left++; # Could be that pidfile is left
}
}
if ( ! $pidsockfiles_left )
{
last PIDSOCKFILEREMOVED;
}
if ( $loop % 20 == 1 )
{
mtr_warning("Still processes alive after 10 seconds, retrying for $loop seconds...");
}
mtr_debug("Sleep for 1 second waiting for pid and socket file removal");
sleep(1); # One second
}
# ----------------------------------------------------------------------
# If no known PIDs, we have nothing more to try
# ----------------------------------------------------------------------
if ( ! $any_pid )
{
stop_reap_all();
return;
}
# ----------------------------------------------------------------------
# We may have killed all that left a socket, but we are not sure we got
# them all killed. If we suspect it lives, try nice kill with SIG_TERM.
# Note that for true Win32 processes, kill(0,$pid) will not return 1.
# In mtr_mysqladmin_shutdown() we only waited for the mysqld servers
# not to listen to the port. But we are not sure we got them all
# killed. If we suspect it lives, try nice kill with SIG_TERM. Note
# that for true Win32 processes, kill(0,$pid) will not return 1.
# ----------------------------------------------------------------------
SIGNAL:
foreach my $sig (15,9)
{
my $process_left= 0;
foreach my $srv ( @$spec )
my $retries= 10; # 10 seconds
kill($sig, keys %mysqld_pids);
while ( $retries-- and kill(0, keys %mysqld_pids) )
{
if ( $srv->{'pid'} and
( -f $srv->{'pidfile'} or kill(0,$srv->{'pid'}) ) )
{
$process_left++;
mtr_warning("process $srv->{'pid'} not cooperating, " .
"will send signal $sig to process");
kill($sig,$srv->{'pid'}); # SIG_TERM
}
if ( ! $process_left )
{
last SIGNAL;
}
mtr_debug("Sleep 1 second waiting for processes to die");
sleep(1) # Wait one second
}
mtr_debug("Sleep for 5 seconds waiting for processes to die");
sleep(5); # We wait longer than usual
}
# ----------------------------------------------------------------------
@ -437,8 +526,8 @@ sub mtr_stop_mysqld_servers ($$) {
foreach my $file ($srv->{'pidfile'}, $srv->{'sockfile'})
{
unlink($file);
if ( -e $file )
# Know it is dead so should be no race, careful anyway
if ( -f $file and ! unlink($file) and -f $file )
{
$errors++;
mtr_warning("couldn't delete $file");
@ -454,9 +543,147 @@ sub mtr_stop_mysqld_servers ($$) {
}
}
stop_reap_all();
# FIXME We just assume they are all dead, for Cygwin we are not
# really sure
}
# FIXME We just assume they are all dead, we don't know....
##############################################################################
#
# Shut down mysqld servers using "mysqladmin ... shutdown".
# To speed this up, we start them in parallel and use waitpid() to
# catch their termination. Note that this doesn't say the servers
# are terminated, just that 'mysqladmin' is terminated.
#
# Note that mysqladmin will ask the server about what PID file it uses,
# and mysqladmin will wait for it to be removed before it terminates
# (unless passes timeout).
#
# This function will take at most about 20 seconds, and we still are not
# sure we killed them all. If none is responding to ping, we return 1,
# else we return 0.
#
##############################################################################
sub mtr_mysqladmin_shutdown () {
my $spec= shift;
my @mysql_admin_pids;
my @to_kill_specs;
foreach my $srv ( @$spec )
{
if ( mtr_ping_mysqld_server($srv->{'port'}, $srv->{'sockfile'}) )
{
push(@to_kill_specs, $srv);
}
}
foreach my $srv ( @to_kill_specs )
{
# FIXME wrong log.....
# FIXME, stderr.....
# Shutdown time must be high as slave may be in reconnect
my $args;
mtr_init_args(\$args);
mtr_add_arg($args, "--no-defaults");
mtr_add_arg($args, "--user=%s", $::opt_user);
mtr_add_arg($args, "--password=");
if ( -e $srv->{'sockfile'} )
{
mtr_add_arg($args, "--socket=%s", $srv->{'sockfile'});
}
if ( $srv->{'port'} )
{
mtr_add_arg($args, "--port=%s", $srv->{'port'});
}
if ( $srv->{'port'} and ! -e $srv->{'sockfile'} )
{
mtr_add_arg($args, "--protocol=tcp"); # Needed if no --socket
}
mtr_add_arg($args, "--connect_timeout=5");
mtr_add_arg($args, "--shutdown_timeout=20");
mtr_add_arg($args, "shutdown");
# We don't wait for termination of mysqladmin
my $pid= mtr_spawn($::exe_mysqladmin, $args,
"", $::path_manager_log, $::path_manager_log, "");
push(@mysql_admin_pids, $pid);
}
# We wait blocking, we wait for the last one anyway
foreach my $pid (@mysql_admin_pids)
{
waitpid($pid,0); # FIXME no need to check -1 or 0?
}
# If we trusted "mysqladmin --shutdown_timeout= ..." we could just
# terminate now, but we don't (FIXME should be debugged).
# So we try again to ping and at least wait the same amount of time
# mysqladmin would for all to die.
my $timeout= 20; # 20 seconds max
my $res= 1; # If we just fall through, we are done
TIME:
while ( $timeout-- )
{
foreach my $srv ( @to_kill_specs )
{
$res= 1; # We are optimistic
if ( mtr_ping_mysqld_server($srv->{'port'}, $srv->{'sockfile'}) )
{
mtr_debug("Sleep 1 second waiting for processes to stop using port");
sleep(1); # One second
$res= 0;
next TIME;
}
}
last; # If we got here, we are done
}
return $res;
}
##############################################################################
#
# The operating system will keep information about dead children,
# we read this information here, and if we have records the process
# is alive, we mark it as dead.
#
##############################################################################
sub mtr_record_dead_children () {
my $ret_pid;
# FIXME the man page says to wait for -1 to terminate,
# but on OS X we get '0' all the time...
while ( ($ret_pid= waitpid(-1,&WNOHANG)) > 0 )
{
mtr_debug("waitpid() catched exit of child $ret_pid");
foreach my $idx (0..1)
{
if ( $::master->[$idx]->{'pid'} eq $ret_pid )
{
mtr_debug("child $ret_pid was master[$idx]");
$::master->[$idx]->{'pid'}= 0;
}
}
foreach my $idx (0..2)
{
if ( $::slave->[$idx]->{'pid'} eq $ret_pid )
{
mtr_debug("child $ret_pid was slave[$idx]");
$::slave->[$idx]->{'pid'}= 0;
last;
}
}
}
}
sub start_reap_all {
@ -467,6 +694,32 @@ sub stop_reap_all {
$SIG{CHLD}= 'DEFAULT';
}
sub mtr_ping_mysqld_server () {
my $port= shift;
my $remote= "localhost";
my $iaddr= inet_aton($remote);
if ( ! $iaddr )
{
mtr_error("can't find IP number for $remote");
}
my $paddr= sockaddr_in($port, $iaddr);
my $proto= getprotobyname('tcp');
if ( ! socket(SOCK, PF_INET, SOCK_STREAM, $proto) )
{
mtr_error("can't create socket: $!");
}
if ( connect(SOCK, $paddr) )
{
close(SOCK); # FIXME check error?
return 1;
}
else
{
return 0;
}
}
##############################################################################
#
# Wait for a file to be created
@ -474,33 +727,38 @@ sub stop_reap_all {
##############################################################################
sub sleep_until_file_created ($$) {
sub sleep_until_file_created ($$$) {
my $pidfile= shift;
my $timeout= shift;
my $pid= shift;
my $loop= $timeout;
while ( $loop-- )
for ( my $loop= 1; $loop <= $timeout; $loop++ )
{
if ( -r $pidfile )
{
return;
return 1;
}
mtr_debug("Sleep for 1 second waiting for creation of $pidfile");
if ( $loop % 20 == 1 )
# Check if it died after the fork() was successful
if ( waitpid($pid,&WNOHANG) == $pid )
{
mtr_warning("Waiting for $pidfile to be created, still trying for $loop seconds...");
return 0;
}
mtr_debug("Sleep 1 second waiting for creation of $pidfile");
if ( $loop % 60 == 0 )
{
my $left= $timeout - $loop;
mtr_warning("Waited $loop seconds for $pidfile to be created, " .
"still waiting for $left seconds...");
}
sleep(1);
}
if ( ! -r $pidfile )
{
mtr_error("No $pidfile was created");
}
return 0;
}
1;

View file

@ -10,6 +10,7 @@ sub mtr_report_test_name($);
sub mtr_report_test_passed($);
sub mtr_report_test_failed($);
sub mtr_report_test_skipped($);
sub mtr_report_test_disabled($);
sub mtr_show_failed_diff ($);
sub mtr_report_stats ($);
@ -72,7 +73,14 @@ sub mtr_report_test_skipped ($) {
my $tinfo= shift;
$tinfo->{'result'}= 'MTR_RES_SKIPPED';
print "[ skipped ]\n";
if ( $tinfo->{'disable'} )
{
print "[ disabled ] $tinfo->{'comment'}\n";
}
else
{
print "[ skipped ]\n";
}
}
sub mtr_report_test_passed ($) {
@ -95,9 +103,18 @@ sub mtr_report_test_failed ($) {
$tinfo->{'result'}= 'MTR_RES_FAILED';
print "[ fail ]\n";
print "Errors are (from $::path_timefile) :\n";
print mtr_fromfile($::path_timefile); # FIXME print_file() instead
print "\n(the last lines may be the most important ones)\n";
# FIXME Instead of this test, and meaningless error message in 'else'
# we should write out into $::path_timefile when the error occurs.
if ( -f $::path_timefile )
{
print "Errors are (from $::path_timefile) :\n";
print mtr_fromfile($::path_timefile); # FIXME print_file() instead
print "\n(the last lines may be the most important ones)\n";
}
else
{
print "Unexpected termination, probably when starting mysqld\n";
}
}
sub mtr_report_stats ($) {

View file

@ -96,6 +96,8 @@ bool create_system_files(const char *mdata,const char *output_file, bool test)
"Lock_tables_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
"PRIMARY KEY Host (Host,Db,User),"
"KEY User (User))"
"engine=MyISAM "
"CHARACTER SET utf8 COLLATE utf8_bin "
"comment='Database privileges';\n");
if (test)
@ -126,10 +128,12 @@ bool create_system_files(const char *mdata,const char *output_file, bool test)
"Create_tmp_table_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
"Lock_tables_priv enum('N','Y') DEFAULT 'N' NOT NULL,"
"PRIMARY KEY Host (Host,Db))"
"comment='Host privileges;"
" Merged with database privileges';\n");
"engine=MyISAM "
"CHARACTER SET utf8 COLLATE utf8_bin "
"comment='Host privileges; Merged with database privileges';\n");
}
if (test_sys_file(mdata,"mysql/user.frm"))
{
#ifdef __WIN__
@ -184,7 +188,10 @@ bool create_system_files(const char *mdata,const char *output_file, bool test)
"max_updates int(11) unsigned DEFAULT 0 NOT NULL,"
"max_connections int(11) unsigned DEFAULT 0 NOT NULL,"
"PRIMARY KEY Host (Host,User)"
") comment='Users and global privileges';\n");
") engine=MyISAM "
"CHARACTER SET utf8 COLLATE utf8_bin "
"comment='Users and global privileges';\n");
if (test)
{
@ -238,7 +245,9 @@ bool create_system_files(const char *mdata,const char *output_file, bool test)
"dl char(128) DEFAULT '' NOT NULL,"
"type enum ('function','aggregate') NOT NULL,"
"PRIMARY KEY (name)"
") comment='User defined functions';\n");
") engine=MyISAM "
"CHARACTER SET utf8 COLLATE utf8_bin "
"comment='User defined functions';\n");
}
if (test_sys_file(mdata,"mysql/tables_priv.frm"))
@ -258,7 +267,9 @@ bool create_system_files(const char *mdata,const char *output_file, bool test)
" DEFAULT '' NOT NULL,"
"PRIMARY KEY (Host,Db,User,Table_name),"
"KEY Grantor (Grantor)"
") comment='Table privileges';\n");
") engine=MyISAM "
"CHARACTER SET utf8 COLLATE utf8_bin "
"comment='Table privileges';\n");
}
if (test_sys_file(mdata,"mysql/columns_priv.frm"))
@ -274,7 +285,9 @@ bool create_system_files(const char *mdata,const char *output_file, bool test)
"Column_priv set('Select','Insert','Update','References')"
" DEFAULT '' NOT NULL,"
"PRIMARY KEY (Host,Db,User,Table_name,Column_name)"
") comment='Column privileges';\n");
") engine=MyISAM "
"CHARACTER SET utf8 COLLATE utf8_bin "
"comment='Column privileges';\n");
}
if (test_sys_file(mdata,"mysql/help_topic.frm"))
@ -289,7 +302,9 @@ bool create_system_files(const char *mdata,const char *output_file, bool test)
"url varchar(128) not null,"
"primary key (help_topic_id),"
"unique index (name)"
") comment='help topics';\n");
") engine=MyISAM "
"CHARACTER SET utf8 "
"comment='help topics';\n");
}
if (test_sys_file(mdata,"mysql/help_category.frm"))
@ -302,7 +317,9 @@ bool create_system_files(const char *mdata,const char *output_file, bool test)
"url varchar(128) not null,"
"primary key (help_category_id),"
"unique index (name)"
") comment='help categories';\n");
") engine=MyISAM "
"CHARACTER SET utf8 "
"comment='help categories';\n");
}
if (test_sys_file(mdata,"mysql/help_keyword.frm"))
@ -313,7 +330,9 @@ bool create_system_files(const char *mdata,const char *output_file, bool test)
"name varchar(64) not null,"
"primary key (help_keyword_id),"
"unique index (name)"
") comment='help keywords';\n");
") engine=MyISAM "
"CHARACTER SET utf8 "
"comment='help keywords';\n");
}
if (test_sys_file(mdata,"mysql/help_relation.frm"))
@ -323,7 +342,9 @@ bool create_system_files(const char *mdata,const char *output_file, bool test)
"help_topic_id int unsigned not null references help_topic,"
"help_keyword_id int unsigned not null references help_keyword,"
"primary key (help_keyword_id, help_topic_id)"
") comment='keyword-topic relation';\n");
") engine=MyISAM "
"CHARACTER SET utf8 "
"comment='keyword-topic relation';\n");
}
if (test_sys_file(mdata,"mysql/time_zone_name.frm"))
@ -333,7 +354,7 @@ bool create_system_files(const char *mdata,const char *output_file, bool test)
"Name char(64) NOT NULL,"
"Time_zone_id int unsigned NOT NULL,"
"PRIMARY KEY Name (Name)"
") DEFAULT CHARACTER SET latin1 "
") engine=MyISAM CHARACTER SET utf8 "
"comment='Time zone names';\n");
if (test)
@ -341,7 +362,9 @@ bool create_system_files(const char *mdata,const char *output_file, bool test)
fprintf(out,
"INSERT INTO time_zone_name (Name, Time_Zone_id) VALUES"
"('MET', 1), ('UTC', 2), ('Universal', 2), "
"('Europe/Moscow',3), ('leap/Europe/Moscow',4);\n");
"('Europe/Moscow',3), ('leap/Europe/Moscow',4),"
"('Japan', 5);\n");
}
}
@ -353,13 +376,13 @@ bool create_system_files(const char *mdata,const char *output_file, bool test)
"Time_zone_id int unsigned NOT NULL auto_increment,"
"Use_leap_seconds enum('Y','N') DEFAULT 'N' NOT NULL,"
"PRIMARY KEY TzId (Time_zone_id)"
") DEFAULT CHARACTER SET latin1 "
") engine=MyISAM CHARACTER SET utf8 "
"comment='Time zones';\n");
if (test)
{
fprintf(out,"INSERT INTO time_zone (Time_zone_id, Use_leap_seconds)"
"VALUES (1,'N'), (2,'N'), (3,'N'), (4,'Y');\n");
"VALUES (1,'N'), (2,'N'), (3,'N'), (4,'Y'), (5,'N');\n");
}
}
@ -371,7 +394,7 @@ bool create_system_files(const char *mdata,const char *output_file, bool test)
"Transition_time bigint signed NOT NULL,"
"Transition_type_id int unsigned NOT NULL,"
"PRIMARY KEY TzIdTranTime (Time_zone_id, Transition_time)"
") DEFAULT CHARACTER SET latin1 "
") engine=MyISAM CHARACTER SET utf8 "
"comment='Time zone transitions';\n");
if (test)
@ -576,7 +599,9 @@ bool create_system_files(const char *mdata,const char *output_file, bool test)
",(4, 2045689222, 8) ,(4, 2058390022, 9)"
",(4, 2077138822, 8) ,(4, 2090444422, 9)"
",(4, 2108588422, 8) ,(4, 2121894022, 9)"
",(4, 2140038022, 8);\n");
",(4, 2140038022, 8), (5, -1009875600, 1);\n");
}
}
@ -590,7 +615,7 @@ bool create_system_files(const char *mdata,const char *output_file, bool test)
"Is_DST tinyint unsigned DEFAULT 0 NOT NULL,"
"Abbreviation char(8) DEFAULT '' NOT NULL,"
"PRIMARY KEY TzIdTrTId (Time_zone_id, Transition_type_id)"
") DEFAULT CHARACTER SET latin1 "
") engine=MyISAM CHARACTER SET utf8 "
"comment='Time zone transition types';\n");
if (test)
@ -612,7 +637,9 @@ bool create_system_files(const char *mdata,const char *output_file, bool test)
",(4, 4, 10800, 0, 'MSK') ,(4, 5, 14400, 1, 'MSD')"
",(4, 6, 18000, 1, 'MSD') ,(4, 7, 7200, 0, 'EET')"
",(4, 8, 10800, 0, 'MSK') ,(4, 9, 14400, 1, 'MSD')"
",(4, 10, 10800, 1, 'EEST') ,(4, 11, 7200, 0, 'EET');\n");
",(4, 10, 10800, 1, 'EEST') ,(4, 11, 7200, 0, 'EET')"
",(5, 0, 32400, 0, 'CJT') ,(5, 1, 32400, 0, 'JST');\n");
}
}
@ -623,7 +650,7 @@ bool create_system_files(const char *mdata,const char *output_file, bool test)
"Transition_time bigint signed NOT NULL,"
"Correction int signed NOT NULL,"
"PRIMARY KEY TranTime (Transition_time)"
") DEFAULT CHARACTER SET latin1 "
") engine=MyISAM CHARACTER SET utf8 "
"comment='Leap seconds information for time zones';\n");
if (test)

View file

@ -122,7 +122,7 @@ void add_arg(arg_list_t *al, const char *format, ...)
al->argv[al->argc]= malloc(strlen(temp)+1);
ASSERT(al->argv[al->argc] != NULL);
strcpy(al->argv[al->argc], temp);
++(al->argc);
}
else
@ -644,7 +644,7 @@ void del_tree(char *dir)
if (lstat(entry->d_name, &st) == -1)
{
/* FIXME error */
return;
return;
}
if (S_ISDIR(st.st_mode))
#else
@ -800,9 +800,12 @@ int removef(const char *format, ...)
#ifndef STRUCT_DIRENT_HAS_D_TYPE
struct stat st;
if (lstat(entry->d_name, &st) == -1)
/* create long name */
snprintf(temp, FN_REFLEN, "%s/%s", path, entry->d_name);
if (lstat(temp, &st) == -1)
{
return 1;
return 1; /* Error couldn't lstat file */
}
if (!S_ISDIR(st.st_mode) && !fnmatch(p, entry->d_name,0))

View file

@ -84,10 +84,11 @@ use Sys::Hostname;
#use Carp;
use IO::Socket;
use IO::Socket::INET;
use Data::Dumper;
#use Data::Dumper;
use strict;
#use diagnostics;
require "lib/mtr_cases.pl";
require "lib/mtr_process.pl";
require "lib/mtr_io.pl";
require "lib/mtr_gcov.pl";
@ -165,14 +166,12 @@ our $glob_user= 'test';
our $glob_use_embedded_server= 0;
our $glob_basedir;
our $glob_do_test;
# The total result
our $path_charsetsdir;
our $path_client_bindir;
our $path_language;
our $path_tests_bindir;
our $path_timefile;
our $path_manager_log; # Used by mysqldadmin
our $path_slave_load_tmpdir; # What is this?!
@ -192,8 +191,10 @@ our $exe_master_mysqld;
our $exe_mysql;
our $exe_mysqladmin;
our $exe_mysqlbinlog;
our $exe_mysql_client_test;
our $exe_mysqld;
our $exe_mysqldump; # Called from test case
our $exe_mysql_fix_system_tables;
our $exe_mysqltest;
our $exe_slave_mysqld;
@ -208,6 +209,7 @@ our $opt_current_test;
our $opt_ddd;
our $opt_debug;
our $opt_do_test;
our @opt_cases; # The test cases names in argv
our $opt_embedded_server;
our $opt_extern;
our $opt_fast;
@ -232,8 +234,6 @@ our $opt_local_master;
our $master; # Will be struct in C
our $slave;
our $opt_master_myport;
our $opt_slave_myport;
our $opt_ndbcluster_port;
our $opt_ndbconnectstring;
@ -284,6 +284,11 @@ our $opt_warnings;
our $opt_with_ndbcluster;
our $opt_with_openssl;
our $exe_ndb_mgm;
our $path_ndb_tools_dir;
our $path_ndb_backup_dir;
our $file_ndb_testrun_log;
our $flag_ndb_status_ok= 1;
######################################################################
#
@ -297,8 +302,7 @@ sub command_line_setup ();
sub executable_setup ();
sub environment_setup ();
sub kill_and_cleanup ();
sub collect_test_cases ($);
sub sleep_until_file_created ($$);
sub ndbcluster_install ();
sub ndbcluster_start ();
sub ndbcluster_stop ();
sub run_benchmarks ($);
@ -306,6 +310,7 @@ sub run_tests ();
sub mysql_install_db ();
sub install_db ($$);
sub run_testcase ($);
sub report_failure_and_restart ($);
sub do_before_start_master ($$);
sub do_before_start_slave ($$);
sub mysqld_start ($$$$);
@ -347,18 +352,20 @@ sub main () {
kill_and_cleanup();
mysql_install_db();
if ( $opt_with_ndbcluster and ! $glob_use_running_ndbcluster )
{
ndbcluster_start(); # We start the cluster storage engine
}
# mysql_loadstd(); FIXME copying from "std_data" .frm and
# .MGR but there are none?!
}
if ( $opt_start_and_exit )
{
mtr_report("Servers started, exiting");
if ( mysqld_start('master',0,[],[]) )
{
mtr_report("Servers started, exiting");
}
else
{
mtr_error("Can't start the mysqld server");
}
}
else
{
@ -447,8 +454,8 @@ sub command_line_setup () {
$path_manager_log= "$glob_mysql_test_dir/var/log/manager.log";
$opt_current_test= "$glob_mysql_test_dir/var/log/current_test";
$opt_master_myport= 9306;
$opt_slave_myport= 9308;
my $opt_master_myport= 9306;
my $opt_slave_myport= 9308;
$opt_ndbcluster_port= 9350;
# Read the command line
@ -532,6 +539,8 @@ sub command_line_setup () {
usage("");
}
@opt_cases= @ARGV;
# Put this into a hash, will be a C struct
$master->[0]->{'path_myddir'}= "$glob_mysql_test_dir/var/master-data";
@ -542,6 +551,8 @@ sub command_line_setup () {
$master->[0]->{'path_myport'}= $opt_master_myport;
$master->[0]->{'start_timeout'}= 400; # enough time create innodb tables
$master->[0]->{'ndbcluster'}= 1; # ndbcluster not started
$master->[1]->{'path_myddir'}= "$glob_mysql_test_dir/var/master1-data";
$master->[1]->{'path_myerr'}= "$glob_mysql_test_dir/var/log/master1.err";
$master->[1]->{'path_mylog'}= "$glob_mysql_test_dir/var/log/master1.log";
@ -598,7 +609,7 @@ sub command_line_setup () {
# Look at the command line options and set script flags
# --------------------------------------------------------------------------
if ( $opt_record and ! @ARGV)
if ( $opt_record and ! @opt_cases )
{
mtr_error("Will not run in record mode without a specific test case");
}
@ -672,6 +683,10 @@ sub command_line_setup () {
$glob_use_running_ndbcluster= 1;
$opt_with_ndbcluster= 1;
}
else
{
$opt_ndbconnectstring= "host=localhost:$opt_ndbcluster_port";
}
# FIXME
@ -733,7 +748,8 @@ sub executable_setup () {
{
mtr_error("Can't find embedded server 'mysqltest'");
}
$path_tests_bindir= "$glob_basedir/libmysqld/examples";
$exe_mysql_client_test=
"$glob_basedir/libmysqld/examples/mysql_client_test_embedded";
}
else
{
@ -749,7 +765,8 @@ sub executable_setup () {
{
$exe_mysqltest= "$glob_basedir/client/mysqltest";
}
$path_tests_bindir= "$glob_basedir/tests";
$exe_mysql_client_test=
"$glob_basedir/tests/mysql_client_test";
}
if ( -f "$glob_basedir/client/.libs/mysqldump" )
{
@ -768,22 +785,29 @@ sub executable_setup () {
$exe_mysqlbinlog= "$glob_basedir/client/mysqlbinlog";
}
$exe_mysqld= "$glob_basedir/sql/mysqld";
$path_client_bindir= "$glob_basedir/client";
$exe_mysqladmin= "$path_client_bindir/mysqladmin";
$exe_mysql= "$path_client_bindir/mysql";
$path_language= "$glob_basedir/sql/share/english/";
$path_charsetsdir= "$glob_basedir/sql/share/charsets";
$path_client_bindir= "$glob_basedir/client";
$exe_mysqld= "$glob_basedir/sql/mysqld";
$exe_mysqladmin= "$path_client_bindir/mysqladmin";
$exe_mysql= "$path_client_bindir/mysql";
$exe_mysql_fix_system_tables= "$glob_basedir/scripts/mysql_fix_privilege_tables";
$path_language= "$glob_basedir/sql/share/english/";
$path_charsetsdir= "$glob_basedir/sql/share/charsets";
$path_ndb_tools_dir= "$glob_basedir/ndb/tools";
$exe_ndb_mgm= "$glob_basedir/ndb/src/mgmclient/ndb_mgm";
}
else
{
$path_client_bindir= "$glob_basedir/bin";
$path_tests_bindir= "$glob_basedir/tests";
$exe_mysqltest= "$path_client_bindir/mysqltest";
$exe_mysqldump= "$path_client_bindir/mysqldump";
$exe_mysqlbinlog= "$path_client_bindir/mysqlbinlog";
$exe_mysqladmin= "$path_client_bindir/mysqladmin";
$exe_mysql= "$path_client_bindir/mysql";
my $path_tests_bindir= "$glob_basedir/tests";
$path_client_bindir= "$glob_basedir/bin";
$exe_mysqltest= "$path_client_bindir/mysqltest";
$exe_mysqldump= "$path_client_bindir/mysqldump";
$exe_mysqlbinlog= "$path_client_bindir/mysqlbinlog";
$exe_mysqladmin= "$path_client_bindir/mysqladmin";
$exe_mysql= "$path_client_bindir/mysql";
$exe_mysql_fix_system_tables= "$path_client_bindir/scripts/mysql_fix_privilege_tables";
if ( -d "$glob_basedir/share/mysql/english" )
{
$path_language ="$glob_basedir/share/mysql/english/";
@ -804,6 +828,36 @@ sub executable_setup () {
$exe_mysqld= "$glob_basedir/bin/mysqld";
}
if ( $glob_use_embedded_server )
{
if ( -f "$path_client_bindir/mysqltest_embedded" )
{
# FIXME valgrind?
$exe_mysqltest="$path_client_bindir/mysqltest_embedded";
}
else
{
error("Cannot find embedded server 'mysqltest_embedded'");
}
if ( -d "$path_tests_bindir/mysql_client_test_embedded" )
{
$exe_mysql_client_test=
"$path_tests_bindir/mysql_client_test_embedded";
}
else
{
$exe_mysql_client_test=
"$path_client_bindir/mysql_client_test_embedded";
}
}
else
{
$exe_mysqltest="$path_client_bindir/mysqltest";
$exe_mysql_client_test="$path_client_bindir/mysql_client_test";
}
$path_ndb_tools_dir= "$glob_basedir/bin";
$exe_ndb_mgm= "$glob_basedir/bin/ndb_mgm";
}
# FIXME special $exe_master_mysqld and $exe_slave_mysqld
@ -818,6 +872,10 @@ sub executable_setup () {
{
$exe_slave_mysqld= $exe_mysqld;
}
$path_ndb_backup_dir=
"$glob_mysql_test_dir/var/ndbcluster-$opt_ndbcluster_port";
$file_ndb_testrun_log= "$glob_mysql_test_dir/var/log/ndb_testrun.log";
}
@ -846,13 +904,18 @@ sub environment_setup () {
# Also command lines in .opt files may contain env vars
# --------------------------------------------------------------------------
$ENV{'LC_COLLATE'}= "C";
$ENV{'MYSQL_TEST_DIR'}= $glob_mysql_test_dir;
$ENV{'MASTER_MYPORT'}= $opt_master_myport;
$ENV{'SLAVE_MYPORT'}= $opt_slave_myport;
# $ENV{'MYSQL_TCP_PORT'}= '@MYSQL_TCP_PORT@'; # FIXME
$ENV{'MYSQL_TCP_PORT'}= 3306;
$ENV{'MASTER_MYSOCK'}= $master->[0]->{'path_mysock'};
$ENV{'UMASK'}= "0660"; # The octal *string*
$ENV{'UMASK_DIR'}= "0770"; # The octal *string*
$ENV{'LC_COLLATE'}= "C";
$ENV{'USE_RUNNING_SERVER'}= $glob_use_running_server;
$ENV{'MYSQL_TEST_DIR'}= $glob_mysql_test_dir;
$ENV{'MASTER_MYSOCK'}= $master->[0]->{'path_mysock'};
$ENV{'MASTER_MYSOCK1'}= $master->[1]->{'path_mysock'};
$ENV{'MASTER_MYPORT'}= $master->[0]->{'path_myport'};
$ENV{'MASTER_MYPORT1'}= $master->[1]->{'path_myport'};
$ENV{'SLAVE_MYPORT'}= $slave->[0]->{'path_myport'};
# $ENV{'MYSQL_TCP_PORT'}= '@MYSQL_TCP_PORT@'; # FIXME
$ENV{'MYSQL_TCP_PORT'}= 3306;
}
@ -875,203 +938,6 @@ sub handle_int_signal () {
}
##############################################################################
#
# Collect information about test cases we are to run
#
##############################################################################
sub collect_test_cases ($) {
my $suite= shift; # Test suite name
my $testdir;
my $resdir;
if ( $suite eq "main" )
{
$testdir= "$glob_mysql_test_dir/t";
$resdir= "$glob_mysql_test_dir/r";
}
else
{
$testdir= "$glob_mysql_test_dir/suite/$suite/t";
$resdir= "$glob_mysql_test_dir/suite/$suite/r";
}
my @tests; # Array of hash, will be array of C struct
opendir(TESTDIR, $testdir) or mtr_error("Can't open dir \"$testdir\": $!");
foreach my $elem ( sort readdir(TESTDIR) ) {
my $tname= mtr_match_extension($elem,"test");
next if ! defined $tname;
next if $opt_do_test and ! defined mtr_match_prefix($elem,$opt_do_test);
my $path= "$testdir/$elem";
# ----------------------------------------------------------------------
# Skip some tests silently
# ----------------------------------------------------------------------
if ( $opt_start_from and $tname lt $opt_start_from )
{
next;
}
# ----------------------------------------------------------------------
# Skip some tests but include in list, just mark them to skip
# ----------------------------------------------------------------------
my $tinfo= {};
$tinfo->{'name'}= $tname;
$tinfo->{'result_file'}= "$resdir/$tname.result";
push(@tests, $tinfo);
if ( $opt_skip_test and defined mtr_match_prefix($tname,$opt_skip_test) )
{
$tinfo->{'skip'}= 1;
next;
}
# FIXME temporary solution, we have a hard coded list of test cases to
# skip if we are using the embedded server
if ( $glob_use_embedded_server and
mtr_match_any_exact($tname,\@skip_if_embedded_server) )
{
$tinfo->{'skip'}= 1;
next;
}
# ----------------------------------------------------------------------
# Collect information about test case
# ----------------------------------------------------------------------
$tinfo->{'path'}= $path;
$tinfo->{'timezone'}= "GMT-3"; # for UNIX_TIMESTAMP tests to work
if ( defined mtr_match_prefix($tname,"rpl") )
{
if ( $opt_skip_rpl )
{
$tinfo->{'skip'}= 1;
next;
}
# FIXME currently we always restart slaves
$tinfo->{'slave_restart'}= 1;
if ( $tname eq 'rpl_failsafe' or $tname eq 'rpl_chain_temp_table' )
{
$tinfo->{'slave_num'}= 3;
}
else
{
$tinfo->{'slave_num'}= 1;
}
}
# FIXME what about embedded_server + ndbcluster, skip ?!
my $master_opt_file= "$testdir/$tname-master.opt";
my $slave_opt_file= "$testdir/$tname-slave.opt";
my $slave_mi_file= "$testdir/$tname.slave-mi";
my $master_sh= "$testdir/$tname-master.sh";
my $slave_sh= "$testdir/$tname-slave.sh";
if ( -f $master_opt_file )
{
$tinfo->{'master_restart'}= 1; # We think so for now
# This is a dirty hack from old mysql-test-run, we use the opt file
# to flag other things as well, it is not a opt list at all
my $extra_master_opt= mtr_get_opts_from_file($master_opt_file);
foreach my $opt (@$extra_master_opt)
{
my $value;
$value= mtr_match_prefix($opt, "--timezone=");
if ( defined $value )
{
$tinfo->{'timezone'}= $value;
$extra_master_opt= [];
$tinfo->{'master_restart'}= 0;
last;
}
$value= mtr_match_prefix($opt, "--result-file=");
if ( defined $value )
{
$tinfo->{'result_file'}= "r/$value.result";
if ( $opt_result_ext and $opt_record or
-f "$tinfo->{'result_file'}$opt_result_ext")
{
$tinfo->{'result_file'}.= $opt_result_ext;
}
$extra_master_opt= [];
$tinfo->{'master_restart'}= 0;
last;
}
}
$tinfo->{'master_opt'}= $extra_master_opt;
}
if ( -f $slave_opt_file )
{
$tinfo->{'slave_opt'}= mtr_get_opts_from_file($slave_opt_file);
$tinfo->{'slave_restart'}= 1;
}
if ( -f $slave_mi_file )
{
$tinfo->{'slave_mi'}= mtr_get_opts_from_file($slave_mi_file);
$tinfo->{'slave_restart'}= 1;
}
if ( -f $master_sh )
{
if ( $glob_win32_perl )
{
$tinfo->{'skip'}= 1;
}
else
{
$tinfo->{'master_sh'}= $master_sh;
$tinfo->{'master_restart'}= 1;
}
}
if ( -f $slave_sh )
{
if ( $glob_win32_perl )
{
$tinfo->{'skip'}= 1;
}
else
{
$tinfo->{'slave_sh'}= $slave_sh;
$tinfo->{'slave_restart'}= 1;
}
}
# We can't restart a running server that may be in use
if ( $glob_use_running_server and
( $tinfo->{'master_restart'} or $tinfo->{'slave_restart'} ) )
{
$tinfo->{'skip'}= 1;
}
}
closedir TESTDIR;
return \@tests;
}
##############################################################################
#
# Handle left overs from previous runs
@ -1099,22 +965,19 @@ sub kill_and_cleanup () {
mtr_report("Killing Possible Leftover Processes");
mkpath("$glob_mysql_test_dir/var/log"); # Needed for mysqladmin log
mtr_kill_leftovers();
}
if ( $opt_with_ndbcluster and ! $glob_use_running_ndbcluster )
{
ndbcluster_stop();
$master->[0]->{'ndbcluster'}= 1;
}
mtr_report("Removing Stale Files");
rmtree("$glob_mysql_test_dir/var/log");
rmtree("$glob_mysql_test_dir/var/ndbcluster");
rmtree("$glob_mysql_test_dir/var/ndbcluster-$opt_ndbcluster_port");
rmtree("$glob_mysql_test_dir/var/run");
rmtree("$glob_mysql_test_dir/var/tmp");
mkpath("$glob_mysql_test_dir/var/log");
mkpath("$glob_mysql_test_dir/var/ndbcluster");
mkpath("$glob_mysql_test_dir/var/run");
mkpath("$glob_mysql_test_dir/var/tmp");
mkpath($opt_tmpdir);
@ -1152,26 +1015,67 @@ sub kill_and_cleanup () {
# FIXME why is there a different start below?!
sub ndbcluster_install () {
if ( ! $opt_with_ndbcluster or $glob_use_running_ndbcluster )
{
return 0;
}
mtr_report("Install ndbcluster");
my $ndbcluster_opts= $opt_bench ? "" : "--small";
my $ndbcluster_port_base= $opt_ndbcluster_port + 2;
if ( mtr_run("$glob_mysql_test_dir/ndb/ndbcluster",
["--port=$opt_ndbcluster_port",
"--port-base=$ndbcluster_port_base",
"--data-dir=$glob_mysql_test_dir/var",
$ndbcluster_opts,
"--initial"],
"", "", "", "") )
{
mtr_error("Error ndbcluster_install");
return 1;
}
ndbcluster_stop();
$master->[0]->{'ndbcluster'}= 1;
return 0;
}
sub ndbcluster_start () {
mtr_report("Starting ndbcluster");
my $ndbcluster_opts= $opt_bench ? "" : "--small";
# FIXME check result code?!
mtr_run("$glob_mysql_test_dir/ndb/ndbcluster",
["--port-base=$opt_ndbcluster_port",
$ndbcluster_opts,
"--diskless",
"--initial",
"--data-dir=$glob_mysql_test_dir/var"],
"", "", "", "");
if ( ! $opt_with_ndbcluster or $glob_use_running_ndbcluster )
{
return 0;
}
# FIXME, we want to _append_ output to file $file_ndb_testrun_log instead of /dev/null
if ( mtr_run("$glob_mysql_test_dir/ndb/ndbcluster",
["--port=$opt_ndbcluster_port",
"--data-dir=$glob_mysql_test_dir/var"],
"", "/dev/null", "", "") )
{
mtr_error("Error ndbcluster_install");
return 1;
}
return 0;
}
sub ndbcluster_stop () {
if ( ! $opt_with_ndbcluster or $glob_use_running_ndbcluster )
{
return;
}
my $ndbcluster_port_base= $opt_ndbcluster_port + 2;
# FIXME, we want to _append_ output to file $file_ndb_testrun_log instead of /dev/null
mtr_run("$glob_mysql_test_dir/ndb/ndbcluster",
["--data-dir=$glob_mysql_test_dir/var",
"--port-base=$opt_ndbcluster_port",
["--port=$opt_ndbcluster_port",
"--data-dir=$glob_mysql_test_dir/var",
"--stop"],
"", "", "", "");
"", "/dev/null", "", "");
return;
}
@ -1189,6 +1093,10 @@ sub run_benchmarks ($) {
if ( ! $glob_use_embedded_server and ! $opt_local_master )
{
$master->[0]->{'pid'}= mysqld_start('master',0,[],[]);
if ( ! $master->[0]->{'pid'} )
{
mtr_error("Can't start the mysqld server");
}
}
mtr_init_args(\$args);
@ -1254,7 +1162,7 @@ sub run_suite () {
mtr_print_thick_line();
mtr_report("Finding Tests in the '$suite' suite");
mtr_report("Finding Tests in the '$suite' suite");
my $tests= collect_test_cases($suite);
@ -1275,11 +1183,6 @@ sub run_suite () {
stop_masters_slaves();
}
if ( $opt_with_ndbcluster and ! $glob_use_running_ndbcluster )
{
ndbcluster_stop();
}
if ( $opt_gcov )
{
gcov_collect(); # collect coverage information
@ -1301,10 +1204,19 @@ sub run_suite () {
sub mysql_install_db () {
mtr_report("Installing Test Databases");
# FIXME not exactly true I think, needs improvements
install_db('master', $master->[0]->{'path_myddir'});
install_db('master', $master->[1]->{'path_myddir'});
install_db('slave', $slave->[0]->{'path_myddir'});
install_db('slave', $slave->[1]->{'path_myddir'});
install_db('slave', $slave->[2]->{'path_myddir'});
if ( ndbcluster_install() )
{
# failed to install, disable usage but flag that its no ok
$opt_with_ndbcluster= 0;
$flag_ndb_status_ok= 0;
}
return 0;
}
@ -1368,6 +1280,9 @@ sub run_testcase ($) {
mtr_tonewfile($opt_current_test,"$tname\n"); # Always tell where we are
# output current test to ndbcluster log file to enable diagnostics
mtr_tofile($file_ndb_testrun_log,"CURRENT TEST $tname\n");
# ----------------------------------------------------------------------
# If marked to skip, just print out and return.
# Note that a test case not marked as 'skip' can still be
@ -1422,6 +1337,12 @@ sub run_testcase ($) {
mtr_tofile($master->[0]->{'path_myerr'},"CURRENT_TEST: $tname\n");
do_before_start_master($tname,$tinfo->{'master_sh'});
# ----------------------------------------------------------------------
# If any mysqld servers running died, we have to know
# ----------------------------------------------------------------------
mtr_record_dead_children();
# ----------------------------------------------------------------------
# Start masters
# ----------------------------------------------------------------------
@ -1435,18 +1356,37 @@ sub run_testcase ($) {
if ( ! $opt_local_master )
{
if ( $master->[0]->{'ndbcluster'} )
{
$master->[0]->{'ndbcluster'}= ndbcluster_start();
if ( $master->[0]->{'ndbcluster'} )
{
report_failure_and_restart($tinfo);
return;
}
}
if ( ! $master->[0]->{'pid'} )
{
$master->[0]->{'pid'}=
mysqld_start('master',0,$tinfo->{'master_opt'},[]);
if ( ! $master->[0]->{'pid'} )
{
report_failure_and_restart($tinfo);
return;
}
}
if ( $opt_with_ndbcluster and ! $master->[1]->{'pid'} )
{
$master->[1]->{'pid'}=
mysqld_start('master',1,$tinfo->{'master_opt'},[]);
if ( ! $master->[1]->{'pid'} )
{
report_failure_and_restart($tinfo);
return;
}
}
if ( $tinfo->{'master_opt'} )
if ( @{$tinfo->{'master_opt'}} )
{
$master->[0]->{'uses_special_flags'}= 1;
}
@ -1469,6 +1409,11 @@ sub run_testcase ($) {
$slave->[$idx]->{'pid'}=
mysqld_start('slave',$idx,
$tinfo->{'slave_opt'}, $tinfo->{'slave_mi'});
if ( ! $slave->[$idx]->{'pid'} )
{
report_failure_and_restart($tinfo);
return;
}
}
}
}
@ -1502,33 +1447,40 @@ sub run_testcase ($) {
"mysqltest returned unexpected code $res, " .
"it has probably crashed");
}
mtr_report_test_failed($tinfo);
mtr_show_failed_diff($tname);
print "\n";
if ( ! $opt_force )
{
print "Aborting: $tname failed. To continue, re-run with '--force'.";
print "\n";
if ( ! $opt_gdb and ! $glob_use_running_server and
! $opt_ddd and ! $glob_use_embedded_server )
{
stop_masters_slaves();
}
exit(1);
}
# FIXME always terminate on failure?!
if ( ! $opt_gdb and ! $glob_use_running_server and
! $opt_ddd and ! $glob_use_embedded_server )
{
stop_masters_slaves();
}
print "Resuming Tests\n\n";
report_failure_and_restart($tinfo);
}
}
}
sub report_failure_and_restart ($) {
my $tinfo= shift;
mtr_report_test_failed($tinfo);
mtr_show_failed_diff($tinfo->{'name'});
print "\n";
if ( ! $opt_force )
{
print "Aborting: $tinfo->{'name'} failed. To continue, re-run with '--force'.";
print "\n";
if ( ! $opt_gdb and ! $glob_use_running_server and
! $opt_ddd and ! $glob_use_embedded_server )
{
stop_masters_slaves();
}
exit(1);
}
# FIXME always terminate on failure?!
if ( ! $opt_gdb and ! $glob_use_running_server and
! $opt_ddd and ! $glob_use_embedded_server )
{
stop_masters_slaves();
}
print "Resuming Tests\n\n";
}
##############################################################################
#
# Start and stop servers
@ -1603,11 +1555,13 @@ sub do_before_start_slave ($$) {
}
sub mysqld_arguments ($$$$$) {
my $args= shift;
my $type= shift; # master/slave/bootstrap
my $idx= shift;
my $extra_opt= shift;
my $slave_master_info= shift;
my $args= shift;
my $type= shift; # master/slave/bootstrap
my $idx= shift;
my $extra_opt= shift;
my $slave_master_info= shift;
# print STDERR Dumper($extra_opt);
my $sidx= ""; # Index as string, 0 is empty string
if ( $idx > 0 )
@ -1728,17 +1682,8 @@ sub mysqld_arguments ($$$$$) {
if ( $opt_with_ndbcluster )
{
mtr_add_arg($args, "%s--ndbcluster", $prefix);
if ( $glob_use_running_ndbcluster )
{
mtr_add_arg($args,"--ndb-connectstring=%s", $prefix,
$opt_ndbconnectstring);
}
else
{
mtr_add_arg($args,"--ndb-connectstring=host=localhost:%d",
$prefix, $opt_ndbcluster_port);
}
mtr_add_arg($args, "%s--ndb-connectstring=%s", $prefix,
$opt_ndbconnectstring);
}
# FIXME always set nowdays??? SMALL_SERVER
@ -1835,10 +1780,10 @@ sub mysqld_arguments ($$$$$) {
##############################################################################
sub mysqld_start ($$$$) {
my $type= shift; # master/slave/bootstrap
my $idx= shift;
my $extra_opt= shift;
my $slave_master_info= shift;
my $type= shift; # master/slave/bootstrap
my $idx= shift;
my $extra_opt= shift;
my $slave_master_info= shift;
my $args; # Arg vector
my $exe;
@ -1893,9 +1838,8 @@ sub mysqld_start ($$$$) {
$master->[$idx]->{'path_myerr'},
$master->[$idx]->{'path_myerr'}, "") )
{
sleep_until_file_created($master->[$idx]->{'path_mypid'},
$master->[$idx]->{'start_timeout'});
return $pid;
return sleep_until_file_created($master->[$idx]->{'path_mypid'},
$master->[$idx]->{'start_timeout'}, $pid);
}
}
@ -1905,13 +1849,12 @@ sub mysqld_start ($$$$) {
$slave->[$idx]->{'path_myerr'},
$slave->[$idx]->{'path_myerr'}, "") )
{
sleep_until_file_created($slave->[$idx]->{'path_mypid'},
$master->[$idx]->{'start_timeout'});
return $pid;
return sleep_until_file_created($slave->[$idx]->{'path_mypid'},
$master->[$idx]->{'start_timeout'}, $pid);
}
}
mtr_error("Can't start mysqld FIXME");
return 0;
}
sub stop_masters_slaves () {
@ -1944,7 +1887,13 @@ sub stop_masters () {
}
}
mtr_stop_mysqld_servers(\@args, 0);
if ( ! $master->[0]->{'ndbcluster'} )
{
ndbcluster_stop();
$master->[0]->{'ndbcluster'}= 1;
}
mtr_stop_mysqld_servers(\@args);
}
sub stop_slaves () {
@ -1966,7 +1915,7 @@ sub stop_slaves () {
}
}
mtr_stop_mysqld_servers(\@args, 0);
mtr_stop_mysqld_servers(\@args);
}
@ -1992,17 +1941,39 @@ sub run_mysqltest ($$) {
}
my $cmdline_mysql=
"$exe_mysql --host=localhost --port=$master->[0]->{'path_myport'} " .
"--socket=$master->[0]->{'path_mysock'} --user=root --password=";
"$exe_mysql --host=localhost --user=root --password= " .
"--port=$master->[0]->{'path_myport'} " .
"--socket=$master->[0]->{'path_mysock'}";
my $cmdline_mysql_client_test=
"$exe_mysql_client_test --no-defaults --testcase --user=root --silent " .
"--port=$master->[0]->{'path_myport'} " .
"--socket=$master->[0]->{'path_mysock'}";
my $cmdline_mysql_fix_system_tables=
"$exe_mysql_fix_system_tables --no-defaults --host=localhost --user=root --password= " .
"--basedir=$glob_basedir --bindir=$path_client_bindir --verbose " .
"--port=$master->[0]->{'path_myport'} " .
"--socket=$master->[0]->{'path_mysock'}";
# FIXME really needing a PATH???
# $ENV{'PATH'}= "/bin:/usr/bin:/usr/local/bin:/usr/bsd:/usr/X11R6/bin:/usr/openwin/bin:/usr/bin/X11:$ENV{'PATH'}";
$ENV{'MYSQL'}= $exe_mysql;
$ENV{'MYSQL'}= $cmdline_mysql;
$ENV{'MYSQL_DUMP'}= $cmdline_mysqldump;
$ENV{'MYSQL_BINLOG'}= $exe_mysqlbinlog;
$ENV{'CLIENT_BINDIR'}= $path_client_bindir;
$ENV{'TESTS_BINDIR'}= $path_tests_bindir;
$ENV{'MYSQL_BINLOG'}= $cmdline_mysqlbinlog;
$ENV{'MYSQL_FIX_SYSTEM_TABLES'}= $cmdline_mysql_fix_system_tables;
$ENV{'MYSQL_CLIENT_TEST'}= $cmdline_mysql_client_test;
$ENV{'CHARSETSDIR'}= $path_charsetsdir;
$ENV{'NDB_STATUS_OK'}= $flag_ndb_status_ok;
$ENV{'NDB_MGM'}= $exe_ndb_mgm;
$ENV{'NDB_BACKUP_DIR'}= $path_ndb_backup_dir;
$ENV{'NDB_TOOLS_DIR'}= $path_ndb_tools_dir;
$ENV{'NDB_TOOLS_OUTPUT'}= $file_ndb_testrun_log;
$ENV{'NDB_CONNECTSTRING'}= $opt_ndbconnectstring;
my $exe= $exe_mysqltest;
my $args;

View file

@ -227,6 +227,8 @@ EXTRA_MYSQLBINLOG_OPT=""
USE_RUNNING_SERVER=0
USE_NDBCLUSTER=""
USE_RUNNING_NDBCLUSTER=""
USE_PURIFY=""
PURIFY_LOGS=""
DO_GCOV=""
DO_GDB=""
MANUAL_GDB=""
@ -246,7 +248,7 @@ MYSQL_TEST_SSL_OPTS=""
USE_TIMER=""
USE_EMBEDDED_SERVER=""
RESULT_EXT=""
TEST_MODE="default"
TEST_MODE=""
NDB_MGM_EXTRA_OPTS=
NDB_MGMD_EXTRA_OPTS=
@ -254,8 +256,17 @@ NDBD_EXTRA_OPTS=
while test $# -gt 0; do
case "$1" in
--embedded-server) USE_EMBEDDED_SERVER=1 USE_MANAGER=0 NO_SLAVE=1 ; \
USE_RUNNING_SERVER=0 RESULT_EXT=".es" TEST_MODE="embedded" ;;
--embedded-server)
USE_EMBEDDED_SERVER=1
USE_MANAGER=0 NO_SLAVE=1
USE_RUNNING_SERVER=0
RESULT_EXT=".es"
TEST_MODE="$TEST_MODE embedded" ;;
--purify)
USE_PURIFY=1
USE_MANAGER=0
USE_RUNNING_SERVER=0
TEST_MODE="$TEST_MODE purify" ;;
--user=*) DBUSER=`$ECHO "$1" | $SED -e "s;--user=;;"` ;;
--force) FORCE=1 ;;
--timer) USE_TIMER=1 ;;
@ -341,7 +352,7 @@ while test $# -gt 0; do
SLEEP_TIME_AFTER_RESTART=`$ECHO "$1" | $SED -e "s;--sleep=;;"`
;;
--ps-protocol)
TEST_MODE="ps-protocol" EXTRA_MYSQL_TEST_OPT="$EXTRA_MYSQL_TEST_OPT $1" ;;
TEST_MODE="$TEST_MODE ps-protocol" EXTRA_MYSQL_TEST_OPT="$EXTRA_MYSQL_TEST_OPT $1" ;;
--user-test=*)
USER_TEST=`$ECHO "$1" | $SED -e "s;--user-test=;;"`
;;
@ -430,7 +441,7 @@ while test $# -gt 0; do
STRACE_CLIENT=1
;;
--debug)
EXTRA_MASTER_MYSQLD_OPT="$EXTRA_MASTER_MYSQLD_OPT \
EXTRA_MASTER_MYSQLD_TRACE=" \
--debug=d:t:i:A,$MYSQL_TEST_DIR/var/log/master.trace"
EXTRA_SLAVE_MYSQLD_OPT="$EXTRA_SLAVE_MYSQLD_OPT \
--debug=d:t:i:A,$MYSQL_TEST_DIR/var/log/slave.trace"
@ -454,6 +465,13 @@ while test $# -gt 0; do
shift
done
if [ -z "$TEST_MODE" ] ; then
TEST_MODE="default"
else
# Remove the leading space if any
TEST_MODE=`echo $TEST_MODE | sed 's/^ *//'`
fi
#++
# mysqld Environment Parameters
#--
@ -482,6 +500,7 @@ export MASTER_MYPORT MASTER_MYPORT1 SLAVE_MYPORT MYSQL_TCP_PORT MASTER_MYSOCK MA
NDBCLUSTER_BASE_PORT=`expr $NDBCLUSTER_PORT + 2`
NDBCLUSTER_OPTS="--port=$NDBCLUSTER_PORT --port-base=$NDBCLUSTER_BASE_PORT --data-dir=$MYSQL_TEST_DIR/var --ndb_mgm-extra-opts=$NDB_MGM_EXTRA_OPTS --ndb_mgmd-extra-opts=$NDB_MGMD_EXTRA_OPTS --ndbd-extra-opts=$NDBD_EXTRA_OPTS"
NDB_BACKUP_DIR=$MYSQL_TEST_DIR/var/ndbcluster-$NDBCLUSTER_PORT
NDB_TOOLS_OUTPUT=$MYSQL_TEST_DIR/var/log/ndb_tools.log
if [ x$SOURCE_DIST = x1 ] ; then
MY_BASEDIR=$MYSQL_TEST_DIR
@ -515,7 +534,10 @@ if [ x$SOURCE_DIST = x1 ] ; then
fi
MYSQL_CLIENT_TEST="$BASEDIR/libmysqld/examples/mysql_client_test_embedded"
else
MYSQLD="$VALGRIND $BASEDIR/sql/mysqld"
MYSQLD="$BASEDIR/sql/mysqld"
if [ -n "$VALGRIND" ] ; then
MYSQLD="$VALGRIND $MYSQLD"
fi
if [ -f "$BASEDIR/client/.libs/lt-mysqltest" ] ; then
MYSQL_TEST="$BASEDIR/client/.libs/lt-mysqltest"
elif [ -f "$BASEDIR/client/.libs/mysqltest" ] ; then
@ -552,6 +574,31 @@ if [ x$SOURCE_DIST = x1 ] ; then
MYSQL_FIX_SYSTEM_TABLES="$BASEDIR/scripts/mysql_fix_privilege_tables"
NDB_TOOLS_DIR="$BASEDIR/ndb/tools"
NDB_MGM="$BASEDIR/ndb/src/mgmclient/ndb_mgm"
if [ -n "$USE_PURIFY" ] ; then
PSUP="$MYSQL_TEST_DIR/purify.suppress"
echo "suppress UMR rw_read_held; mi_open; ha_myisam::open64; handler::ha_open; openfrm" > $PSUP
echo "suppress UMR my_end; main" >> $PSUP
echo "suppress UMR _doprnt; fprintf; my_end; main" >> $PSUP
PURIFYOPTIONS="-windows=no -log-file=%v.purifylog -append-logfile -add-suppression-files=$PSUP"
if [ -f "${MYSQL_TEST}-purify" ] ; then
MYSQL_TEST="${MYSQL_TEST}-purify"
PLOG="$MYSQL_TEST.purifylog"
if [ -f $PLOG ]; then
mv $PLOG $PLOG.$$
fi
PURIFY_LOGS="$PLOG"
fi
if [ -f "${MYSQLD}-purify" ] ; then
MYSQLD="${MYSQLD}-purify"
PLOG="$MYSQLD.purifylog"
if [ -f $PLOG ]; then
mv $PLOG $PLOG.$$
fi
PURIFY_LOGS="$PURIFY_LOGS $PLOG"
fi
fi
else
# We have a binary installation. Note that this can be both from
@ -645,8 +692,7 @@ then
fi
MYSQL_CLIENT_TEST="$MYSQL_CLIENT_TEST --no-defaults --testcase --user=root --socket=$MASTER_MYSOCK --port=$MYSQL_TCP_PORT --silent"
MYSQL_DUMP="$MYSQL_DUMP --no-defaults -uroot --socket=$MASTER_MYSOCK --password=$DBPASSWD $EXTRA_MYSQLDUMP_OPT"
MYSQL_BINLOG="$MYSQL_BINLOG --no-defaults --local-load=$MYSQL_TMP_DIR $EXTRA_MYSQLBINLOG_OPT"
MYSQL_BINLOG="$MYSQL_BINLOG --no-defaults --local-load=$MYSQL_TMP_DIR --character-sets-dir=$CHARSETSDIR $EXTRA_MYSQLBINLOG_OPT"
MYSQL_FIX_SYSTEM_TABLES="$MYSQL_FIX_SYSTEM_TABLES --no-defaults --host=localhost --port=$MASTER_MYPORT --socket=$MASTER_MYSOCK --user=root --password=$DBPASSWD --basedir=$BASEDIR --bindir=$CLIENT_BINDIR --verbose"
MYSQL="$MYSQL --host=localhost --port=$MASTER_MYPORT --socket=$MASTER_MYSOCK --user=root --password=$DBPASSWD"
export MYSQL MYSQL_DUMP MYSQL_BINLOG MYSQL_FIX_SYSTEM_TABLES
@ -654,6 +700,10 @@ export CLIENT_BINDIR MYSQL_CLIENT_TEST CHARSETSDIR
export NDB_TOOLS_DIR
export NDB_MGM
export NDB_BACKUP_DIR
export NDB_TOOLS_OUTPUT
export PURIFYOPTIONS
NDB_STATUS_OK=1
export NDB_STATUS_OK
MYSQL_TEST_ARGS="--no-defaults --socket=$MASTER_MYSOCK --database=$DB \
--user=$DBUSER --password=$DBPASSWD --silent -v --skip-safemalloc \
@ -783,6 +833,19 @@ disable_test() {
$ECHO "$RES$RES_SPACE [ disabled ] $2"
}
report_current_test () {
tname=$1
echo "CURRENT_TEST: $tname" >> $MASTER_MYERR
if [ -n "$PURIFY_LOGS" ] ; then
for log in $PURIFY_LOGS
do
echo "CURRENT_TEST: $tname" >> $log
done
fi
}
report_stats () {
if [ $TOT_FAIL = 0 ]; then
$ECHO "All $TOT_TEST tests were successful."
@ -1011,6 +1074,7 @@ start_ndbcluster()
{
if [ ! -z "$USE_NDBCLUSTER" ]
then
rm -f $NDB_TOOLS_OUTPUT
if [ -z "$USE_RUNNING_NDBCLUSTER" ]
then
echo "Starting ndbcluster"
@ -1020,13 +1084,15 @@ start_ndbcluster()
else
NDBCLUSTER_EXTRA_OPTS="--small"
fi
NDB_STARTED=1
./ndb/ndbcluster $NDBCLUSTER_OPTS $NDBCLUSTER_EXTRA_OPTS --initial || NDB_STARTED=0
if [ x$NDB_STARTED != x1 ] ; then
./ndb/ndbcluster $NDBCLUSTER_OPTS $NDBCLUSTER_EXTRA_OPTS --initial || NDB_STATUS_OK=0
if [ x$NDB_STATUS_OK != x1 ] ; then
if [ x$FORCE != x1 ] ; then
exit 1
fi
USE_NDBCLUSTER=
return
fi
NDB_CONNECTSTRING="host=localhost:$NDBCLUSTER_PORT"
else
NDB_CONNECTSTRING="$USE_RUNNING_NDBCLUSTER"
@ -1083,6 +1149,11 @@ start_master()
this_master_myport=$MASTER_MYPORT
NOT_FIRST_MASTER_EXTRA_OPTS=""
fi
if [ -n "$EXTRA_MASTER_MYSQLD_TRACE" ]
then
EXTRA_MASTER_MYSQLD_OPT="$EXTRA_MASTER_MYSQLD_OPT \
$EXTRA_MASTER_MYSQLD_TRACE$1"
fi
if [ -z "$DO_BENCH" ]
then
master_args="--no-defaults --log-bin=$MYSQL_TEST_DIR/var/log/master-bin$1 \
@ -1535,7 +1606,7 @@ run_testcase ()
esac
stop_master
stop_master 1
echo "CURRENT_TEST: $tname" >> $MASTER_MYERR
report_current_test $tname
start_master
if [ -n "$USE_NDBCLUSTER" -a -z "$DO_BENCH" ] ; then
start_master 1
@ -1551,13 +1622,13 @@ run_testcase ()
EXTRA_MASTER_OPT=""
stop_master
stop_master 1
echo "CURRENT_TEST: $tname" >> $MASTER_MYERR
report_current_test $tname
start_master
if [ -n "$USE_NDBCLUSTER" -a -z "$DO_BENCH" ] ; then
start_master 1
fi
else
echo "CURRENT_TEST: $tname" >> $MASTER_MYERR
report_current_test $tname
fi
fi
@ -1741,7 +1812,6 @@ then
mysql_loadstd
fi
$ECHO "Starting Tests"
# Some test cases need USE_RUNNING_SERVER

View file

@ -132,7 +132,13 @@ static char skip_test[FN_REFLEN]=
" repair ,"
" rpl_trunc_binlog ,"
" mysqldump ,"
" rpl000001 ";
" rpl000001 ,"
" derived ,"
" group_by ,"
" select ,"
" rpl000015 ,"
" subselect ";
#endif
static char ignore_test[FN_REFLEN]= "";
@ -143,6 +149,8 @@ static char mysql_tmp_dir[FN_REFLEN];
static char result_dir[FN_REFLEN];
static char master_dir[FN_REFLEN];
static char slave_dir[FN_REFLEN];
static char slave1_dir[FN_REFLEN];
static char slave2_dir[FN_REFLEN];
static char lang_dir[FN_REFLEN];
static char char_dir[FN_REFLEN];
@ -190,6 +198,8 @@ int restarts= 0;
FILE *log_fd= NULL;
static char argument[FN_REFLEN];
/******************************************************************************
functions
@ -221,7 +231,7 @@ void log_info(const char *, ...);
void log_error(const char *, ...);
void log_errno(const char *, ...);
void die(const char *);
char *str_tok(char *string, const char *delim);
char *str_tok(char* dest, char *string, const char *delim);
#ifndef __WIN__
void run_init_script(const char *script_name);
#endif
@ -289,11 +299,15 @@ void install_db(char *datadir)
add_arg(&al, "--basedir=%s", base_dir);
add_arg(&al, "--datadir=%s", datadir);
add_arg(&al, "--skip-innodb");
add_arg(&al, "--skip-ndbcluster");
add_arg(&al, "--skip-bdb");
#ifndef __NETWARE__
add_arg(&al, "--character-sets-dir=%s", char_dir);
add_arg(&al, "--language=%s", lang_dir);
#endif
// added
add_arg(&al, "--default-character-set=latin1");
add_arg(&al, "--innodb_data_file_path=ibdata1:50M");
/* spawn */
if ((err= spawn(mysqld_file, &al, TRUE, input, output, error, NULL)) != 0)
@ -335,12 +349,27 @@ void mysql_install_db()
mkdir(temp, S_IRWXU);
snprintf(temp, FN_REFLEN, "%s/var/master-data/test", mysql_test_dir);
mkdir(temp, S_IRWXU);
snprintf(temp, FN_REFLEN, "%s/var/slave-data", mysql_test_dir);
mkdir(temp, S_IRWXU);
snprintf(temp, FN_REFLEN, "%s/var/slave-data/mysql", mysql_test_dir);
mkdir(temp, S_IRWXU);
snprintf(temp, FN_REFLEN, "%s/var/slave-data/test", mysql_test_dir);
mkdir(temp, S_IRWXU);
snprintf(temp, FN_REFLEN, "%s/var/slave1-data", mysql_test_dir);
mkdir(temp, S_IRWXU);
snprintf(temp, FN_REFLEN, "%s/var/slave1-data/mysql", mysql_test_dir);
mkdir(temp, S_IRWXU);
snprintf(temp, FN_REFLEN, "%s/var/slave1-data/test", mysql_test_dir);
mkdir(temp, S_IRWXU);
snprintf(temp, FN_REFLEN, "%s/var/slave2-data", mysql_test_dir);
mkdir(temp, S_IRWXU);
snprintf(temp, FN_REFLEN, "%s/var/slave2-data/mysql", mysql_test_dir);
mkdir(temp, S_IRWXU);
snprintf(temp, FN_REFLEN, "%s/var/slave2-data/test", mysql_test_dir);
mkdir(temp, S_IRWXU);
#else
mkdir(temp);
/* create subdirectories */
@ -368,6 +397,8 @@ void mysql_install_db()
install_db(master_dir);
mlog("Creating test databases for slave... \n");
install_db(slave_dir);
install_db(slave1_dir);
install_db(slave2_dir);
}
/******************************************************************************
@ -384,7 +415,6 @@ void start_master()
int err;
char master_out[FN_REFLEN];
char master_err[FN_REFLEN];
/* char temp[FN_REFLEN]; */
char temp2[FN_REFLEN];
/* remove old berkeley db log files that can confuse the server */
@ -463,6 +493,11 @@ void start_master()
add_arg(&al, "--character-sets-dir=%s", char_dir);
add_arg(&al, "--tmpdir=%s", mysql_tmp_dir);
add_arg(&al, "--language=%s", lang_dir);
add_arg(&al, "--rpl-recovery-rank=1");
add_arg(&al, "--init-rpl-role=master");
add_arg(&al, "--default-character-set=latin1");
// add_arg(&al, "--innodb_data_file_path=ibdata1:50M");
#ifdef DEBUG /* only for debug builds */
add_arg(&al, "--debug");
#endif
@ -491,13 +526,13 @@ void start_master()
{
char *p;
p= (char *)str_tok(master_opt, " \t");
p= (char *)str_tok(argument, master_opt, " \t");
if (!strstr(master_opt, "timezone"))
{
while (p)
{
add_arg(&al, "%s", p);
p= (char *)str_tok(NULL, " \t");
p= (char *)str_tok(argument, NULL, " \t");
}
}
}
@ -624,10 +659,10 @@ void start_slave()
add_arg(&al, "--log-bin=slave-bin");
add_arg(&al, "--relay_log=slave-relay-bin");
add_arg(&al, "--basedir=%s", base_dir);
add_arg(&al, "--port=%u", slave_port);
#if !defined(__NETWARE__) && !defined(__WIN__)
add_arg(&al, "--socket=%s",slave_socket);
#endif
add_arg(&al, "--port=%u", slave_port);
add_arg(&al, "--datadir=%s", slave_dir);
#ifndef __WIN__
add_arg(&al, "--pid-file=%s", slave_pid);
@ -651,10 +686,15 @@ void start_slave()
add_arg(&al, "--master-retry-count=10");
add_arg(&al, "-O");
add_arg(&al, "slave_net_timeout=10");
add_arg(&al, "--log-slave-updates");
add_arg(&al, "--log=%s/var/log/slave.log", mysql_test_dir);
add_arg(&al, "--default-character-set=latin1");
add_arg(&al, "--skip-ndbcluster");
#ifdef DEBUG /* only for debug builds */
add_arg(&al, "--debug");
#endif
#endif
if (use_openssl)
{
add_arg(&al, "--ssl-ca=%s", ca_cert);
@ -667,12 +707,12 @@ void start_slave()
{
char *p;
p= (char *)str_tok(slave_master_info, " \t");
p= (char *)str_tok(argument, slave_master_info, " \t");
while (p)
{
add_arg(&al, "%s", p);
p= (char *)str_tok(NULL, " \t");
p= (char *)str_tok(argument, NULL, " \t");
}
}
else
@ -700,13 +740,13 @@ void start_slave()
{
char *p;
p= (char *)str_tok(slave_opt, " \t");
p= (char *)str_tok(argument, slave_opt, " \t");
while (p)
{
add_arg(&al, "%s", p);
p= (char *)str_tok(NULL, " \t");
}
p= (char *)str_tok(argument, NULL, " \t");
}
}
/* remove the pid file if it exists */
@ -753,9 +793,12 @@ void start_slave()
void mysql_start()
{
/* log_info("Starting the MySQL server(s): %u", ++restarts); */
printf("loading master...\r");
start_master();
printf("loading slave...\r");
start_slave();
/* activate the test screen */
@ -853,6 +896,7 @@ void mysql_restart()
mysql_stop();
mlog(DASH);
sleep(1);
mysql_start();
}
@ -912,7 +956,7 @@ int read_option(char *opt_file, char *opt)
if ((p= strstr(opt, "\\\\")) != NULL)
{
/* bmove is guranteed to work byte by byte */
bmove(p, p+1, strlen(p+1));
bmove(p, p+1, strlen(p)+1);
}
}
else
@ -977,14 +1021,6 @@ void run_test(char *test)
char err_file[FN_REFLEN];
int err;
arg_list_t al;
#ifdef __WIN__
/* Clean test database */
removef("%s/test/*.*", master_dir);
removef("%s/test/*.*", slave_dir);
removef("%s/mysqltest/*.*", master_dir);
removef("%s/mysqltest/*.*", slave_dir);
#endif
/* skip slave? */
flag= skip_slave;
skip_slave= (strncmp(test, "rpl", 3) != 0);
@ -1045,9 +1081,6 @@ void run_test(char *test)
if (!master_running) mysql_start();
else if (restart) mysql_restart();
/* let the system stabalize */
sleep(1);
/* show test */
mlog("%-46s ", test);
@ -1066,10 +1099,12 @@ void run_test(char *test)
add_arg(&al, "--silent");
add_arg(&al, "--basedir=%s/", mysql_test_dir);
add_arg(&al, "--host=127.0.0.1");
add_arg(&al, "--skip-safemalloc");
add_arg(&al, "-v");
add_arg(&al, "-R");
add_arg(&al, "%s", result_file);
if (use_openssl)
{
add_arg(&al, "--ssl-ca=%s", ca_cert);
@ -1079,7 +1114,6 @@ void run_test(char *test)
/* spawn */
err= spawn(mysqltest_file, &al, TRUE, test_file, out_file, err_file, NULL);
/* free args */
free_args(&al);
@ -1259,7 +1293,9 @@ void die(const char *msg)
void setup(char *file __attribute__((unused)))
{
char temp[FN_REFLEN];
#if defined(__WIN__) || defined(__NETWARE__)
char file_path[FN_REFLEN*2];
#endif
char *p;
int position;
@ -1349,7 +1385,11 @@ void setup(char *file __attribute__((unused)))
snprintf(client_key, FN_REFLEN, "%s/SSL/client-key.pem", base_dir);
/* setup files */
#ifdef _DEBUG
snprintf(mysqld_file, FN_REFLEN, "%s/mysqld-debug.exe", bin_dir);
#else
snprintf(mysqld_file, FN_REFLEN, "%s/mysqld.exe", bin_dir);
#endif
snprintf(mysqltest_file, FN_REFLEN, "%s/mysqltest.exe", bin_dir);
snprintf(mysqladmin_file, FN_REFLEN, "%s/mysqladmin.exe", bin_dir);
#else
@ -1361,6 +1401,8 @@ void setup(char *file __attribute__((unused)))
snprintf(result_dir, FN_REFLEN, "%s/r", mysql_test_dir);
snprintf(master_dir, FN_REFLEN, "%s/var/master-data", mysql_test_dir);
snprintf(slave_dir, FN_REFLEN, "%s/var/slave-data", mysql_test_dir);
snprintf(slave1_dir, FN_REFLEN, "%s/var/slave1-data", mysql_test_dir);
snprintf(slave2_dir, FN_REFLEN, "%s/var/slave2-data", mysql_test_dir);
snprintf(lang_dir, FN_REFLEN, "%s/sql/share/english", base_dir);
snprintf(char_dir, FN_REFLEN, "%s/sql/share/charsets", base_dir);
@ -1413,30 +1455,147 @@ void setup(char *file __attribute__((unused)))
snprintf(file_path,FN_REFLEN,"MYSQL_TEST_DIR=%s",mysql_test_dir);
_putenv(file_path);
snprintf(file_path, FN_REFLEN*2,
"MYSQL_DUMP=%s/mysqldump.exe --no-defaults -u root --port=%u",
"MYSQL_DUMP=%s/mysqldump.exe --no-defaults -uroot --port=%u",
bin_dir, master_port);
_putenv(file_path);
snprintf(file_path, FN_REFLEN*2,
"MYSQL_BINLOG=%s/mysqlbinlog.exe --no-defaults --local-load=%s",
"MYSQL_BINLOG=%s/mysqlbinlog.exe --no-defaults --local-load=%s",
bin_dir, mysql_tmp_dir);
_putenv(file_path);
snprintf(file_path, FN_REFLEN*2,
"TESTS_BINDIR=%s/tests", base_dir);
_putenv(file_path);
snprintf(file_path, FN_REFLEN*2,
"CHARSETSDIR=%s/sql/share/charsets", base_dir);
_putenv(file_path);
snprintf(file_path, FN_REFLEN*2,
"MYSQL=%s/mysql --port=%u ",
bin_dir, master_port);
_putenv(file_path);
snprintf(file_path, FN_REFLEN*2,
"MYSQL_FIX_SYSTEM_TABLES=%s/scripts/mysql_fix_privilege_tables --no-defaults "
"--host=localhost --port=%u "
"--basedir=%s --bindir=%s --verbose",
base_dir,master_port, base_dir, bin_dir);
_putenv(file_path);
snprintf(file_path, FN_REFLEN*2,
"NDB_TOOLS_DIR=%s/ndb/tools", base_dir);
_putenv(file_path);
snprintf(file_path, FN_REFLEN*2,
"CLIENT_BINDIR=%s", bin_dir);
_putenv(file_path);
snprintf(file_path, FN_REFLEN*2,
"MYSQL_CLIENT_TEST=%s/tests/mysql_client_test --no-defaults --testcase "
"--user=root --port=%u --silent",
base_dir, master_port);
_putenv(file_path);
#else
snprintf(file_path,FN_REFLEN,"MYSQL_TEST_DIR=%s",mysql_test_dir);
putenv(file_path);
snprintf(file_path, FN_REFLEN*2,
"MYSQL_DUMP=%s/mysqldump --no-defaults -u root --port=%u --socket=%s",
bin_dir, master_port, master_socket);
putenv(file_path);
snprintf(file_path, FN_REFLEN*2,
"MYSQL_BINLOG=%s/mysqlbinlog --no-defaults --local-load=%s",
bin_dir, mysql_tmp_dir);
putenv(file_path);
{
static char env_MYSQL_TEST_DIR[FN_REFLEN*2];
static char env_MYSQL_DUMP[FN_REFLEN*2];
static char env_MYSQL_BINLOG[FN_REFLEN*2];
static char env_MASTER_MYSOCK[FN_REFLEN*2];
static char env_TESTS_BINDIR[FN_REFLEN*2];
static char env_CHARSETSDIR[FN_REFLEN*2];
static char env_MYSQL[FN_REFLEN*2];
static char env_MYSQL_FIX_SYSTEM_TABLES[FN_REFLEN*2];
static char env_CLIENT_BINDIR[FN_REFLEN*2];
static char env_MYSQL_CLIENT_TEST[FN_REFLEN*2];
static char env_NDB_TOOLS_DIR[FN_REFLEN*2];
static char env_NDB_MGM[FN_REFLEN*2];
static char env_NDB_BACKUP_DIR[FN_REFLEN*2];
static char env_NDB_TOOLS_OUTPUT[FN_REFLEN*2];
snprintf(env_MYSQL_TEST_DIR,FN_REFLEN*2,
"MYSQL_TEST_DIR=%s",mysql_test_dir);
putenv(env_MYSQL_TEST_DIR);
snprintf(env_MYSQL_DUMP, FN_REFLEN*2,"MYSQL_DUMP=%s/mysqldump --no-defaults "
"-uroot --port=%u --socket=%s ",
bin_dir, master_port, master_socket);
putenv(env_MYSQL_DUMP);
snprintf(env_MYSQL_BINLOG, FN_REFLEN*2,
"MYSQL_BINLOG=%s/mysqlbinlog --no-defaults --local-load=%s -uroot ",
bin_dir, mysql_tmp_dir);
putenv(env_MYSQL_BINLOG);
snprintf(env_MASTER_MYSOCK, FN_REFLEN*2,
"MASTER_MYSOCK=%s", master_socket);
putenv(env_MASTER_MYSOCK);
snprintf(env_TESTS_BINDIR, FN_REFLEN*2,
"TESTS_BINDIR=%s/tests", base_dir);
putenv(env_TESTS_BINDIR);
snprintf(env_CHARSETSDIR, FN_REFLEN*2,
"CHARSETSDIR=%s/sql/share/charsets", base_dir);
putenv(env_CHARSETSDIR);
snprintf(env_MYSQL, FN_REFLEN*2,
"MYSQL=%s/mysql --port=%u --socket=%s -uroot ",
bin_dir, master_port, master_socket);
putenv(env_MYSQL);
snprintf(env_MYSQL_FIX_SYSTEM_TABLES, FN_REFLEN*2,
"MYSQL_FIX_SYSTEM_TABLES=%s/scripts/mysql_fix_privilege_tables --no-defaults "
"--host=localhost --port=%u --socket=%s "
"--basedir=%s --bindir=%s --verbose -uroot ",
base_dir,master_port, master_socket, base_dir, bin_dir);
putenv(env_MYSQL_FIX_SYSTEM_TABLES);
snprintf(env_CLIENT_BINDIR, FN_REFLEN*2,
"CLIENT_BINDIR=%s", bin_dir);
putenv(env_CLIENT_BINDIR);
snprintf(env_MYSQL_CLIENT_TEST, FN_REFLEN*2,
"MYSQL_CLIENT_TEST=%s/tests/mysql_client_test --no-defaults --testcase "
"--user=root --socket=%s --port=%u --silent",
base_dir, master_socket, master_port);
putenv(env_MYSQL_CLIENT_TEST);
// NDB
snprintf(env_NDB_TOOLS_DIR, FN_REFLEN*2,
"NDB_TOOLS_DIR=%s/ndb/tools", base_dir);
putenv(env_NDB_TOOLS_DIR);
snprintf(env_NDB_MGM, FN_REFLEN*2,
"NDB_MGM=%s/ndb/src/mgmclient/ndb_mgm", base_dir);
putenv(env_NDB_MGM);
//NDBCLUSTER_PORT=9350
snprintf(env_NDB_BACKUP_DIR, FN_REFLEN*2,
"NDB_BACKUP_DIR=%s/var/ndbcluster-%i", mysql_test_dir, 9350);
putenv(env_NDB_BACKUP_DIR);
snprintf(env_NDB_TOOLS_OUTPUT, FN_REFLEN*2,
"NDB_TOOLS_OUTPUT=%s/var/log/ndb_tools.log", mysql_test_dir);
putenv(env_NDB_TOOLS_OUTPUT);
putenv((char *)"NDB_STATUS_OK=1");
// NDB_MGM="$BASEDIR/ndb/src/mgmclient/ndb_mgm"
// NDB_BACKUP_DIR=$MYSQL_TEST_DIR/var/ndbcluster-$NDBCLUSTER_PORT
// NDB_TOOLS_OUTPUT=$MYSQL_TEST_DIR/var/log/ndb_tools.log
}
#endif
#ifndef __WIN__
putenv((char *)"MASTER_MYPORT=9306");
putenv((char *)"SLAVE_MYPORT=9307");
putenv((char *)"MYSQL_TCP_PORT=3306");
#else
_putenv("MASTER_MYPORT=9306");
_putenv("SLAVE_MYPORT=9307");
@ -1468,8 +1627,13 @@ int main(int argc, char **argv)
char **testes= 0;
int name_index;
int index;
char var_dir[FN_REFLEN];
/* setup */
setup(argv[0]);
/* delete all file in var */
snprintf(var_dir,FN_REFLEN,"%s/var",mysql_test_dir);
del_tree(var_dir);
/*
The --ignore option is comma saperated list of test cases to skip and
@ -1484,7 +1648,8 @@ int main(int argc, char **argv)
{
char *temp, *token;
temp= strdup(strchr(argv[1],'=') + 1);
for (token=str_tok(temp, ","); token != NULL; token=str_tok(NULL, ","))
for (token=str_tok(argument, temp, ","); token != NULL;
token=str_tok(argument, NULL, ","))
{
if (strlen(ignore_test) + strlen(token) + 2 <= FN_REFLEN-1)
sprintf(ignore_test+strlen(ignore_test), " %s ", token);
@ -1508,7 +1673,7 @@ int main(int argc, char **argv)
/* install test databases */
mysql_install_db();
mlog("Starting Tests...\n");
mlog("\n");
@ -1671,105 +1836,70 @@ Arguments:
Output:
return the null terminated token of NULL.
*/
char *str_tok(char *string, const char *delim)
char *str_tok(char* dest, char *string, const char *delim)
{
char *token; /* current token received from strtok */
char *qt_token; /* token delimeted by the matching pair of quote */
/*
if there are any quote chars found in the token then this variable
will hold the concatenated string to return to the caller
*/
char *ptr_token=NULL;
/* pointer to the quote character in the token from strtok */
char *ptr_quote=NULL;
char *token;
char *ptr_end_token= NULL;
char *ptr_quote= NULL;
char *ptr_token= NULL;
int count_quotes= 0;
/* See if the delimeter contains any quote character */
*dest = '\0';
if (strchr(delim,'\'') || strchr(delim,'\"'))
return NULL;
/* repeate till we are getting some token from strtok */
while ((token= (char*)strtok(string, delim) ) != NULL)
token= (char*)strtok(string, delim);
if (token)
{
/*
make the input string NULL so that next time onward strtok can
be called with NULL input string.
*/
string= NULL;
/* We don't need to remove any quote character for Windows version */
/* double quote is found */
if (strchr(token,'\"'))
{
do
{
if (count_quotes & 1)
{
if (*dest == '\0')
sprintf(dest,"%s", ptr_token);
else
sprintf(dest,"%s %s", dest, ptr_token);
ptr_token= (char*)strtok(NULL, delim);
if (!ptr_token)
break;
}
else
{
ptr_token= token;
}
if (ptr_quote = strchr(ptr_token,'\"'))
{
ptr_end_token= ptr_token + strlen(ptr_token);
do
{
#ifndef __WIN__
/* check if the current token contain double quote character*/
if ((ptr_quote= (char*)strchr(token,'\"')) != NULL)
{
/*
get the matching the matching double quote in the remaining
input string
*/
qt_token= (char*)strtok(NULL,"\"");
}
/* check if the current token contain single quote character*/
else if ((ptr_quote= (char*)strchr(token,'\'')) != NULL)
{
/*
get the matching the matching single quote in the remaining
input string
*/
qt_token= (char*)strtok(NULL,"\'");
}
bmove(ptr_quote, ptr_quote+1, ptr_end_token - ptr_quote);
#endif
/*
if the current token does not contains any quote character then
return to the caller.
*/
if (ptr_quote == NULL)
{
/*
if there is any earlier token i.e. ptr_token then append the
current token in it and return it else return the current
token directly
*/
return ptr_token ? strcat(ptr_token,token) : token;
}
/*
remove the quote character i.e. make NULL so that the token will
be devided in two part and later both part can be concatenated
and hence quote will be removed
*/
*ptr_quote= 0;
/* check if ptr_token has been initialized or not */
if (ptr_token == NULL)
{
/* initialize the ptr_token with current token */
ptr_token= token;
/* copy entire string between matching pair of quote*/
sprintf(ptr_token+strlen(ptr_token),"%s %s", ptr_quote+1, qt_token);
count_quotes++;
} while (ptr_quote != NULL && (ptr_quote = strchr(ptr_quote+1,'\"')));
}
/* there are unpair quotes we have to search next quote*/
} while (count_quotes & 1);
if (ptr_token != NULL)
{
if (*dest == '\0')
sprintf(dest,"%s", ptr_token);
else
sprintf(dest,"%s %s",dest,ptr_token);
}
}
else
{
/*
copy the current token and entire string between matching pair
of quote
*/
if (qt_token == NULL)
{
sprintf(ptr_token+strlen(ptr_token),"%s%s", token, ptr_quote+1);
}
else
{
sprintf(ptr_token+strlen(ptr_token),"%s%s %s", token, ptr_quote+1,
qt_token );
}
sprintf(dest,"%s",token);
}
}
/* return the concatenated token */
return ptr_token;
return token ? dest : NULL;
}
#ifndef __WIN__
/*
Synopsis:
This function run scripts files on Linux and Netware

View file

@ -7,7 +7,7 @@ select 9223372036854775807,-009223372036854775808;
9223372036854775807 -9223372036854775808
select +9999999999999999999,-9999999999999999999;
9999999999999999999 -9999999999999999999
9999999999999999999 -10000000000000000000
9999999999999999999 -9999999999999999999
select cast(9223372036854775808 as unsigned)+1;
cast(9223372036854775808 as unsigned)+1
9223372036854775809
@ -16,7 +16,7 @@ select 9223372036854775808+1;
9223372036854775809
select -(0-3),round(-(0-3)), round(9999999999999999999);
-(0-3) round(-(0-3)) round(9999999999999999999)
3 3 10000000000000000000
3 3 9999999999999999999
create table t1 (a bigint unsigned not null, primary key(a));
insert into t1 values (18446744073709551615), (0xFFFFFFFFFFFFFFFE), (18446744073709551613), (18446744073709551612);
select * from t1;

View file

@ -91,7 +91,10 @@ CASE WHEN 1 THEN 'a' ELSE 1.0 END AS c5,
CASE WHEN 1 THEN 1.0 ELSE 'a' END AS c6,
CASE WHEN 1 THEN 1 ELSE 1.0 END AS c7,
CASE WHEN 1 THEN 1.0 ELSE 1 END AS c8,
CASE WHEN 1 THEN 1.0 END AS c9
CASE WHEN 1 THEN 1.0 END AS c9,
CASE WHEN 1 THEN 0.1e1 else 0.1 END AS c10,
CASE WHEN 1 THEN 0.1e1 else 1 END AS c11,
CASE WHEN 1 THEN 0.1e1 else '1' END AS c12
;
SHOW CREATE TABLE t1;
Table Create Table
@ -100,11 +103,14 @@ t1 CREATE TABLE `t1` (
`c2` varchar(1) character set latin1 collate latin1_danish_ci NOT NULL default '',
`c3` varbinary(1) NOT NULL default '',
`c4` varbinary(1) NOT NULL default '',
`c5` varbinary(3) NOT NULL default '',
`c6` varbinary(3) NOT NULL default '',
`c7` double(3,1) NOT NULL default '0.0',
`c8` double(3,1) NOT NULL default '0.0',
`c9` double(3,1) default NULL
`c5` varbinary(4) NOT NULL default '',
`c6` varbinary(4) NOT NULL default '',
`c7` decimal(5,1) NOT NULL default '0.0',
`c8` decimal(5,1) NOT NULL default '0.0',
`c9` decimal(5,1) default NULL,
`c10` double NOT NULL default '0',
`c11` double NOT NULL default '0',
`c12` varbinary(5) NOT NULL default ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
SELECT CASE
@ -146,11 +152,11 @@ SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
`COALESCE(1)` int(1) NOT NULL default '0',
`COALESCE(1.0)` double(3,1) NOT NULL default '0.0',
`COALESCE(1.0)` decimal(5,1) NOT NULL default '0.0',
`COALESCE('a')` varchar(1) NOT NULL default '',
`COALESCE(1,1.0)` double(3,1) NOT NULL default '0.0',
`COALESCE(1,1.0)` decimal(5,1) NOT NULL default '0.0',
`COALESCE(1,'1')` varbinary(1) NOT NULL default '',
`COALESCE(1.1,'1')` varbinary(3) NOT NULL default '',
`COALESCE(1.1,'1')` varbinary(4) NOT NULL default '',
`COALESCE('a' COLLATE latin1_bin,'b')` varchar(1) character set latin1 collate latin1_bin NOT NULL default ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;

View file

@ -0,0 +1,74 @@
create table t1 (
`a&b` int,
`a<b` int,
`a>b` text
);
insert into t1 values (1, 2, 'a&b a<b a>b');
<?xml version="1.0"?>
<resultset statement="select * from t1
">
<row>
<field name="a&amp;b">1</field>
<field name="a&lt;b">2</field>
<field name="a&gt;b">a&amp;b a&lt;b a&gt;b</field>
</row>
</resultset>
<?xml version="1.0"?>
<mysqldump>
<database name="test">
<table_structure name="t1">
<field Field="a&amp;b" Type="int(11)" Null="YES" Key="" Extra="" />
<field Field="a&lt;b" Type="int(11)" Null="YES" Key="" Extra="" />
<field Field="a&gt;b" Type="text" Null="YES" Key="" Extra="" />
</table_structure>
<table_data name="t1">
<row>
<field name="a&amp;b">1</field>
<field name="a&lt;b">2</field>
<field name="a&gt;b">a&amp;b a&lt;b a&gt;b</field>
</row>
</table_data>
</database>
</mysqldump>
<?xml version="1.0"?>
<resultset statement="select count(*) from t1
">
<row>
<field name="count(*)">1</field>
</row>
</resultset>
<?xml version="1.0"?>
<resultset statement="select 1 &lt; 2 from dual
">
<row>
<field name="1 &lt; 2">1</field>
</row>
</resultset>
<?xml version="1.0"?>
<resultset statement="select 1 &gt; 2 from dual
">
<row>
<field name="1 &gt; 2">0</field>
</row>
</resultset>
<?xml version="1.0"?>
<resultset statement="select 1 &amp; 3 from dual
">
<row>
<field name="1 &amp; 3">1</field>
</row>
</resultset>
<?xml version="1.0"?>
<resultset statement="select null from dual
">
<row>
<field name="NULL">NULL</field>
</row>
</resultset>
drop table t1;

View file

@ -36,3 +36,9 @@ hex(a) STRCMP(a,'a') STRCMP(a,'a ')
6109 -1 -1
61 0 0
DROP TABLE t1;
SELECT CHAR(31) = '', '' = CHAR(31);
CHAR(31) = '' '' = CHAR(31)
0 0
SELECT CHAR(30) = '', '' = CHAR(30);
CHAR(30) = '' '' = CHAR(30)
0 0

View file

@ -103,9 +103,9 @@ Field Type Null Key Default Extra
a datetime NO 0000-00-00 00:00:00
b time NO 00:00:00
c date NO 0000-00-00
d bigint(17) NO 0
e double(18,1) NO 0.0
f bigint(17) NO 0
d int(2) NO 0
e decimal(6,1) NO 0.0
f bigint(18) NO 0
drop table t2;
create table t2 select CAST("2001-12-29" AS DATE) as d, CAST("20:45:11" AS TIME) as t, CAST("2001-12-29 20:45:11" AS DATETIME) as dt;
describe t2;
@ -418,7 +418,7 @@ d date YES NULL
e varchar(1) NO
f datetime YES NULL
g time YES NULL
h longblob NO
h varbinary(23) NO
dd time YES NULL
select * from t2;
a b c d e f g h dd
@ -437,7 +437,7 @@ t2 CREATE TABLE `t2` (
`ifnull(e,e)` bigint(20) default NULL,
`ifnull(f,f)` float(3,2) default NULL,
`ifnull(g,g)` double(4,3) default NULL,
`ifnull(h,h)` decimal(5,4) default NULL,
`ifnull(h,h)` decimal(6,4) default NULL,
`ifnull(i,i)` year(4) default NULL,
`ifnull(j,j)` date default NULL,
`ifnull(k,k)` datetime NOT NULL default '0000-00-00 00:00:00',

View file

@ -526,13 +526,14 @@ insert into t2 values (@v);
show binlog events from 95;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 95 User var 1 135 @`v`=_ucs2 0x006100620063 COLLATE ucs2_general_ci
master-bin.000001 135 Query 1 218 use `test`; insert into t2 values (@v)
master-bin.000001 135 Query 1 225 use `test`; insert into t2 values (@v)
/*!40019 SET @@session.max_insert_delayed_threads=0*/;
SET @`v`:=_ucs2 0x006100620063 COLLATE `ucs2_general_ci`;
use test;
SET TIMESTAMP=10000;
SET @@session.foreign_key_checks=1, @@session.sql_auto_is_null=1, @@session.unique_checks=1;
SET @@session.sql_mode=0;
SET @@session.character_set_client=8,@@session.collation_connection=8,@@session.collation_server=8;
insert into t2 values (@v);
drop table t2;
set names latin1;

View file

@ -330,6 +330,15 @@ SELECT MIN(price) min, MAX(price) max, AVG(price) avg FROM (SELECT SUBSTRING( MA
min max avg
10.00 10.00 10
DROP TABLE t1;
create table t1 (a integer, b integer);
insert into t1 values (1,4), (2,2),(2,2), (4,1),(4,1),(4,1),(4,1);
select distinct sum(b) from t1 group by a;
sum(b)
4
select distinct sum(b) from (select a,b from t1) y group by a;
sum(b)
4
drop table t1;
CREATE TABLE t1 (a char(10), b char(10));
INSERT INTO t1 VALUES ('root','localhost'), ('root','%');
SELECT * FROM (SELECT (SELECT a.a FROM t1 AS a WHERE a.a = b.a) FROM t1 AS b) AS c;

View file

@ -462,5 +462,5 @@ rout int(11) default '0'
INSERT INTO t1 VALUES ('1',1,0);
SELECT DISTINCT html,SUM(rout)/(SUM(rin)+1) as 'prod' FROM t1 GROUP BY rin;
html prod
1 0.00
1 0.00000
drop table t1;

View file

@ -1,7 +1,9 @@
reset master;
create database `drop-temp+table-test`;
use `drop-temp+table-test`;
create temporary table shortn1 (a int);
create temporary table `table:name` (a int);
create temporary table shortn2 (a int);
select get_lock("a",10);
get_lock("a",10)
1
@ -10,9 +12,13 @@ get_lock("a",10)
1
show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Format_desc 1 95 Server ver: VERSION, Binlog ver: 4
master-bin.000001 95 Query 1 206 create database `drop-temp+table-test`
master-bin.000001 206 Query 1 322 use `drop-temp+table-test`; create temporary table `table:name` (a int)
master-bin.000001 322 Query 1 473 use `drop-temp+table-test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `drop-temp+table-test`.`table:name`
master-bin.000001 473 Query 1 566 use `drop-temp+table-test`; DO RELEASE_LOCK("a")
master-bin.000001 # Format_desc 1 # Server ver: VERSION, Binlog ver: 4
master-bin.000001 # Query 1 # create database `drop-temp+table-test`
master-bin.000001 # Query 1 # use `drop-temp+table-test`; create temporary table shortn1 (a int)
master-bin.000001 # Query 1 # use `drop-temp+table-test`; create temporary table `table:name` (a int)
master-bin.000001 # Query 1 # use `drop-temp+table-test`; create temporary table shortn2 (a int)
master-bin.000001 # Query 1 # use `drop-temp+table-test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `drop-temp+table-test`.`shortn2`
master-bin.000001 # Query 1 # use `drop-temp+table-test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `drop-temp+table-test`.`table:name`
master-bin.000001 # Query 1 # use `drop-temp+table-test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `drop-temp+table-test`.`shortn1`
master-bin.000001 # Query 1 # use `drop-temp+table-test`; DO RELEASE_LOCK("a")
drop database `drop-temp+table-test`;

View file

@ -1,7 +1,7 @@
drop table if exists t1,t2;
select 0<=>0,0.0<=>0.0,"A"<=>"A",NULL<=>NULL;
0<=>0 0.0<=>0.0 "A"<=>"A" NULL<=>NULL
1 1 1 1
select 0<=>0,0.0<=>0.0,0E0=0E0,"A"<=>"A",NULL<=>NULL;
0<=>0 0.0<=>0.0 0E0=0E0 "A"<=>"A" NULL<=>NULL
1 1 1 1 1
select 1<=>0,0<=>NULL,NULL<=>0;
1<=>0 0<=>NULL NULL<=>0
0 0 0
@ -11,6 +11,12 @@ select 1.0<=>0.0,0.0<=>NULL,NULL<=>0.0;
select "A"<=>"B","A"<=>NULL,NULL<=>"A";
"A"<=>"B" "A"<=>NULL NULL<=>"A"
0 0 0
select 0<=>0.0, 0.0<=>0E0, 0E0<=>"0", 10.0<=>1E1, 10<=>10.0, 10<=>1E1;
0<=>0.0 0.0<=>0E0 0E0<=>"0" 10.0<=>1E1 10<=>10.0 10<=>1E1
1 1 1 1 1 1
select 1.0<=>0E1,10<=>NULL,NULL<=>0.0, NULL<=>0E0;
1.0<=>0E1 10<=>NULL NULL<=>0.0 NULL<=>0E0
0 0 0 0
create table t1 (id int, value int);
create table t2 (id int, value int);
insert into t1 values (1,null);

View file

@ -737,3 +737,15 @@ one 2
two 2
three 1
drop table t1;
create table t1(f1 datetime);
insert into t1 values (now());
create table t2 select f2 from (select max(now()) f2 from t1) a;
show columns from t2;
Field Type Null Key Default Extra
f2 datetime NO 0000-00-00 00:00:00
drop table t2;
create table t2 select f2 from (select now() f2 from t1) a;
show columns from t2;
Field Type Null Key Default Extra
f2 datetime NO 0000-00-00 00:00:00
drop table t2, t1;

View file

@ -28,3 +28,24 @@ length(format('nan', 2)) > 0
select concat("$",format(2500,2));
concat("$",format(2500,2))
$2,500.00
create table t1 ( a timestamp );
insert into t1 values ( '2004-01-06 12:34' );
select a from t1 where left(a+0,6) in ( left(20040106,6) );
a
2004-01-06 12:34:00
select a from t1 where left(a+0,6) = ( left(20040106,6) );
a
2004-01-06 12:34:00
select a from t1 where right(a+0,6) in ( right(20040106123400,6) );
a
2004-01-06 12:34:00
select a from t1 where right(a+0,6) = ( right(20040106123400,6) );
a
2004-01-06 12:34:00
select a from t1 where mid(a+0,6,3) in ( mid(20040106123400,6,3) );
a
2004-01-06 12:34:00
select a from t1 where mid(a+0,6,3) = ( mid(20040106123400,6,3) );
a
2004-01-06 12:34:00
drop table t1;

View file

@ -1,6 +1,6 @@
select 1+1,1-1,1+1*2,8/5,8%5,mod(8,5),mod(8,5)|0,-(1+1)*-2;
1+1 1-1 1+1*2 8/5 8%5 mod(8,5) mod(8,5)|0 -(1+1)*-2
2 0 3 1.60 3 3 3 4
2 0 3 1.60000 3 3 3 4
explain extended select 1+1,1-1,1+1*2,8/5,8%5,mod(8,5),mod(8,5)|0,-(1+1)*-2;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL No tables used

View file

@ -328,6 +328,19 @@ trim(trailing 'foo' from 'foo')
select trim(leading 'foo' from 'foo');
trim(leading 'foo' from 'foo')
select quote(ltrim(concat(' ', 'a')));
quote(ltrim(concat(' ', 'a')))
'a'
select quote(trim(concat(' ', 'a')));
quote(trim(concat(' ', 'a')))
'a'
CREATE TABLE t1 SELECT 1 UNION SELECT 2 UNION SELECT 3;
SELECT QUOTE('A') FROM t1;
QUOTE('A')
'A'
'A'
'A'
DROP TABLE t1;
select 1=_latin1'1';
1=_latin1'1'
1
@ -694,12 +707,6 @@ select count(*) as total, left(c,10) as reg from t1 group by reg order by reg de
total reg
10 2004-12-10
drop table t1;
select quote(ltrim(concat(' ', 'a')));
quote(ltrim(concat(' ', 'a')))
'a'
select quote(trim(concat(' ', 'a')));
quote(trim(concat(' ', 'a')))
'a'
select trim(null from 'kate') as "must_be_null";
must_be_null
NULL
@ -712,3 +719,26 @@ NULL
select trim(trailing NULL from 'xyz') as "must_be_null";
must_be_null
NULL
CREATE TABLE t1 (
id int(11) NOT NULL auto_increment,
a bigint(20) unsigned default NULL,
PRIMARY KEY (id)
) ENGINE=MyISAM;
INSERT INTO t1 VALUES
('0','16307858876001849059');
SELECT CONV('e251273eb74a8ee3', 16, 10);
CONV('e251273eb74a8ee3', 16, 10)
16307858876001849059
EXPLAIN
SELECT id
FROM t1
WHERE a = 16307858876001849059;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 system NULL NULL NULL NULL 1
EXPLAIN
SELECT id
FROM t1
WHERE a = CONV('e251273eb74a8ee3', 16, 10);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 system NULL NULL NULL NULL 1
DROP TABLE t1;

View file

@ -183,3 +183,13 @@ select 5.1 mod 3, 5.1 mod -3, -5.1 mod 3, -5.1 mod -3;
select 5 mod 3, 5 mod -3, -5 mod 3, -5 mod -3;
5 mod 3 5 mod -3 -5 mod 3 -5 mod -3
2 2 -2 -2
create table t1 (a int, b int);
insert into t1 values (1,2), (2,3), (3,4), (4,5);
select * from t1 where a not between 1 and 2;
a b
3 4
4 5
select * from t1 where a not between 1 and 2 and b not between 3 and 4;
a b
4 5
drop table t1;

View file

@ -440,12 +440,12 @@ create table t2 (user_id integer not null, date date);
insert into t2 values (1, '2002-06-09'),(2, '2002-06-09'),(1, '2002-06-09'),(3, '2002-06-09'),(4, '2002-06-09'),(4, '2002-06-09');
select u.gender as gender, count(distinct u.id) as dist_count, (count(distinct u.id)/5*100) as percentage from t1 u, t2 l where l.user_id = u.id group by u.gender;
gender dist_count percentage
F 3 60.00
M 1 20.00
F 3 60.00000
M 1 20.00000
select u.gender as gender, count(distinct u.id) as dist_count, (count(distinct u.id)/5*100) as percentage from t1 u, t2 l where l.user_id = u.id group by u.gender order by percentage;
gender dist_count percentage
M 1 20.00
F 3 60.00
M 1 20.00000
F 3 60.00000
drop table t1,t2;
CREATE TABLE t1 (ID1 int, ID2 int, ID int NOT NULL AUTO_INCREMENT,PRIMARY KEY(ID
));
@ -629,15 +629,6 @@ explain SELECT i, COUNT(DISTINCT(i)) FROM t1 GROUP BY j ORDER BY NULL;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ALL NULL NULL NULL NULL 6 Using filesort
DROP TABLE t1;
create table t1 ( col1 int, col2 int );
insert into t1 values (1,1),(1,2),(1,3),(2,1),(2,2);
select group_concat( distinct col1 ) as alias from t1
group by col2 having alias like '%';
alias
1,2
1,2
1
drop table t1;
create table t1 (a int);
insert into t1 values(null);
select min(a) is null from t1;
@ -650,3 +641,39 @@ select 1 and min(a) is null from t1;
1 and min(a) is null
1
drop table t1;
create table t1 ( col1 int, col2 int );
insert into t1 values (1,1),(1,2),(1,3),(2,1),(2,2);
select group_concat( distinct col1 ) as alias from t1
group by col2 having alias like '%';
alias
1,2
1,2
1
drop table t1;
create table t1 (a integer, b integer, c integer);
insert into t1 (a,b) values (1,2),(1,3),(2,5);
select a, 0.1*0+1 r2, sum(1) r1 from t1 where a = 1 group by a having r1>1 and r2=1;
a r2 r1
1 1.0 2
select a, rand()*0+1 r2, sum(1) r1 from t1 where a = 1 group by a having r1>1 and r2=1;
a r2 r1
1 1 2
select a,sum(b) from t1 where a=1 group by c;
a sum(b)
1 5
select a*sum(b) from t1 where a=1 group by c;
a*sum(b)
5
select sum(a)*sum(b) from t1 where a=1 group by c;
sum(a)*sum(b)
10
select a,sum(b) from t1 where a=1 group by c having a=1;
a sum(b)
1 5
select a as d,sum(b) from t1 where a=1 group by c having d=1;
d sum(b)
1 5
select sum(a)*sum(b) as d from t1 where a=1 group by c having d > 0;
d
10
drop table t1;

View file

@ -0,0 +1,2 @@
Collation Charset Id Default Compiled Sortlen
cp932_japanese_ci cp932 95 Yes Yes 1

View file

@ -0,0 +1,2 @@
Collation Charset Id Default Compiled Sortlen
eucjpms_japanese_ci eucjpms 97 Yes Yes 1

View file

@ -371,11 +371,11 @@ alter table t0 add filler1 char(200), add filler2 char(200), add filler3 char(20
update t0 set key2=1, key3=1, key4=1, key5=1,key6=1,key7=1 where key7 < 500;
explain select max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5)
from t0 as A, t0 as B
where (A.key1 = 1 and A.key2 = 1 and A.key3 = 1 and A.key4=1 and A.key5=1 and A.key6=1 and A.key7 = 1 or A.key8=1)
and (B.key1 = 1 and B.key2 = 1 and B.key3 = 1 and B.key4=1 and B.key5=1 and B.key6=1 and B.key7 = 1 or B.key8=1);
where (A.key1 = 1 and A.key2 = 1 and A.key3 = 1 and A.key4=1 and A.key5=1 and A.key6=1 and A.key7or16 = 1 or A.key8=1)
and (B.key1 = 1 and B.key2 = 1 and B.key3 = 1 and B.key4=1 and B.key5=1 and B.key6=1 and B.key7or16 = 1 or B.key8=1);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE A index_merge i1,i2,i3,i4,i5,i6,i7,i8 i2,i3,i4,i5,i6,i8 4,4,4,4,4,4 NULL 16 Using union(intersect(i2,i3,i4,i5,i6),i8); Using where
1 SIMPLE B index_merge i1,i2,i3,i4,i5,i6,i7,i8 i2,i3,i4,i5,i6,i8 4,4,4,4,4,4 NULL 16 Using union(intersect(i2,i3,i4,i5,i6),i8); Using where
1 SIMPLE A index_merge i1,i2,i3,i4,i5,i6,i7?,i8 i2,i3,i4,i5,i6,i7?,i8 X NULL 7or16 Using union(intersect(i2,i3,i4,i5,i6,i7?),i8); Using where
1 SIMPLE B index_merge i1,i2,i3,i4,i5,i6,i7?,i8 i2,i3,i4,i5,i6,i7?,i8 X NULL 7or16 Using union(intersect(i2,i3,i4,i5,i6,i7?),i8); Using where
select max(A.key1 + B.key1 + A.key2 + B.key2 + A.key3 + B.key3 + A.key4 + B.key4 + A.key5 + B.key5)
from t0 as A, t0 as B
where (A.key1 = 1 and A.key2 = 1 and A.key3 = 1 and A.key4=1 and A.key5=1 and A.key6=1 and A.key7 = 1 or A.key8=1)

View file

@ -69,9 +69,11 @@ id select_type table type possible_keys key key_len ref rows Extra
select pk from t1 where key2 = 1 and key1 = 1;
pk
26
27
select pk from t1 ignore index(key1,key2) where key2 = 1 and key1 = 1;
pk
26
27
drop table t1;
create table t1 (
pk int primary key auto_increment,

View file

@ -56,7 +56,7 @@ pk1 pk2
95 59
explain select * from t1 where badkey=1 and key1=10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref key1 key1 4 const 101 Using where
1 SIMPLE t1 ref key1 key1 4 const 100 Using where
explain select * from t1 where pk1 < 7500 and key1 = 10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge PRIMARY,key1 key1,PRIMARY 4,4 NULL 38 Using intersect(key1,PRIMARY); Using where
@ -74,13 +74,13 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge PRIMARY,key1,pktail2ok pktail2ok,key1 8,4 NULL 199 Using sort_union(pktail2ok,key1); Using where
explain select * from t1 where pktail3bad=1 and key1=10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref key1,pktail3bad pktail3bad 4 const ROWS Using where
1 SIMPLE t1 ref key1,pktail3bad key1 4 const 100 Using where
explain select * from t1 where pktail4bad=1 and key1=10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref key1,pktail4bad pktail4bad 4 const 99 Using where
1 SIMPLE t1 ref key1,pktail4bad key1 4 const 100 Using where
explain select * from t1 where pktail5bad=1 and key1=10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 ref key1,pktail5bad pktail5bad 4 const 99 Using where
1 SIMPLE t1 ref key1,pktail5bad key1 4 const 100 Using where
explain select pk1,pk2,key1,key2 from t1 where key1 = 10 and key2=10 limit 10;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index_merge key1,key2 key1,key2 4,4 NULL 1 Using intersect(key1,key2); Using where; Using index

View file

@ -1,6 +1,6 @@
show variables variable_name where variable_name like "skip_show_database";
variable_name
skip_show_database
show variables where variable_name like "skip_show_database";
Variable_name Value
skip_show_database OFF
grant all privileges on test.* to mysqltest_1@localhost;
select * from information_schema.SCHEMATA where schema_name > 'm';
CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME SQL_PATH
@ -11,11 +11,6 @@ schema_name
information_schema
mysql
test
show databases *;
CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME SQL_PATH
NULL information_schema utf8 NULL
NULL mysql latin1 NULL
NULL test latin1 NULL
show databases like 't%';
Database (t%)
test
@ -24,11 +19,8 @@ Database
information_schema
mysql
test
show databases * where schema_name like 't%';
CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME SQL_PATH
NULL test latin1 NULL
show databases * where schema_name = 't%';
CATALOG_NAME SCHEMA_NAME DEFAULT_CHARACTER_SET_NAME SQL_PATH
show databases where `database` = 't%';
Database
create database testtets;
create table testtets.t1(a int, b VARCHAR(30), KEY string_data (b));
create table test.t2(a int);
@ -116,20 +108,13 @@ t4
select * from information_schema.STATISTICS where TABLE_SCHEMA = "testtets";
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT
NULL testtets t1 1 testtets string_data 1 b A NULL NULL NULL YES BTREE
show keys * from t3 where TABLE_SCHEMA Like "test%";
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME NON_UNIQUE INDEX_SCHEMA INDEX_NAME SEQ_IN_INDEX COLUMN_NAME COLLATION CARDINALITY SUB_PART PACKED NULLABLE INDEX_TYPE COMMENT
NULL test t3 1 test a_data 1 a A NULL NULL NULL YES BTREE
show keys from t3 where INDEX_NAME = "a_data";
show keys from t3 where Key_name = "a_data";
Table Non_unique Key_name Seq_in_index Column_name Collation Cardinality Sub_part Packed Null Index_type Comment
t3 1 a_data 1 a A NULL NULL NULL YES BTREE
show tables like 't%';
Tables_in_test (t%)
t2
t3
show tables * from test where table_name like 't%';
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME TABLE_TYPE
NULL test t2
NULL test t3
show table status;
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
t2 MyISAM 9 Fixed 0 0 0 21474836479 1024 0 NULL # # NULL latin1_swedish_ci NULL
@ -148,10 +133,9 @@ select * from information_schema.COLUMNS where table_name="t1"
and column_name= "a";
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT
NULL testtets t1 a 1 NULL YES int 11 11 11 0 NULL NULL int(11) select,insert,update,references
show columns * from testtets.t1 where table_name = "t1";
TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAULT IS_NULLABLE DATA_TYPE CHARACTER_MAXIMUM_LENGTH CHARACTER_OCTET_LENGTH NUMERIC_PRECISION NUMERIC_SCALE CHARACTER_SET_NAME COLLATION_NAME COLUMN_TYPE COLUMN_KEY EXTRA PRIVILEGES COLUMN_COMMENT
NULL testtets t1 a 1 NULL YES int 11 11 11 0 NULL NULL int(11) select,insert,update,references
NULL testtets t1 b 2 NULL YES varchar 30 30 NULL NULL latin1 latin1_swedish_ci varchar(30) MUL select,insert,update,references
show columns from testtets.t1 where field like "%a%";
Field Type Null Key Default Extra
a int(11) YES NULL
drop view v1;
drop tables testtets.t4, testtets.t1, t2, t3;
drop database testtets;
@ -162,18 +146,9 @@ latin1 latin1_swedish_ci ISO 8859-1 West European 1
SHOW CHARACTER SET LIKE 'latin1%';
Charset Description Default collation Maxlen
latin1 ISO 8859-1 West European latin1_swedish_ci 1
SHOW CHARACTER SET * LIKE 'latin1%';
CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN
latin1 latin1_swedish_ci ISO 8859-1 West European 1
SHOW CHARACTER SET WHERE CHARACTER_SET_NAME like 'latin1%';
SHOW CHARACTER SET WHERE charset like 'latin1%';
Charset Description Default collation Maxlen
latin1 ISO 8859-1 West European latin1_swedish_ci 1
SHOW CHARACTER SET CHARACTER_SET_NAME WHERE CHARACTER_SET_NAME like 'latin1%';
CHARACTER_SET_NAME
latin1
SHOW CHARACTER SET * WHERE CHARACTER_SET_NAME like 'latin1%';
CHARACTER_SET_NAME DEFAULT_COLLATE_NAME DESCRIPTION MAXLEN
latin1 latin1_swedish_ci ISO 8859-1 West European 1
select * from information_schema.COLLATIONS
where COLLATION_NAME like 'latin1%';
COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN
@ -195,17 +170,7 @@ latin1_bin latin1 47 Yes 1
latin1_general_ci latin1 48 0
latin1_general_cs latin1 49 0
latin1_spanish_ci latin1 94 0
SHOW COLLATION * LIKE 'latin1%';
COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN
latin1_german1_ci latin1 5 0
latin1_swedish_ci latin1 8 Yes Yes 1
latin1_danish_ci latin1 15 0
latin1_german2_ci latin1 31 Yes 2
latin1_bin latin1 47 Yes 1
latin1_general_ci latin1 48 0
latin1_general_cs latin1 49 0
latin1_spanish_ci latin1 94 0
SHOW COLLATION WHERE COLLATION_NAME like 'latin1%';
SHOW COLLATION WHERE collation like 'latin1%';
Collation Charset Id Default Compiled Sortlen
latin1_german1_ci latin1 5 0
latin1_swedish_ci latin1 8 Yes Yes 1
@ -215,26 +180,6 @@ latin1_bin latin1 47 Yes 1
latin1_general_ci latin1 48 0
latin1_general_cs latin1 49 0
latin1_spanish_ci latin1 94 0
SHOW COLLATION COLLATION_NAME WHERE COLLATION_NAME like 'latin1%';
COLLATION_NAME
latin1_german1_ci
latin1_swedish_ci
latin1_danish_ci
latin1_german2_ci
latin1_bin
latin1_general_ci
latin1_general_cs
latin1_spanish_ci
SHOW COLLATION * WHERE COLLATION_NAME like 'latin1%';
COLLATION_NAME CHARACTER_SET_NAME ID IS_DEFAULT IS_COMPILED SORTLEN
latin1_german1_ci latin1 5 0
latin1_swedish_ci latin1 8 Yes Yes 1
latin1_danish_ci latin1 15 0
latin1_german2_ci latin1 31 Yes 2
latin1_bin latin1 47 Yes 1
latin1_general_ci latin1 48 0
latin1_general_cs latin1 49 0
latin1_spanish_ci latin1 94 0
select * from information_schema.COLLATION_CHARACTER_SET_APPLICABILITY
where COLLATION_NAME like 'latin1%';
COLLATION_NAME CHARACTER_SET_NAME
@ -435,26 +380,6 @@ delete from mysql.db where user='joe';
delete from mysql.tables_priv where user='joe';
delete from mysql.columns_priv where user='joe';
flush privileges;
create procedure px5 ()
begin
declare v int;
declare c cursor for select version from
information_schema.tables where table_schema <> 'information_schema';
open c;
fetch c into v;
select v;
close c;
end;//
call px5()//
v
9
call px5()//
v
9
select sql_mode from information_schema.ROUTINES;
sql_mode
drop procedure px5;
create table t1 (a int not null auto_increment,b int, primary key (a));
insert into t1 values (1,1),(NULL,3),(NULL,4);
select AUTO_INCREMENT from information_schema.tables where table_name = 't1';
@ -671,14 +596,11 @@ BASE TABLE
show open tables where `table` like "user";
Database Table In_use Name_locked
mysql user 0 0
show status variable_name where variable_name like "%database%";
variable_name
Com_show_databases
show variables variable_name where variable_name like "%database%";
variable_name
character_set_database
collation_database
skip_show_database
show status where variable_name like "%database%";
Variable_name Value
Com_show_databases 0
show variables where variable_name like "skip_show_databas";
Variable_name Value
show global status like "Threads_running";
Variable_name Value
Threads_running 1

View file

@ -249,6 +249,30 @@ n
4
5
6
set autocommit=0;
begin;
savepoint `my_savepoint`;
insert into t1 values (7);
savepoint `savept2`;
insert into t1 values (3);
select n from t1;
n
3
4
5
6
7
rollback to savepoint `savept2`;
release savepoint `my_savepoint`;
select n from t1;
n
4
5
6
7
rollback to savepoint `my_savepoint`;
ERROR HY000: Got error 153 during ROLLBACK
set autocommit=1;
rollback;
drop table t1;
create table t1 (n int not null primary key) engine=innodb;
@ -1609,14 +1633,14 @@ t2 CREATE TABLE `t2` (
drop table t2, t1;
show status like "binlog_cache_use";
Variable_name Value
Binlog_cache_use 24
Binlog_cache_use 25
show status like "binlog_cache_disk_use";
Variable_name Value
Binlog_cache_disk_use 0
create table t1 (a int) engine=innodb;
show status like "binlog_cache_use";
Variable_name Value
Binlog_cache_use 25
Binlog_cache_use 26
show status like "binlog_cache_disk_use";
Variable_name Value
Binlog_cache_disk_use 1
@ -1625,7 +1649,7 @@ delete from t1;
commit;
show status like "binlog_cache_use";
Variable_name Value
Binlog_cache_use 26
Binlog_cache_use 27
show status like "binlog_cache_disk_use";
Variable_name Value
Binlog_cache_disk_use 1
@ -1693,10 +1717,10 @@ Variable_name Value
Innodb_rows_deleted 2070
show status like "Innodb_rows_inserted";
Variable_name Value
Innodb_rows_inserted 31706
Innodb_rows_inserted 31708
show status like "Innodb_rows_read";
Variable_name Value
Innodb_rows_read 80153
Innodb_rows_read 80162
show status like "Innodb_rows_updated";
Variable_name Value
Innodb_rows_updated 29530

View file

@ -75,7 +75,7 @@ ERROR 23000: Duplicate entry '2' for key 1
show binlog events;
Log_name Pos Event_type Server_id End_log_pos Info
master-bin.000001 4 Format_desc 1 95 Server ver: VERSION, Binlog ver: 4
master-bin.000001 95 Query 1 183 use `test`; insert into t1 select * from t2
master-bin.000001 95 Query 1 190 use `test`; insert into t1 select * from t2
select * from t1;
a
1

View file

@ -633,3 +633,15 @@ No Field Count
0 1 100
0 2 100
drop table t1, t2;
CREATE TABLE t1 (
ID int(11) NOT NULL auto_increment,
NO int(11) NOT NULL default '0',
SEQ int(11) NOT NULL default '0',
PRIMARY KEY (ID),
KEY t1$NO (SEQ,NO)
) ENGINE=MyISAM;
INSERT INTO t1 (SEQ, NO) SELECT "1" AS SEQ, IF(MAX(NO) IS NULL, 0, MAX(NO)) + 1 AS NO FROM t1 WHERE (SEQ = 1);
select SQL_BUFFER_RESULT * from t1 WHERE (SEQ = 1);
ID NO SEQ
1 1 1
drop table t1;

View file

@ -67,3 +67,12 @@ SELECT * FROM t1;
id id2
3 0
DROP TABLE t1;
create table t1 (a integer);
insert into t1 values (1);
select 1 as a from t1 union all select 1 from dual limit 1;
a
1
(select 1 as a from t1) union all (select 1 from dual) limit 1;
a
1
drop table t1;

View file

@ -41,8 +41,8 @@ lock tables t1 write;
check table t2;
Table Op Msg_type Msg_text
test.t2 check error Table 't2' was not locked with LOCK TABLES
insert into t1 select nr from t1;
ERROR HY000: Table 't1' was not locked with LOCK TABLES
insert into t1 select index1,nr from t1;
ERROR 42000: INSERT command denied to user 'root'@'localhost' for column 'index1' in table 't1'
unlock tables;
lock tables t1 write, t1 as t1_alias read;
insert into t1 select index1,nr from t1 as t1_alias;

Some files were not shown because too many files have changed in this diff Show more