Merge lp:~linuxjedi/drizzle/trunk-bug-738024 into lp:~drizzle-trunk/drizzle/development

Proposed by Andrew Hutchings
Status: Rejected
Rejected by: Andrew Hutchings
Proposed branch: lp:~linuxjedi/drizzle/trunk-bug-738024
Merge into: lp:~drizzle-trunk/drizzle/development
Diff against target: 13 lines (+2/-1)
1 file modified
plugin/console/console.cc (+2/-1)
To merge this branch: bzr merge lp:~linuxjedi/drizzle/trunk-bug-738024
Reviewer Review Type Date Requested Status
Lee Bieber (community) Needs Fixing
Olaf van der Spek (community) Needs Fixing
Review via email: mp+54119@code.launchpad.net

Description of the change

Fix default user for console plugin

To post a comment you must log in.
Revision history for this message
Olaf van der Spek (olafvdspek) wrote :

Shouldn't option defaults be used instead?

review: Needs Fixing
Revision history for this message
Andrew Hutchings (linuxjedi) wrote :

> Shouldn't option defaults be used instead?

Probably, but since none of that plugin uses option defaults that is a separate issue for a separate bug report. Please feel free to file it.

Revision history for this message
Olaf van der Spek (olafvdspek) wrote :

On Sun, Mar 20, 2011 at 3:41 PM, Andrew Hutchings
<email address hidden> wrote:
>> Shouldn't option defaults be used instead?
>
> Probably, but since none of that plugin uses option defaults that is a separate issue for a separate bug report.  Please feel free to file it.

Done
But why not fix it while you're working on the code anyway?

--
Olaf

Revision history for this message
Andrew Hutchings (linuxjedi) wrote :

Mostly because there are many things broken in very minor ways with the options processing and I didn't have time to fix them all now. This was more urgent with code that stewart was working on.

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

I can't reproduce this with distcheck and that server doesn't have logs from that build. Are there any other servers it failed on I can look into?

Revision history for this message
Olaf van der Spek (olafvdspek) wrote :

On Mon, Mar 21, 2011 at 11:27 AM, Andrew Hutchings
<email address hidden> wrote:
> I can't reproduce this with distcheck and that server doesn't have logs from that build.  Are there any other servers it failed on I can look into?

Try make check

--
Olaf

Revision history for this message
Olaf van der Spek (olafvdspek) wrote :

std::string can't be NULL. If username and password are not provided and get_login() = NULL, you do username = NULL, but password = "".

Revision history for this message
Andrew Hutchings (linuxjedi) wrote :

ok, I didn't realise I had done that. Note for the future: don't patch when you are ill, stressed and haven't slept for 3 days ;)

2244. By Andrew Hutchings

This is what I mean to do to fix the console plugin, doh!

Revision history for this message
Andrew Hutchings (linuxjedi) wrote :

Lee: should be good now

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

New valgrind warnings

review: Needs Fixing
Revision history for this message
Andrew Hutchings (linuxjedi) wrote :

abandoning this, taking a different approach due to a new bug

Unmerged revisions

2244. By Andrew Hutchings

This is what I mean to do to fix the console plugin, doh!

2243. By Andrew Hutchings

Add console default user

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'plugin/console/console.cc'
2--- plugin/console/console.cc 2011-03-15 21:30:35 +0000
3+++ plugin/console/console.cc 2011-03-21 12:05:55 +0000
4@@ -366,8 +366,9 @@
5
6 static int init(drizzled::module::Context &context)
7 {
8+ const char* unix_user= getlogin();
9 const module::option_map &vm= context.getOptions();
10- const string username(vm.count("username") ? vm["username"].as<string>() : "");
11+ const string username(vm.count("username") ? vm["username"].as<string>() : (unix_user ? unix_user : ""));
12 const string password(vm.count("password") ? vm["password"].as<string>() : "");
13 const string schema(vm.count("schema") ? vm["schema"].as<string>() : "");
14