forked from percona/percona-server
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'bug1486747-5.5' into bug1486747-5.6.
Additionally re-record innodb.innodb-alter-autoinc to account for autoinc gaps resulting from InnoDB reserving autoinc values more closely to the estimated row count for bulk inserts.
- Loading branch information
Showing
12 changed files
with
118 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
SELECT @@innodb_autoinc_lock_mode; | ||
@@innodb_autoinc_lock_mode | ||
1 | ||
CREATE TABLE `test` ( | ||
`test_id` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, | ||
`testcol` varchar(256) | ||
) ENGINE=InnoDB; | ||
INSERT INTO `test` (`testcol`) VALUES ('aldsldjfhasjk'); | ||
SET SESSION auto_increment_increment = 2; | ||
SET DEBUG_SYNC="ib_after_row_insert SIGNAL insert_1_ready WAIT_FOR insert_1_finish"; | ||
INSERT INTO `test` (`testcol`) VALUES ('aldsldjfhasjk'); | ||
SET SESSION auto_increment_increment = 2; | ||
SET DEBUG_SYNC="now WAIT_FOR insert_1_ready"; | ||
SET DEBUG_SYNC="ib_before_row_insert SIGNAL insert_1_finish WAIT_FOR insert_2_finish"; | ||
INSERT INTO `test` (`testcol`) VALUES ('aldsldjfhasjk'); | ||
SET DEBUG_SYNC="now SIGNAL insert_2_finish"; | ||
SELECT * FROM test; | ||
test_id testcol | ||
1 aldsldjfhasjk | ||
3 aldsldjfhasjk | ||
5 aldsldjfhasjk | ||
DROP TABLE test; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# | ||
# Test for bug #76872: InnoDB AUTO_INCREMENT produces same value twice | ||
# | ||
--source include/have_innodb.inc | ||
--source include/have_debug_sync.inc | ||
--source include/count_sessions.inc | ||
|
||
# Should be != 0 | ||
SELECT @@innodb_autoinc_lock_mode; | ||
|
||
CREATE TABLE `test` ( | ||
`test_id` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, | ||
`testcol` varchar(256) | ||
) ENGINE=InnoDB; | ||
|
||
INSERT INTO `test` (`testcol`) VALUES ('aldsldjfhasjk'); | ||
|
||
SET SESSION auto_increment_increment = 2; | ||
SET DEBUG_SYNC="ib_after_row_insert SIGNAL insert_1_ready WAIT_FOR insert_1_finish"; | ||
send INSERT INTO `test` (`testcol`) VALUES ('aldsldjfhasjk'); | ||
--connect(con1,localhost,root,,) | ||
--connection con1 | ||
SET SESSION auto_increment_increment = 2; | ||
SET DEBUG_SYNC="now WAIT_FOR insert_1_ready"; | ||
SET DEBUG_SYNC="ib_before_row_insert SIGNAL insert_1_finish WAIT_FOR insert_2_finish"; | ||
send INSERT INTO `test` (`testcol`) VALUES ('aldsldjfhasjk'); | ||
--connection default | ||
reap; | ||
SET DEBUG_SYNC="now SIGNAL insert_2_finish"; | ||
--connection con1 | ||
reap; | ||
--disconnect con1 | ||
--connection default | ||
|
||
SELECT * FROM test; | ||
|
||
DROP TABLE test; | ||
--source include/wait_until_count_sessions.inc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters