List:Commits« Previous MessageNext Message »
From:satya Date:November 11 2008 6:24am
Subject:Re: bzr commit into mysql-6.0 branch (satya.bn:2902) Bug#36573
View as plain text  
Hi Ingo,

Please see my comments  below.

Ingo Strüwing wrote:
> Hi Satya,
>
> excellent so far! Please add functionality and test for the case that
> none of the source tables has a .frm file. Since you copy a .frm file
> from the first table only, it would be sufficient to show that missing
> this one does not produce an error and the joined table gets no .frm.
>
>   
This functionality exists with the current patch. I have added
the testcase to test this. Will submit with the new patch.
> ...
>   
>> +-- echo # ===== myisampack.3 =====
>> +
>> +--echo #Tests the myisampack join operation with an existing destination
> .frm,.MYI,.MDI 
>> +--echo #the command should fail with exit status 2
>> +
>> +--error 2
>> +--exec $MYISAMPACK --join=$MYSQLTEST_VARDIR/master-data/test/t3
> $MYSQLTEST_VARDIR/master-data/test/t1 $MYSQLTEST_VARDIR/master-data/test/t2
>>     
>
> To get the error message into the test result, you can append " 2>&1" to
> the command line. Amazingly this works even on Windows.
>
> I suggest to append this in general. That way new or modified error
> messages pop up as result difference and must be explicitly acknowledged.
>
>   
I have a problem with this. When I add 2>&1 to the test , the negative 
test case prints
the error message with the current file path to the result file. I have 
gone through the
test framework and test commands manual. Couldn't find anything related 
to this.
 Any ideas on how to fix  this?

Testcase
---------------
--echo # ===== myisampack.4 =====
--echo #Tests the myisampack join operation with an existing destination 
.frm,.MYI,.MDI
--echo #the command should fail with exit status 2
--error 2
--exec $MYISAMPACK --join=$MYSQLTEST_VARDIR/master-data/test/t3  
$MYSQLTEST_VARDIR/master-data/test/t1 
$MYSQLTEST_VARDIR/master-data/test/t2 2>&1

DROP TABLE t1,t2,t3;


In result file
--------------------
# ===== myisampack.4 =====
#Tests the myisampack join operation with an existing destination 
.frm,.MYI,.MDI
#the command should fail with exit status 2
^G/home/satya/WORK/mysql-6.0-bug-36573/storage/myisam/myisampack: Can't 
create/write to file 
'/home/satya/WORK/mysql-6.0-bug-36573/mysql-test/var/master-data/test/t3.MYI' 
(Errcode: 17)
Aborted: 
/home/satya/WORK/mysql-6.0-bug-36573/mysql-test/var/master-data/test/t3 
is not compressed
DROP TABLE t1,t2,t3;


I have tried replacing path with variables 
$MYSQLTEST_VARDIR/var/masterdata/test/t3.MYI  but it didn't work.

Thanks,
Satya
> ...
>   


Thread
bzr commit into mysql-6.0 branch (satya.bn:2902) Bug#36573Satya B7 Nov
  • Re: bzr commit into mysql-6.0 branch (satya.bn:2902) Bug#36573Ingo Strüwing7 Nov
    • Re: bzr commit into mysql-6.0 branch (satya.bn:2902) Bug#36573satya11 Nov
      • Re: bzr commit into mysql-6.0 branch (satya.bn:2902) Bug#36573Ingo Strüwing11 Nov