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

Merge 11.2 into 11.3

This commit is contained in:
Marko Mäkelä
2023-10-27 10:48:29 +03:00
511 changed files with 15169 additions and 29021 deletions

View File

@@ -74,6 +74,8 @@ No_such_table_error_handler::handle_condition(THD *,
Sql_condition ** cond_hdl)
{
*cond_hdl= NULL;
if (!first_error)
first_error= sql_errno;
if (sql_errno == ER_NO_SUCH_TABLE || sql_errno == ER_NO_SUCH_TABLE_IN_ENGINE)
{
m_handled_errors++;
@@ -96,7 +98,6 @@ bool No_such_table_error_handler::safely_trapped_errors()
return ((m_handled_errors > 0) && (m_unhandled_errors == 0));
}
/**
This internal handler is used to trap ER_NO_SUCH_TABLE and
ER_WRONG_MRG_TABLE errors during CHECK/REPAIR TABLE for MERGE
@@ -2126,10 +2127,6 @@ retry_share:
goto err_lock;
}
/* Open view */
if (mysql_make_view(thd, share, table_list, false))
goto err_lock;
/*
This table is a view. Validate its metadata version: in particular,
that it was a view when the statement was prepared.
@@ -2137,6 +2134,10 @@ retry_share:
if (check_and_update_table_version(thd, table_list, share))
goto err_lock;
/* Open view */
if (mysql_make_view(thd, share, table_list, false))
goto err_lock;
/* TODO: Don't free this */
tdc_release_share(share);
@@ -4209,6 +4210,12 @@ open_and_process_table(THD *thd, TABLE_LIST *tables, uint *counter, uint flags,
if (tables->open_strategy && !tables->table)
goto end;
/* Check and update metadata version of a base table. */
error= check_and_update_table_version(thd, tables, tables->table->s);
if (unlikely(error))
goto end;
error= extend_table_list(thd, tables, prelocking_strategy, has_prelocking_list);
if (unlikely(error))
goto end;
@@ -4216,11 +4223,6 @@ open_and_process_table(THD *thd, TABLE_LIST *tables, uint *counter, uint flags,
/* Copy grant information from TABLE_LIST instance to TABLE one. */
tables->table->grant= tables->grant;
/* Check and update metadata version of a base table. */
error= check_and_update_table_version(thd, tables, tables->table->s);
if (unlikely(error))
goto end;
/*
After opening a MERGE table add the children to the query list of
tables, so that they are opened too.
@@ -5627,7 +5629,8 @@ bool open_and_lock_tables(THD *thd, const DDL_options_st &options,
goto err;
/* Don't read statistics tables when opening internal tables */
if (!(flags & MYSQL_OPEN_IGNORE_LOGGING_FORMAT))
if (!(flags & (MYSQL_OPEN_IGNORE_LOGGING_FORMAT |
MYSQL_OPEN_IGNORE_ENGINE_STATS)))
(void) read_statistics_for_tables_if_needed(thd, tables);
if (derived)