Commit 6f091434 authored by Monty's avatar Monty

MDEV-32531 MSAN / Valgrind errors in Item_func_like::get_mm_leaf with temporal field

Added missing initializer
parent ab6139dd
......@@ -429,9 +429,6 @@ SET join_cache_level=3;
SET optimizer_switch='join_cache_hashed=on';
SET optimizer_switch='join_cache_bka=on';
set optimizer_switch='hash_join_cardinality=on';
select benchmark(1,1);
benchmark(1,1)
0
EXPLAIN
SELECT * FROM t1, t2 WHERE b=a;
id select_type table type possible_keys key key_len ref rows Extra
......@@ -443,5 +440,18 @@ DROP TABLE t1,t2;
set @@optimizer_switch=@save_optimizer_switch;
set @@join_cache_level=@save_join_cache_level;
#
# MDEV-32531 MSAN / Valgrind errors in Item_func_like::get_mm_leaf with
# temporal field
#
CREATE TABLE t1 (f DATE);
INSERT INTO t1 VALUES ('1978-08-27'),('1906-04-30');
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 f LIKE '2023%';
f
DROP TABLE t1;
#
# End of 10.6 tests
#
......@@ -287,7 +287,6 @@ SET optimizer_switch='join_cache_hashed=on';
SET optimizer_switch='join_cache_bka=on';
set optimizer_switch='hash_join_cardinality=on';
select benchmark(1,1);
EXPLAIN
SELECT * FROM t1, t2 WHERE b=a;
SELECT * FROM t1, t2 WHERE b=a;
......@@ -296,6 +295,17 @@ DROP TABLE t1,t2;
set @@optimizer_switch=@save_optimizer_switch;
set @@join_cache_level=@save_join_cache_level;
--echo #
--echo # MDEV-32531 MSAN / Valgrind errors in Item_func_like::get_mm_leaf with
--echo # temporal field
--echo #
CREATE TABLE t1 (f DATE);
INSERT INTO t1 VALUES ('1978-08-27'),('1906-04-30');
ANALYZE TABLE t1 PERSISTENT FOR ALL;
SELECT * FROM t1 WHERE f LIKE '2023%';
DROP TABLE t1;
--echo #
--echo # End of 10.6 tests
--echo #
......@@ -3532,6 +3532,7 @@ bool calculate_cond_selectivity_for_table(THD *thd, TABLE *table, Item **cond)
init_sql_alloc(key_memory_quick_range_select_root, &alloc,
thd->variables.range_alloc_block_size, 0, MYF(MY_THREAD_SPECIFIC));
bzero((void*) &param, sizeof(param));
param.thd= thd;
param.mem_root= &alloc;
param.old_root= thd->mem_root;
......
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