1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

Do not log ALTER table to ddl log for REPAIR

REPAIR of InnoDB tables was logging ALTER TABLE and REPAIR to ddl log.
ALTER TABLE contained the new tableid and REPAIR, wrongly, contained the
old rowid.

Now only REPAIR is logged

ddl.log changes:
REPAIR TABLE and OPTIMIZE TABLE that are done through ALTER TABLE will
now contain the old and new table id. If not done through ALTER TABLE,
only the current rowid will be shown (as before).
This commit is contained in:
Monty
2025-01-26 20:17:17 +02:00
parent aae9b50a53
commit f099f778b3
7 changed files with 59 additions and 30 deletions

View File

@ -268,23 +268,22 @@ public:
class Recreate_info
{
ha_rows m_records_copied;
ha_rows m_records_duplicate;
public:
ha_rows copied;
ha_rows duplicate;
uchar tabledef_version[MY_UUID_SIZE];
Recreate_info()
:m_records_copied(0),
m_records_duplicate(0)
{ }
Recreate_info(ha_rows records_copied,
ha_rows records_duplicate)
:m_records_copied(records_copied),
m_records_duplicate(records_duplicate)
{ }
ha_rows records_copied() const { return m_records_copied; }
ha_rows records_duplicate() const { return m_records_duplicate; }
:copied(0),
duplicate(0)
{
bzero(tabledef_version, sizeof(tabledef_version));
}
ha_rows records_copied() const { return copied; }
ha_rows records_duplicate() const { return duplicate; }
ha_rows records_processed() const
{
return m_records_copied + m_records_duplicate;
return copied + duplicate;
}
};