mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-29978 Corruption errors upon CHECK on temporary InnoDB table
row_check_index(): Treat secondary indexes of temporary tables as if SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED is in effect. That is, only consider the delete-mark and nothing else.
This commit is contained in:
@@ -789,4 +789,16 @@ CHECK TABLE t EXTENDED;
|
|||||||
Table Op Msg_type Msg_text
|
Table Op Msg_type Msg_text
|
||||||
test.t check status OK
|
test.t check status OK
|
||||||
DROP TEMPORARY TABLE t;
|
DROP TEMPORARY TABLE t;
|
||||||
|
#
|
||||||
|
# MDEV-29978 Corruption errors upon CHECK on temporary InnoDB table
|
||||||
|
#
|
||||||
|
CREATE TEMPORARY TABLE t (f INT UNIQUE) ENGINE=InnoDB;
|
||||||
|
INSERT INTO t (f) VALUES (1),(2);
|
||||||
|
CHECK TABLE t;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t check status OK
|
||||||
|
CHECK TABLE t EXTENDED;
|
||||||
|
Table Op Msg_type Msg_text
|
||||||
|
test.t check status OK
|
||||||
|
DROP TEMPORARY TABLE t;
|
||||||
# End of 10.6 tests
|
# End of 10.6 tests
|
||||||
|
@@ -624,4 +624,15 @@ UPDATE t SET a=2;
|
|||||||
CHECK TABLE t;
|
CHECK TABLE t;
|
||||||
CHECK TABLE t EXTENDED;
|
CHECK TABLE t EXTENDED;
|
||||||
DROP TEMPORARY TABLE t;
|
DROP TEMPORARY TABLE t;
|
||||||
|
|
||||||
|
--echo #
|
||||||
|
--echo # MDEV-29978 Corruption errors upon CHECK on temporary InnoDB table
|
||||||
|
--echo #
|
||||||
|
|
||||||
|
CREATE TEMPORARY TABLE t (f INT UNIQUE) ENGINE=InnoDB;
|
||||||
|
INSERT INTO t (f) VALUES (1),(2);
|
||||||
|
CHECK TABLE t;
|
||||||
|
CHECK TABLE t EXTENDED;
|
||||||
|
DROP TEMPORARY TABLE t;
|
||||||
|
|
||||||
--echo # End of 10.6 tests
|
--echo # End of 10.6 tests
|
||||||
|
@@ -6300,14 +6300,16 @@ rec_loop:
|
|||||||
goto next_rec;
|
goto next_rec;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (index->is_clust())
|
if (prebuilt->table->is_temporary())
|
||||||
|
{
|
||||||
|
count_or_not:
|
||||||
|
if (rec_deleted)
|
||||||
|
goto next_rec;
|
||||||
|
}
|
||||||
|
else if (index->is_clust())
|
||||||
{
|
{
|
||||||
if (prebuilt->trx->isolation_level == TRX_ISO_READ_UNCOMMITTED)
|
if (prebuilt->trx->isolation_level == TRX_ISO_READ_UNCOMMITTED)
|
||||||
{
|
goto count_or_not;
|
||||||
if (!rec_deleted)
|
|
||||||
goto count_row;
|
|
||||||
goto next_rec;
|
|
||||||
}
|
|
||||||
|
|
||||||
trx_id_t rec_trx_id= row_get_rec_trx_id(rec, index, offsets);
|
trx_id_t rec_trx_id= row_get_rec_trx_id(rec, index, offsets);
|
||||||
|
|
||||||
@@ -6371,10 +6373,7 @@ rec_loop:
|
|||||||
ER_NOT_KEYFILE, "InnoDB: %s", w.m_oss.str().c_str());
|
ER_NOT_KEYFILE, "InnoDB: %s", w.m_oss.str().c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!rec_deleted)
|
goto count_or_not;
|
||||||
goto count_row;
|
|
||||||
|
|
||||||
goto next_rec;
|
|
||||||
}
|
}
|
||||||
else if (const trx_id_t page_trx_id= page_get_max_trx_id(page_align(rec)))
|
else if (const trx_id_t page_trx_id= page_get_max_trx_id(page_align(rec)))
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user