Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
e4f70789
Commit
e4f70789
authored
Sep 19, 2016
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix sporadic innodb.auto_increment_dup failures
fix a race condition in the test
parent
398d33ce
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
5 deletions
+9
-5
mysql-test/suite/innodb/r/auto_increment_dup.result
mysql-test/suite/innodb/r/auto_increment_dup.result
+4
-2
mysql-test/suite/innodb/t/auto_increment_dup.test
mysql-test/suite/innodb/t/auto_increment_dup.test
+5
-3
No files found.
mysql-test/suite/innodb/r/auto_increment_dup.result
View file @
e4f70789
...
...
@@ -81,18 +81,20 @@ affected rows: 0
#
connect con1, localhost, root;
connect con2, localhost, root;
SET DEBUG_SYNC='now WAIT_FOR write_row_done';
connection con1;
#
# Connection 1
#
SET DEBUG_SYNC=
IF(@@innodb_autoinc_lock_mode > 0, 'ha_write_row_end WAIT_FOR continue', 'RESET')
;
SET DEBUG_SYNC=
'ha_write_row_end SIGNAL write_row_done WAIT_FOR continue'
;
affected rows: 0
INSERT INTO t1(k) VALUES (1), (2), (3) ON DUPLICATE KEY UPDATE c='1';
connection con2;
#
# Connection 2
#
SET DEBUG_SYNC=IF(@@innodb_autoinc_lock_mode > 0, 'execute_command_after_close_tables SIGNAL continue', 'RESET');
affected rows: 0
SET DEBUG_SYNC='execute_command_after_close_tables SIGNAL continue';
affected rows: 0
INSERT INTO t1(k) VALUES (2), (4), (5) ON DUPLICATE KEY UPDATE c='2';
ERROR HY000: Lock wait timeout exceeded; try restarting transaction
...
...
mysql-test/suite/innodb/t/auto_increment_dup.test
View file @
e4f70789
...
...
@@ -77,18 +77,20 @@ CREATE TABLE t1(
--
connect
(
con1
,
localhost
,
root
)
--
connect
(
con2
,
localhost
,
root
)
--
send
SET
DEBUG_SYNC
=
'now WAIT_FOR write_row_done'
--
connection
con1
--
echo
#
--
echo
# Connection 1
--
echo
#
SET
DEBUG_SYNC
=
IF
(
@@
innodb_autoinc_lock_mode
>
0
,
'ha_write_row_end WAIT_FOR continue'
,
'RESET'
)
;
SET
DEBUG_SYNC
=
'ha_write_row_end SIGNAL write_row_done WAIT_FOR continue'
;
--
send
INSERT
INTO
t1
(
k
)
VALUES
(
1
),
(
2
),
(
3
)
ON
DUPLICATE
KEY
UPDATE
c
=
'1'
--
connection
con2
--
echo
#
--
echo
# Connection 2
--
echo
#
SET
DEBUG_SYNC
=
IF
(
@@
innodb_autoinc_lock_mode
>
0
,
'execute_command_after_close_tables SIGNAL continue'
,
'RESET'
);
--
error
1205
--
reap
SET
DEBUG_SYNC
=
'execute_command_after_close_tables SIGNAL continue'
;
--
error
ER_LOCK_WAIT_TIMEOUT
INSERT
INTO
t1
(
k
)
VALUES
(
2
),
(
4
),
(
5
)
ON
DUPLICATE
KEY
UPDATE
c
=
'2'
;
--
connection
con1
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment