• Magne Mahre's avatar
    Fix for Bug#36573 myisampack --join does not create destination · 952f8bda
    Magne Mahre authored
    table .frm file
                
    Problem:
    ========
    Myisampack --join did not create the destination table .frm file. 
    The user had to copy one of the source table .frm file as destination .frm 
    file for mysql server to recognize. This is just 'user-friendliness' issue.
                
    How it was solved
    =================
    After successful join and compression we copy the frm file from the first 
    source table.
                
    Functionality added
    ===================
    myisampack --join=/path/t3 /path/t1 /path/t2 creates 
    /path/t3.frm (which is bascially copied from first table's frm /path/t1)
          
    Tests
    =====
    Modified myisampack.test to test two scenario's
    1. Positive myisampack --join test
       In this case after the join operation is done,we test if the destination 
       table is accessible from the server
    2. Positive myisampack --join test with an existing .frm file.
       We test the above case with an existing .frm file for the destination 
       table. It should return success even in this case.
    3. Positive myisampack --join test with no .frm file for source tables
       We test the join operation with no .frm files for source tables. It should
       complete the join operation without any warnings and error messages
    4. Negative myisampack --join test
       We test myisampack --join with existing .MYI,.MDI,.frm files for the 
       destination table. It should fail with exit status 2 in this case.
    952f8bda
myisampack.c 102 KB