create table t1(f1 int not null, f2 int not null, index idx(f2))engine=innodb;
create table t2(f1 int primary key, f2 int, index idx(f2))engine=innodb;
insert into t1 values(1, 2);
insert into t2 values(1, 2); SET GLOBAL innodb_fast_shutdown = 0;
# restart: --innodb-log-recovery-target=20480
SELECT COUNT(*) FROM INFORMATION_SCHEMA.ENGINES
WHERE engine = 'innodb' AND support IN ('YES', 'DEFAULT', 'ENABLED');
COUNT(*) 0
FOUND 1 /InnoDB: cannot fulfill innodb_log_recovery_target=20480<.*/ in mysqld.1.err
# restart: --innodb-force-recovery=4
select variable_name,variable_value from information_schema.global_status
WHERE variable_name LIKE 'innodb_buffer_pool_%_requests';
variable_name variable_value
INNODB_BUFFER_POOL_READ_REQUESTS 0
INNODB_BUFFER_POOL_WRITE_REQUESTS 0
select * from t1;
f1 f2 12
select variable_name from information_schema.global_status
WHERE variable_name LIKE 'innodb_buffer_pool_%_requests'and variable_value>0;
variable_name
INNODB_BUFFER_POOL_READ_REQUESTS
begin;
insert into t1 values(2, 3);
rollback;
select variable_name from information_schema.global_status
WHERE variable_name LIKE 'innodb_buffer_pool_%_requests'and variable_value>0;
variable_name
INNODB_BUFFER_POOL_READ_REQUESTS
INNODB_BUFFER_POOL_WRITE_REQUESTS
alter table t1 add f3 int not null, algorithm=copy;
alter table t1 add f4 int not null, algorithm=inplace;
drop index idx on t1;
update t1 set f1=3 where f2=2;
create table t3(f1 int not null)engine=innodb;
drop table t3;
rename table t1 to t3;
rename table t3 to t1;
truncate table t1;
show tables;
Tables_in_test
t1
t2
# restart: --innodb-force-recovery=5
select * from t2;
f1 f2 12
insert into t2 values(2, 3); ERROR HY000: Running in read-only mode
alter table t2 add f3 int not null, algorithm=copy; ERROR HY000: Can't create temporary table for ALTER TABLE `test`.`t2` (errno: 165 "Table is read only")
alter table t2 add f3 int not null, algorithm=inplace; ERROR0A000: ALGORITHM=INPLACE is not supported. Reason: Running in read-only mode. Try ALGORITHM=COPY
drop index idx on t2; ERROR HY000: Can't create temporary table for ALTER TABLE `test`.`t2` (errno: 165 "Table is read only")
update t2 set f1=3 where f2=2; ERROR HY000: Running in read-only mode
create table t3(f1 int not null)engine=innodb; ERROR HY000: Can't create table `test`.`t3` (errno: 165 "Table is read only")
drop table t3; ERROR HY000: Table 't3' is read only
rename table t2 to t3; 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 HY000: Table 't2' is read only
create schema db;
drop schema db;
show tables;
Tables_in_test
t1
t2
# restart: --innodb-force-recovery=6
select * from t2;
f1 f2 12
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: Table 't2' is read only
alter table t2 add f3 int not null, algorithm=inplace; ERROR0A000: ALGORITHM=INPLACE is not supported. Reason: Running in read-only mode. Try ALGORITHM=COPY
drop index idx on t2; ERROR HY000: Table 't2' is read only
update t2 set f1=3 where f2=2; ERROR HY000: Table 't2' is read only
create table t3(f1 int not null)engine=innodb; ERROR HY000: Can't create table `test`.`t3` (errno: 165 "Table is read only")
drop table t1; ERROR HY000: Table 't1' is read only
rename table t2 to t3; 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 HY000: Table 't2' is read only
show tables;
Tables_in_test
t1
t2
# restart: --innodb-force-recovery=2
select * from t2;
f1 f2 12
begin;
update t2 set f2=3;
connect con1,localhost,root,,;
# Force a redo log flush of the above uncommitted UPDATE SET GLOBAL innodb_flush_log_at_trx_commit=1;
drop table t1;
disconnect con1;
connection default;
# Kill the server
# restart: --innodb-force-recovery=3 SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
select * from t2;
f1 f2 13 SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;
select * from t2;
f1 f2 12 SET SESSION innodb_lock_wait_timeout=1;
insert into t2 values(1,2); ERROR HY000: Lock wait timeout exceeded; try restarting transaction
insert into t2 values(9,10);
# restart
select * from t2;
f1 f2 12 910
drop table t2;
show tables;
Tables_in_test
Messung V0.5 in Prozent
¤ Dauer der Verarbeitung: 0.9 Sekunden
(vorverarbeitet am 2026-10-08)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.