1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

MDEV-28959 Online alter ignores strict table mode

* don't disable warnings when catching up
* do propagate warnings up like copy_data_between_tables() does
This commit is contained in:
Sergei Golubchik
2022-06-30 12:12:00 +02:00
parent 13f1e970a1
commit 93049e3de6
3 changed files with 58 additions and 2 deletions

View File

@ -582,3 +582,33 @@ set debug_sync= 'reset';
drop table t1;
drop table t2;
drop table t3;
#
# MDEV-28959 Online alter ignores strict table mode
#
create table t1 (a int);
insert into t1 values (1),(2),(3);
set debug_sync= 'now wait_for downgraded';
connection con2;
set sql_mode='STRICT_TRANS_TABLES,STRICT_ALL_TABLES';
set debug_sync= 'alter_table_online_downgraded signal downgraded wait_for goforit';
alter table t1 modify a int not null, algorithm=copy, lock=none;
connection default;
insert into t1 values (null),(null);
set debug_sync= 'now signal goforit';
connection con2;
ERROR 01000: Data truncated for column 'a' at row 4
show create table t1;
Table Create Table
t1 CREATE TABLE `t1` (
`a` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci
select * from t1;
a
1
2
3
NULL
NULL
connection default;
drop table t1;
set debug_sync= reset;