1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Merge 10.3 into 10.4

This commit is contained in:
Marko Mäkelä
2022-06-27 10:14:37 +03:00
48 changed files with 610 additions and 517 deletions

View File

@ -1,5 +1,5 @@
/* Copyright (c) 2005, 2017, Oracle and/or its affiliates.
Copyright (c) 2009, 2018, MariaDB
Copyright (c) 2009, 2022, MariaDB
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@ -6913,14 +6913,29 @@ static bool alter_partition_lock_handling(ALTER_PARTITION_PARAM_TYPE *lpt)
static int alter_close_table(ALTER_PARTITION_PARAM_TYPE *lpt)
{
THD *thd= lpt->thd;
TABLE_SHARE *share= lpt->table->s;
DBUG_ENTER("alter_close_table");
if (lpt->table->db_stat)
{
mysql_lock_remove(lpt->thd, lpt->thd->lock, lpt->table);
lpt->table->file->ha_close();
lpt->table->db_stat= 0; // Mark file closed
}
TABLE *table= thd->open_tables;
do {
table= find_locked_table(table, share->db.str, share->table_name.str);
if (!table)
{
DBUG_RETURN(0);
}
if (table->db_stat)
{
mysql_lock_remove(thd, thd->lock, table);
if (int error= table->file->ha_close())
{
DBUG_RETURN(error);
}
table->db_stat= 0; // Mark file closed
}
} while ((table= table->next));
DBUG_RETURN(0);
}