mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge branch 'bb-10.3-release' into bb-10.4-release
Note, the fix for "MDEV-23328 Server hang due to Galera lock conflict resolution" was null-merged. 10.4 version of the fix is coming up separately
This commit is contained in:
@ -3636,8 +3636,7 @@ bool calculate_cond_selectivity_for_table(THD *thd, TABLE *table, Item **cond)
|
||||
|
||||
void store_key_image_to_rec(Field *field, uchar *ptr, uint len)
|
||||
{
|
||||
/* Do the same as print_key() does */
|
||||
my_bitmap_map *old_map;
|
||||
/* Do the same as print_key() does */
|
||||
|
||||
if (field->real_maybe_null())
|
||||
{
|
||||
@ -3649,10 +3648,10 @@ void store_key_image_to_rec(Field *field, uchar *ptr, uint len)
|
||||
field->set_notnull();
|
||||
ptr++;
|
||||
}
|
||||
old_map= dbug_tmp_use_all_columns(field->table,
|
||||
field->table->write_set);
|
||||
MY_BITMAP *old_map= dbug_tmp_use_all_columns(field->table,
|
||||
&field->table->write_set);
|
||||
field->set_key_image(ptr, len);
|
||||
dbug_tmp_restore_column_map(field->table->write_set, old_map);
|
||||
dbug_tmp_restore_column_map(&field->table->write_set, old_map);
|
||||
}
|
||||
|
||||
#ifdef WITH_PARTITION_STORAGE_ENGINE
|
||||
@ -3867,7 +3866,7 @@ bool prune_partitions(THD *thd, TABLE *table, Item *pprune_cond)
|
||||
PART_PRUNE_PARAM prune_param;
|
||||
MEM_ROOT alloc;
|
||||
RANGE_OPT_PARAM *range_par= &prune_param.range_param;
|
||||
my_bitmap_map *old_sets[2];
|
||||
MY_BITMAP *old_sets[2];
|
||||
|
||||
prune_param.part_info= part_info;
|
||||
init_sql_alloc(&alloc, "prune_partitions",
|
||||
@ -3884,7 +3883,7 @@ bool prune_partitions(THD *thd, TABLE *table, Item *pprune_cond)
|
||||
}
|
||||
|
||||
dbug_tmp_use_all_columns(table, old_sets,
|
||||
table->read_set, table->write_set);
|
||||
&table->read_set, &table->write_set);
|
||||
range_par->thd= thd;
|
||||
range_par->table= table;
|
||||
/* range_par->cond doesn't need initialization */
|
||||
@ -3981,7 +3980,7 @@ all_used:
|
||||
retval= FALSE; // some partitions are used
|
||||
mark_all_partitions_as_used(prune_param.part_info);
|
||||
end:
|
||||
dbug_tmp_restore_column_maps(table->read_set, table->write_set, old_sets);
|
||||
dbug_tmp_restore_column_maps(&table->read_set, &table->write_set, old_sets);
|
||||
thd->no_errors=0;
|
||||
thd->mem_root= range_par->old_root;
|
||||
free_root(&alloc,MYF(0)); // Return memory & allocator
|
||||
@ -15658,8 +15657,8 @@ static void
|
||||
print_sel_arg_key(Field *field, const uchar *key, String *out)
|
||||
{
|
||||
TABLE *table= field->table;
|
||||
my_bitmap_map *old_sets[2];
|
||||
dbug_tmp_use_all_columns(table, old_sets, table->read_set, table->write_set);
|
||||
MY_BITMAP *old_sets[2];
|
||||
dbug_tmp_use_all_columns(table, old_sets, &table->read_set, &table->write_set);
|
||||
|
||||
if (field->real_maybe_null())
|
||||
{
|
||||
@ -15679,7 +15678,7 @@ print_sel_arg_key(Field *field, const uchar *key, String *out)
|
||||
field->val_str(out);
|
||||
|
||||
end:
|
||||
dbug_tmp_restore_column_maps(table->read_set, table->write_set, old_sets);
|
||||
dbug_tmp_restore_column_maps(&table->read_set, &table->write_set, old_sets);
|
||||
}
|
||||
|
||||
|
||||
@ -15774,9 +15773,9 @@ print_key(KEY_PART *key_part, const uchar *key, uint used_length)
|
||||
const uchar *key_end= key+used_length;
|
||||
uint store_length;
|
||||
TABLE *table= key_part->field->table;
|
||||
my_bitmap_map *old_sets[2];
|
||||
MY_BITMAP *old_sets[2];
|
||||
|
||||
dbug_tmp_use_all_columns(table, old_sets, table->read_set, table->write_set);
|
||||
dbug_tmp_use_all_columns(table, old_sets, &table->read_set, &table->write_set);
|
||||
|
||||
for (; key < key_end; key+=store_length, key_part++)
|
||||
{
|
||||
@ -15803,7 +15802,7 @@ print_key(KEY_PART *key_part, const uchar *key, uint used_length)
|
||||
if (key+store_length < key_end)
|
||||
fputc('/',DBUG_FILE);
|
||||
}
|
||||
dbug_tmp_restore_column_maps(table->read_set, table->write_set, old_sets);
|
||||
dbug_tmp_restore_column_maps(&table->read_set, &table->write_set, old_sets);
|
||||
}
|
||||
|
||||
|
||||
@ -15811,16 +15810,16 @@ static void print_quick(QUICK_SELECT_I *quick, const key_map *needed_reg)
|
||||
{
|
||||
char buf[MAX_KEY/8+1];
|
||||
TABLE *table;
|
||||
my_bitmap_map *old_sets[2];
|
||||
MY_BITMAP *old_sets[2];
|
||||
DBUG_ENTER("print_quick");
|
||||
if (!quick)
|
||||
DBUG_VOID_RETURN;
|
||||
DBUG_LOCK_FILE;
|
||||
|
||||
table= quick->head;
|
||||
dbug_tmp_use_all_columns(table, old_sets, table->read_set, table->write_set);
|
||||
dbug_tmp_use_all_columns(table, old_sets, &table->read_set, &table->write_set);
|
||||
quick->dbug_dump(0, TRUE);
|
||||
dbug_tmp_restore_column_maps(table->read_set, table->write_set, old_sets);
|
||||
dbug_tmp_restore_column_maps(&table->read_set, &table->write_set, old_sets);
|
||||
|
||||
fprintf(DBUG_FILE,"other_keys: 0x%s:\n", needed_reg->print(buf));
|
||||
|
||||
@ -16043,8 +16042,8 @@ void print_range_for_non_indexed_field(String *out, Field *field,
|
||||
KEY_MULTI_RANGE *range)
|
||||
{
|
||||
TABLE *table= field->table;
|
||||
my_bitmap_map *old_sets[2];
|
||||
dbug_tmp_use_all_columns(table, old_sets, table->read_set, table->write_set);
|
||||
MY_BITMAP *old_sets[2];
|
||||
dbug_tmp_use_all_columns(table, old_sets, &table->read_set, &table->write_set);
|
||||
|
||||
if (range->start_key.length)
|
||||
{
|
||||
@ -16059,7 +16058,7 @@ void print_range_for_non_indexed_field(String *out, Field *field,
|
||||
print_max_range_operator(out, range->end_key.flag);
|
||||
field->print_key_part_value(out, range->end_key.key, field->key_length());
|
||||
}
|
||||
dbug_tmp_restore_column_maps(table->read_set, table->write_set, old_sets);
|
||||
dbug_tmp_restore_column_maps(&table->read_set, &table->write_set, old_sets);
|
||||
}
|
||||
|
||||
|
||||
@ -16126,8 +16125,8 @@ static void print_key_value(String *out, const KEY_PART_INFO *key_part,
|
||||
StringBuffer<128> tmp(system_charset_info);
|
||||
TABLE *table= field->table;
|
||||
uint store_length;
|
||||
my_bitmap_map *old_sets[2];
|
||||
dbug_tmp_use_all_columns(table, old_sets, table->read_set, table->write_set);
|
||||
MY_BITMAP *old_sets[2];
|
||||
dbug_tmp_use_all_columns(table, old_sets, &table->read_set, &table->write_set);
|
||||
const uchar *key_end= key+used_length;
|
||||
|
||||
for (; key < key_end; key+=store_length, key_part++)
|
||||
@ -16140,7 +16139,7 @@ static void print_key_value(String *out, const KEY_PART_INFO *key_part,
|
||||
if (key + store_length < key_end)
|
||||
out->append(STRING_WITH_LEN(","));
|
||||
}
|
||||
dbug_tmp_restore_column_maps(table->read_set, table->write_set, old_sets);
|
||||
dbug_tmp_restore_column_maps(&table->read_set, &table->write_set, old_sets);
|
||||
out->append(STRING_WITH_LEN(")"));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user