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
7f73f5e4
Commit
7f73f5e4
authored
Aug 24, 2018
by
Sergei Petrunia
Committed by
GitHub
Aug 24, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #839 from minggr/fix-auto-inc
MDEV-16703: update AUTO_INCREMENT in the UPDATE statement
parents
9c5a0380
f7154242
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
19 additions
and
1 deletion
+19
-1
storage/rocksdb/ha_rocksdb.cc
storage/rocksdb/ha_rocksdb.cc
+1
-1
storage/rocksdb/mysql-test/rocksdb/r/autoinc_vars.result
storage/rocksdb/mysql-test/rocksdb/r/autoinc_vars.result
+8
-0
storage/rocksdb/mysql-test/rocksdb/t/autoinc_vars.test
storage/rocksdb/mysql-test/rocksdb/t/autoinc_vars.test
+10
-0
No files found.
storage/rocksdb/ha_rocksdb.cc
View file @
7f73f5e4
...
...
@@ -9553,7 +9553,7 @@ int ha_rocksdb::update_pk(const Rdb_key_def &kd,
}
}
if
(
table
->
next_number_field
)
{
if
(
table
->
found_
next_number_field
)
{
update_auto_incr_val_from_field
();
}
...
...
storage/rocksdb/mysql-test/rocksdb/r/autoinc_vars.result
View file @
7f73f5e4
...
...
@@ -150,3 +150,11 @@ CREATE TABLE t0(c0 BLOB) ENGINE=ROCKSDB;
INSERT INTO t0 VALUES(0);
ALTER TABLE t0 AUTO_INCREMENT=0;
DROP TABLE t0;
#---------------------------------------------------------------
# MDEV-16703 Assertion failed in load_auto_incr_value_from_index
#---------------------------------------------------------------
CREATE TABLE t1 (pk INT AUTO_INCREMENT, a INT, PRIMARY KEY(pk)) ENGINE=RocksDB;
INSERT INTO t1 (a) VALUES (1);
UPDATE t1 SET pk = 3;
ALTER TABLE t1 AUTO_INCREMENT 2;
DROP TABLE t1;
storage/rocksdb/mysql-test/rocksdb/t/autoinc_vars.test
View file @
7f73f5e4
...
...
@@ -116,3 +116,13 @@ CREATE TABLE t0(c0 BLOB) ENGINE=ROCKSDB;
INSERT
INTO
t0
VALUES
(
0
);
ALTER
TABLE
t0
AUTO_INCREMENT
=
0
;
DROP
TABLE
t0
;
--
echo
#---------------------------------------------------------------
--
echo
# MDEV-16703 Assertion failed in load_auto_incr_value_from_index
--
echo
#---------------------------------------------------------------
CREATE
TABLE
t1
(
pk
INT
AUTO_INCREMENT
,
a
INT
,
PRIMARY
KEY
(
pk
))
ENGINE
=
RocksDB
;
INSERT
INTO
t1
(
a
)
VALUES
(
1
);
UPDATE
t1
SET
pk
=
3
;
ALTER
TABLE
t1
AUTO_INCREMENT
2
;
DROP
TABLE
t1
;
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