Below is the list of changes that have just been committed into a local
5.0 repository of msvensson. When msvensson does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.1970 05/12/12 12:43:33 msvensson@neptunus.(none) +6 -0
Merge neptunus.(none):/home/msvensson/mysql/mysql-5.0
into neptunus.(none):/home/msvensson/mysql/wl2930/my50-wl2930-integration
mysql-test/t/mysqltest.test
1.22 05/12/12 12:43:27 msvensson@neptunus.(none) +0 -3
Manual merge
mysql-test/r/mysqltest.result
1.18 05/12/12 12:43:27 msvensson@neptunus.(none) +2 -2
Manual merge
mysql-test/t/union.test
1.93 05/12/12 12:42:02 msvensson@neptunus.(none) +0 -0
Auto merged
mysql-test/mysql-test-run.sh
1.284 05/12/12 12:42:02 msvensson@neptunus.(none) +0 -0
Auto merged
mysql-test/mysql-test-run.pl
1.59 05/12/12 12:42:02 msvensson@neptunus.(none) +0 -0
Auto merged
client/mysqltest.c
1.184 05/12/12 12:42:02 msvensson@neptunus.(none) +0 -0
Auto merged
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: msvensson
# Host: neptunus.(none)
# Root: /home/msvensson/mysql/wl2930/my50-wl2930-integration/RESYNC
--- 1.283/mysql-test/mysql-test-run.sh 2005-11-10 17:50:43 +01:00
+++ 1.284/mysql-test/mysql-test-run.sh 2005-12-12 12:42:02 +01:00
@@ -110,6 +110,20 @@
#$WAIT_PID pid $SLEEP_TIME_FOR_DELETE
}
+# Check that valgrind is installed
+find_valgrind()
+{
+ FIND_VALGRIND=`which valgrind` # this will print an error if not found
+ # Give good warning to the user and stop
+ if [ -z "$FIND_VALGRIND" ] ; then
+ $ECHO "You need to have the 'valgrind' program in your PATH to run mysql-test-run with option --valgrind. Valgrind's home page is http://valgrind.kde.org ."
+ exit 1
+ fi
+ # >=2.1.2 requires the --tool option, some versions write to stdout, some to stderr
+ valgrind --help 2>&1 | grep "\-\-tool" > /dev/null && FIND_VALGRIND="$FIND_VALGRIND --tool=memcheck"
+ FIND_VALGRIND="$FIND_VALGRIND --alignment=8 --leak-check=yes --num-callers=16 --suppressions=$CWD/valgrind.supp"
+}
+
# No paths below as we can't be sure where the program is!
SED=sed
@@ -255,7 +269,6 @@
MANUAL_GDB=""
DO_DDD=""
DO_CLIENT_GDB=""
-DO_VALGRIND_MYSQL_TEST=""
SLEEP_TIME_AFTER_RESTART=1
SLEEP_TIME_FOR_DELETE=10
SLEEP_TIME_FOR_FIRST_MASTER=400 # Enough time to create innodb tables
@@ -470,15 +483,8 @@
EXTRA_SLAVE_MYSQLD_OPT="$EXTRA_SLAVE_MYSQLD_OPT --gdb"
;;
--valgrind | --valgrind-all)
- VALGRIND=`which valgrind` # this will print an error if not found
- # Give good warning to the user and stop
- if [ -z "$VALGRIND" ] ; then
- $ECHO "You need to have the 'valgrind' program in your PATH to run mysql-test-run with option --valgrind. Valgrind's home page is http://valgrind.kde.org ."
- exit 1
- fi
- # >=2.1.2 requires the --tool option, some versions write to stdout, some to stderr
- valgrind --help 2>&1 | grep "\-\-tool" > /dev/null && VALGRIND="$VALGRIND --tool=memcheck"
- VALGRIND="$VALGRIND --alignment=8 --leak-check=yes --num-callers=16 --suppressions=$CWD/valgrind.supp"
+ find_valgrind;
+ VALGRIND=$FIND_VALGRIND
EXTRA_MASTER_MYSQLD_OPT="$EXTRA_MASTER_MYSQLD_OPT --skip-safemalloc --skip-bdb"
EXTRA_SLAVE_MYSQLD_OPT="$EXTRA_SLAVE_MYSQLD_OPT --skip-safemalloc --skip-bdb"
SLEEP_TIME_AFTER_RESTART=10
@@ -493,8 +499,13 @@
TMP=`$ECHO "$1" | $SED -e "s;--valgrind-options=;;"`
VALGRIND="$VALGRIND $TMP"
;;
- --valgrind-mysqltest)
- DO_VALGRIND_MYSQL_TEST=1
+ --valgrind-mysqltest | --valgrind-mysqltest-all)
+ find_valgrind;
+ VALGRIND_MYSQLTEST=$FIND_VALGRIND
+ if test "$1" = "--valgrind-mysqltest-all"
+ then
+ VALGRIND_MYSQLTEST="$VALGRIND_MYSQLTEST -v --show-reachable=yes"
+ fi
;;
--skip-ndbcluster | --skip-ndb)
USE_NDBCLUSTER=""
@@ -599,7 +610,7 @@
if [ x$SOURCE_DIST = x1 ] ; then
if [ "x$USE_EMBEDDED_SERVER" = "x1" ] ; then
if [ -f "$BASEDIR/libmysqld/examples/mysqltest_embedded" ] ; then
- MYSQL_TEST="$VALGRIND $BASEDIR/libmysqld/examples/mysqltest_embedded"
+ MYSQL_TEST="$BASEDIR/libmysqld/examples/mysqltest_embedded"
else
echo "Fatal error: Cannot find embedded server 'mysqltest_embedded'" 1>&2
exit 1
@@ -733,7 +744,7 @@
fi
if [ "x$USE_EMBEDDED_SERVER" = "x1" ] ; then
if [ -f "$CLIENT_BINDIR/mysqltest_embedded" ] ; then
- MYSQL_TEST="$VALGRIND $CLIENT_BINDIR/mysqltest_embedded"
+ MYSQL_TEST="$CLIENT_BINDIR/mysqltest_embedded"
else
echo "Fatal error: Cannot find embedded server 'mysqltest_embedded'" 1>&2
exit 1
@@ -744,7 +755,7 @@
MYSQL_CLIENT_TEST="$CLIENT_BINDIR/mysql_client_test_embedded"
fi
else
- MYSQL_TEST="$VALGRIND_MYSQLTEST $CLIENT_BINDIR/mysqltest"
+ MYSQL_TEST="$CLIENT_BINDIR/mysqltest"
MYSQL_CLIENT_TEST="$CLIENT_BINDIR/mysql_client_test"
fi
fi
@@ -759,10 +770,6 @@
SLAVE_MYSQLD=$MYSQLD
fi
-if [ x$DO_VALGRIND_MYSQL_TEST = x1 ] ; then
- MYSQL_TEST="$VALGRIND $MYSQL_TEST"
-fi
-
# If we should run all tests cases, we will use a local server for that
if [ -z "$1" -a -z "$DO_STRESS" ]
@@ -819,7 +826,10 @@
fi
MYSQL_TEST_BIN=$MYSQL_TEST
MYSQL_TEST="$MYSQL_TEST $MYSQL_TEST_ARGS"
+
+# Export MYSQL_TEST variable for use from .test files
export MYSQL_TEST
+
GDB_CLIENT_INIT=$MYSQL_TMP_DIR/gdbinit.client
GDB_MASTER_INIT=$MYSQL_TMP_DIR/gdbinit.master
GDB_SLAVE_INIT=$MYSQL_TMP_DIR/gdbinit.slave
@@ -829,6 +839,7 @@
GPROF_MASTER=$GPROF_DIR/master.gprof
GPROF_SLAVE=$GPROF_DIR/slave.gprof
TIMEFILE="$MYSQL_TEST_DIR/var/log/mysqltest-time"
+MYSQLTEST_LOG="$MYSQL_TEST_DIR/var/log/mysqltest.log"
if [ -n "$DO_CLIENT_GDB" -o -n "$DO_GDB" ] ; then
XTERM=`which xterm`
fi
@@ -991,6 +1002,18 @@
echo "WARNING: Got errors/warnings while running tests. Please examine"
echo "$MY_LOG_DIR/warnings for details."
fi
+
+ fi # USE_RUNNING_SERVER
+
+ # Check valgrind errors from mysqltest
+ if [ ! -z "$VALGRIND_MYSQLTEST" ]
+ then
+ if $GREP "ERROR SUMMARY" $MYSQLTEST_LOG | $GREP -v "0 errors" > /dev/null
+ then
+ $ECHO "Valgrind detected errors!"
+ $GREP "ERROR SUMMARY" $MYSQLTEST_LOG | $GREP -v "0 errors"
+ $ECHO "See $MYSQLTEST_LOG"
+ fi
fi
}
@@ -1767,12 +1790,16 @@
$RM -f r/$tname.*reject
mysql_test_args="-R $result_file $EXTRA_MYSQL_TEST_OPT"
if [ -z "$DO_CLIENT_GDB" ] ; then
- `$MYSQL_TEST $mysql_test_args < $tf 2> $TIMEFILE`;
+ `$VALGRIND_MYSQLTEST $MYSQL_TEST $mysql_test_args < $tf 2> $TIMEFILE`;
else
do_gdb_test "$mysql_test_args" "$tf"
fi
res=$?
+
+ # Save the testcase log to mysqltest log file
+ echo "CURRENT_TEST: $tname" >> $MYSQLTEST_LOG
+ cat $TIMEFILE >> $MYSQLTEST_LOG
pname=`$ECHO "$tname "|$CUT -c 1-24`
RES="$pname"
--- 1.92/mysql-test/t/union.test 2005-10-31 12:25:01 +01:00
+++ 1.93/mysql-test/t/union.test 2005-12-12 12:42:02 +01:00
@@ -732,6 +732,24 @@
show columns from t2;
drop table t2, t1;
+#
+# Bug #14216: UNION + DECIMAL wrong values in result
+#
+create table t1 (f1 decimal(60,25), f2 decimal(60,25));
+insert into t1 values (0.0,0.0);
+select f1 from t1 union all select f2 from t1;
+select 'XXXXXXXXXXXXXXXXXXXX' as description, f1 from t1
+union all
+select 'YYYYYYYYYYYYYYYYYYYY' as description, f2 from t1;
+drop table t1;
+create table t1 (f1 decimal(60,24), f2 decimal(60,24));
+insert into t1 values (0.0,0.0);
+select f1 from t1 union all select f2 from t1;
+select 'XXXXXXXXXXXXXXXXXXXX' as description, f1 from t1
+union all
+select 'YYYYYYYYYYYYYYYYYYYY' as description, f2 from t1;
+drop table t1;
+
#
# Test that union with VARCHAR produces dynamic row tables
#
--- 1.58/mysql-test/mysql-test-run.pl 2005-12-09 17:52:24 +01:00
+++ 1.59/mysql-test/mysql-test-run.pl 2005-12-12 12:42:02 +01:00
@@ -96,6 +96,7 @@
require "lib/mtr_diff.pl";
require "lib/mtr_match.pl";
require "lib/mtr_misc.pl";
+require "lib/mtr_stress.pl";
$Devel::Trace::TRACE= 1;
@@ -276,6 +277,16 @@
our $opt_valgrind_all;
our $opt_valgrind_options;
+our $opt_stress= "";
+our $opt_stress_suite= "main";
+our $opt_stress_mode= "random";
+our $opt_stress_threads= 5;
+our $opt_stress_test_count= 20;
+our $opt_stress_loop_count= "";
+our $opt_stress_test_duration= "";
+our $opt_stress_init_file= "";
+our $opt_stress_test_file= "";
+
our $opt_verbose;
our $opt_wait_for_master;
@@ -396,6 +407,10 @@
{
run_benchmarks(shift); # Shift what? Extra arguments?!
}
+ elsif ( $opt_stress )
+ {
+ run_stress_test()
+ }
else
{
run_tests();
@@ -555,6 +570,17 @@
'valgrind-all:s' => \$opt_valgrind_all,
'valgrind-options=s' => \$opt_valgrind_options,
+ # Stress testing
+ 'stress' => \$opt_stress,
+ 'stress-suite=s' => \$opt_stress_suite,
+ 'stress-threads=i' => \$opt_stress_threads,
+ 'stress-test-file=s' => \$opt_stress_test_file,
+ 'stress-init-file=s' => \$opt_stress_init_file,
+ 'stress-mode=s' => \$opt_stress_mode,
+ 'stress-loop-count=i' => \$opt_stress_loop_count,
+ 'stress-test-count=i' => \$opt_stress_test_count,
+ 'stress-test-duration=i' => \$opt_stress_test_duration,
+
# Misc
'big-test' => \$opt_big_test,
'debug' => \$opt_debug,
@@ -952,7 +978,7 @@
}
$exe_mysqlcheck= mtr_exe_exists("$path_client_bindir/mysqlcheck");
$exe_mysqldump= mtr_exe_exists("$path_client_bindir/mysqldump");
- $exe_mysqlimport= mtr_exe_exists("$path_client_bindir/mysqlimport");
+ $exe_mysqlimport= mtr_exe_exists("$path_client_bindir/mysqlimport");
$exe_mysqlshow= mtr_exe_exists("$path_client_bindir/mysqlshow");
$exe_mysqlbinlog= mtr_exe_exists("$path_client_bindir/mysqlbinlog");
$exe_mysqladmin= mtr_exe_exists("$path_client_bindir/mysqladmin");
@@ -969,6 +995,7 @@
$path_client_bindir= mtr_path_exists("$glob_basedir/bin");
$exe_mysqlcheck= mtr_exe_exists("$path_client_bindir/mysqlcheck");
$exe_mysqldump= mtr_exe_exists("$path_client_bindir/mysqldump");
+ $exe_mysqlimport= mtr_exe_exists("$path_client_bindir/mysqlimport");
$exe_mysqlshow= mtr_exe_exists("$path_client_bindir/mysqlshow");
$exe_mysqlbinlog= mtr_exe_exists("$path_client_bindir/mysqlbinlog");
$exe_mysqladmin= mtr_exe_exists("$path_client_bindir/mysqladmin");
@@ -2035,7 +2062,7 @@
mtr_add_arg($args, "%s--basedir=%s", $prefix, $path_my_basedir);
mtr_add_arg($args, "%s--character-sets-dir=%s", $prefix, $path_charsetsdir);
mtr_add_arg($args, "%s--core", $prefix);
- mtr_add_arg($args, "%s--log-bin-trust-routine-creators", $prefix);
+ mtr_add_arg($args, "%s--log-bin-trust-function-creators", $prefix);
mtr_add_arg($args, "%s--default-character-set=latin1", $prefix);
mtr_add_arg($args, "%s--language=%s", $prefix, $path_language);
mtr_add_arg($args, "%s--tmpdir=$opt_tmpdir", $prefix);
@@ -2158,7 +2185,7 @@
mtr_add_arg($args, "%s--key_buffer_size=1M", $prefix);
mtr_add_arg($args, "%s--sort_buffer=256K", $prefix);
mtr_add_arg($args, "%s--max_heap_table_size=1M", $prefix);
- mtr_add_arg($args, "%s--log-bin-trust-routine-creators", $prefix);
+ mtr_add_arg($args, "%s--log-bin-trust-function-creators", $prefix);
if ( $opt_ssl_supported )
{
--- 1.17/mysql-test/r/mysqltest.result 2005-12-06 21:28:06 +01:00
+++ 1.18/mysql-test/r/mysqltest.result 2005-12-12 12:43:27 +01:00
@@ -396,5 +396,27 @@
--------------------------------------------------------------------------------
this will be executed
this will be executed
+mysqltest: At line 3: query 'create table t1 (a int primary key);
+insert into t1 values (1);
+select 'select-me';
+insertz 'error query'' failed: 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'insertz 'error query'' at line 1
+drop table t1;
+drop table t1;
+create table t1 (a int primary key);
+insert into t1 values (1);
+select 'select-me';
+insertz error query||||
+select-me
+select-me
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'insertz error query' at line 1
+drop table t1;
+create table t1 (a int primary key);
+insert into t1 values (1);
+select 'select-me';
+insertz error query||||
+select-me
+select-me
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'insertz error query' at line 1
+drop table t1;
mysqltest: Result length mismatch
mysqltest: The test didn't produce any output
--- 1.21/mysql-test/t/mysqltest.test 2005-12-06 21:28:07 +01:00
+++ 1.22/mysql-test/t/mysqltest.test 2005-12-12 12:43:27 +01:00
@@ -979,4 +979,51 @@
#--error 1
#--exec $MYSQL_TEST -x var/tmp/query.sql -R var/tmp/result_file.result 2>&1
+#
+# Bug #11731 mysqltest in multi-statement queries ignores errors in
+# non-1st queries
+#
+
+# Failing multi statement query
+# PS does not support multi statement
+--exec echo "--disable_ps_protocol" > var/tmp/bug11731.sql
+--exec echo "delimiter ||||;" >> var/tmp/bug11731.sql
+--exec echo "create table t1 (a int primary key);" >> var/tmp/bug11731.sql
+--exec echo "insert into t1 values (1);" >> var/tmp/bug11731.sql
+--exec echo "select 'select-me';" >> var/tmp/bug11731.sql
+--exec echo "insertz 'error query'||||" >> var/tmp/bug11731.sql
+--exec echo "delimiter ;||||" >> var/tmp/bug11731.sql
+
+--error 1
+--exec $MYSQL_TEST -x $MYSQL_TEST_DIR/var/tmp/bug11731.sql 2>&1
+drop table t1;
+
+--error 1
+--exec $MYSQL_TEST --record -x $MYSQL_TEST_DIR/var/tmp/bug11731.sql -R $MYSQL_TEST_DIR/var/tmp/bug11731.out
+# The .out file should be empty, cat will fail!
+--error 1
+--exec cat $MYSQL_TEST_DIR/var/tmp/bug11731.out
+drop table t1;
+
+
+# Using expected error
+# PS does not support multi statement
+--exec echo "--disable_ps_protocol" > var/tmp/bug11731.sql
+--exec echo "delimiter ||||;" >> var/tmp/bug11731.sql
+--exec echo "--error 1064" >> var/tmp/bug11731.sql
+--exec echo "create table t1 (a int primary key);" >> var/tmp/bug11731.sql
+--exec echo "insert into t1 values (1);" >> var/tmp/bug11731.sql
+--exec echo "select 'select-me';" >> var/tmp/bug11731.sql
+--exec echo "insertz "error query"||||" >> var/tmp/bug11731.sql
+--exec echo "delimiter ;||||" >> var/tmp/bug11731.sql
+
+# These two should work since the error is expected
+--exec $MYSQL_TEST -x $MYSQL_TEST_DIR/var/tmp/bug11731.sql 2>&1
+drop table t1;
+
+--exec $MYSQL_TEST --record -x $MYSQL_TEST_DIR/var/tmp/bug11731.sql -R $MYSQL_TEST_DIR/var/tmp/bug11731.out
+--exec cat $MYSQL_TEST_DIR/var/tmp/bug11731.out
+drop table t1;
+
+
--- 1.183/client/mysqltest.c 2005-12-09 18:51:39 +01:00
+++ 1.184/client/mysqltest.c 2005-12-12 12:42:02 +01:00
@@ -2726,7 +2726,7 @@
{"password", 'p', "Password to use when connecting to server.",
0, 0, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
{"port", 'P', "Port number to use for connection.", (gptr*) &port,
- (gptr*) &port, 0, GET_INT, REQUIRED_ARG, MYSQL_PORT, 0, 0, 0, 0, 0},
+ (gptr*) &port, 0, GET_INT, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
{"ps-protocol", OPT_PS_PROTOCOL, "Use prepared statements protocol for communication",
(gptr*) &ps_protocol, (gptr*) &ps_protocol, 0,
GET_BOOL, NO_ARG, 0, 0, 0, 0, 0, 0},
@@ -3457,20 +3457,23 @@
((q->expected_errno[i].type == ERR_SQLSTATE) &&
(strcmp(q->expected_errno[i].code.sqlstate, err_sqlstate) == 0)))
{
- if (q->expected_errors == 1)
+ if (!disable_result_log)
{
- /* Only log error if there is one possible error */
- dynstr_append_mem(ds, "ERROR ", 6);
- replace_dynstr_append(ds, err_sqlstate);
- dynstr_append_mem(ds, ": ", 2);
- replace_dynstr_append(ds, err_error);
- dynstr_append_mem(ds,"\n",1);
- }
- /* Don't log error if we may not get an error */
- else if (q->expected_errno[0].type == ERR_SQLSTATE ||
- (q->expected_errno[0].type == ERR_ERRNO &&
- q->expected_errno[0].code.errnum != 0))
- dynstr_append(ds,"Got one of the listed errors\n");
+ if (q->expected_errors == 1)
+ {
+ /* Only log error if there is one possible error */
+ dynstr_append_mem(ds, "ERROR ", 6);
+ replace_dynstr_append(ds, err_sqlstate);
+ dynstr_append_mem(ds, ": ", 2);
+ replace_dynstr_append(ds, err_error);
+ dynstr_append_mem(ds,"\n",1);
+ }
+ /* Don't log error if we may not get an error */
+ else if (q->expected_errno[0].type == ERR_SQLSTATE ||
+ (q->expected_errno[0].type == ERR_ERRNO &&
+ q->expected_errno[0].code.errnum != 0))
+ dynstr_append(ds,"Got one of the listed errors\n");
+ }
/* OK */
DBUG_VOID_RETURN;
}
@@ -3478,11 +3481,14 @@
DBUG_PRINT("info",("i: %d expected_errors: %d", i, q->expected_errors));
- dynstr_append_mem(ds, "ERROR ",6);
- replace_dynstr_append(ds, err_sqlstate);
- dynstr_append_mem(ds, ": ", 2);
- replace_dynstr_append(ds, err_error);
- dynstr_append_mem(ds, "\n", 1);
+ if (!disable_result_log)
+ {
+ dynstr_append_mem(ds, "ERROR ",6);
+ replace_dynstr_append(ds, err_sqlstate);
+ dynstr_append_mem(ds, ": ", 2);
+ replace_dynstr_append(ds, err_error);
+ dynstr_append_mem(ds, "\n", 1);
+ }
if (i)
{
| Thread |
|---|
| • bk commit into 5.0 tree (msvensson:1.1970) | msvensson | 12 Dec |