Below is the list of changes that have just been committed into a local
4.1 repository of psergey. When psergey does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2007-03-29 10:27:58+04:00, sergefp@stripped +1 -0
BUG#26624: high mem usage (crash) in range optimizer
- Post-review fixes
sql/opt_range.cc@stripped, 2007-03-29 10:27:56+04:00, sergefp@stripped +15 -14
BUG#26624: high mem usage (crash) in range optimizer
- Post-review fixes
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: sergefp
# Host: pylon.mylan
# Root: /home/psergey/mysql-4.1-bug26624-r2
--- 1.151/sql/opt_range.cc 2007-03-29 10:28:01 +04:00
+++ 1.152/sql/opt_range.cc 2007-03-29 10:28:01 +04:00
@@ -175,7 +175,7 @@
Example:
By induction: Let's take any interval on some keypart in the middle:
- kp15=1
+ kp15=c0
Then let's AND it with this interval 'structure' from preceding and
following keyparts:
@@ -184,18 +184,18 @@
We will obtain this SEL_ARG graph:
- kp14 $ kp15 $ kp16
- $ $
- +---------+ $ +--------+ $ +---------+
- | kp14=c1 |--$-->| kp15=1 |--$-->| kp16=c3 |
- +---------+ $ +--------+ $ +---------+
- | $ $
- +---------+ $ +--------+ $
- | kp14=c2 |--$-->| kp15=1 | $
- +---------+ $ +--------+ $
- $ $
+ kp14 $ kp15 $ kp16
+ $ $
+ +---------+ $ +---------+ $ +---------+
+ | kp14=c1 |--$-->| kp15=c0 |--$-->| kp16=c3 |
+ +---------+ $ +---------+ $ +---------+
+ | $ $
+ +---------+ $ +---------+ $
+ | kp14=c2 |--$-->| kp15=c0 | $
+ +---------+ $ +---------+ $
+ $ $
- Note that we had to duplicate "kp15=1" and there was no way to avoid
+ Note that we had to duplicate "kp15=c0" and there was no way to avoid
that.
The induction step: AND the obtained expression with another "wrapping"
expression like (*).
@@ -477,7 +477,7 @@
max_key[MAX_KEY_LENGTH+MAX_FIELD_WIDTH];
bool quick; // Don't calulate possible keys
COND *cond;
- /* Numbr of SEL_ARG objects allocated by SEL_ARG::clone_tree operations */
+ /* Number of SEL_ARG objects allocated by SEL_ARG::clone_tree operations */
uint alloced_sel_args;
} PARAM;
@@ -681,7 +681,8 @@
tmp->parent=new_parent;
tmp->next_key_part=next_key_part;
if (left != &null_element)
- tmp->left=left->clone(param, tmp, next_arg);
+ if (!(tmp->left=left->clone(param, tmp, next_arg)))
+ return 0; // OOM
tmp->prev= *next_arg; // Link into next/prev chain
(*next_arg)->next=tmp;
| Thread |
|---|
| • bk commit into 4.1 tree (sergefp:1.2629) BUG#26624 | Sergey Petrunia | 29 Mar |