#At file:///home/spetrunia/dev/mysql-6.0-bugs/
2691 Sergey Petrunia 2008-09-12
BUG:#37851: Crash in test_if_skip_sort_order tab->select is zero
- Fix pushbuild test failure. It has turned out there are cases where tab->select->cond
is used by filesort.
modified:
sql/sql_select.cc
per-file messages:
sql/sql_select.cc
BUG:#37851: Crash in test_if_skip_sort_order tab->select is zero
- Fix pushbuild test failure. It has turned out there are cases where tab->select->cond
is used by filesort.
=== modified file 'sql/sql_select.cc'
--- a/sql/sql_select.cc 2008-09-10 10:08:37 +0000
+++ b/sql/sql_select.cc 2008-09-12 12:58:42 +0000
@@ -15917,7 +15917,11 @@ test_if_skip_sort_order(JOIN_TAB *tab,OR
if (table->covering_keys.is_set(ref_key))
usable_keys.intersect(table->covering_keys);
if (tab->pre_idx_push_select_cond)
+ {
tab->select_cond= tab->pre_idx_push_select_cond;
+ if (tab->select)
+ tab->select->cond= tab->select_cond;
+ }
if ((new_ref_key= test_if_subkey(order, table, ref_key, ref_key_parts,
&usable_keys)) < MAX_KEY)
{
@@ -16177,7 +16181,11 @@ test_if_skip_sort_order(JOIN_TAB *tab,OR
table->file->extra(HA_EXTRA_KEYREAD);
}
if (tab->pre_idx_push_select_cond)
+ {
+ if (tab->select)
+ tab->select->cond= tab->select_cond;
tab->select_cond= tab->pre_idx_push_select_cond;
+ }
table->file->ha_index_or_rnd_end();
if (join->select_options & SELECT_DESCRIBE)
{
| Thread |
|---|
| • bzr commit into mysql-6.0-opt branch (sergefp:2691) | Sergey Petrunia | 12 Sep |