summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorJorgen Loland <jorgen.loland@oracle.com>2013-04-12 09:39:56 +0200
committerJorgen Loland <jorgen.loland@oracle.com>2013-04-12 09:39:56 +0200
commit2c780b461dc62924b3f35bd9e17ec7237dfd31d8 (patch)
treeaa5317b60cfb82be31d8db4fa8c861fc5f593b1b /client
parentd20ec0f5ba3d80900de59d5de180240a72774f93 (diff)
downloadmariadb-git-2c780b461dc62924b3f35bd9e17ec7237dfd31d8.tar.gz
Bug#16540042: WRONG QUERY RESULT WHEN USING RANGE OVER
PARTIAL INDEX Consider the following table definition: CREATE TABLE t ( my_col CHAR(10), ... INDEX my_idx (my_col(1)) ) The my_idx index is not able to distinguish between rows with equal first-character my_col-values (e.g. "f", "foo", "fee"). Prior to this CS, the range optimizer would translate "WHERE my_col NOT IN ('f', 'h')" into (optimizer trace syntax) "ranges": [ "NULL < my_col < f", "f < my_col" ] But this was not correct because the rows with values "foo" and "fee" would not belong to any of those ranges. However, the predicate "my_col != 'f' AND my_col != 'h'" would translate to "ranges": [ "NULL < my_col" ] because get_mm_leaf() changes from "<" to "<=" for partial keyparts. This CS changes the range optimizer implementation for NOT IN to behave like a conjunction of NOT EQUAL: it replaces "<" with "<=" for all but the first range when the keypart is partial.
Diffstat (limited to 'client')
0 files changed, 0 insertions, 0 deletions