1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

SQL: don't update TRT when altered [#305, #302]

Tests affected: main.mysqlcheck
This commit is contained in:
Aleksey Midenkov
2017-11-14 15:47:01 +03:00
parent ecf259cacf
commit a4439fef96
3 changed files with 27 additions and 6 deletions

View File

@@ -31,6 +31,7 @@ mysql.time_zone_leap_second OK
mysql.time_zone_name OK mysql.time_zone_name OK
mysql.time_zone_transition OK mysql.time_zone_transition OK
mysql.time_zone_transition_type OK mysql.time_zone_transition_type OK
mysql.transaction_registry OK
mysql.user OK mysql.user OK
mysql.vtmd_template OK mysql.vtmd_template OK
mtr.global_suppressions Table is already up to date mtr.global_suppressions Table is already up to date
@@ -66,6 +67,9 @@ mysql.time_zone_leap_second OK
mysql.time_zone_name OK mysql.time_zone_name OK
mysql.time_zone_transition OK mysql.time_zone_transition OK
mysql.time_zone_transition_type OK mysql.time_zone_transition_type OK
mysql.transaction_registry
note : Table does not support optimize, doing recreate + analyze instead
status : OK
mysql.user OK mysql.user OK
mysql.vtmd_template mysql.vtmd_template
note : Table does not support optimize, doing recreate + analyze instead note : Table does not support optimize, doing recreate + analyze instead
@@ -97,6 +101,7 @@ mysql.time_zone_leap_second OK
mysql.time_zone_name OK mysql.time_zone_name OK
mysql.time_zone_transition OK mysql.time_zone_transition OK
mysql.time_zone_transition_type OK mysql.time_zone_transition_type OK
mysql.transaction_registry OK
mysql.user OK mysql.user OK
mysql.vtmd_template OK mysql.vtmd_template OK
mysql.column_stats Table is already up to date mysql.column_stats Table is already up to date
@@ -130,6 +135,9 @@ mysql.time_zone_leap_second Table is already up to date
mysql.time_zone_name Table is already up to date mysql.time_zone_name Table is already up to date
mysql.time_zone_transition Table is already up to date mysql.time_zone_transition Table is already up to date
mysql.time_zone_transition_type Table is already up to date mysql.time_zone_transition_type Table is already up to date
mysql.transaction_registry
note : Table does not support optimize, doing recreate + analyze instead
status : OK
mysql.user Table is already up to date mysql.user Table is already up to date
mysql.vtmd_template mysql.vtmd_template
note : Table does not support optimize, doing recreate + analyze instead note : Table does not support optimize, doing recreate + analyze instead
@@ -455,6 +463,7 @@ mysql.time_zone_leap_second Table is already up to date
mysql.time_zone_name Table is already up to date mysql.time_zone_name Table is already up to date
mysql.time_zone_transition Table is already up to date mysql.time_zone_transition Table is already up to date
mysql.time_zone_transition_type Table is already up to date mysql.time_zone_transition_type Table is already up to date
mysql.transaction_registry OK
mysql.user Table is already up to date mysql.user Table is already up to date
mysql.vtmd_template OK mysql.vtmd_template OK
mysqltest1.t1 mysqltest1.t1

View File

@@ -7430,7 +7430,7 @@ static bool mysql_inplace_alter_table(THD *thd,
{ {
TR_table trt(thd, true); TR_table trt(thd, true);
if (table->file->native_versioned()) if (table->file->native_versioned() && trt != *table_list)
{ {
if (opt_transaction_registry && trt.update()) if (opt_transaction_registry && trt.update())
return true; return true;

View File

@@ -2961,6 +2961,15 @@ public:
ulonglong commit_id1= 0, enum_tx_isolation iso_level1= ISO_READ_UNCOMMITTED, ulonglong commit_id1= 0, enum_tx_isolation iso_level1= ISO_READ_UNCOMMITTED,
ulonglong commit_id0= 0); ulonglong commit_id0= 0);
enum_tx_isolation iso_level() const;
void store_iso_level(enum_tx_isolation iso_level)
{
DBUG_ASSERT(iso_level <= ISO_SERIALIZABLE);
store(FLD_ISO_LEVEL, iso_level + 1);
}
bool check();
public:
TABLE * operator-> () const TABLE * operator-> () const
{ {
return table; return table;
@@ -2974,13 +2983,16 @@ public:
{ {
return table; return table;
} }
enum_tx_isolation iso_level() const; bool operator== (TABLE_LIST &subj) const
void store_iso_level(enum_tx_isolation iso_level)
{ {
DBUG_ASSERT(iso_level <= ISO_SERIALIZABLE); if (0 != strcmp(db, subj.db))
store(FLD_ISO_LEVEL, iso_level + 1); return false;
return (0 == strcmp(table_name, subj.table_name));
}
bool operator!= (TABLE_LIST &subj) const
{
return !(*this == subj);
} }
bool check();
}; };
#endif /* MYSQL_CLIENT */ #endif /* MYSQL_CLIENT */