mirror of
https://github.com/MariaDB/server.git
synced 2025-01-16 03:52:35 +01:00
Merge branch '10.5' into 10.6
This commit is contained in:
commit
c7b6707fe1
9 changed files with 41 additions and 61 deletions
|
@ -1180,5 +1180,16 @@ a
|
|||
1
|
||||
drop table t1,t2;
|
||||
#
|
||||
# MDEV-31743 Server crash in store_length, assertion failure in
|
||||
# Type_handler_string_result::sort_length
|
||||
#
|
||||
create table t1 (a int, b longtext, c varchar(18));
|
||||
insert into t1 values (1, 'Aa123456', 'abc'), (2, 'Bb7897777', 'def'),
|
||||
(3, 'Cc01287', 'xyz'), (5, 'd12345', 'efg');
|
||||
select distinct if(sum(a), b, 0) from t1 group by value(c) with rollup;
|
||||
if(sum(a), b, 0)
|
||||
Aa123456
|
||||
drop table t1;
|
||||
#
|
||||
# end of 10.5 tests
|
||||
#
|
||||
|
|
|
@ -914,6 +914,18 @@ select distinct a from t1 where t1.a=1 and t1.a in (select a+0 from t2 where t2.
|
|||
select distinct a from t1 where t1.a=1 and t1.a in (select a+0 from t2 where t2.b in (1,2)) limit 0,1;
|
||||
drop table t1,t2;
|
||||
|
||||
--echo #
|
||||
--echo # MDEV-31743 Server crash in store_length, assertion failure in
|
||||
--echo # Type_handler_string_result::sort_length
|
||||
--echo #
|
||||
|
||||
create table t1 (a int, b longtext, c varchar(18));
|
||||
insert into t1 values (1, 'Aa123456', 'abc'), (2, 'Bb7897777', 'def'),
|
||||
(3, 'Cc01287', 'xyz'), (5, 'd12345', 'efg');
|
||||
|
||||
select distinct if(sum(a), b, 0) from t1 group by value(c) with rollup;
|
||||
drop table t1;
|
||||
|
||||
--echo #
|
||||
--echo # end of 10.5 tests
|
||||
--echo #
|
||||
|
|
|
@ -2289,7 +2289,8 @@ sortlength(THD *thd, Sort_keys *sort_keys, bool *allow_packing_for_sortkeys)
|
|||
set_if_smaller(sortorder->length, thd->variables.max_sort_length);
|
||||
set_if_smaller(sortorder->original_length, thd->variables.max_sort_length);
|
||||
}
|
||||
length+=sortorder->length;
|
||||
DBUG_ASSERT(length < UINT_MAX32 - sortorder->length);
|
||||
length+= sortorder->length;
|
||||
|
||||
sort_keys->increment_size_of_packable_fields(sortorder->length_bytes);
|
||||
sort_keys->increment_original_sort_length(sortorder->original_length);
|
||||
|
|
|
@ -25165,6 +25165,9 @@ JOIN_TAB::remove_duplicates()
|
|||
{
|
||||
/* Item is not stored in temporary table, remember it */
|
||||
sorder->item= item;
|
||||
sorder->type= sorder->item->type_handler()->is_packable() ?
|
||||
SORT_FIELD_ATTR::VARIABLE_SIZE :
|
||||
SORT_FIELD_ATTR::FIXED_SIZE;
|
||||
/* Calculate sorder->length */
|
||||
item->type_handler()->sort_length(thd, item, sorder);
|
||||
sorder++;
|
||||
|
|
|
@ -564,12 +564,9 @@ int ha_spider::open(
|
|||
wide_handler->sql_command =
|
||||
pt_clone_source_handler->wide_handler->sql_command;
|
||||
}
|
||||
} else {
|
||||
if (share->semi_table_lock)
|
||||
{
|
||||
wide_handler->semi_table_lock = TRUE;
|
||||
}
|
||||
}
|
||||
} else
|
||||
wide_handler->semi_table_lock =
|
||||
spider_param_semi_table_lock(thd, share->semi_table_lock);
|
||||
#ifdef HA_CAN_BULK_ACCESS
|
||||
external_lock_cnt = 0;
|
||||
#endif
|
||||
|
|
|
@ -50,7 +50,7 @@ pkey
|
|||
connection child2_1;
|
||||
SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%sql_mode%';
|
||||
argument
|
||||
set session transaction isolation level repeatable read;set session autocommit = 1;set session sql_log_off = 0;set session wait_timeout = 604800;set session sql_mode = 'real_as_float,ignore_bad_table_options,no_unsigned_subtraction,no_dir_in_create,no_auto_value_on_zero,strict_trans_tables,strict_all_tables,no_zero_in_date,no_zero_date,allow_invalid_dates,error_for_division_by_zero,no_auto_create_user,high_not_precedence,no_engine_substitution,pad_char_to_full_length,empty_string_is_null,simultaneous_assignment,time_round_fractional';set session time_zone = '+00:00';set @`spider_lc_./auto_test_remote/tbl_a` = '-xxxxxxxxxxxx-xxxxx-./auto_test_local/tbl_a-'
|
||||
set session transaction isolation level repeatable read;set session autocommit = 1;set session sql_log_off = 0;set session wait_timeout = 604800;set session sql_mode = 'real_as_float,ignore_bad_table_options,no_unsigned_subtraction,no_dir_in_create,no_auto_value_on_zero,strict_trans_tables,strict_all_tables,no_zero_in_date,no_zero_date,allow_invalid_dates,error_for_division_by_zero,no_auto_create_user,high_not_precedence,no_engine_substitution,pad_char_to_full_length,empty_string_is_null,simultaneous_assignment,time_round_fractional';set session time_zone = '+00:00';set @`spider_lc_./auto_test_remote/tbl_a` = '-xxxxxxxxxxxx-xxxxx-./auto_test_local/tbl_a-';start transaction
|
||||
SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%sql_mode%'
|
||||
SELECT pkey FROM tbl_a ORDER BY pkey;
|
||||
pkey
|
||||
|
|
|
@ -50,7 +50,7 @@ pkey
|
|||
connection child2_1;
|
||||
SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%sql_mode%';
|
||||
argument
|
||||
set session transaction isolation level repeatable read;set session autocommit = 1;set session sql_log_off = 0;set session wait_timeout = 604800;set session sql_mode = 'real_as_float,ignore_bad_table_options,no_unsigned_subtraction,no_dir_in_create,no_auto_value_on_zero,strict_trans_tables,strict_all_tables,no_zero_in_date,no_zero_date,allow_invalid_dates,error_for_division_by_zero,no_auto_create_user,high_not_precedence,no_engine_substitution,pad_char_to_full_length';set session time_zone = '+00:00';set @`spider_lc_./auto_test_remote/tbl_a` = '-xxxxxxxxxxxx-xxxxx-./auto_test_local/tbl_a-'
|
||||
set session transaction isolation level repeatable read;set session autocommit = 1;set session sql_log_off = 0;set session wait_timeout = 604800;set session sql_mode = 'real_as_float,ignore_bad_table_options,no_unsigned_subtraction,no_dir_in_create,no_auto_value_on_zero,strict_trans_tables,strict_all_tables,no_zero_in_date,no_zero_date,allow_invalid_dates,error_for_division_by_zero,no_auto_create_user,high_not_precedence,no_engine_substitution,pad_char_to_full_length';set session time_zone = '+00:00';set @`spider_lc_./auto_test_remote/tbl_a` = '-xxxxxxxxxxxx-xxxxx-./auto_test_local/tbl_a-';start transaction
|
||||
SELECT argument FROM mysql.general_log WHERE command_type != 'Execute' AND argument LIKE '%sql_mode%'
|
||||
SELECT pkey FROM tbl_a ORDER BY pkey;
|
||||
pkey
|
||||
|
|
|
@ -945,14 +945,6 @@ static MYSQL_THDVAR_INT(
|
|||
|
||||
SPIDER_THDVAR_OVERRIDE_VALUE_FUNC(int, buffer_size)
|
||||
|
||||
/*
|
||||
Notes on merge conflicts (remove after merging):
|
||||
10.5: 48faa20db848012e2187a09e05aba832078cb82e
|
||||
10.6: 51ff9eddf7c0aaf1e022fcb3b48ec36835df7785
|
||||
10.9: 06a61b8e453126c2de1649073f247d34e85f9702
|
||||
10.10: 90cd0c156f5bb53fd058d2bbfb83f850ffae6722
|
||||
10.11+: 124eb662700708f3c4b0fb77968f8b854d6bb4aa
|
||||
*/
|
||||
/*
|
||||
-1 :fallback to default
|
||||
0 :off
|
||||
|
@ -1577,12 +1569,7 @@ static MYSQL_THDVAR_INT(
|
|||
0 /* blk */
|
||||
);
|
||||
|
||||
double spider_param_hs_ping_interval(
|
||||
THD *thd
|
||||
) {
|
||||
DBUG_ENTER("spider_param_hs_ping_interval");
|
||||
DBUG_RETURN(THDVAR(thd, hs_ping_interval));
|
||||
}
|
||||
SPIDER_THDVAR_VALUE_FUNC(double, hs_ping_interval)
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -2105,12 +2092,7 @@ static MYSQL_THDVAR_UINT(
|
|||
0 /* blk */
|
||||
);
|
||||
|
||||
uint spider_param_hs_r_conn_recycle_mode(
|
||||
THD *thd
|
||||
) {
|
||||
DBUG_ENTER("spider_param_hs_r_conn_recycle_mode");
|
||||
DBUG_RETURN(THDVAR(thd, hs_r_conn_recycle_mode));
|
||||
}
|
||||
SPIDER_THDVAR_VALUE_FUNC(uint, hs_r_conn_recycle_mode)
|
||||
|
||||
/*
|
||||
0: weak
|
||||
|
@ -2128,12 +2110,7 @@ static MYSQL_THDVAR_UINT(
|
|||
0 /* blk */
|
||||
);
|
||||
|
||||
uint spider_param_hs_r_conn_recycle_strict(
|
||||
THD *thd
|
||||
) {
|
||||
DBUG_ENTER("spider_param_hs_r_conn_recycle_strict");
|
||||
DBUG_RETURN(THDVAR(thd, hs_r_conn_recycle_strict));
|
||||
}
|
||||
SPIDER_THDVAR_VALUE_FUNC(uint, hs_r_conn_recycle_strict)
|
||||
|
||||
/*
|
||||
0: no recycle
|
||||
|
@ -2152,12 +2129,7 @@ static MYSQL_THDVAR_UINT(
|
|||
0 /* blk */
|
||||
);
|
||||
|
||||
uint spider_param_hs_w_conn_recycle_mode(
|
||||
THD *thd
|
||||
) {
|
||||
DBUG_ENTER("spider_param_hs_w_conn_recycle_mode");
|
||||
DBUG_RETURN(THDVAR(thd, hs_w_conn_recycle_mode));
|
||||
}
|
||||
SPIDER_THDVAR_VALUE_FUNC(uint, hs_w_conn_recycle_mode)
|
||||
|
||||
/*
|
||||
0: weak
|
||||
|
@ -2175,12 +2147,7 @@ static MYSQL_THDVAR_UINT(
|
|||
0 /* blk */
|
||||
);
|
||||
|
||||
uint spider_param_hs_w_conn_recycle_strict(
|
||||
THD *thd
|
||||
) {
|
||||
DBUG_ENTER("spider_param_hs_w_conn_recycle_strict");
|
||||
DBUG_RETURN(THDVAR(thd, hs_w_conn_recycle_strict));
|
||||
}
|
||||
SPIDER_THDVAR_VALUE_FUNC(uint, hs_w_conn_recycle_strict)
|
||||
|
||||
/*
|
||||
-1 :fallback to default
|
||||
|
@ -2838,7 +2805,7 @@ static MYSQL_THDVAR_BOOL(
|
|||
SPIDER_THDVAR_VALUE_FUNC(bool, sync_sql_mode)
|
||||
|
||||
/*
|
||||
-1 : use table parameter
|
||||
-1 : fallback to default
|
||||
0 : do not strict
|
||||
1 : do strict
|
||||
*/
|
||||
|
@ -2848,20 +2815,13 @@ static MYSQL_THDVAR_INT(
|
|||
"Use columns in select clause strictly for group by clause",
|
||||
NULL, /* check */
|
||||
NULL, /* update */
|
||||
-1, /* def */
|
||||
1, /* def */
|
||||
-1, /* min */
|
||||
1, /* max */
|
||||
0 /* blk */
|
||||
);
|
||||
|
||||
int spider_param_strict_group_by(
|
||||
THD *thd,
|
||||
int strict_group_by
|
||||
) {
|
||||
DBUG_ENTER("spider_param_strict_group_by");
|
||||
DBUG_RETURN(THDVAR(thd, strict_group_by) == -1 ?
|
||||
strict_group_by : THDVAR(thd, strict_group_by));
|
||||
}
|
||||
SPIDER_THDVAR_OVERRIDE_VALUE_FUNC(int, strict_group_by)
|
||||
|
||||
static struct st_mysql_storage_engine spider_storage_engine =
|
||||
{ MYSQL_HANDLERTON_INTERFACE_VERSION };
|
||||
|
|
|
@ -4052,16 +4052,12 @@ int spider_set_connect_info_default(
|
|||
#endif
|
||||
if (share->access_balances[roop_count] == -1)
|
||||
share->access_balances[roop_count] = 100;
|
||||
if (share->strict_group_bys[roop_count] == -1)
|
||||
share->strict_group_bys[roop_count] = 1;
|
||||
}
|
||||
|
||||
if (share->query_cache == -1)
|
||||
share->query_cache = 0;
|
||||
if (share->query_cache_sync == -1)
|
||||
share->query_cache_sync = 0;
|
||||
if (share->buffer_size == -1)
|
||||
share->buffer_size = 16000;
|
||||
if (share->scan_rate == -1)
|
||||
share->scan_rate = 1;
|
||||
if (share->read_rate == -1)
|
||||
|
|
Loading…
Reference in a new issue