Bug #18906 Test case rpl_temporary fails when using --vardir option
Submitted: 8 Apr 2006 13:09 Modified: 10 Apr 2006 20:05
Reporter: Andrei Elkin Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Replication Severity:S3 (Non-critical)
Version:5.0.21 OS:Any (all)
Assigned to: Andrei Elkin CPU Architecture:Any

[8 Apr 2006 13:09] Andrei Elkin
Description:
ttps://intranet.mysql.com/~knielsen/getlog.pl?dir=mysql-5.0&entry=push-aelkin@dl145j.mysql.com-20060408004557.info&name=test_n_stm&plat=sol10-amd64-a
reports 

rpl_temporary                  [ fail ]

Errors are (from /tmp/var-n_stm-5/log/mysqltest-time) :
mysqltest: Result length mismatch
(the last lines may be the most important ones)
Below are the diffs between actual and expected results:
-------------------------------------------------------
*** r/rpl_temporary.result	Sat Apr  8 01:59:47 2006
--- r/rpl_temporary.reject	Sat Apr  8 03:01:43 2006
***************
*** 93,99 ****
  create table t5 (f int);
  drop table if exists t999;
  create temporary table t999 (f int);
! LOAD DATA INFILE "./var/tmp/bl_dump_thread_id" into table t999;
  drop table t999;
  insert into t4 values (1);
  kill `select id from information_schema.processlist where command='Binlog Dump'`;
--- 93,99 ----
  create table t5 (f int);
  drop table if exists t999;
  create temporary table t999 (f int);
! LOAD DATA INFILE "/tmp/var-n_stm-5/tmp/bl_dump_thread_id" into table t999;
  drop table t999;
  insert into t4 values (1);
  kill `select id from information_schema.processlist where command='Binlog Dump'`;
-------------------------------------------------------

How to repeat:
make test and 
I guess (haven't tried on reported platforms)
./mysql-bin-test rpl_temporary

Suggested fix:
Sounds like a bug in mysqltest to be reported. The problem is in failure of performing
--replace_result $MYSQL_TEST_DIR "."
eval LOAD DATA INFILE "$MYSQLTEST_VARDIR/tmp/bl_dump_thread_id" into table t999;
at get_binlog_dump_thread_id.inc

I am going to disable disable_result_log for LOAD query. Thas is fair since it is a part
of implementing pseudo-macro.
[8 Apr 2006 20:13] Kristian Nielsen
The problem is not with mysqltest, the problem is that the testcase assumes that $MYSQLTEST_VARDIR will equal $MYSQL_TEST_DIR/var. This assumption is false when using the --vardir option to mysql-test-run.pl, as pushbuild does.

The problem is with this code, in get_binlog_dump_thread_id.inc:

--replace_result $MYSQL_TEST_DIR "."
eval LOAD DATA INFILE "$MYSQLTEST_VARDIR/tmp/bl_dump_thread_id" into table t999;

It should instead be written like this:

--replace_result $MYSQLTEST_VARDIR "./var"
eval LOAD DATA INFILE "$MYSQLTEST_VARDIR/tmp/bl_dump_thread_id" into table t999;
[9 Apr 2006 10:29] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/4682
[10 Apr 2006 6:33] Andrei Elkin
Fixed in  5.0.21, 5.1.10-beta.
[10 Apr 2006 20:05] Paul DuBois
No changelog entry needed.