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

Merge branch '10.5' into 10.6

This commit is contained in:
Oleksandr Byelkin
2023-08-02 20:20:50 +02:00
42 changed files with 639 additions and 404 deletions

View File

@@ -3532,17 +3532,18 @@ int TABLE_SHARE::init_from_sql_statement_string(THD *thd, bool write,
sql_unusable_for_discovery(thd, hton, sql_copy))))
goto ret;
thd->lex->create_info.db_type= hton;
tmp_lex.create_info.db_type= hton;
#ifdef WITH_PARTITION_STORAGE_ENGINE
thd->work_part_info= 0; // For partitioning
#endif
if (tabledef_version.str)
thd->lex->create_info.tabledef_version= tabledef_version;
tmp_lex.create_info.tabledef_version= tabledef_version;
promote_first_timestamp_column(&thd->lex->alter_info.create_list);
file= mysql_create_frm_image(thd, db, table_name,
&thd->lex->create_info, &thd->lex->alter_info,
tmp_lex.alter_info.db= db;
tmp_lex.alter_info.table_name= table_name;
promote_first_timestamp_column(&tmp_lex.alter_info.create_list);
file= mysql_create_frm_image(thd, &tmp_lex.create_info, &tmp_lex.alter_info,
C_ORDINARY_CREATE, &unused1, &unused2, &frm);
error|= file == 0;
delete file;
@@ -3556,7 +3557,7 @@ int TABLE_SHARE::init_from_sql_statement_string(THD *thd, bool write,
ret:
my_free(const_cast<uchar*>(frm.str));
lex_end(thd->lex);
lex_end(&tmp_lex);
thd->reset_db(&db_backup);
thd->lex= old_lex;
reenable_binlog(thd);
@@ -9927,20 +9928,14 @@ LEX_CSTRING *fk_option_name(enum_fk_option opt)
{
{ STRING_WITH_LEN("???") },
{ STRING_WITH_LEN("RESTRICT") },
{ STRING_WITH_LEN("NO ACTION") },
{ STRING_WITH_LEN("CASCADE") },
{ STRING_WITH_LEN("SET NULL") },
{ STRING_WITH_LEN("NO ACTION") },
{ STRING_WITH_LEN("SET DEFAULT") }
};
return names + opt;
}
bool fk_modifies_child(enum_fk_option opt)
{
static bool can_write[]= { false, false, true, true, false, true };
return can_write[opt];
}
enum TR_table::enabled TR_table::use_transaction_registry= TR_table::MAYBE;
TR_table::TR_table(THD* _thd, bool rw) :