Commit 59fcbf72 authored by Alice Sherepa's avatar Alice Sherepa

innodb suite (force_recovery)

parent 3a75ef0e
......@@ -13,19 +13,19 @@ f1 f2
insert into t1 values(2, 3);
ERROR HY000: Table 't1' is read only
alter table t1 add f3 int not null, algorithm=copy;
ERROR HY000: InnoDB is in read only mode.
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 165 "Table is read only")
alter table t1 add f3 int not null, algorithm=inplace;
ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Running in read-only mode. Try ALGORITHM=COPY.
drop index idx on t1;
ERROR HY000: InnoDB is in read only mode.
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 165 "Table is read only")
update t1 set f1=3 where f2=2;
ERROR HY000: Table 't1' is read only
create table t3(f1 int not null)engine=innodb;
ERROR HY000: InnoDB is in read only mode.
ERROR HY000: Can't create table `test`.`t3` (errno: 165 "Table is read only")
drop table t3;
ERROR 42S02: Unknown table 'test.t3'
rename table t1 to t3;
ERROR HY000: Error on rename of './test/t1' to './test/t3' (errno: 165 - Table is read only)
ERROR HY000: Error on rename of './test/t1' to './test/t3' (errno: 165 "Table is read only")
truncate table t1;
ERROR HY000: Table 't1' is read only
drop table t1;
......@@ -40,23 +40,23 @@ f1 f2
insert into t2 values(2, 3);
ERROR HY000: Table 't2' is read only
alter table t2 add f3 int not null, algorithm=copy;
ERROR HY000: InnoDB is in read only mode.
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 165 "Table is read only")
alter table t2 add f3 int not null, algorithm=inplace;
ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Running in read-only mode. Try ALGORITHM=COPY.
drop index idx on t2;
ERROR HY000: InnoDB is in read only mode.
ERROR HY000: Can't create table `test`.`#sql-temporary` (errno: 165 "Table is read only")
update t2 set f1=3 where f2=2;
ERROR HY000: Table 't2' is read only
create table t4(f1 int not null)engine=innodb;
ERROR HY000: InnoDB is in read only mode.
ERROR HY000: Can't create table `test`.`t4` (errno: 165 "Table is read only")
drop table t4;
ERROR 42S02: Unknown table 'test.t4'
rename table t2 to t3;
ERROR HY000: Error on rename of './test/t2' to './test/t3' (errno: 165 - Table is read only)
ERROR HY000: Error on rename of './test/t2' to './test/t3' (errno: 165 "Table is read only")
truncate table t2;
ERROR HY000: Table 't2' is read only
drop table t2;
ERROR 42S02: Unknown table 'test.t2'
ERROR HY000: Table 't2' is read only
show tables;
Tables_in_test
t2
......@@ -66,25 +66,25 @@ select * from t2;
f1 f2
1 2
insert into t2 values(2, 3);
ERROR HY000: Can't lock file (errno: 165 - Table is read only)
ERROR HY000: Table 't2' is read only
alter table t2 add f3 int not null, algorithm=copy;
ERROR HY000: Can't lock file (errno: 165 - Table is read only)
ERROR HY000: Table 't2' is read only
alter table t2 add f3 int not null, algorithm=inplace;
ERROR 0A000: ALGORITHM=INPLACE is not supported. Reason: Running in read-only mode. Try ALGORITHM=COPY.
drop index idx on t2;
ERROR HY000: Can't lock file (errno: 165 - Table is read only)
ERROR HY000: Table 't2' is read only
update t2 set f1=3 where f2=2;
ERROR HY000: Can't lock file (errno: 165 - Table is read only)
ERROR HY000: Table 't2' is read only
create table t4(f1 int not null)engine=innodb;
ERROR HY000: InnoDB is in read only mode.
ERROR HY000: Can't create table `test`.`t4` (errno: 165 "Table is read only")
drop table t4;
ERROR 42S02: Unknown table 'test.t4'
rename table t2 to t3;
ERROR HY000: Error on rename of './test/t2' to './test/t3' (errno: 165 - Table is read only)
ERROR HY000: Error on rename of './test/t2' to './test/t3' (errno: 165 "Table is read only")
truncate table t2;
ERROR HY000: Table 't2' is read only
drop table t2;
ERROR 42S02: Unknown table 'test.t2'
ERROR HY000: Table 't2' is read only
show tables;
Tables_in_test
t2
......
......@@ -32,23 +32,7 @@ CREATE UNIQUE INDEX idxē ON corrupt_bit_test_ā(z, b);
SELECT * FROM corrupt_bit_test_ā;
select @@unique_checks;
select @@innodb_change_buffering_debug;
# Create enough rows for the table, so that the insert buffer will be
# used for modifying the secondary index page. There must be multiple
# index pages, because changes to the root page are never buffered.
INSERT INTO corrupt_bit_test_ā SELECT 0,b,c+1,z+1 FROM corrupt_bit_test_ā;
INSERT INTO corrupt_bit_test_ā SELECT 0,b,c+10,z+10 FROM corrupt_bit_test_ā;
INSERT INTO corrupt_bit_test_ā SELECT 0,b,c+20,z+20 FROM corrupt_bit_test_ā;
INSERT INTO corrupt_bit_test_ā SELECT 0,b,c+50,z+50 FROM corrupt_bit_test_ā;
INSERT INTO corrupt_bit_test_ā SELECT 0,b,c+100,z+100 FROM corrupt_bit_test_ā;
INSERT INTO corrupt_bit_test_ā SELECT 0,b,c+200,z+200 FROM corrupt_bit_test_ā;
INSERT INTO corrupt_bit_test_ā SELECT 0,b,c+400,z+400 FROM corrupt_bit_test_ā;
INSERT INTO corrupt_bit_test_ā SELECT 0,b,c+800,z+800 FROM corrupt_bit_test_ā;
INSERT INTO corrupt_bit_test_ā SELECT 0,b,c+1600,z+1600 FROM corrupt_bit_test_ā;
INSERT INTO corrupt_bit_test_ā SELECT 0,b,c+4000,z+4000 FROM corrupt_bit_test_ā;
select count(*) from corrupt_bit_test_ā;
......@@ -86,7 +70,6 @@ delete from corrupt_bit_test_ā where a = 10001;
insert into corrupt_bit_test_ā values (10001, "a", 20001, 20001);
rollback;
# Drop one corrupted index before reboot
drop index idxā on corrupt_bit_test_ā;
check table corrupt_bit_test_ā;
......
......@@ -47,19 +47,22 @@ select * from t1;
--error ER_OPEN_AS_READONLY
insert into t1 values(2, 3);
--error ER_INNODB_READ_ONLY
--replace_regex /#sql-[0-9a-f_]*/#sql-temporary/
--error ER_CANT_CREATE_TABLE
alter table t1 add f3 int not null, algorithm=copy;
--replace_regex /#sql-[0-9a-f_]*/#sql-temporary/
--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
alter table t1 add f3 int not null, algorithm=inplace;
--error ER_INNODB_READ_ONLY
--replace_regex /#sql-[0-9a-f_]*/#sql-temporary/
--error ER_CANT_CREATE_TABLE
drop index idx on t1;
--error ER_OPEN_AS_READONLY
update t1 set f1=3 where f2=2;
--error ER_INNODB_READ_ONLY
--error ER_CANT_CREATE_TABLE
create table t3(f1 int not null)engine=innodb;
--error ER_BAD_TABLE_ERROR
......@@ -107,19 +110,22 @@ select * from t2;
--error ER_OPEN_AS_READONLY
insert into t2 values(2, 3);
--error ER_INNODB_READ_ONLY
--replace_regex /#sql-[0-9a-f_]*/#sql-temporary/
--error ER_CANT_CREATE_TABLE
alter table t2 add f3 int not null, algorithm=copy;
--replace_regex /#sql-[0-9a-f_]*/#sql-temporary/
--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
alter table t2 add f3 int not null, algorithm=inplace;
--error ER_INNODB_READ_ONLY
--replace_regex /#sql-[0-9a-f_]*/#sql-temporary/
--error ER_CANT_CREATE_TABLE
drop index idx on t2;
--error ER_OPEN_AS_READONLY
update t2 set f1=3 where f2=2;
--error ER_INNODB_READ_ONLY
--error ER_CANT_CREATE_TABLE
create table t4(f1 int not null)engine=innodb;
--error ER_BAD_TABLE_ERROR
......@@ -131,7 +137,7 @@ rename table t2 to t3;
--error ER_OPEN_AS_READONLY
truncate table t2;
--error ER_BAD_TABLE_ERROR
--error ER_OPEN_AS_READONLY
drop table t2;
show tables;
......@@ -165,22 +171,22 @@ show tables;
select * from t2;
--error ER_CANT_LOCK
--error ER_OPEN_AS_READONLY
insert into t2 values(2, 3);
--error ER_CANT_LOCK
--error ER_OPEN_AS_READONLY
alter table t2 add f3 int not null, algorithm=copy;
--error ER_ALTER_OPERATION_NOT_SUPPORTED_REASON
alter table t2 add f3 int not null, algorithm=inplace;
--error ER_CANT_LOCK
--error ER_OPEN_AS_READONLY
drop index idx on t2;
--error ER_CANT_LOCK
--error ER_OPEN_AS_READONLY
update t2 set f1=3 where f2=2;
--error ER_INNODB_READ_ONLY
--error ER_CANT_CREATE_TABLE
create table t4(f1 int not null)engine=innodb;
--error ER_BAD_TABLE_ERROR
......@@ -192,7 +198,7 @@ rename table t2 to t3;
--error ER_OPEN_AS_READONLY
truncate table t2;
--error ER_BAD_TABLE_ERROR
--error ER_OPEN_AS_READONLY
drop table t2;
show tables;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment