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

errors after altering a table has finished aren't fatal

We cannot revert the ALTER, so anything happening after
the point of no return should not be treated as an error. A
very unfortunate condition that a user needs to be warned about - yes,
but we cannot say "ALTER TABLE has failed" if the table was successfully
altered.
This commit is contained in:
Sergei Golubchik
2021-07-01 13:33:38 +02:00
parent 0ad8a825a8
commit b5f50e2de8
5 changed files with 39 additions and 54 deletions

View File

@@ -102,7 +102,9 @@ drop table t1;
create table t1 (a int, b int) engine=aria select seq as a,seq+10 as b from seq_1_to_10;
lock table t1 write;
alter table t1 add column c int, engine=s3;
ERROR HY000: Table 't1' is read only
Warnings:
Warning 1036 Table 't1' is read only
Warning 1213 Deadlock found when trying to get lock; try restarting transaction
unlock tables;
select count(*), sum(a), sum(b), sum(c) from t1;
count(*) sum(a) sum(b) sum(c)