Merge lp:~linuxjedi/drizzle/trunk-bug-709493 into lp:drizzle/7.0

Proposed by Andrew Hutchings
Status: Merged
Approved by: Lee Bieber
Approved revision: 2125
Merged at revision: 2127
Proposed branch: lp:~linuxjedi/drizzle/trunk-bug-709493
Merge into: lp:drizzle/7.0
Diff against target: 53 lines (+24/-2)
3 files modified
drizzled/item/cmpfunc.cc (+2/-2)
tests/suite/regression/r/709493.result (+11/-0)
tests/suite/regression/t/709493.test (+11/-0)
To merge this branch: bzr merge lp:~linuxjedi/drizzle/trunk-bug-709493
Reviewer Review Type Date Requested Status
Drizzle Developers Pending
Review via email: mp+47889@code.launchpad.net

Description of the change

To post a comment you must log in.
2126. By Andrew Hutchings

Doh! missed t2 for cleanup

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'drizzled/item/cmpfunc.cc'
2--- drizzled/item/cmpfunc.cc 2011-01-24 22:22:11 +0000
3+++ drizzled/item/cmpfunc.cc 2011-01-29 17:06:45 +0000
4@@ -5114,15 +5114,15 @@
5 return 0;
6 List_iterator_fast<Item_field> it(fields);
7 Item *item= const_item ? const_item : it++;
8+ eval_item->store_value(item);
9 if ((null_value= item->null_value))
10 return 0;
11- eval_item->store_value(item);
12 while ((item_field= it++))
13 {
14 /* Skip fields of non-const tables. They haven't been read yet */
15 if (item_field->field->getTable()->const_table)
16 {
17- if ((null_value= item_field->null_value) || eval_item->cmp(item_field))
18+ if (eval_item->cmp(item_field) || (null_value= item_field->null_value))
19 return 0;
20 }
21 }
22
23=== added file 'tests/suite/regression/r/709493.result'
24--- tests/suite/regression/r/709493.result 1970-01-01 00:00:00 +0000
25+++ tests/suite/regression/r/709493.result 2011-01-29 17:06:45 +0000
26@@ -0,0 +1,11 @@
27+create table t1 (pk int primary key, col_int int, col_int_unique int unique key);
28+insert into t1 values (1,NULL,2), (2,0,0);
29+create table t2 (pk int primary key, col_int int, col_int_unique int unique key);
30+insert into t2 values (1,0,1), (2,0,2);
31+select * from t1 left join t2
32+on t1.col_int_unique = t2.col_int_unique and t1.col_int = t2.col_int
33+where t1.pk=1;
34+pk col_int col_int_unique pk col_int col_int_unique
35+1 NULL 2 NULL NULL NULL
36+drop table t1;
37+drop table t2;
38
39=== added file 'tests/suite/regression/t/709493.test'
40--- tests/suite/regression/t/709493.test 1970-01-01 00:00:00 +0000
41+++ tests/suite/regression/t/709493.test 2011-01-29 17:06:45 +0000
42@@ -0,0 +1,11 @@
43+create table t1 (pk int primary key, col_int int, col_int_unique int unique key);
44+insert into t1 values (1,NULL,2), (2,0,0);
45+create table t2 (pk int primary key, col_int int, col_int_unique int unique key);
46+insert into t2 values (1,0,1), (2,0,2);
47+
48+select * from t1 left join t2
49+ on t1.col_int_unique = t2.col_int_unique and t1.col_int = t2.col_int
50+ where t1.pk=1;
51+
52+drop table t1;
53+drop table t2;

Subscribers

People subscribed via source and target branches