2017-04-26 12:53:13 +02:00
|
|
|
# Not supported in embedded
|
|
|
|
--source include/not_embedded.inc
|
|
|
|
|
|
|
|
# This test case needs InnoDB.
|
|
|
|
-- source include/have_innodb.inc
|
|
|
|
|
|
|
|
--disable_query_log
|
|
|
|
call mtr.add_suppression("InnoDB: Failed to find tablespace for table .* in the cache. Attempting to load the tablespace with space id");
|
|
|
|
call mtr.add_suppression("InnoDB: Allocated tablespace ID \\d+ for test.t[12], old maximum was");
|
2017-11-15 15:53:14 +01:00
|
|
|
call mtr.add_suppression("InnoDB: Allocated tablespace ID \\d+ for mysql.transaction_registry, old maximum was");
|
2017-04-26 12:53:13 +02:00
|
|
|
--enable_query_log
|
|
|
|
|
|
|
|
create table t1(f1 int not null, f2 int not null, index idx(f2))engine=innodb;
|
2017-06-23 08:46:51 +02:00
|
|
|
create table t2(f1 int primary key, f2 int, index idx(f2))engine=innodb;
|
2017-04-26 12:53:13 +02:00
|
|
|
insert into t1 values(1, 2);
|
|
|
|
insert into t2 values(1, 2);
|
|
|
|
|
|
|
|
SET GLOBAL innodb_fast_shutdown = 0;
|
|
|
|
|
|
|
|
--let $restart_parameters= --innodb-force-recovery=4
|
|
|
|
--source include/restart_mysqld.inc
|
2019-09-26 11:44:04 +02:00
|
|
|
let $status=`SHOW ENGINE INNODB STATUS`;
|
2017-04-26 12:53:13 +02:00
|
|
|
|
2024-10-03 09:55:08 +02:00
|
|
|
--disable_cursor_protocol
|
2023-12-06 16:27:23 +01:00
|
|
|
SELECT CAST(variable_value AS INTEGER) INTO @read1
|
|
|
|
FROM INFORMATION_SCHEMA.GLOBAL_STATUS
|
|
|
|
WHERE VARIABLE_NAME='innodb_buffer_pool_read_requests';
|
2024-10-03 09:55:08 +02:00
|
|
|
--enable_cursor_protocol
|
2023-12-06 16:27:23 +01:00
|
|
|
|
2017-04-26 12:53:13 +02:00
|
|
|
select * from t1;
|
|
|
|
|
2024-10-03 09:55:08 +02:00
|
|
|
--disable_cursor_protocol
|
2023-12-06 16:27:23 +01:00
|
|
|
SELECT CAST(variable_value AS INTEGER) INTO @read2
|
|
|
|
FROM INFORMATION_SCHEMA.GLOBAL_STATUS
|
|
|
|
WHERE VARIABLE_NAME='innodb_buffer_pool_read_requests';
|
2024-10-03 09:55:08 +02:00
|
|
|
--enable_cursor_protocol
|
2023-12-06 16:27:23 +01:00
|
|
|
|
|
|
|
SELECT @read1>0, @read2>@read1;
|
|
|
|
|
MDEV-19514 Defer change buffer merge until pages are requested
We will remove the InnoDB background operation of merging buffered
changes to secondary index leaf pages. Changes will only be merged as a
result of an operation that accesses a secondary index leaf page,
such as a SQL statement that performs a lookup via that index,
or is modifying the index. Also ROLLBACK and some background operations,
such as purging the history of committed transactions, or computing
index cardinality statistics, can cause change buffer merge.
Encryption key rotation will not perform change buffer merge.
The motivation of this change is to simplify the I/O logic and to
allow crash recovery to happen in the background (MDEV-14481).
We also hope that this will reduce the number of "mystery" crashes
due to corrupted data. Because change buffer merge will typically
take place as a result of executing SQL statements, there should be
a clearer connection between the crash and the SQL statements that
were executed when the server crashed.
In many cases, a slight performance improvement was observed.
This is joint work with Thirunarayanan Balathandayuthapani
and was tested by Axel Schwenke and Matthias Leich.
The InnoDB monitor counter innodb_ibuf_merge_usec will be removed.
On slow shutdown (innodb_fast_shutdown=0), we will continue to
merge all buffered changes (and purge all undo log history).
Two InnoDB configuration parameters will be changed as follows:
innodb_disable_background_merge: Removed.
This parameter existed only in debug builds.
All change buffer merges will use synchronous reads.
innodb_force_recovery will be changed as follows:
* innodb_force_recovery=4 will be the same as innodb_force_recovery=3
(the change buffer merge cannot be disabled; it can only happen as
a result of an operation that accesses a secondary index leaf page).
The option used to be capable of corrupting secondary index leaf pages.
Now that capability is removed, and innodb_force_recovery=4 becomes 'safe'.
* innodb_force_recovery=5 (which essentially hard-wires
SET GLOBAL TRANSACTION ISOLATION LEVEL READ UNCOMMITTED)
becomes safe to use. Bogus data can be returned to SQL, but
persistent InnoDB data files will not be corrupted further.
* innodb_force_recovery=6 (ignore the redo log files)
will be the only option that can potentially cause
persistent corruption of InnoDB data files.
Code changes:
buf_page_t::ibuf_exist: New flag, to indicate whether buffered
changes exist for a buffer pool page. Pages with pending changes
can be returned by buf_page_get_gen(). Previously, the changes
were always merged inside buf_page_get_gen() if needed.
ibuf_page_exists(const buf_page_t&): Check if a buffered changes
exist for an X-latched or read-fixed page.
buf_page_get_gen(): Add the parameter allow_ibuf_merge=false.
All callers that know that they may be accessing a secondary index
leaf page must pass this parameter as allow_ibuf_merge=true,
unless it does not matter for that caller whether all buffered
changes have been applied. Assert that whenever allow_ibuf_merge
holds, the page actually is a leaf page. Attempt change buffer
merge only to secondary B-tree index leaf pages.
btr_block_get(): Add parameter 'bool merge'.
All callers of btr_block_get() should know whether the page could be
a secondary index leaf page. If it is not, we should avoid consulting
the change buffer bitmap to even consider a merge. This is the main
interface to requesting index pages from the buffer pool.
ibuf_merge_or_delete_for_page(), recv_recover_page(): Replace
buf_page_get_known_nowait() with much simpler logic, because
it is now guaranteed that that the block is x-latched or read-fixed.
mlog_init_t::mark_ibuf_exist(): Renamed from mlog_init_t::ibuf_merge().
On crash recovery, we will no longer merge any buffered changes
for the pages that we read into the buffer pool during the last batch
of applying log records.
buf_page_get_gen_known_nowait(), BUF_MAKE_YOUNG, BUF_KEEP_OLD: Remove.
btr_search_guess_on_hash(): Merge buf_page_get_gen_known_nowait()
to its only remaining caller.
buf_page_make_young_if_needed(): Define as an inline function.
Add the parameter buf_pool.
buf_page_peek_if_young(), buf_page_peek_if_too_old(): Add the
parameter buf_pool.
fil_space_validate_for_mtr_commit(): Remove a bogus comment
about background merge of the change buffer.
btr_cur_open_at_rnd_pos_func(), btr_cur_search_to_nth_level_func(),
btr_cur_open_at_index_side_func(): Use narrower data types and scopes.
ibuf_read_merge_pages(): Replaces buf_read_ibuf_merge_pages().
Merge the change buffer by invoking buf_page_get_gen().
2019-10-11 16:28:15 +02:00
|
|
|
begin;
|
2017-04-26 12:53:13 +02:00
|
|
|
insert into t1 values(2, 3);
|
MDEV-19514 Defer change buffer merge until pages are requested
We will remove the InnoDB background operation of merging buffered
changes to secondary index leaf pages. Changes will only be merged as a
result of an operation that accesses a secondary index leaf page,
such as a SQL statement that performs a lookup via that index,
or is modifying the index. Also ROLLBACK and some background operations,
such as purging the history of committed transactions, or computing
index cardinality statistics, can cause change buffer merge.
Encryption key rotation will not perform change buffer merge.
The motivation of this change is to simplify the I/O logic and to
allow crash recovery to happen in the background (MDEV-14481).
We also hope that this will reduce the number of "mystery" crashes
due to corrupted data. Because change buffer merge will typically
take place as a result of executing SQL statements, there should be
a clearer connection between the crash and the SQL statements that
were executed when the server crashed.
In many cases, a slight performance improvement was observed.
This is joint work with Thirunarayanan Balathandayuthapani
and was tested by Axel Schwenke and Matthias Leich.
The InnoDB monitor counter innodb_ibuf_merge_usec will be removed.
On slow shutdown (innodb_fast_shutdown=0), we will continue to
merge all buffered changes (and purge all undo log history).
Two InnoDB configuration parameters will be changed as follows:
innodb_disable_background_merge: Removed.
This parameter existed only in debug builds.
All change buffer merges will use synchronous reads.
innodb_force_recovery will be changed as follows:
* innodb_force_recovery=4 will be the same as innodb_force_recovery=3
(the change buffer merge cannot be disabled; it can only happen as
a result of an operation that accesses a secondary index leaf page).
The option used to be capable of corrupting secondary index leaf pages.
Now that capability is removed, and innodb_force_recovery=4 becomes 'safe'.
* innodb_force_recovery=5 (which essentially hard-wires
SET GLOBAL TRANSACTION ISOLATION LEVEL READ UNCOMMITTED)
becomes safe to use. Bogus data can be returned to SQL, but
persistent InnoDB data files will not be corrupted further.
* innodb_force_recovery=6 (ignore the redo log files)
will be the only option that can potentially cause
persistent corruption of InnoDB data files.
Code changes:
buf_page_t::ibuf_exist: New flag, to indicate whether buffered
changes exist for a buffer pool page. Pages with pending changes
can be returned by buf_page_get_gen(). Previously, the changes
were always merged inside buf_page_get_gen() if needed.
ibuf_page_exists(const buf_page_t&): Check if a buffered changes
exist for an X-latched or read-fixed page.
buf_page_get_gen(): Add the parameter allow_ibuf_merge=false.
All callers that know that they may be accessing a secondary index
leaf page must pass this parameter as allow_ibuf_merge=true,
unless it does not matter for that caller whether all buffered
changes have been applied. Assert that whenever allow_ibuf_merge
holds, the page actually is a leaf page. Attempt change buffer
merge only to secondary B-tree index leaf pages.
btr_block_get(): Add parameter 'bool merge'.
All callers of btr_block_get() should know whether the page could be
a secondary index leaf page. If it is not, we should avoid consulting
the change buffer bitmap to even consider a merge. This is the main
interface to requesting index pages from the buffer pool.
ibuf_merge_or_delete_for_page(), recv_recover_page(): Replace
buf_page_get_known_nowait() with much simpler logic, because
it is now guaranteed that that the block is x-latched or read-fixed.
mlog_init_t::mark_ibuf_exist(): Renamed from mlog_init_t::ibuf_merge().
On crash recovery, we will no longer merge any buffered changes
for the pages that we read into the buffer pool during the last batch
of applying log records.
buf_page_get_gen_known_nowait(), BUF_MAKE_YOUNG, BUF_KEEP_OLD: Remove.
btr_search_guess_on_hash(): Merge buf_page_get_gen_known_nowait()
to its only remaining caller.
buf_page_make_young_if_needed(): Define as an inline function.
Add the parameter buf_pool.
buf_page_peek_if_young(), buf_page_peek_if_too_old(): Add the
parameter buf_pool.
fil_space_validate_for_mtr_commit(): Remove a bogus comment
about background merge of the change buffer.
btr_cur_open_at_rnd_pos_func(), btr_cur_search_to_nth_level_func(),
btr_cur_open_at_index_side_func(): Use narrower data types and scopes.
ibuf_read_merge_pages(): Replaces buf_read_ibuf_merge_pages().
Merge the change buffer by invoking buf_page_get_gen().
2019-10-11 16:28:15 +02:00
|
|
|
rollback;
|
2017-04-26 12:53:13 +02:00
|
|
|
|
|
|
|
alter table t1 add f3 int not null, algorithm=copy;
|
|
|
|
|
MDEV-19514 Defer change buffer merge until pages are requested
We will remove the InnoDB background operation of merging buffered
changes to secondary index leaf pages. Changes will only be merged as a
result of an operation that accesses a secondary index leaf page,
such as a SQL statement that performs a lookup via that index,
or is modifying the index. Also ROLLBACK and some background operations,
such as purging the history of committed transactions, or computing
index cardinality statistics, can cause change buffer merge.
Encryption key rotation will not perform change buffer merge.
The motivation of this change is to simplify the I/O logic and to
allow crash recovery to happen in the background (MDEV-14481).
We also hope that this will reduce the number of "mystery" crashes
due to corrupted data. Because change buffer merge will typically
take place as a result of executing SQL statements, there should be
a clearer connection between the crash and the SQL statements that
were executed when the server crashed.
In many cases, a slight performance improvement was observed.
This is joint work with Thirunarayanan Balathandayuthapani
and was tested by Axel Schwenke and Matthias Leich.
The InnoDB monitor counter innodb_ibuf_merge_usec will be removed.
On slow shutdown (innodb_fast_shutdown=0), we will continue to
merge all buffered changes (and purge all undo log history).
Two InnoDB configuration parameters will be changed as follows:
innodb_disable_background_merge: Removed.
This parameter existed only in debug builds.
All change buffer merges will use synchronous reads.
innodb_force_recovery will be changed as follows:
* innodb_force_recovery=4 will be the same as innodb_force_recovery=3
(the change buffer merge cannot be disabled; it can only happen as
a result of an operation that accesses a secondary index leaf page).
The option used to be capable of corrupting secondary index leaf pages.
Now that capability is removed, and innodb_force_recovery=4 becomes 'safe'.
* innodb_force_recovery=5 (which essentially hard-wires
SET GLOBAL TRANSACTION ISOLATION LEVEL READ UNCOMMITTED)
becomes safe to use. Bogus data can be returned to SQL, but
persistent InnoDB data files will not be corrupted further.
* innodb_force_recovery=6 (ignore the redo log files)
will be the only option that can potentially cause
persistent corruption of InnoDB data files.
Code changes:
buf_page_t::ibuf_exist: New flag, to indicate whether buffered
changes exist for a buffer pool page. Pages with pending changes
can be returned by buf_page_get_gen(). Previously, the changes
were always merged inside buf_page_get_gen() if needed.
ibuf_page_exists(const buf_page_t&): Check if a buffered changes
exist for an X-latched or read-fixed page.
buf_page_get_gen(): Add the parameter allow_ibuf_merge=false.
All callers that know that they may be accessing a secondary index
leaf page must pass this parameter as allow_ibuf_merge=true,
unless it does not matter for that caller whether all buffered
changes have been applied. Assert that whenever allow_ibuf_merge
holds, the page actually is a leaf page. Attempt change buffer
merge only to secondary B-tree index leaf pages.
btr_block_get(): Add parameter 'bool merge'.
All callers of btr_block_get() should know whether the page could be
a secondary index leaf page. If it is not, we should avoid consulting
the change buffer bitmap to even consider a merge. This is the main
interface to requesting index pages from the buffer pool.
ibuf_merge_or_delete_for_page(), recv_recover_page(): Replace
buf_page_get_known_nowait() with much simpler logic, because
it is now guaranteed that that the block is x-latched or read-fixed.
mlog_init_t::mark_ibuf_exist(): Renamed from mlog_init_t::ibuf_merge().
On crash recovery, we will no longer merge any buffered changes
for the pages that we read into the buffer pool during the last batch
of applying log records.
buf_page_get_gen_known_nowait(), BUF_MAKE_YOUNG, BUF_KEEP_OLD: Remove.
btr_search_guess_on_hash(): Merge buf_page_get_gen_known_nowait()
to its only remaining caller.
buf_page_make_young_if_needed(): Define as an inline function.
Add the parameter buf_pool.
buf_page_peek_if_young(), buf_page_peek_if_too_old(): Add the
parameter buf_pool.
fil_space_validate_for_mtr_commit(): Remove a bogus comment
about background merge of the change buffer.
btr_cur_open_at_rnd_pos_func(), btr_cur_search_to_nth_level_func(),
btr_cur_open_at_index_side_func(): Use narrower data types and scopes.
ibuf_read_merge_pages(): Replaces buf_read_ibuf_merge_pages().
Merge the change buffer by invoking buf_page_get_gen().
2019-10-11 16:28:15 +02:00
|
|
|
alter table t1 add f4 int not null, algorithm=inplace;
|
2017-04-26 12:53:13 +02:00
|
|
|
|
|
|
|
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;
|
MDEV-19514 Defer change buffer merge until pages are requested
We will remove the InnoDB background operation of merging buffered
changes to secondary index leaf pages. Changes will only be merged as a
result of an operation that accesses a secondary index leaf page,
such as a SQL statement that performs a lookup via that index,
or is modifying the index. Also ROLLBACK and some background operations,
such as purging the history of committed transactions, or computing
index cardinality statistics, can cause change buffer merge.
Encryption key rotation will not perform change buffer merge.
The motivation of this change is to simplify the I/O logic and to
allow crash recovery to happen in the background (MDEV-14481).
We also hope that this will reduce the number of "mystery" crashes
due to corrupted data. Because change buffer merge will typically
take place as a result of executing SQL statements, there should be
a clearer connection between the crash and the SQL statements that
were executed when the server crashed.
In many cases, a slight performance improvement was observed.
This is joint work with Thirunarayanan Balathandayuthapani
and was tested by Axel Schwenke and Matthias Leich.
The InnoDB monitor counter innodb_ibuf_merge_usec will be removed.
On slow shutdown (innodb_fast_shutdown=0), we will continue to
merge all buffered changes (and purge all undo log history).
Two InnoDB configuration parameters will be changed as follows:
innodb_disable_background_merge: Removed.
This parameter existed only in debug builds.
All change buffer merges will use synchronous reads.
innodb_force_recovery will be changed as follows:
* innodb_force_recovery=4 will be the same as innodb_force_recovery=3
(the change buffer merge cannot be disabled; it can only happen as
a result of an operation that accesses a secondary index leaf page).
The option used to be capable of corrupting secondary index leaf pages.
Now that capability is removed, and innodb_force_recovery=4 becomes 'safe'.
* innodb_force_recovery=5 (which essentially hard-wires
SET GLOBAL TRANSACTION ISOLATION LEVEL READ UNCOMMITTED)
becomes safe to use. Bogus data can be returned to SQL, but
persistent InnoDB data files will not be corrupted further.
* innodb_force_recovery=6 (ignore the redo log files)
will be the only option that can potentially cause
persistent corruption of InnoDB data files.
Code changes:
buf_page_t::ibuf_exist: New flag, to indicate whether buffered
changes exist for a buffer pool page. Pages with pending changes
can be returned by buf_page_get_gen(). Previously, the changes
were always merged inside buf_page_get_gen() if needed.
ibuf_page_exists(const buf_page_t&): Check if a buffered changes
exist for an X-latched or read-fixed page.
buf_page_get_gen(): Add the parameter allow_ibuf_merge=false.
All callers that know that they may be accessing a secondary index
leaf page must pass this parameter as allow_ibuf_merge=true,
unless it does not matter for that caller whether all buffered
changes have been applied. Assert that whenever allow_ibuf_merge
holds, the page actually is a leaf page. Attempt change buffer
merge only to secondary B-tree index leaf pages.
btr_block_get(): Add parameter 'bool merge'.
All callers of btr_block_get() should know whether the page could be
a secondary index leaf page. If it is not, we should avoid consulting
the change buffer bitmap to even consider a merge. This is the main
interface to requesting index pages from the buffer pool.
ibuf_merge_or_delete_for_page(), recv_recover_page(): Replace
buf_page_get_known_nowait() with much simpler logic, because
it is now guaranteed that that the block is x-latched or read-fixed.
mlog_init_t::mark_ibuf_exist(): Renamed from mlog_init_t::ibuf_merge().
On crash recovery, we will no longer merge any buffered changes
for the pages that we read into the buffer pool during the last batch
of applying log records.
buf_page_get_gen_known_nowait(), BUF_MAKE_YOUNG, BUF_KEEP_OLD: Remove.
btr_search_guess_on_hash(): Merge buf_page_get_gen_known_nowait()
to its only remaining caller.
buf_page_make_young_if_needed(): Define as an inline function.
Add the parameter buf_pool.
buf_page_peek_if_young(), buf_page_peek_if_too_old(): Add the
parameter buf_pool.
fil_space_validate_for_mtr_commit(): Remove a bogus comment
about background merge of the change buffer.
btr_cur_open_at_rnd_pos_func(), btr_cur_search_to_nth_level_func(),
btr_cur_open_at_index_side_func(): Use narrower data types and scopes.
ibuf_read_merge_pages(): Replaces buf_read_ibuf_merge_pages().
Merge the change buffer by invoking buf_page_get_gen().
2019-10-11 16:28:15 +02:00
|
|
|
rename table t3 to t1;
|
2017-04-26 12:53:13 +02:00
|
|
|
truncate table t1;
|
|
|
|
|
|
|
|
show tables;
|
|
|
|
|
|
|
|
--let $restart_parameters= --innodb-force-recovery=5
|
|
|
|
--source include/restart_mysqld.inc
|
2019-09-26 11:44:04 +02:00
|
|
|
let $status=`SHOW ENGINE INNODB STATUS`;
|
2017-04-26 12:53:13 +02:00
|
|
|
|
|
|
|
select * from t2;
|
|
|
|
|
|
|
|
--error ER_READ_ONLY_MODE
|
|
|
|
insert into t2 values(2, 3);
|
|
|
|
|
|
|
|
--error ER_CANT_CREATE_TABLE
|
|
|
|
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_CREATE_TABLE
|
|
|
|
drop index idx on t2;
|
|
|
|
|
|
|
|
--error ER_READ_ONLY_MODE
|
|
|
|
update t2 set f1=3 where f2=2;
|
|
|
|
|
|
|
|
--error ER_CANT_CREATE_TABLE
|
2019-05-28 15:43:02 +02:00
|
|
|
create table t3(f1 int not null)engine=innodb;
|
2017-04-26 12:53:13 +02:00
|
|
|
|
2020-06-01 22:27:14 +02:00
|
|
|
--error ER_OPEN_AS_READONLY
|
2019-05-28 15:43:02 +02:00
|
|
|
drop table t3;
|
2017-04-26 12:53:13 +02:00
|
|
|
|
|
|
|
--error ER_ERROR_ON_RENAME
|
|
|
|
rename table t2 to t3;
|
|
|
|
|
|
|
|
--error ER_OPEN_AS_READONLY
|
|
|
|
truncate table t2;
|
|
|
|
|
|
|
|
--error ER_OPEN_AS_READONLY
|
|
|
|
drop table t2;
|
2019-05-28 15:43:02 +02:00
|
|
|
|
|
|
|
create schema db;
|
|
|
|
drop schema db;
|
2017-04-26 12:53:13 +02:00
|
|
|
show tables;
|
|
|
|
|
|
|
|
--let $restart_parameters= --innodb-force-recovery=6
|
|
|
|
--source include/restart_mysqld.inc
|
2019-09-26 11:44:04 +02:00
|
|
|
let $status=`SHOW ENGINE INNODB STATUS`;
|
2017-04-26 12:53:13 +02:00
|
|
|
|
|
|
|
select * from t2;
|
|
|
|
|
|
|
|
--error ER_OPEN_AS_READONLY
|
|
|
|
insert into t2 values(2, 3);
|
|
|
|
|
|
|
|
--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_OPEN_AS_READONLY
|
|
|
|
drop index idx on t2;
|
|
|
|
|
|
|
|
--error ER_OPEN_AS_READONLY
|
|
|
|
update t2 set f1=3 where f2=2;
|
|
|
|
|
|
|
|
--error ER_CANT_CREATE_TABLE
|
2019-05-28 15:43:02 +02:00
|
|
|
create table t3(f1 int not null)engine=innodb;
|
2017-04-26 12:53:13 +02:00
|
|
|
|
2019-05-28 15:43:02 +02:00
|
|
|
--error ER_OPEN_AS_READONLY
|
2017-04-26 12:53:13 +02:00
|
|
|
drop table t1;
|
|
|
|
|
|
|
|
--error ER_ERROR_ON_RENAME
|
|
|
|
rename table t2 to t3;
|
|
|
|
|
|
|
|
--error ER_OPEN_AS_READONLY
|
|
|
|
truncate table t2;
|
|
|
|
|
|
|
|
--error ER_OPEN_AS_READONLY
|
|
|
|
drop table t2;
|
|
|
|
show tables;
|
|
|
|
|
2017-06-23 08:46:51 +02:00
|
|
|
--let $restart_parameters= --innodb-force-recovery=2
|
|
|
|
--source include/restart_mysqld.inc
|
2019-09-26 11:44:04 +02:00
|
|
|
let $status=`SHOW ENGINE INNODB STATUS`;
|
2017-06-23 08:46:51 +02:00
|
|
|
|
|
|
|
select * from t2;
|
|
|
|
begin;
|
|
|
|
update t2 set f2=3;
|
|
|
|
|
|
|
|
connect (con1,localhost,root,,);
|
|
|
|
--echo # Force a redo log flush of the above uncommitted UPDATE
|
|
|
|
SET GLOBAL innodb_flush_log_at_trx_commit=1;
|
2019-05-28 15:43:02 +02:00
|
|
|
drop table t1;
|
2017-06-23 08:46:51 +02:00
|
|
|
disconnect con1;
|
|
|
|
|
|
|
|
connection default;
|
|
|
|
--source include/kill_mysqld.inc
|
|
|
|
|
|
|
|
--let $restart_parameters= --innodb-force-recovery=3
|
|
|
|
--source include/start_mysqld.inc
|
2019-09-26 11:44:04 +02:00
|
|
|
let $status=`SHOW ENGINE INNODB STATUS`;
|
2017-06-23 08:46:51 +02:00
|
|
|
|
|
|
|
SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
|
2023-05-31 06:57:45 +02:00
|
|
|
--disable_ps2_protocol
|
2017-06-23 08:46:51 +02:00
|
|
|
select * from t2;
|
2023-05-31 06:57:45 +02:00
|
|
|
--enable_ps2_protocol
|
2017-06-23 08:46:51 +02:00
|
|
|
SET TRANSACTION ISOLATION LEVEL REPEATABLE READ;
|
|
|
|
select * from t2;
|
2022-02-17 18:17:05 +01:00
|
|
|
SET SESSION innodb_lock_wait_timeout=1;
|
2017-06-23 08:46:51 +02:00
|
|
|
--error ER_LOCK_WAIT_TIMEOUT
|
|
|
|
insert into t2 values(1,2);
|
|
|
|
insert into t2 values(9,10);
|
|
|
|
|
2017-04-26 12:53:13 +02:00
|
|
|
--let $restart_parameters=
|
|
|
|
--source include/restart_mysqld.inc
|
|
|
|
|
2017-06-23 08:46:51 +02:00
|
|
|
select * from t2;
|
2017-04-26 12:53:13 +02:00
|
|
|
drop table t2;
|
|
|
|
show tables;
|