Commit 6a26e0c7 authored by Marko Mäkelä's avatar Marko Mäkelä

Merge 10.1 into 10.2

parents fbcfbb0e adbf85fc
...@@ -8,6 +8,9 @@ connection default; ...@@ -8,6 +8,9 @@ connection default;
SET DEBUG_SYNC= 'now WAIT_FOR in_sync'; SET DEBUG_SYNC= 'now WAIT_FOR in_sync';
FOUND 1 /sleep/ in MDEV-20466.text FOUND 1 /sleep/ in MDEV-20466.text
SET DEBUG_SYNC= 'now SIGNAL go'; SET DEBUG_SYNC= 'now SIGNAL go';
connection con1;
user
disconnect con1; disconnect con1;
connection default;
SET DEBUG_SYNC = 'RESET'; SET DEBUG_SYNC = 'RESET';
End of 5.5 tests End of 5.5 tests
...@@ -1871,5 +1871,20 @@ id select_type table type possible_keys key key_len ref rows Extra ...@@ -1871,5 +1871,20 @@ id select_type table type possible_keys key key_len ref rows Extra
set optimizer_switch= @save_optimizer_switch; set optimizer_switch= @save_optimizer_switch;
set optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity; set optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity;
drop table t1,t2; drop table t1,t2;
#
# MDEV-21495: Conditional jump or move depends on uninitialised value in sel_arg_range_seq_next
#
CREATE TABLE t1(a INT, b INT);
INSERT INTO t1 SELECT seq, seq from seq_1_to_100;
set optimizer_use_condition_selectivity=4;
ANALYZE TABLE t1 PERSISTENT FOR ALL;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SELECT * from t1 WHERE a = 5 and b = 5;
a b
5 5
set optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity;
drop table t1;
# End of 10.1 tests # End of 10.1 tests
set @@global.histogram_size=@save_histogram_size; set @@global.histogram_size=@save_histogram_size;
...@@ -1881,6 +1881,21 @@ id select_type table type possible_keys key key_len ref rows Extra ...@@ -1881,6 +1881,21 @@ id select_type table type possible_keys key key_len ref rows Extra
set optimizer_switch= @save_optimizer_switch; set optimizer_switch= @save_optimizer_switch;
set optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity; set optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity;
drop table t1,t2; drop table t1,t2;
#
# MDEV-21495: Conditional jump or move depends on uninitialised value in sel_arg_range_seq_next
#
CREATE TABLE t1(a INT, b INT);
INSERT INTO t1 SELECT seq, seq from seq_1_to_100;
set optimizer_use_condition_selectivity=4;
ANALYZE TABLE t1 PERSISTENT FOR ALL;
Table Op Msg_type Msg_text
test.t1 analyze status Engine-independent statistics collected
test.t1 analyze status OK
SELECT * from t1 WHERE a = 5 and b = 5;
a b
5 5
set optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity;
drop table t1;
# End of 10.1 tests # End of 10.1 tests
set @@global.histogram_size=@save_histogram_size; set @@global.histogram_size=@save_histogram_size;
set optimizer_switch=@save_optimizer_switch_for_selectivity_test; set optimizer_switch=@save_optimizer_switch_for_selectivity_test;
......
...@@ -30,7 +30,10 @@ remove_file $MYSQLTEST_VARDIR/tmp/MDEV-20466.text; ...@@ -30,7 +30,10 @@ remove_file $MYSQLTEST_VARDIR/tmp/MDEV-20466.text;
SET DEBUG_SYNC= 'now SIGNAL go'; SET DEBUG_SYNC= 'now SIGNAL go';
connection con1;
reap;
disconnect con1; disconnect con1;
connection default;
SET DEBUG_SYNC = 'RESET'; SET DEBUG_SYNC = 'RESET';
......
...@@ -1272,6 +1272,18 @@ set optimizer_switch= @save_optimizer_switch; ...@@ -1272,6 +1272,18 @@ set optimizer_switch= @save_optimizer_switch;
set optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity; set optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity;
drop table t1,t2; drop table t1,t2;
--echo #
--echo # MDEV-21495: Conditional jump or move depends on uninitialised value in sel_arg_range_seq_next
--echo #
CREATE TABLE t1(a INT, b INT);
INSERT INTO t1 SELECT seq, seq from seq_1_to_100;
set optimizer_use_condition_selectivity=4;
ANALYZE TABLE t1 PERSISTENT FOR ALL;
SELECT * from t1 WHERE a = 5 and b = 5;
set optimizer_use_condition_selectivity= @save_optimizer_use_condition_selectivity;
drop table t1;
--echo # End of 10.1 tests --echo # End of 10.1 tests
# #
......
...@@ -74,6 +74,7 @@ range_seq_t sel_arg_range_seq_init(void *init_param, uint n_ranges, uint flags) ...@@ -74,6 +74,7 @@ range_seq_t sel_arg_range_seq_init(void *init_param, uint n_ranges, uint flags)
SEL_ARG_RANGE_SEQ *seq= (SEL_ARG_RANGE_SEQ*)init_param; SEL_ARG_RANGE_SEQ *seq= (SEL_ARG_RANGE_SEQ*)init_param;
seq->param->range_count=0; seq->param->range_count=0;
seq->at_start= TRUE; seq->at_start= TRUE;
seq->param->max_key_part= 0;
seq->stack[0].key_tree= NULL; seq->stack[0].key_tree= NULL;
seq->stack[0].min_key= seq->param->min_key; seq->stack[0].min_key= seq->param->min_key;
seq->stack[0].min_key_flag= 0; seq->stack[0].min_key_flag= 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment