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:
@ -1987,7 +1987,7 @@ int write_bin_log(THD *thd, bool clear_error,
|
||||
errcode= query_error_code(thd, TRUE);
|
||||
error= thd->binlog_query(THD::STMT_QUERY_TYPE,
|
||||
query, query_length, is_trans, FALSE, FALSE,
|
||||
errcode);
|
||||
errcode) > 0;
|
||||
thd_proc_info(thd, 0);
|
||||
}
|
||||
return error;
|
||||
@ -2603,24 +2603,24 @@ err:
|
||||
/* Chop of the last comma */
|
||||
built_non_trans_tmp_query.chop();
|
||||
built_non_trans_tmp_query.append(" /* generated by server */");
|
||||
error |= thd->binlog_query(THD::STMT_QUERY_TYPE,
|
||||
built_non_trans_tmp_query.ptr(),
|
||||
built_non_trans_tmp_query.length(),
|
||||
FALSE, FALSE,
|
||||
is_drop_tmp_if_exists_added,
|
||||
0);
|
||||
error |= (thd->binlog_query(THD::STMT_QUERY_TYPE,
|
||||
built_non_trans_tmp_query.ptr(),
|
||||
built_non_trans_tmp_query.length(),
|
||||
FALSE, FALSE,
|
||||
is_drop_tmp_if_exists_added,
|
||||
0) > 0);
|
||||
}
|
||||
if (trans_tmp_table_deleted)
|
||||
{
|
||||
/* Chop of the last comma */
|
||||
built_trans_tmp_query.chop();
|
||||
built_trans_tmp_query.append(" /* generated by server */");
|
||||
error |= thd->binlog_query(THD::STMT_QUERY_TYPE,
|
||||
built_trans_tmp_query.ptr(),
|
||||
built_trans_tmp_query.length(),
|
||||
TRUE, FALSE,
|
||||
is_drop_tmp_if_exists_added,
|
||||
0);
|
||||
error |= (thd->binlog_query(THD::STMT_QUERY_TYPE,
|
||||
built_trans_tmp_query.ptr(),
|
||||
built_trans_tmp_query.length(),
|
||||
TRUE, FALSE,
|
||||
is_drop_tmp_if_exists_added,
|
||||
0) > 0);
|
||||
}
|
||||
if (non_tmp_table_deleted)
|
||||
{
|
||||
@ -2629,11 +2629,11 @@ err:
|
||||
built_query.append(" /* generated by server */");
|
||||
int error_code = non_tmp_error ? thd->get_stmt_da()->sql_errno()
|
||||
: 0;
|
||||
error |= thd->binlog_query(THD::STMT_QUERY_TYPE,
|
||||
built_query.ptr(),
|
||||
built_query.length(),
|
||||
TRUE, FALSE, FALSE,
|
||||
error_code);
|
||||
error |= (thd->binlog_query(THD::STMT_QUERY_TYPE,
|
||||
built_query.ptr(),
|
||||
built_query.length(),
|
||||
TRUE, FALSE, FALSE,
|
||||
error_code) > 0);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -2716,7 +2716,7 @@ bool log_drop_table(THD *thd, const LEX_CSTRING *db_name,
|
||||
"failed CREATE OR REPLACE */"));
|
||||
error= thd->binlog_query(THD::STMT_QUERY_TYPE,
|
||||
query.ptr(), query.length(),
|
||||
FALSE, FALSE, temporary_table, 0);
|
||||
FALSE, FALSE, temporary_table, 0) > 0;
|
||||
DBUG_RETURN(error);
|
||||
}
|
||||
|
||||
@ -5271,9 +5271,13 @@ bool mysql_create_table(THD *thd, TABLE_LIST *create_table,
|
||||
}
|
||||
|
||||
err:
|
||||
/* In RBR we don't need to log CREATE TEMPORARY TABLE */
|
||||
if (!result && thd->is_current_stmt_binlog_format_row() && create_info->tmp_table())
|
||||
/* In RBR or readonly server we don't need to log CREATE TEMPORARY TABLE */
|
||||
if (!result && create_info->tmp_table() &&
|
||||
(thd->is_current_stmt_binlog_format_row() || (opt_readonly && !thd->slave_thread)))
|
||||
{
|
||||
/* Note that table->s->table_creation_was_logged is not set! */
|
||||
DBUG_RETURN(result);
|
||||
}
|
||||
|
||||
if (create_info->tmp_table())
|
||||
thd->transaction.stmt.mark_created_temp_table();
|
||||
@ -5290,11 +5294,13 @@ err:
|
||||
*/
|
||||
thd->locked_tables_list.unlock_locked_table(thd, mdl_ticket);
|
||||
}
|
||||
else if (likely(!result) && create_info->tmp_table() && create_info->table)
|
||||
else if (likely(!result) && create_info->table)
|
||||
{
|
||||
/*
|
||||
Remember that tmp table creation was logged so that we know if
|
||||
Remember that table creation was logged so that we know if
|
||||
we should log a delete of it.
|
||||
If create_info->table was not set, it's a normal table and
|
||||
table_creation_was_logged will be set when the share is created.
|
||||
*/
|
||||
create_info->table->s->table_creation_was_logged= 1;
|
||||
}
|
||||
@ -6883,7 +6889,7 @@ static bool fill_alter_inplace_info(THD *thd, TABLE *table, bool varchar,
|
||||
}
|
||||
|
||||
if (field->vcol_info->is_in_partitioning_expr() ||
|
||||
field->flags & PART_KEY_FLAG)
|
||||
field->flags & PART_KEY_FLAG || field->stored_in_db())
|
||||
{
|
||||
if (value_changes)
|
||||
ha_alter_info->handler_flags|= ALTER_COLUMN_VCOL;
|
||||
|
Reference in New Issue
Block a user