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
b3bd51c9
Commit
b3bd51c9
authored
Jul 15, 2019
by
Sergei Petrunia
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix rocksdb.autoinc_vars_thread test
parent
9ccbe8d5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
4 deletions
+12
-4
storage/rocksdb/ha_rocksdb.cc
storage/rocksdb/ha_rocksdb.cc
+1
-0
storage/rocksdb/mysql-test/rocksdb/r/autoinc_vars_thread.result
...e/rocksdb/mysql-test/rocksdb/r/autoinc_vars_thread.result
+3
-2
storage/rocksdb/mysql-test/rocksdb/t/autoinc_vars_thread.test
...age/rocksdb/mysql-test/rocksdb/t/autoinc_vars_thread.test
+8
-2
No files found.
storage/rocksdb/ha_rocksdb.cc
View file @
b3bd51c9
...
...
@@ -12178,6 +12178,7 @@ void ha_rocksdb::get_auto_increment(ulonglong off, ulonglong inc,
an actual reserve of some values might be a better solution.
*/
DEBUG_SYNC
(
ha_thd
(),
"rocksdb.autoinc_vars"
);
DEBUG_SYNC
(
ha_thd
(),
"rocksdb.autoinc_vars2"
);
if
(
off
>
inc
)
{
off
=
1
;
...
...
storage/rocksdb/mysql-test/rocksdb/r/autoinc_vars_thread.result
View file @
b3bd51c9
...
...
@@ -12,17 +12,18 @@ SET auto_increment_increment = 2;
SET auto_increment_offset = 1;
connect con3, localhost, root,,;
connection con1;
SET debug_sync='rocksdb.autoinc_vars2 SIGNAL go2';
SET debug_sync='rocksdb.autoinc_vars SIGNAL parked1 WAIT_FOR go1';
INSERT INTO t1 VALUES(NULL);
connection default;
SET debug_sync='now WAIT_FOR parked1';
connection con2;
SET debug_sync='rocksdb.autoinc_vars SIGNAL parked2 WAIT_FOR go2';
INSERT INTO t1 VALUES(NULL);
connection default;
SET debug_sync='now WAIT_FOR parked1';
SET debug_sync='now WAIT_FOR parked2';
SET debug_sync='now SIGNAL go1';
connection con3;
SET debug_sync='now SIGNAL go2';
connection default;
connection con1;
connection con2;
...
...
storage/rocksdb/mysql-test/rocksdb/t/autoinc_vars_thread.test
View file @
b3bd51c9
...
...
@@ -23,22 +23,28 @@ connect (con3, localhost, root,,);
# Start each thread on an insert that will block waiting for a signal
connection
con1
;
SET
debug_sync
=
'rocksdb.autoinc_vars2 SIGNAL go2'
;
SET
debug_sync
=
'rocksdb.autoinc_vars SIGNAL parked1 WAIT_FOR go1'
;
send
INSERT
INTO
t1
VALUES
(
NULL
);
connection
default
;
SET
debug_sync
=
'now WAIT_FOR parked1'
;
connection
con2
;
SET
debug_sync
=
'rocksdb.autoinc_vars SIGNAL parked2 WAIT_FOR go2'
;
send
INSERT
INTO
t1
VALUES
(
NULL
);
# Wait for both threads to be at debug_sync point
connection
default
;
SET
debug_sync
=
'now WAIT_FOR parked1'
;
SET
debug_sync
=
'now WAIT_FOR parked2'
;
# Signal both threads to continue
# (In MariaDB, we signal one of them which continues and signals the other)
send
SET
debug_sync
=
'now SIGNAL go1'
;
connection
con3
;
SET
debug_sync
=
'now SIGNAL go2'
;
# MariaDB: do nothing here
connection
default
;
reap
;
...
...
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