Merge lp:~prafulla-t/drizzle/dr-bug-592473 into lp:~drizzle-trunk/drizzle/development

Proposed by Patrick Crews
Status: Merged
Approved by: Brian Aker
Approved revision: 1641
Merged at revision: 1644
Proposed branch: lp:~prafulla-t/drizzle/dr-bug-592473
Merge into: lp:~drizzle-trunk/drizzle/development
Diff against target: 32 lines (+4/-0)
1 file modified
drizzled/join.cc (+4/-0)
To merge this branch: bzr merge lp:~prafulla-t/drizzle/dr-bug-592473
Reviewer Review Type Date Requested Status
Brian Aker Approve
Review via email: mp+29015@code.launchpad.net

Description of the change

Contains a fix for https://bugs.launchpad.net/drizzle/+bug/592473
Crash/segfault in drizzled::subselect_single_select_engine::exec (this=0x19a7008) at drizzled/item/subselect.cc:2204

I have tested this patch with the randgen + regular test suite with no issues.
Tested various grammars against patched vs. unpatched drizzle with no differences in result sets (other than the original crash)
Also tested execution times with no reported differences.

To post a comment you must log in.
lp:~prafulla-t/drizzle/dr-bug-592473 updated
1641. By PrafullaT

Reverting some un-necessary changes.

Revision history for this message
Brian Aker (brianaker) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'drizzled/join.cc'
2--- drizzled/join.cc 2010-06-25 19:38:04 +0000
3+++ drizzled/join.cc 2010-07-03 03:10:43 +0000
4@@ -497,6 +497,7 @@
5 { /* Impossible cond */
6 zero_result_cause= having_value == Item::COND_FALSE ?
7 "Impossible HAVING" : "Impossible WHERE";
8+ tables = 0;
9 goto setup_subq_exit;
10 }
11 }
12@@ -516,6 +517,7 @@
13 if (res == HA_ERR_KEY_NOT_FOUND)
14 {
15 zero_result_cause= "No matching min/max row";
16+ tables = 0;
17 goto setup_subq_exit;
18 }
19 if (res > 1)
20@@ -526,10 +528,12 @@
21 if (res < 0)
22 {
23 zero_result_cause= "No matching min/max row";
24+ tables = 0;
25 goto setup_subq_exit;
26 }
27 zero_result_cause= "Select tables optimized away";
28 tables_list= 0; // All tables resolved
29+ const_tables= tables;
30 /*
31 Extract all table-independent conditions and replace the WHERE
32 clause with them. All other conditions were computed by optimizer::sum_query