summaryrefslogtreecommitdiff
path: root/mysys/safemalloc.c
diff options
context:
space:
mode:
authorMartin Hansson <martin.hansson@sun.com>2010-06-11 09:38:29 +0200
committerMartin Hansson <martin.hansson@sun.com>2010-06-11 09:38:29 +0200
commit0823afc8bf160e03ce722c5e3cef21024b63b99a (patch)
treec0caa34cb10477f50a49ff88b0c7bbdfe442d520 /mysys/safemalloc.c
parent0f9ddfa9d8bb8d071266bcc63e92813cf18ccd2b (diff)
downloadmariadb-git-0823afc8bf160e03ce722c5e3cef21024b63b99a.tar.gz
Bug#53859: Valgrind: opt_sum_query(TABLE_LIST*, List<Item>&,
Item*) at opt_sum.cc:305 Queries applying MIN/MAX functions to indexed columns are optimized to read directly from the index if all key parts of the index preceding the aggregated key part are bound to constants by the WHERE clause. A prefix length is also produced, equal to the total length of the bound key parts. If the aggregated column itself is bound to a constant, however, it is also included in the prefix. Such full search keys are read as closed intervals for reasons beyond the scope of this bug. However, the procedure missed one case where a key part meant for use as range endpoint was being overwritten with a NULL value destined for equality checking. In this case the key part was overwritten but the range flag remained, causing open interval reading to be performed. Bug was fixed by adding more stringent checking to the search key building procedure (matching_cond) and never allow overwrites of range predicates with non-range predicates. An assertion was added to make sure open intervals are never used with full search keys.
Diffstat (limited to 'mysys/safemalloc.c')
0 files changed, 0 insertions, 0 deletions