On 3/9/11 10:45 AM, Jon Olav Hauglid wrote:
> #Atfile:///export/home/x/mysql-5.5-bug11815600/ based
> onrevid:marc.alff@stripped
>
> 3378 Jon Olav Hauglid 2011-03-09
> Bug#11815600 [ERROR] INNODB COULD NOT FIND INDEX PRIMARY
> 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.
OK to push.