Advertisement
Guest User

Untitled

a guest
Mar 4th, 2015
211
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. if (thd_sql_command(user_thd) == SQLCOM_INSERT
  2. || thd_sql_command(user_thd) == SQLCOM_REPLACE) {
  3. dict_table_t* ib_table = prebuilt->table;
  4.  
  5. /* Acquire the AUTOINC mutex. */
  6. dict_table_autoinc_lock(ib_table);
  7.  
  8. /* We need to check that another transaction isn't
  9. already holding the AUTOINC lock on the table. */
  10. if (ib_table->n_waiting_or_granted_auto_inc_locks) {
  11. /* Release the mutex to avoid deadlocks. */
  12. dict_table_autoinc_unlock(ib_table);
  13. } else {
  14. fprintf(stderr, "fallback ha_innodb.cc\n");
  15. break; // This happens on MASTER
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement