console plugin fails unless username is specified

Bug #738024 reported by Stewart Smith on 2011-03-19
This bug report is a duplicate of:  Bug #743902: getlogin() needs changing. Edit Remove
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Drizzle
Triaged
Medium
Andrew Hutchings
7.1
Triaged
Medium
Andrew Hutchings

Bug Description

=== modified file 'plugin/console/console.cc'
--- plugin/console/console.cc 2011-03-15 21:30:35 +0000
+++ plugin/console/console.cc 2011-03-19 06:32:40 +0000
@@ -367,7 +367,7 @@ public:
 static int init(drizzled::module::Context &context)
 {
   const module::option_map &vm= context.getOptions();
- const string username(vm.count("username") ? vm["username"].as<string>() : "");
+ const string username(vm.count("username") ? vm["username"].as<string>() : "root");
   const string password(vm.count("password") ? vm["password"].as<string>() : "");
   const string schema(vm.count("schema") ? vm["schema"].as<string>() : "");

Related branches

Andrew Hutchings (linuxjedi) wrote :

In the drizzle client we detect the current unix user and use that, I thought I had ported it to the console plugin, I guess not :)

Changed in drizzle:
assignee: nobody → Andrew Hutchings (linuxjedi)
Stewart Smith (stewart) wrote :

that's an even better fix actually

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers