1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-05 13:16:09 +03:00

Merge 11.4 into 11.8

This commit is contained in:
Marko Mäkelä
2025-03-05 20:39:47 +02:00
177 changed files with 5360 additions and 2623 deletions

View File

@@ -332,8 +332,15 @@ bool Sql_cmd_truncate_table::lock_table(THD *thd, TABLE_LIST *table_ref,
versioned= table->versioned();
hton= table->file->ht;
#ifdef WITH_WSREP
/* Resolve should we replicate truncate. It should
be replicated if storage engine(s) associated
are replicated by Galera. If this is partitioned
table we need to find out default partition
handlerton.
*/
if (WSREP(thd) &&
!wsrep_should_replicate_ddl(thd, hton))
!wsrep_should_replicate_ddl(thd, table->file->partition_ht() ?
table->file->partition_ht() : hton))
DBUG_RETURN(TRUE);
#endif
@@ -355,12 +362,22 @@ bool Sql_cmd_truncate_table::lock_table(THD *thd, TABLE_LIST *table_ref,
sequence= share->table_type == TABLE_TYPE_SEQUENCE;
hton= share->db_type();
#ifdef WITH_WSREP
if (WSREP(thd) &&
hton != view_pseudo_hton &&
!wsrep_should_replicate_ddl(thd, hton))
if (WSREP(thd) && hton != view_pseudo_hton)
{
tdc_release_share(share);
DBUG_RETURN(TRUE);
/* Resolve should we replicate truncate. It should
be replicated if storage engine(s) associated
are replicated by Galera. If this is partitioned
table we need to find out default partition
handlerton.
*/
const handlerton *ht= share->default_part_plugin ?
plugin_hton(share->default_part_plugin) : hton;
if (ht && !wsrep_should_replicate_ddl(thd, ht))
{
tdc_release_share(share);
DBUG_RETURN(TRUE);
}
}
#endif