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
a1141e22
Commit
a1141e22
authored
Dec 08, 2017
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix nullable autoinc test w/o versioning
parent
e77080c7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
1 deletion
+18
-1
mysql-test/suite/versioning/r/alter.result
mysql-test/suite/versioning/r/alter.result
+10
-0
mysql-test/suite/versioning/t/alter.test
mysql-test/suite/versioning/t/alter.test
+7
-0
sql/handler.cc
sql/handler.cc
+1
-1
No files found.
mysql-test/suite/versioning/r/alter.result
View file @
a1141e22
...
...
@@ -398,6 +398,16 @@ t CREATE TABLE `t` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1
call verify_vtq;
No A B C D
create or replace table t (a int);
insert t values (1),(2),(3),(4);
alter table t add b int auto_increment null unique;
select * from t;
a b
1 1
2 2
3 3
4 4
drop table t;
create or replace table t (a int) with system versioning engine=innodb;
insert into t values (1), (2), (3);
delete from t where a<3;
...
...
mysql-test/suite/versioning/t/alter.test
View file @
a1141e22
...
...
@@ -205,6 +205,13 @@ alter table t drop system versioning, algorithm=copy;
show
create
table
t
;
call
verify_vtq
;
# nullable autoinc test w/o versioning
create
or
replace
table
t
(
a
int
);
insert
t
values
(
1
),(
2
),(
3
),(
4
);
alter
table
t
add
b
int
auto_increment
null
unique
;
select
*
from
t
;
drop
table
t
;
create
or
replace
table
t
(
a
int
)
with
system
versioning
engine
=
innodb
;
insert
into
t
values
(
1
),
(
2
),
(
3
);
delete
from
t
where
a
<
3
;
...
...
sql/handler.cc
View file @
a1141e22
...
...
@@ -3071,8 +3071,8 @@ int handler::update_auto_increment()
table
->
next_number_field
->
set_null
();
DBUG_RETURN
(
0
);
}
table
->
next_number_field
->
set_notnull
();
}
table
->
next_number_field
->
set_notnull
();
}
/*
...
...
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