mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Merge 10.3 into 10.4
In main.index_merge_myisam we remove the test that was added in commita2d24def8c
because it duplicates the test case that was added in commit5af12e4635
.
This commit is contained in:
@ -4397,11 +4397,8 @@ bool validate_comment_length(THD *thd, LEX_CSTRING *comment, size_t max_len,
|
||||
if (comment->length == 0)
|
||||
DBUG_RETURN(false);
|
||||
|
||||
if (max_len > comment->length)
|
||||
max_len= comment->length;
|
||||
|
||||
size_t tmp_len=
|
||||
Well_formed_prefix(system_charset_info, comment->str, max_len).length();
|
||||
Well_formed_prefix(system_charset_info, *comment, max_len).length();
|
||||
if (tmp_len < comment->length)
|
||||
{
|
||||
if (thd->is_strict_mode())
|
||||
@ -10586,7 +10583,6 @@ copy_data_between_tables(THD *thd, TABLE *from, TABLE *to,
|
||||
bool make_versioned= !from->versioned() && to->versioned();
|
||||
bool make_unversioned= from->versioned() && !to->versioned();
|
||||
bool keep_versioned= from->versioned() && to->versioned();
|
||||
bool drop_history= false; // XXX
|
||||
Field *to_row_start= NULL, *to_row_end= NULL, *from_row_end= NULL;
|
||||
MYSQL_TIME query_start;
|
||||
DBUG_ENTER("copy_data_between_tables");
|
||||
@ -10717,10 +10713,6 @@ copy_data_between_tables(THD *thd, TABLE *from, TABLE *to,
|
||||
{
|
||||
from_row_end= from->vers_end_field();
|
||||
}
|
||||
else if (keep_versioned && drop_history)
|
||||
{
|
||||
from_row_end= from->vers_end_field();
|
||||
}
|
||||
|
||||
if (from_row_end)
|
||||
bitmap_set_bit(from->read_set, from_row_end->field_index);
|
||||
@ -10757,6 +10749,13 @@ copy_data_between_tables(THD *thd, TABLE *from, TABLE *to,
|
||||
error= 1;
|
||||
break;
|
||||
}
|
||||
|
||||
if (make_unversioned)
|
||||
{
|
||||
if (!from_row_end->is_max())
|
||||
continue; // Drop history rows.
|
||||
}
|
||||
|
||||
if (unlikely(++thd->progress.counter >= time_to_report_progress))
|
||||
{
|
||||
time_to_report_progress+= MY_HOW_OFTEN_TO_WRITE/10;
|
||||
@ -10776,20 +10775,12 @@ copy_data_between_tables(THD *thd, TABLE *from, TABLE *to,
|
||||
copy_ptr->do_copy(copy_ptr);
|
||||
}
|
||||
|
||||
if (drop_history && from_row_end && !from_row_end->is_max())
|
||||
continue;
|
||||
|
||||
if (make_versioned)
|
||||
{
|
||||
to_row_start->set_notnull();
|
||||
to_row_start->store_time(&query_start);
|
||||
to_row_end->set_max();
|
||||
}
|
||||
else if (make_unversioned)
|
||||
{
|
||||
if (!from_row_end->is_max())
|
||||
continue; // Drop history rows.
|
||||
}
|
||||
|
||||
prev_insert_id= to->file->next_insert_id;
|
||||
if (to->default_field)
|
||||
|
Reference in New Issue
Block a user