Merge lp:~tmaesaka/drizzle/drizzle-fix-drizzleslap into lp:~drizzle-trunk/drizzle/development
Status: | Merged |
---|---|
Merged at revision: | not available |
Proposed branch: | lp:~tmaesaka/drizzle/drizzle-fix-drizzleslap |
Merge into: | lp:~drizzle-trunk/drizzle/development |
Diff against target: | None lines |
To merge this branch: | bzr merge lp:~tmaesaka/drizzle/drizzle-fix-drizzleslap |
Related bugs: | |
Related blueprints: |
HTTP Protocol Plugin
(Low)
|
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Brian Aker | 2009-05-19 | Resubmit on 2009-06-01 | |
Jay Pipes (community) | 2009-05-18 | Approve on 2009-05-19 | |
Stewart Smith (community) | Approve on 2009-05-19 | ||
Review via email:
|
Toru Maesaka (tmaesaka) wrote : | # |
Toru Maesaka (tmaesaka) wrote : | # |
Err, sorry I forgot to mention that all these fixes are for the drizzleslap tool :)
Jay Pipes (jaypipes) wrote : | # |
Hi Toru!
I think we've been trying to get rid of calls to my_open() and my_close() in favour of the standard open()/close() methods... so I'd prefer to see the calls to my_open() disappear than going back to my_close() :)
Toru, I can tell you didn't want to go back to my_close()...is there another reason you did that?
-jay
Toru Maesaka (tmaesaka) wrote : | # |
Jay, Stewart
Hi!
Fair enough I'll get rid of my_open() and resubmit the patch.
> Toru, I can tell you didn't want to go back to my_close()...is there another
> reason you did that?
What I had in mind was to refactor drizzleslap later on and get rid of mysys dependencies then . But I guess I was just being lazy :(
Cheers,
Toru
> Hi Toru!
>
> I think we've been trying to get rid of calls to my_open() and my_close() in
> favour of the standard open()/close() methods... so I'd prefer to see the
> calls to my_open() disappear than going back to my_close() :)
>
> Toru, I can tell you didn't want to go back to my_close()...is there another
> reason you did that?
>
> -jay
- 1018. By Toru Maesaka on 2009-05-19
-
Replace occrrences of my_(open|close) with straight open() and close() system calls
Toru Maesaka (tmaesaka) wrote : | # |
Hi!
As suggested in the review, I've replaced all occurrences of my_open() and my_close() in drizzleslap with open(2) and close(2) system calls.
Next stop: Use a real list container for query statements.
Cheers,
Toru
Brian Aker (brianaker) wrote : | # |
Hi!
I've asked Toru to take the patch, and apply it to trunk. This tree came off of some tree that must have been abandoned (lots of bad stuff in the merge).
Cheers,
-Brian
Wesley Batista (w-le-y) wrote : | # |
hi
This merge involves three fixes:
(1) There was a block of code that assumed memory allocation
is always successful so a check is added.
(2) Fix a segmentation fault that is caused due to
trying to free a invalid pointer in statement_clean().
Note: This fix is not perfect.
Ideally, we should move the query_statement list to
a proper container like std::vector and create a
nice cleanup function for it (which I'm planning to
do next). This way, we can get rid of the small
memory leak that has been in drizzleslap for a while.
(3) Fix a memory leak due to not freeing the string
obtained inside my_open(). So, use my_close() instead
of directly closing the descriptor with close(2).
Cheers,
Toru