1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

fix nullable autoinc test w/o versioning

This commit is contained in:
Sergei Golubchik
2017-12-08 16:29:16 +01:00
parent e77080c7d5
commit a1141e226d
3 changed files with 18 additions and 1 deletions

View File

@@ -398,6 +398,16 @@ t CREATE TABLE `t` (
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
call verify_vtq; call verify_vtq;
No A B C D 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; create or replace table t (a int) with system versioning engine=innodb;
insert into t values (1), (2), (3); insert into t values (1), (2), (3);
delete from t where a<3; delete from t where a<3;

View File

@@ -205,6 +205,13 @@ alter table t drop system versioning, algorithm=copy;
show create table t; show create table t;
call verify_vtq; 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; create or replace table t (a int) with system versioning engine=innodb;
insert into t values (1), (2), (3); insert into t values (1), (2), (3);
delete from t where a<3; delete from t where a<3;

View File

@@ -3071,8 +3071,8 @@ int handler::update_auto_increment()
table->next_number_field->set_null(); table->next_number_field->set_null();
DBUG_RETURN(0); DBUG_RETURN(0);
} }
table->next_number_field->set_notnull();
} }
table->next_number_field->set_notnull();
} }
/* /*