• Jon Olav Hauglid's avatar
    Bug#11815600 [ERROR] INNODB COULD NOT FIND INDEX PRIMARY · fc6ef378
    Jon Olav Hauglid authored
                 KEY NO 0 FOR TABLE IN ERROR LOG 
    
    With the changes made by the patches for Bug#11751388 and
    Bug#11784056, concurrent reads are allowed while secondary
    indexes are created in InnoDB. This means that the metadata
    lock on the affected table is not upgraded to exclusive
    until the .FRM is updated at the end of ALTER TABLE processing.
    
    The problem was that if this lock upgrade failed for some
    reason (e.g. timeout), the index information in the server
    and inside InnoDB would be out of sync. This would happen
    since the add index operation already was committed inside 
    InnoDB but the table metadata inside the server had not been
    updated yet.
    
    This patch fixes the problem by (for now) reverting the
    effects of the patches for Bug#11751388 and Bug#11784056.
    Concurrent reads will now again be blocked during creation
    of secondary indexes in InnoDB.
    
    Test case added to innodb_mysql_lock.test.
    fc6ef378
innodb_mysql_sync.result 2.9 KB