summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorunknown <sasha@mysql.sashanet.com>2001-04-12 13:46:19 -0600
committerunknown <sasha@mysql.sashanet.com>2001-04-12 13:46:19 -0600
commit4d4dbc94c2f386c36c5bcb64213bebb5693af208 (patch)
tree6b6eccc0d4314f9fdf07f9dfbc2a30d22af14870 /mysql-test
parentfa30245c81d8a4412d4d10a44d84fb43cc6c6b1e (diff)
downloadmariadb-git-4d4dbc94c2f386c36c5bcb64213bebb5693af208.tar.gz
BitKeeper/triggers/post-commit
do REAL_EMAIL magic mysql-test/mysql-test-run.sh added show_failed_diffs mysql-test/r/bench_count_distinct.result tired of waiting :-) mysql-test/r/rpl000001.result new test results after implementing Monty's Hack (TM) mysql-test/t/bench_count_distinct.test tired of waiting mysql-test/t/rpl000001.test implemented Monty's Hack (TM) to kill a query in the middle of update without generating a table with 30,000 rows. This will also avoice the timing uncertainty BitKeeper/triggers/post-commit: do REAL_EMAIL magic mysql-test/mysql-test-run.sh: added show_failed_diffs mysql-test/r/bench_count_distinct.result: tired of waiting :-) mysql-test/r/rpl000001.result: new test results after implementing Monty's Hack (TM) mysql-test/t/bench_count_distinct.test: tired of waiting mysql-test/t/rpl000001.test: implemented Monty's Hack (TM) to kill a query in the middle of update without generating a table with 30,000 rows. This will also avoice the timing uncertainty
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/mysql-test-run.sh16
-rw-r--r--mysql-test/r/bench_count_distinct.result2
-rw-r--r--mysql-test/r/rpl000001.result4
-rw-r--r--mysql-test/t/bench_count_distinct.test2
-rw-r--r--mysql-test/t/rpl000001.test13
5 files changed, 30 insertions, 7 deletions
diff --git a/mysql-test/mysql-test-run.sh b/mysql-test/mysql-test-run.sh
index 1ee2786e2a2..9342e30f1a1 100644
--- a/mysql-test/mysql-test-run.sh
+++ b/mysql-test/mysql-test-run.sh
@@ -44,6 +44,7 @@ which ()
# No paths below as we can't be sure where the program is!
BASENAME=`which basename | head -1`
+DIFF=`which diff | head -1`
CAT=cat
CUT=cut
TAIL=tail
@@ -283,6 +284,20 @@ prompt_user ()
read unused
}
+show_failed_diff ()
+{
+ reject_file=r/$1.reject
+ result_file=r/$1.result
+ if [ -x "$DIFF" ] && [ -f $reject_file ]
+ then
+ echo "Below are the diffs between actual and expected results:"
+ echo "-------------------------------------------------------"
+ $DIFF -u $result_file $reject_file
+ echo "-------------------------------------------------------"
+ echo "Please e-mail the above, along with the output of mysqlbug"
+ echo "and any other relevant info to bugs@lists.mysql.com"
+ fi
+}
error () {
$ECHO "Error: $1"
@@ -675,6 +690,7 @@ run_testcase ()
$ECHO "$RES$RES_SPACE [ fail ]"
$ECHO
error_is
+ show_failed_diff $tname
$ECHO
if [ x$FORCE != x1 ] ; then
$ECHO "Aborting. To continue, re-run with '--force'."
diff --git a/mysql-test/r/bench_count_distinct.result b/mysql-test/r/bench_count_distinct.result
index 6265c146709..20f23c0abbe 100644
--- a/mysql-test/r/bench_count_distinct.result
+++ b/mysql-test/r/bench_count_distinct.result
@@ -1,2 +1,2 @@
count(distinct n)
-10000
+100
diff --git a/mysql-test/r/rpl000001.result b/mysql-test/r/rpl000001.result
index 925c5599d77..ad03b514fae 100644
--- a/mysql-test/r/rpl000001.result
+++ b/mysql-test/r/rpl000001.result
@@ -6,8 +6,8 @@ sum(length(word))
(@id := id) - id
0
Master_Host Master_User Master_Port Connect_retry Log_File Pos Slave_Running Replicate_do_db Replicate_ignore_db Last_errno Last_error Skip_counter
-127.0.0.1 root 9306 1 master-bin.001 1729137 No 1053 Slave: query ' update t1 set n = n + 1' partially completed on the master and was aborted. There is a chance that your master is inconsistent at this point. If you are sure that your master is ok, run this query manually on the slave and then restart the slave with SET SQL_SLAVE_SKIP_COUNTER=1; SLAVE START; 0
+127.0.0.1 root 9306 1 master-bin.001 939 No 1053 Slave: query ' update t1 set n = n + get_lock('crash_lock', 2)' partially completed on the master and was aborted. There is a chance that your master is inconsistent at this point. If you are sure that your master is ok, run this query manually on the slave and then restart the slave with SET SQL_SLAVE_SKIP_COUNTER=1; SLAVE START; 0
count(*)
-30000
+10
n
3456
diff --git a/mysql-test/t/bench_count_distinct.test b/mysql-test/t/bench_count_distinct.test
index 6bc74f0b1f1..62d456a3cf8 100644
--- a/mysql-test/t/bench_count_distinct.test
+++ b/mysql-test/t/bench_count_distinct.test
@@ -1,6 +1,6 @@
drop table if exists t1;
create table t1(n int not null, key(n)) delay_key_write = 1;
-let $1=10000;
+let $1=100;
while ($1)
{
eval insert into t1 values($1);
diff --git a/mysql-test/t/rpl000001.test b/mysql-test/t/rpl000001.test
index 1170cbebeaf..06b5d92fc8e 100644
--- a/mysql-test/t/rpl000001.test
+++ b/mysql-test/t/rpl000001.test
@@ -30,7 +30,7 @@ reset slave;
connection master;
drop table if exists t1,t2;
create table t1(n int);
-let $1=30000;
+let $1=10;
while ($1)
{
eval insert into t1 values($1);
@@ -39,10 +39,17 @@ while ($1)
create table t2(id int);
insert into t2 values(connection_id());
save_master_pos;
-send update t1 set n = n + 1;
+
+connection master1;
+#avoid generating result
+create temporary table t1_temp(n int);
+insert into t1_temp select get_lock('crash_lock', 1) from t2;
+
+connection master;
+send update t1 set n = n + get_lock('crash_lock', 2);
connection master1;
+sleep 2;
select (@id := id) - id from t2;
-sleep 0.1;
kill @id;
drop table t2;
connection master;