--no-defaults is ignored

Bug #935951 reported by Vadim Tkachenko
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Drizzle
Fix Released
Undecided
Wajahat Abbassi

Bug Description

I am trying to get help using --help and my command is:

 drizzled --no-defaults --help

getting error:
Aborting:"Use --help to get a list of available options. unknown option max-connections". Abort was called from drizzled/drizzled.cc:1369 in init_variables_after_daemonizing()

option max-connection is in drizzled.cnf, and this file should be ignored when I use
--no-defaults

Related branches

Henrik Ingo (hingo)
tags: added: low-hanging-fruit startup
Revision history for this message
denis (denisboyun) wrote :

As I understand it is already closed bug or no? Because in my Drizzle client 7.1 build 7.1.31.2535-snapshot, for pc-linux-gnu (i686) using readline 6.2 it is work a normal?

Revision history for this message
denis (denisboyun) wrote :

As I understand it is already closed bug or no. Because in my drizzled Ver 7.1.31.2535-snapshot for pc-linux-gnu on i686 (Source distribution (drizzle)) it is normal work?

Revision history for this message
Henrik Ingo (hingo) wrote :

No, I still get this. To test this bug you first need to make sure you are trying to use the correct defaults file. You could do this like:

strace sbin/drizzled 2>&1 | grep drizzled.cnf

Usually it is either /etc/drizzle/drizzled.cnf or (relative) etc/drizzle/drizzled.cnf

Then just do

echo foo >> etc/drizzle/drizzled.cnf and you will get an error from drizzled when starting.

Revision history for this message
Wajahat Abbassi (wajahat-abbassi) wrote :

Hi,

I would like to pick up this bug and fix it. This will enable me to familiarize with Drizzle code base and participate in GSoC 2012.

Thanks.

Wajahat Abbassi

Changed in drizzle:
assignee: nobody → Wajahat Abbassi (wajahat-abbassi)
status: New → In Progress
Revision history for this message
Henrik Ingo (hingo) wrote :

Hi Wajahat

You asked on the mailing list for pointers. This happens in the startup phase, so you should look at drizzled/main.cc and drizzled/drizzled.cc as starting points.

Changed in drizzle:
status: In Progress → Fix Committed
Revision history for this message
Wajahat Abbassi (wajahat-abbassi) wrote :

Hi,

I have commited the fix for this bug. Fix is:

Drizzled.cc has been modified:

Old code: if (vm.count("no-defaults"))

New Code: if (! vm["no-defaults"].as<bool>())

I implemented unit test and submitted the branch for merging.

Wajahat Abbassi

Revision history for this message
Henrik Ingo (hingo) wrote :

Hi Wajahat

Thanks for fixing this. I didn't test it yet, but based on our discussion it seems this is a correct fix.

It's also good you have submitted a test case so that the same error can not happen again without getting noticed.

Please make a merge proposal against 7.1 branch from that branch. (I will test compile your code when back from traveling.)

Revision history for this message
Wajahat Abbassi (wajahat-abbassi) wrote :

I have cloned lp:drizzle/7.1 and this fix has already been part of it.

I have cloned lp:~drizzle-trunk/drizzle/development and push a fix against that.

Vijay Samuel (vjsamuel)
Changed in drizzle:
status: Fix Committed → Fix Released
milestone: none → 7.1.34
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.