summaryrefslogtreecommitdiff
path: root/sql/item.h
diff options
context:
space:
mode:
authorunknown <sergefp@mysql.com>2006-04-25 23:33:31 +0400
committerunknown <sergefp@mysql.com>2006-04-25 23:33:31 +0400
commit15e00f1f3dc8ed6220e69bd20ba5d9335da070d2 (patch)
treec54aa25462b54e0d9f5d4f51654c9ecbccbc89da /sql/item.h
parent2a138695bf6eecb3c8f6b4e3fcb9a1a224b53c2d (diff)
downloadmariadb-git-15e00f1f3dc8ed6220e69bd20ba5d9335da070d2.tar.gz
BUG#15872: Don't run the range analyzer on "t1.keypart NOT IN (const1, ..., )", as that consumes
too much memory. Instead, either create the equvalent SEL_TREE manually, or create only two ranges that strictly include the area to scan (Note: just to re-iterate: increasing NOT_IN_IGNORE_THRESHOLD will make optimization run slower for big IN-lists, but the server will not run out of memory. O(N^2) memory use has been eliminated) mysql-test/r/func_in.result: Testcase for BUG#15872 mysql-test/t/func_in.test: Testcase for BUG#15872 sql/item.cc: BUG#15872: Added Item_decimal::set_decimal_value() sql/item.h: UG#15872: Added Item_decimal::set_decimal_value() sql/item_cmpfunc.h: BUG#15872: Added in_vector::create_item(), in_vector::value_to_item() and their implementations in concrete classes. sql/opt_range.cc: BUG#15872: Don't run the range analyzer on "t1.keypart NOT IN (const1, ..., )", as that consumes too much memory. Instead, either A) create the equivalent SEL_TREE manually, making use of the fact that item_not_in->array has an ordered IN-list, or B) create only two ranges: (-inf|NULL) < X < min_value_from_in_list, max_value_from_in_list < X (Choose #B if the IN-list has > 10K elements)
Diffstat (limited to 'sql/item.h')
-rw-r--r--sql/item.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/item.h b/sql/item.h
index d33e0ae34be..8b09bc14221 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -1442,6 +1442,7 @@ public:
}
uint decimal_precision() const { return decimal_value.precision(); }
bool eq(const Item *, bool binary_cmp) const;
+ void set_decimal_value(my_decimal *value_par);
};