Commit 2ca97b56 authored by unknown's avatar unknown

Merge mysql.com:/home/mydev/mysql-4.1

into mysql.com:/home/mydev/mysql-4.1-4100
parents 29af2328 6b22a5e6
......@@ -1002,3 +1002,5 @@ vio/test-ssl
vio/test-sslclient
vio/test-sslserver
vio/viotest-ssl
tests/mysql_client_test
tests/mysql_client_test
......@@ -1072,7 +1072,7 @@ do { doubleget_union _tmp; \
#define float4store(V,M) memcpy_fixed((byte*) V,(byte*) (&M),sizeof(float))
#if defined(__FLOAT_WORD_ORDER) && (__FLOAT_WORD_ORDER == __BIG_ENDIAN)
#define doublestore(T,V) do { *(T)= ((byte *) &V)[4];\
#define doublestore(T,V) do { *(((char*)T)+0)=(char) ((byte *) &V)[4];\
*(((char*)T)+1)=(char) ((byte *) &V)[5];\
*(((char*)T)+2)=(char) ((byte *) &V)[6];\
*(((char*)T)+3)=(char) ((byte *) &V)[7];\
......
......@@ -2978,7 +2978,7 @@ static my_bool int_is_null_false= 0;
values and mysql_stmt_execute() the statement.
See also: mysql_stmt_send_long_data() for sending long text/blob
data in pieces, examples in tests/client_test.c.
data in pieces, examples in tests/mysql_client_test.c.
Next steps you might want to make:
- execute statement with mysql_stmt_execute(),
- reset statement using mysql_stmt_reset() or reprepare it with
......
noinst_PROGRAMS = mysqltest mysql client_test
client_sources = $(mysqltest_SOURCES) $(mysql_SOURCES)
tests_sources= $(client_test_SOURCES)
noinst_PROGRAMS = mysql
bin_PROGRAMS = mysqltest_embedded mysql_client_test_embedded
client_sources = $(mysqltest_embedded_SOURCES) $(mysql_SOURCES)
tests_sources= $(mysql_client_test_embedded_SOURCES)
link_sources:
for f in $(client_sources); do \
......@@ -19,16 +20,16 @@ INCLUDES = @MT_INCLUDES@ -I$(top_srcdir)/include -I$(srcdir) \
LIBS = @LIBS@ @WRAPLIBS@ @CLIENT_LIBS@
LDADD = @CLIENT_EXTRA_LDFLAGS@ ../libmysqld.a @innodb_system_libs@ @LIBDL@ $(CXXLDFLAGS)
mysqltest_LINK = $(CXXLINK)
mysqltest_SOURCES = mysqltest.c
mysqltest_LDADD = $(LDADD) $(top_builddir)/regex/libregex.a
mysqltest_embedded_LINK = $(CXXLINK)
mysqltest_embedded_SOURCES = mysqltest.c
mysqltest_embedded_LDADD = $(LDADD) $(top_builddir)/regex/libregex.a
mysql_SOURCES = mysql.cc readline.cc completion_hash.cc \
my_readline.h sql_string.h completion_hash.h
mysql_LDADD = @readline_link@ @TERMCAP_LIB@ $(LDADD)
client_test_LINK = $(CXXLINK)
client_test_SOURCES = client_test.c
mysql_client_test_embedded_LINK = $(CXXLINK)
mysql_client_test_embedded_SOURCES = mysql_client_test.c
clean:
rm -f $(client_sources)
......
......@@ -493,13 +493,13 @@ DASH72=`$ECHO '-------------------------------------------------------'|$CUT -c
# on binary, use what is installed
if [ x$SOURCE_DIST = x1 ] ; then
if [ "x$USE_EMBEDDED_SERVER" = "x1" ] ; then
if [ -f "$BASEDIR/libmysqld/examples/mysqltest" ] ; then
MYSQL_TEST="$VALGRIND $BASEDIR/libmysqld/examples/mysqltest"
if [ -f "$BASEDIR/libmysqld/examples/mysqltest_embedded" ] ; then
MYSQL_TEST="$VALGRIND $BASEDIR/libmysqld/examples/mysqltest_embedded"
else
echo "Fatal error: Cannot find embedded server 'mysqltest'" 1>&2
echo "Fatal error: Cannot find embedded server 'mysqltest_embedded'" 1>&2
exit 1
fi
TESTS_BINDIR="$BASEDIR/libmysqld/examples"
MYSQL_CLIENT_TEST="$BASEDIR/libmysqld/examples/mysql_client_test_embedded"
else
MYSQLD="$VALGRIND $BASEDIR/sql/mysqld"
if [ -f "$BASEDIR/client/.libs/lt-mysqltest" ] ; then
......@@ -509,7 +509,7 @@ if [ x$SOURCE_DIST = x1 ] ; then
else
MYSQL_TEST="$BASEDIR/client/mysqltest"
fi
TESTS_BINDIR="$BASEDIR/tests"
MYSQL_CLIENT_TEST="$BASEDIR/tests/mysql_client_test"
fi
if [ -f "$BASEDIR/client/.libs/mysqldump" ] ; then
MYSQL_DUMP="$BASEDIR/client/.libs/mysqldump"
......@@ -539,6 +539,14 @@ if [ x$SOURCE_DIST = x1 ] ; then
NDB_TOOLS_DIR="$BASEDIR/ndb/tools"
NDB_MGM="$BASEDIR/ndb/src/mgmclient/ndb_mgm"
else
# We have a binary installation. Note that this can be both from
# unpacking a MySQL AB binary distribution (created using
# "scripts/make_binary_distribution", and from a "make install".
# Unfortunately the structure differs a bit, for a "make install"
# currently all binaries are in "bin", for a MySQL AB packaging
# some are in "tests".
if test -x "$BASEDIR/libexec/mysqld"
then
MYSQLD="$VALGRIND $BASEDIR/libexec/mysqld"
......@@ -546,8 +554,6 @@ else
MYSQLD="$VALGRIND $BASEDIR/bin/mysqld"
fi
CLIENT_BINDIR="$BASEDIR/bin"
TESTS_BINDIR="$BASEDIR/tests"
MYSQL_TEST="$CLIENT_BINDIR/mysqltest"
MYSQL_DUMP="$CLIENT_BINDIR/mysqldump"
MYSQL_BINLOG="$CLIENT_BINDIR/mysqlbinlog"
MYSQLADMIN="$CLIENT_BINDIR/mysqladmin"
......@@ -567,7 +573,23 @@ else
else
LANGUAGE="$BASEDIR/share/english/"
CHARSETSDIR="$BASEDIR/share/charsets"
fi
fi
if [ "x$USE_EMBEDDED_SERVER" = "x1" ] ; then
if [ -f "$CLIENT_BINDIR/mysqltest_embedded" ] ; then
MYSQL_TEST="$VALGRIND $CLIENT_BINDIR/mysqltest_embedded"
else
echo "Fatal error: Cannot find embedded server 'mysqltest_embedded'" 1>&2
exit 1
fi
if [ -d "$BASEDIR/tests/mysql_client_test_embedded" ] ; then
MYSQL_CLIENT_TEST="$TESTS_BINDIR/mysql_client_test_embedded"
else
MYSQL_CLIENT_TEST="$CLIENT_BINDIR/mysql_client_test_embedded"
fi
else
MYSQL_TEST="$CLIENT_BINDIR/mysqltest"
MYSQL_CLIENT_TEST="$CLIENT_BINDIR/mysql_client_test"
fi
fi
if [ -z "$MASTER_MYSQLD" ]
......@@ -601,13 +623,13 @@ then
EXTRA_SLAVE_MYSQLD_OPT="$EXTRA_SLAVE_MYSQLD_OPT --user=root"
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_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
export CLIENT_BINDIR TESTS_BINDIR CHARSETSDIR
export CLIENT_BINDIR MYSQL_CLIENT_TEST CHARSETSDIR
export NDB_TOOLS_DIR
export NDB_MGM
......
# Skip when testing the embedded server
--source include/not_embedded.inc
--disable_result_log
--exec $TESTS_BINDIR/client_test --no-defaults --testcase --user=root --socket=$MASTER_MYSOCK --port=$MYSQL_TCP_PORT --silent
# We run with different binaries for normal and --embedded-server
--disable_result_log
--exec $MYSQL_CLIENT_TEST
......@@ -127,6 +127,8 @@ else
client/.libs/mysqltest client/.libs/mysqlcheck \
client/.libs/mysqlbinlog client/.libs/mysqlmanagerc \
client/.libs/mysqlmanager-pwgen tools/.libs/mysqlmanager \
tests/.libs/mysql_client_test libmysqld/examples/mysql_client_test_embedded \
libmysqld/examples/mysqltest_embedded \
";
fi
......@@ -187,7 +189,7 @@ fi
if [ $BASE_SYSTEM != "netware" ] ; then
if [ -d tests ] ; then
$CP tests/client_test tests/*.res tests/*.tst tests/*.pl $BASE/tests
$CP tests/*.res tests/*.tst tests/*.pl $BASE/tests
fi
if [ -d man ] ; then
$CP man/*.1 $BASE/man/man1
......
......@@ -26,7 +26,7 @@ EXTRA_DIST = auto_increment.res auto_increment.tst \
pmail.pl mail_to_db.pl table_types.pl \
udf_test udf_test.res myisam-big-rows.tst
bin_PROGRAMS = client_test
bin_PROGRAMS = mysql_client_test
noinst_PROGRAMS = insert_test select_test thread_test
#
......@@ -35,8 +35,8 @@ noinst_PROGRAMS = insert_test select_test thread_test
INCLUDES = -I$(top_srcdir)/include $(openssl_includes)
LIBS = @CLIENT_LIBS@
LDADD = @CLIENT_EXTRA_LDFLAGS@ ../libmysql/libmysqlclient.la
client_test_LDADD= $(LDADD) $(CXXLDFLAGS)
client_test_SOURCES= client_test.c
mysql_client_test_LDADD= $(LDADD) $(CXXLDFLAGS)
mysql_client_test_SOURCES= mysql_client_test.c
insert_test_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES)
select_test_DEPENDENCIES= $(LIBRARIES) $(pkglib_LTLIBRARIES)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment