mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-33478: Tests massively fail with clang-18 -fsanitize=memory
Starting with clang-16, MemorySanitizer appears to check that uninitialized values not be passed by value nor returned. Previously, it was allowed to copy uninitialized data in such cases. get_foreign_key_info(): Remove a local variable that was passed uninitialized to a function. DsMrr_impl: Initialize key_buffer, because DsMrr_impl::dsmrr_init() is reading it. test_bind_result_ext1(): MYSQL_TYPE_LONG is 32 bits, hence we must use a 32-bit type, such as int. sizeof(long) differs between LP64 and LLP64 targets.
This commit is contained in:
@ -556,10 +556,6 @@ class DsMrr_impl
|
||||
public:
|
||||
typedef void (handler::*range_check_toggle_func_t)(bool on);
|
||||
|
||||
DsMrr_impl()
|
||||
: secondary_file(NULL),
|
||||
rowid_filter(NULL) {};
|
||||
|
||||
void init(handler *h_arg, TABLE *table_arg)
|
||||
{
|
||||
primary_file= h_arg;
|
||||
@ -581,7 +577,7 @@ public:
|
||||
int dsmrr_explain_info(uint mrr_mode, char *str, size_t size);
|
||||
private:
|
||||
/* Buffer to store (key, range_id) pairs */
|
||||
Lifo_buffer *key_buffer;
|
||||
Lifo_buffer *key_buffer= nullptr;
|
||||
|
||||
/*
|
||||
The "owner" handler object (the one that is expected to "own" this object
|
||||
@ -594,13 +590,13 @@ private:
|
||||
Secondary handler object. (created when needed, we need it when we need
|
||||
to run both index scan and rnd_pos() scan at the same time)
|
||||
*/
|
||||
handler *secondary_file;
|
||||
handler *secondary_file= nullptr;
|
||||
|
||||
/*
|
||||
The rowid filter that DS-MRR has "unpushed" from the storage engine.
|
||||
If it's present, DS-MRR will use it.
|
||||
*/
|
||||
Rowid_filter *rowid_filter;
|
||||
Rowid_filter *rowid_filter= nullptr;
|
||||
|
||||
uint keyno; /* index we're running the scan on */
|
||||
/* TRUE <=> need range association, buffers hold {rowid, range_id} pairs */
|
||||
|
Reference in New Issue
Block a user