Merge lp:~mordred/drizzle/bug687582 into lp:drizzle/7.0

Proposed by Monty Taylor
Status: Merged
Approved by: Brian Aker
Approved revision: 1989
Merged at revision: 2024
Proposed branch: lp:~mordred/drizzle/bug687582
Merge into: lp:drizzle/7.0
Diff against target: 53 lines (+39/-3)
1 file modified
libdrizzle/column.c (+39/-3)
To merge this branch: bzr merge lp:~mordred/drizzle/bug687582
Reviewer Review Type Date Requested Status
Lee Bieber (community) Needs Fixing
Review via email: mp+43386@code.launchpad.net

This proposal supersedes a proposal from 2010-12-09.

Description of the change

Evan's change for not memsetting column structs.

To post a comment you must log in.
Revision history for this message
Lee Bieber (kalebral-deactivatedaccount) wrote : Posted in a previous version of this proposal

Lots of tests output has changed, do test results need updating??

review: Needs Fixing
Revision history for this message
Andrew Hutchings (linuxjedi) wrote : Posted in a previous version of this proposal

Looks to me like the column length data is getting messed up judging by the test results. I suspect this needs resetting where the memset was.

Revision history for this message
Lee Bieber (kalebral-deactivatedaccount) wrote :
review: Needs Fixing

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'libdrizzle/column.c'
2--- libdrizzle/column.c 2010-12-04 02:13:38 +0000
3+++ libdrizzle/column.c 2010-12-10 20:16:11 +0000
4@@ -364,11 +364,47 @@
5 return NULL;
6 }
7
8- memset(column, 0, sizeof(drizzle_column_st));
9- column->options|= DRIZZLE_COLUMN_ALLOCATED;
10+ column->result = result;
11+ /* SET BELOW: column->next */
12+ column->prev = NULL;
13+ column->options= DRIZZLE_COLUMN_ALLOCATED;
14+ column->catalog[0] = '\0';
15+ column->db[0] = '\0';
16+ column->table[0] = '\0';
17+ column->orig_table[0] = '\0';
18+ column->name[0] = '\0';
19+ column->orig_name[0] = '\0';
20+ column->charset = 0;
21+ column->size = 0;
22+ column->max_size = 0;
23+ column->type = 0;
24+ column->flags = 0;
25+ column->decimals = 0;
26+ /* UNSET: column->default_value */
27+ column->default_value_size = 0;
28+
29 }
30 else
31- memset(column, 0, sizeof(drizzle_column_st));
32+ {
33+ column->result = result;
34+ /* SET BELOW: column->next */
35+ column->prev = NULL;
36+ column->options= 0;
37+ column->catalog[0] = '\0';
38+ column->db[0] = '\0';
39+ column->table[0] = '\0';
40+ column->orig_table[0] = '\0';
41+ column->name[0] = '\0';
42+ column->orig_name[0] = '\0';
43+ column->charset = 0;
44+ column->size = 0;
45+ column->max_size = 0;
46+ column->type = 0;
47+ column->flags = 0;
48+ column->decimals = 0;
49+ /* UNSET: column->default_value */
50+ column->default_value_size = 0;
51+ }
52
53 column->result= result;
54

Subscribers

People subscribed via source and target branches