Skip to content
  • Tor Didriksen's avatar
    40ec5373
    Bug#19142753 ASSERT: MODE !=LOCK_X || LOCK_TABLE_HAS(THR_GET_TRX(THR), INDEX->TABLE, LOCK_IX) · 40ec5373
    Tor Didriksen authored
    WL6742-Improve InnoDB SELECT COUNT(*) performance by using handler::records()
    introduced new functionality in InnoDB.
    
    handler::records can now fail in ways never seen by the server before.
    
    This improved things on the InnoDB side:
    kevin.lewis@oracle.com-20130626194505-muocxuem7bd2wiw8
      bug#16802288 - FAILING ASSERTION: PREBUILT->SQL_STAT_START ||
      TRX->STATE == TRX_STATE_ACTIVE
      
      Add error handling for DB_DEADLOCK and DB_LOCK_TABLE_FULL to
      handler::records() for COUNT(*).  Also rollback transaction when
      handler::records receive DB_DEADLOCK, DB_LOCK_TABLE_FULL or
      DB_LOCK_WAIT_TIMEOUT.
    
    However: thd_mark_transaction_to_rollback() isn't enough.
    The optimizer needs to abort immediately for the cases mentioned above.
    
    Fix: improve error handling for all calls to handler::records()
    Add a new public function ha_records() which does the error checking,
    make handler::records() protected.
    40ec5373
    Bug#19142753 ASSERT: MODE !=LOCK_X || LOCK_TABLE_HAS(THR_GET_TRX(THR), INDEX->TABLE, LOCK_IX)
    Tor Didriksen authored
    WL6742-Improve InnoDB SELECT COUNT(*) performance by using handler::records()
    introduced new functionality in InnoDB.
    
    handler::records can now fail in ways never seen by the server before.
    
    This improved things on the InnoDB side:
    kevin.lewis@oracle.com-20130626194505-muocxuem7bd2wiw8
      bug#16802288 - FAILING ASSERTION: PREBUILT->SQL_STAT_START ||
      TRX->STATE == TRX_STATE_ACTIVE
      
      Add error handling for DB_DEADLOCK and DB_LOCK_TABLE_FULL to
      handler::records() for COUNT(*).  Also rollback transaction when
      handler::records receive DB_DEADLOCK, DB_LOCK_TABLE_FULL or
      DB_LOCK_WAIT_TIMEOUT.
    
    However: thd_mark_transaction_to_rollback() isn't enough.
    The optimizer needs to abort immediately for the cases mentioned above.
    
    Fix: improve error handling for all calls to handler::records()
    Add a new public function ha_records() which does the error checking,
    make handler::records() protected.
Loading