-
unknown authored
Bug #16979: AUTO_INC lock in InnoDB works a table level lock Add a table level counter that tracks the number of AUTOINC locks that are pending and/or granted on a table. We peek at this value to determine whether a transaction doing a simple INSERT in innodb_autoinc_lock_mode = 1, needs to acquire the AUTOINC lock or not. This change is related to Bug# 16979. Bug #27950: Duplicate entry error in auto-inc after mysqld restart We check whether the AUTOINC sub-system has been initialized (first) by holding the AUTOINC mutex and if initialization is required then we initialize using our normal procedure. storage/innobase/dict/dict0boot.c: Apply InnoDB snapshot innodb-5.1-ss1751. storage/innobase/dict/dict0crea.c: Apply InnoDB snapshot innodb-5.1-ss1751. storage/innobase/dict/dict0load.c: Apply InnoDB snapshot innodb-5.1-ss1751. storage/innobase/dict/dict0mem.c: Apply InnoDB snapshot innodb-5.1-ss1751. Revision r1749: Add a table level counter that tracks the number of AUTOINC locks that are pending and/or granted on a table. We peek at this value to determine whether a transaction doing a simple INSERT in innodb_autoinc_lock_mode = 1, needs to acquire the AUTOINC lock or not. This change is related to Bug# 16979. storage/innobase/handler/ha_innodb.cc: Apply InnoDB snapshot innodb-5.1-ss1751. Revision r1735: Add variable "innodb_autoinc_lock_mode" to control the behavior of the AUTOINC locking. There are three modes, 0 for backward compatibility, 1 for the new style locking (default, safe for statement-based replication) and 2 for no AUTOINC locking (unsafe for statement-based replication). Revision r1750: We check whether the AUTOINC sub-system has been initialized (first) by holding the AUTOINC mutex and if initialization is required then we initialize using our normal procedure. This change is related to Bug#27950. Revision r1746: Remove some code from ha_innodb.cc that was already enclosed in #if 0. The code was related to replication and group commit, and it was unreachable already as of MySQL 5.0. Approved by Heikki Revision r1749: Add a table level counter that tracks the number of AUTOINC locks that are pending and/or granted on a table. We peek at this value to determine whether a transaction doing a simple INSERT in innodb_autoinc_lock_mode = 1, needs to acquire the AUTOINC lock or not. This change is related to Bug# 16979. storage/innobase/include/dict0mem.h: Apply InnoDB snapshot innodb-5.1-ss1751. Revision r1749: Add a table level counter that tracks the number of AUTOINC locks that are pending and/or granted on a table. We peek at this value to determine whether a transaction doing a simple INSERT in innodb_autoinc_lock_mode = 1, needs to acquire the AUTOINC lock or not. This change is related to Bug# 16979. Revision r1747: Correct an outdated comment about dict_table_t:col_names that should have been adjusted in r1719, or r1264 in branches/zip. storage/innobase/include/mem0mem.ic: Apply InnoDB snapshot innodb-5.1-ss1751. Revision r1744: Merge r1739 from branches/zip: mem_heap_free_heap_top(): Declare the memory freed with UNIV_MEM_FREE(). Before this change, the memory freed by mem_heap_empty() was not completely flagged free in UNIV_DEBUG_VALGRIND builds. After this change, Valgrind will hopefully catch all errors caught by UNIV_MEM_DEBUG. storage/innobase/include/sync0rw.ic: Apply InnoDB snapshot innodb-5.1-ss1751. Revision r1751: rw_lock_s_lock_func(): Correct a typo in a comment. storage/innobase/include/trx0trx.h: Apply InnoDB snapshot innodb-5.1-ss1751. Revision r1742: Remove some unused fields of trx_t: mysql_master_log_file_name, mysql_master_log_pos, repl_wait_binlog_name, repl_wait_binlog_pos. Approved by Heikki. storage/innobase/lock/lock0lock.c: Apply InnoDB snapshot innodb-5.1-ss1751. Revision r1749: Add a table level counter that tracks the number of AUTOINC locks that are pending and/or granted on a table. We peek at this value to determine whether a transaction doing a simple INSERT in innodb_autoinc_lock_mode = 1, needs to acquire the AUTOINC lock or not. This change is related to Bug# 16979. storage/innobase/mtr/mtr0log.c: Apply InnoDB snapshot innodb-5.1-ss1751. storage/innobase/pars/pars0pars.c: Apply InnoDB snapshot innodb-5.1-ss1751. storage/innobase/srv/srv0srv.c: Apply InnoDB snapshot innodb-5.1-ss1751. storage/innobase/trx/trx0sys.c: Apply InnoDB snapshot innodb-5.1-ss1751. Revision r1743: trx_sys_print_mysql_binlog_offset_from_page(): Enclose the definition in #ifdef UNIV_HOTBACKUP, to match the function declaration. storage/innobase/trx/trx0trx.c: Apply InnoDB snapshot innodb-5.1-ss1751. Revision r1742: Remove some unused fields of trx_t: mysql_master_log_file_name, mysql_master_log_pos, repl_wait_binlog_name, repl_wait_binlog_pos. Approved by Heikki.
a859c594