Merge lp://staging/~daniel-nichter/drizzle/query-log-plugin into lp://staging/~drizzle-trunk/drizzle/development

Proposed by Daniel Nichter
Status: Merged
Approved by: Mark Atwood
Approved revision: 2318
Merged at revision: 2387
Proposed branch: lp://staging/~daniel-nichter/drizzle/query-log-plugin
Merge into: lp://staging/~drizzle-trunk/drizzle/development
Diff against target: 1624 lines (+1529/-0)
18 files modified
plugin/query_log/docs/index.rst (+181/-0)
plugin/query_log/event.h (+68/-0)
plugin/query_log/file.cc (+81/-0)
plugin/query_log/file.h (+89/-0)
plugin/query_log/module.cc (+287/-0)
plugin/query_log/plugin.ini (+8/-0)
plugin/query_log/query_log.cc (+149/-0)
plugin/query_log/query_log.h (+76/-0)
plugin/query_log/tests/check-query-log-attribute.pl (+134/-0)
plugin/query_log/tests/r/check_query_log_attribute.result (+14/-0)
plugin/query_log/tests/r/file.result (+164/-0)
plugin/query_log/tests/r/thresholds.result (+54/-0)
plugin/query_log/tests/samples/sample-event.log (+7/-0)
plugin/query_log/tests/t/check_query_log_attribute.test (+9/-0)
plugin/query_log/tests/t/file.test (+129/-0)
plugin/query_log/tests/t/master.opt (+1/-0)
plugin/query_log/tests/t/thresholds.test (+75/-0)
plugin/query_log/tests/zero-query-log-values.sh (+3/-0)
To merge this branch: bzr merge lp://staging/~daniel-nichter/drizzle/query-log-plugin
Reviewer Review Type Date Requested Status
Mark Atwood Approve
Stewart Smith (community) Needs Information
Drizzle Merge Team Pending
Review via email: mp+61034@code.staging.launchpad.net

Description of the change

I think this plugin can and should replace logging_query. :-) The major parts are tested and it's documented. If merged, I'll continue to maintain and enhance it.

To post a comment you must log in.
Revision history for this message
Daniel Nichter (daniel-nichter) wrote :
Download full text (53.2 KiB)

Branch location changed to: lp:~daniel-nichter/drizzle/query-log-plugin

Le 15 mai 2011 à 12:13, Daniel Nichter a écrit :

> Daniel Nichter has proposed merging lp:~daniel-percona/drizzle/query-log-plugin into lp:drizzle.
>
> Requested reviews:
> Drizzle Merge Team (drizzle-merge)
> Related bugs:
> Bug #781971 in Drizzle: "Write new query log plugin"
> https://bugs.launchpad.net/drizzle/+bug/781971
>
> For more details, see:
> https://code.launchpad.net/~daniel-percona/drizzle/query-log-plugin/+merge/61034
>
> I think this plugin can and should replace logging_query. :-) The major parts are tested and it's documented. If merged, I'll continue to maintain and enhance it.
> --
> https://code.launchpad.net/~daniel-percona/drizzle/query-log-plugin/+merge/61034
> You are the owner of lp:~daniel-percona/drizzle/query-log-plugin.
> === added directory 'plugin/query_log'
> === added file 'plugin/query_log/event.h'
> --- plugin/query_log/event.h 1970-01-01 00:00:00 +0000
> +++ plugin/query_log/event.h 2011-05-15 18:13:26 +0000
> @@ -0,0 +1,66 @@
> +/*
> + * Copyright (C) 2011 Daniel Nichter
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; version 2 of the License.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
> + * GNU General Public License for more details.
> + *
> + * You should have received a copy of the GNU General Public License
> + * along with this program; if not, write to the Free Software
> + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
> + */
> +
> +#pragma once
> +
> +/**
> + * @file
> + * event.h
> + *
> + * @brief
> + * Defines the event_t struct that encapsulates an event.
> + *
> + * @details
> + * An event (i.e. a query) has the attributes defined in the event_t struct.
> + * The values come from various members of the Session class. This is
> + * a necessary redundancy for two reasons. First, access to this data via
> + * the Session class is not uniform; it requires various calls and
> + * calculations. Look at QueryLog::afterStatement() to see this. Second,
> + * because the QueryLog object controls the logger classes, i.e.
> + * QueryLoggerFile and others in the futre, event creation and filtering
> + * is done in one place (QueryLog::afterStatement()) and then acceptable
> + * events are passed to the logger classes so that all they have to do is log.
> + *
> + * Since this is just a collection of variables, making this a class
> + * with accessor functions is overkill.
> + */
> +struct event_t {
> + // GMT timestamps (2002-01-31T10:00:01.123456)
> + std::string ts;
> +
> + // integers
> + uint32_t session_id;
> + uint32_t query_id;
> + uint32_t rows_examined;
> + uint32_t rows_sent;
> + uint32_t tmp_tables;
> + uint32_t warnings;
> +
> + // times (42.123456)
> + double execution_time;
> + double lock_time;
> + double session_ti...

Revision history for this message
Stewart Smith (stewart) wrote :

Looks good from a bit of a quick look.

Additional thoughts:
- add counters for number of in memory temp tables created, on disk temp tables created, number of temp tables that had to be spilled over from mem to disk
- for each of those, max size a table reached and total size of all.
- maybe a temp table log plugin as well?

review: Approve
Revision history for this message
Brian Aker (brianaker) wrote :

One quick note, the license is "just GPL2", we have been trying to use GPL3 or above, or BSD.

Revision history for this message
Daniel Nichter (daniel-nichter) wrote :

Ok I'll change it. Which do you suggest, GPL3 or BSD? I don't know much about licenses. Whichever provides the best guarantee that the code stays free and open source works for me.

Le 16 mai 2011 à 11:12, Brian Aker <email address hidden> a écrit :

> One quick note, the license is "just GPL2", we have been trying to use GPL3 or above, or BSD.
> --
> https://code.launchpad.net/~daniel-nichter/drizzle/query-log-plugin/+merge/61034
> You are the owner of lp:~daniel-nichter/drizzle/query-log-plugin.

Revision history for this message
Mark Atwood (fallenpegasus) wrote :

This is neat. It failed its own tests when I checked it on jenkens drizzle/build

I also have a modified query log plugin to replace the one shipping now.

We should sit down and reconcile them.

.. mark

review: Needs Fixing
Revision history for this message
Daniel Nichter (daniel-nichter) wrote :

I'm surprised it fails tests. What fails? How can I see these failures? How can I run it on Jenkins to know if passes before pushing changes?

Yes, I'd like to see your plugin. Will you push it to Launchpad?

Revision history for this message
Stewart Smith (stewart) wrote :

On Wed, 18 May 2011 03:04:26 -0000, Daniel Nichter <email address hidden> wrote:
> I'm surprised it fails tests. What fails? How can I see these
> failures? How can I run it on Jenkins to know if passes before
> pushing changes?

Monty or someone should be able to set you up with an account that can
submit drizzle-param jobs. You basically give it a BZR branch name and
it goes and builds it everywhere and runs tests. Rather neat.

--
Stewart Smith

Revision history for this message
Daniel Nichter (daniel-nichter) wrote :

Le 17 mai 2011 à 21:13, Stewart Smith <email address hidden> a écrit :
> On Wed, 18 May 2011 03:04:26 -0000, Daniel Nichter <email address hidden> wrote:
>> I'm surprised it fails tests. What fails? How can I see these
>> failures? How can I run it on Jenkins to know if passes before
>> pushing changes?
>
> Monty or someone should be able to set you up with an account that can
> submit drizzle-param jobs. You basically give it a BZR branch name and
> it goes and builds it everywhere and runs tests. Rather neat.

That is neat. I'd like to be able to do this if possible. Thanks.

Revision history for this message
Monty Taylor (mordred) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 05/18/2011 11:03 AM, Daniel Nichter wrote:
> Le 17 mai 2011 à 21:13, Stewart Smith <email address hidden> a écrit :
>> On Wed, 18 May 2011 03:04:26 -0000, Daniel Nichter <email address hidden> wrote:
>>> I'm surprised it fails tests. What fails? How can I see these
>>> failures? How can I run it on Jenkins to know if passes before
>>> pushing changes?
>>
>> Monty or someone should be able to set you up with an account that can
>> submit drizzle-param jobs. You basically give it a BZR branch name and
>> it goes and builds it everywhere and runs tests. Rather neat.
>
> That is neat. I'd like to be able to do this if possible. Thanks.

Make an account on jenkins and let me know what the login id is.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk3T7O8ACgkQ2Jv7/VK1RgFiBQCbBEXxQCzmJ0k4/IsqWD6hPKCS
UKwAn33i/SPdMU1jLWmz4RCM+gUPgpd2
=0mhv
-----END PGP SIGNATURE-----

Revision history for this message
Daniel Nichter (daniel-nichter) wrote :

Le 18 mai 2011 à 10:01, Monty Taylor <email address hidden> a écrit :

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 05/18/2011 11:03 AM, Daniel Nichter wrote:
>> Le 17 mai 2011 à 21:13, Stewart Smith <email address hidden> a écrit :
>>> On Wed, 18 May 2011 03:04:26 -0000, Daniel Nichter <email address hidden> wrote:
>>>> I'm surprised it fails tests. What fails? How can I see these
>>>> failures? How can I run it on Jenkins to know if passes before
>>>> pushing changes?
>>>
>>> Monty or someone should be able to set you up with an account that can
>>> submit drizzle-param jobs. You basically give it a BZR branch name and
>>> it goes and builds it everywhere and runs tests. Rather neat.
>>
>> That is neat. I'd like to be able to do this if possible. Thanks.
>
> Make an account on jenkins and let me know what the login id is.
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk3T7O8ACgkQ2Jv7/VK1RgFiBQCbBEXxQCzmJ0k4/IsqWD6hPKCS
> UKwAn33i/SPdMU1jLWmz4RCM+gUPgpd2
> =0mhv
> -----END PGP SIGNATURE-----

My login id is dnichter. Thanks!

Revision history for this message
Daniel Nichter (daniel-nichter) wrote :

Le 16 mai 2011 à 11:12, Brian Aker a écrit :
> One quick note, the license is "just GPL2", we have been trying to use GPL3 or above, or BSD.
> --
> https://code.launchpad.net/~daniel-nichter/drizzle/query-log-plugin/+merge/61034
> You are the owner of lp:~daniel-nichter/drizzle/query-log-plugin.

I changed the code to use GPLv3.

Revision history for this message
Daniel Nichter (daniel-nichter) wrote :

Any update on this? I'd like to test my branch on jenkins to see which tests are failing. I don't see a way for me to tell it to build a branch. Thanks.

Le 18 mai 2011 à 11:39, Daniel Nichter a écrit :

> Le 18 mai 2011 à 10:01, Monty Taylor <email address hidden> a écrit :
>
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> On 05/18/2011 11:03 AM, Daniel Nichter wrote:
>>> Le 17 mai 2011 à 21:13, Stewart Smith <email address hidden> a écrit :
>>>> On Wed, 18 May 2011 03:04:26 -0000, Daniel Nichter <email address hidden> wrote:
>>>>> I'm surprised it fails tests. What fails? How can I see these
>>>>> failures? How can I run it on Jenkins to know if passes before
>>>>> pushing changes?
>>>>
>>>> Monty or someone should be able to set you up with an account that can
>>>> submit drizzle-param jobs. You basically give it a BZR branch name and
>>>> it goes and builds it everywhere and runs tests. Rather neat.
>>>
>>> That is neat. I'd like to be able to do this if possible. Thanks.
>>
>> Make an account on jenkins and let me know what the login id is.
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.4.11 (GNU/Linux)
>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>>
>> iEYEARECAAYFAk3T7O8ACgkQ2Jv7/VK1RgFiBQCbBEXxQCzmJ0k4/IsqWD6hPKCS
>> UKwAn33i/SPdMU1jLWmz4RCM+gUPgpd2
>> =0mhv
>> -----END PGP SIGNATURE-----
>
> My login id is dnichter. Thanks!
> --
> https://code.launchpad.net/~daniel-nichter/drizzle/query-log-plugin/+merge/61034
> You are the owner of lp:~daniel-nichter/drizzle/query-log-plugin.

Revision history for this message
Monty Taylor (mordred) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Done.

On 05/27/2011 05:48 PM, Daniel Nichter wrote:
> Any update on this? I'd like to test my branch on jenkins to see which tests are failing. I don't see a way for me to tell it to build a branch. Thanks.
>
> Le 18 mai 2011 à 11:39, Daniel Nichter a écrit :
>
>> Le 18 mai 2011 à 10:01, Monty Taylor <email address hidden> a écrit :
>>
> On 05/18/2011 11:03 AM, Daniel Nichter wrote:
>>>>> Le 17 mai 2011 à 21:13, Stewart Smith <email address hidden> a écrit :
>>>>>> On Wed, 18 May 2011 03:04:26 -0000, Daniel Nichter <email address hidden> wrote:
>>>>>>> I'm surprised it fails tests. What fails? How can I see these
>>>>>>> failures? How can I run it on Jenkins to know if passes before
>>>>>>> pushing changes?
>>>>>>
>>>>>> Monty or someone should be able to set you up with an account that can
>>>>>> submit drizzle-param jobs. You basically give it a BZR branch name and
>>>>>> it goes and builds it everywhere and runs tests. Rather neat.
>>>>>
>>>>> That is neat. I'd like to be able to do this if possible. Thanks.
>
> Make an account on jenkins and let me know what the login id is.
>>
>> My login id is dnichter. Thanks!
>> --
>> https://code.launchpad.net/~daniel-nichter/drizzle/query-log-plugin/+merge/61034
>> You are the owner of lp:~daniel-nichter/drizzle/query-log-plugin.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk3gHjcACgkQ2Jv7/VK1RgFt7ACg2lOJt2yPhvwgKzfLyDfL20vu
RIMAnRFxDGvLp1k9knOaWRm2AAe1L3cd
=TL8U
-----END PGP SIGNATURE-----

Revision history for this message
Daniel Nichter (daniel-nichter) wrote :

Thanks Monty. I'm new to Jenkins so I'm not sure if I'm using it correctly. I created a build called "query-log-plugin" and added a build step to execute:

./config/autorun.sh
./configure
make -j 2

but the build fails, saying:

[query-log-plugin] $ /bin/sh -xe C:\Windows\TEMP\hudson8986804151220580592.sh
The system cannot find the file specified
FATAL: command execution failed
java.io.IOException: Cannot run program "/bin/sh" (in directory "c:\jenkins\workspace\query-log-plugin"): CreateProcess error=2, The system cannot find the file specified

It seems it's running on Windows? Am I doing something wrong?

Thanks,

Daniel

Le 27 mai 2011 à 15:58, Monty Taylor a écrit :

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Done.
>
> On 05/27/2011 05:48 PM, Daniel Nichter wrote:
>> Any update on this? I'd like to test my branch on jenkins to see which tests are failing. I don't see a way for me to tell it to build a branch. Thanks.
>>
>> Le 18 mai 2011 à 11:39, Daniel Nichter a écrit :
>>
>>> Le 18 mai 2011 à 10:01, Monty Taylor <email address hidden> a écrit :
>>>
>> On 05/18/2011 11:03 AM, Daniel Nichter wrote:
>>>>>> Le 17 mai 2011 à 21:13, Stewart Smith <email address hidden> a écrit :
>>>>>>> On Wed, 18 May 2011 03:04:26 -0000, Daniel Nichter <email address hidden> wrote:
>>>>>>>> I'm surprised it fails tests. What fails? How can I see these
>>>>>>>> failures? How can I run it on Jenkins to know if passes before
>>>>>>>> pushing changes?
>>>>>>>
>>>>>>> Monty or someone should be able to set you up with an account that can
>>>>>>> submit drizzle-param jobs. You basically give it a BZR branch name and
>>>>>>> it goes and builds it everywhere and runs tests. Rather neat.
>>>>>>
>>>>>> That is neat. I'd like to be able to do this if possible. Thanks.
>>
>> Make an account on jenkins and let me know what the login id is.
>>>
>>> My login id is dnichter. Thanks!
>>> --
>>> https://code.launchpad.net/~daniel-nichter/drizzle/query-log-plugin/+merge/61034
>>> You are the owner of lp:~daniel-nichter/drizzle/query-log-plugin.
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.11 (GNU/Linux)
> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>
> iEYEARECAAYFAk3gHjcACgkQ2Jv7/VK1RgFt7ACg2lOJt2yPhvwgKzfLyDfL20vu
> RIMAnRFxDGvLp1k9knOaWRm2AAe1L3cd
> =TL8U
> -----END PGP SIGNATURE-----
>
> --
> https://code.launchpad.net/~daniel-nichter/drizzle/query-log-plugin/+merge/61034
> You are the owner of lp:~daniel-nichter/drizzle/query-log-plugin.

Revision history for this message
Monty Taylor (mordred) wrote :

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Yeah - WAY easier than that. Go to:

http://jenkins.drizzle.org/view/Drizzle-param/job/drizzle-param/

And click "Build now

On 05/28/2011 03:56 AM, Daniel Nichter wrote:
> Thanks Monty. I'm new to Jenkins so I'm not sure if I'm using it correctly.. I created a build called "query-log-plugin" and added a build step to execute:
>
> ./config/autorun.sh
> ./configure
> make -j 2
>
> but the build fails, saying:
>
> [query-log-plugin] $ /bin/sh -xe C:\Windows\TEMP\hudson8986804151220580592.sh
> The system cannot find the file specified
> FATAL: command execution failed
> java.io.IOException: Cannot run program "/bin/sh" (in directory "c:\jenkins\workspace\query-log-plugin"): CreateProcess error=2, The system cannot find the file specified
>
> It seems it's running on Windows? Am I doing something wrong?
>
> Thanks,
>
> Daniel
>
> Le 27 mai 2011 à 15:58, Monty Taylor a écrit :
>
> Done.
>
> On 05/27/2011 05:48 PM, Daniel Nichter wrote:
>>>> Any update on this? I'd like to test my branch on jenkins to see which tests are failing. I don't see a way for me to tell it to build a branch. Thanks.
>>>>
>>>> Le 18 mai 2011 à 11:39, Daniel Nichter a écrit :
>>>>
>>>>> Le 18 mai 2011 à 10:01, Monty Taylor <email address hidden> a écrit :
>>>>>
>>>> On 05/18/2011 11:03 AM, Daniel Nichter wrote:
>>>>>>>> Le 17 mai 2011 à 21:13, Stewart Smith <email address hidden> a écrit :
>>>>>>>>> On Wed, 18 May 2011 03:04:26 -0000, Daniel Nichter <email address hidden> wrote:
>>>>>>>>>> I'm surprised it fails tests. What fails? How can I see these
>>>>>>>>>> failures? How can I run it on Jenkins to know if passes before
>>>>>>>>>> pushing changes?
>>>>>>>>>
>>>>>>>>> Monty or someone should be able to set you up with an account that can
>>>>>>>>> submit drizzle-param jobs. You basically give it a BZR branch name and
>>>>>>>>> it goes and builds it everywhere and runs tests. Rather neat.
>>>>>>>>
>>>>>>>> That is neat. I'd like to be able to do this if possible. Thanks.
>>>>
>>>> Make an account on jenkins and let me know what the login id is.
>>>>>
>>>>> My login id is dnichter. Thanks!
>>>>> --
>>>>> https://code.launchpad.net/~daniel-nichter/drizzle/query-log-plugin/+merge/61034
>>>>> You are the owner of lp:~daniel-nichter/drizzle/query-log-plugin.
>
>>
- --
https://code.launchpad.net/~daniel-nichter/drizzle/query-log-plugin/+merge/61034
You are the owner of lp:~daniel-nichter/drizzle/query-log-plugin.

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk3gsPEACgkQ2Jv7/VK1RgGuHACdH+vL5nnmDxrZko4g4AcRU4yg
eE8AoLEq8O8c8Dr8DXVXbV08dGMTlX9T
=EOm+
-----END PGP SIGNATURE-----

Revision history for this message
Daniel Nichter (daniel-nichter) wrote :

The latest query-log-plugin branch has fixed tests that now pass. Would anyone else like to review the code?

Le 17 mai 2011 à 12:37, Mark Atwood a écrit :

> Review: Needs Fixing
> This is neat. It failed its own tests when I checked it on jenkens drizzle/build
>
> I also have a modified query log plugin to replace the one shipping now.
>
> We should sit down and reconcile them.
>
> .. mark
> --
> https://code.launchpad.net/~daniel-nichter/drizzle/query-log-plugin/+merge/61034
> You are the owner of lp:~daniel-nichter/drizzle/query-log-plugin.

Revision history for this message
Daniel Nichter (daniel-nichter) wrote :

I fixed compiler warnings in rev 2317 of the query-log-plugin branch. Turns out gcc on Mac OS doesn't support -Wmissing-declarations.

Le 2 juin 2011 à 19:48, Daniel Nichter a écrit :

> The latest query-log-plugin branch has fixed tests that now pass. Would anyone else like to review the code?
>
> Le 17 mai 2011 à 12:37, Mark Atwood a écrit :
>
>> Review: Needs Fixing
>> This is neat. It failed its own tests when I checked it on jenkens drizzle/build
>>
>> I also have a modified query log plugin to replace the one shipping now.
>>
>> We should sit down and reconcile them.
>>
>> .. mark
>> --
>> https://code.launchpad.net/~daniel-nichter/drizzle/query-log-plugin/+merge/61034
>> You are the owner of lp:~daniel-nichter/drizzle/query-log-plugin.
>
>
> --
> https://code.launchpad.net/~daniel-nichter/drizzle/query-log-plugin/+merge/61034
> You are the owner of lp:~daniel-nichter/drizzle/query-log-plugin.

Revision history for this message
Stewart Smith (stewart) wrote :

switched back to "need review" as it looks like there's been fixes

Revision history for this message
Stewart Smith (stewart) wrote :

problem with GPLv3 is that it's not compatible with v2 (http://www.gnu.org/licenses/gpl-faq.html#v2v3Compatibility ) and we have code we've inherited that's v2 only (e.g. drizzled/drizzled.cc ).

review: Needs Information
Revision history for this message
Daniel Nichter (daniel-nichter) wrote :

I can change it back. I changed it to v3 because Brian said "One quick note, the license is "just GPL2", we have been trying to use GPL3 or above, or BSD." If v2 and v3 are incompatible, then how can any new code ever be introduced that uses v3?

Le 5 juin 2011 à 01:01, Stewart Smith a écrit :
> Review: Needs Information
> problem with GPLv3 is that it's not compatible with v2 (http://www.gnu.org/licenses/gpl-faq.html#v2v3Compatibility ) and we have code we've inherited that's v2 only (e.g. drizzled/drizzled.cc ).
> --
> https://code.launchpad.net/~daniel-nichter/drizzle/query-log-plugin/+merge/61034
> You are the owner of lp:~daniel-nichter/drizzle/query-log-plugin.

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

> then how can any new code ever be introduced that uses v3?

You can't.

Revision history for this message
Daniel Nichter (daniel-nichter) wrote :

Le 5 juin 2011 à 15:44, Olaf van der Spek a écrit :
>> then how can any new code ever be introduced that uses v3?
>
> You can't.

So I should change it back to GPL v2? And Brian's note about wanting to use GPL v3 or BSD licenses was just a note?

Revision history for this message
Stewart Smith (stewart) wrote :

On Sun, 05 Jun 2011 21:51:31 -0000, Daniel Nichter <email address hidden> wrote:
> Le 5 juin 2011 à 15:44, Olaf van der Spek a écrit :
> >> then how can any new code ever be introduced that uses v3?
> >
> > You can't.
>
>
> So I should change it back to GPL v2? And Brian's note about wanting
> to use GPL v3 or BSD licenses was just a note?

Change it back :)
--
Stewart Smith

Revision history for this message
Mark Atwood (fallenpegasus) wrote :
review: Needs Fixing
Revision history for this message
Daniel Nichter (daniel-nichter) wrote :

Le 5 juin 2011 à 19:44, Mark Atwood a écrit :
> Review: Needs Fixing
> Fail Jenkins tests
>
> http://jenkins.drizzle.org/view/Drizzle-build/job/drizzle-build-ubuntu10.04-32bit/1315/consoleFull

I dont' see any failures for that ^ build:

query_log.check_query_log_attribute [ pass ] 90
query_log.file [ pass ] 727
query_log.thresholds [ pass ] 1110

> http://jenkins.drizzle.org/view/Drizzle-build/job/drizzle-build-freebsd-8.0/1613/console

This ^ is FreeBSD which I didn't test since it's not part of drizzle-param. When I test my branch, should I test with just drizzle-param or others? Is there a super job that will test on every platform on which code must pass?

Thanks,

Daniel

Revision history for this message
Daniel Nichter (daniel-nichter) wrote :

Latest branch rev complies on FreeBSD now: http://jenkins.drizzle.org/job/drizzle-param-freebsd80/13/consoleText
The error at the end of that log is something else. The query_log plugin compiles though. Are there other tests it needs to pass?

-Daniel

Le 5 juin 2011 à 21:18, Daniel Nichter a écrit :
> Le 5 juin 2011 à 19:44, Mark Atwood a écrit :
>> Review: Needs Fixing
>> Fail Jenkins tests
>>
>> http://jenkins.drizzle.org/view/Drizzle-build/job/drizzle-build-ubuntu10.04-32bit/1315/consoleFull
>
> I dont' see any failures for that ^ build:
>
> query_log.check_query_log_attribute [ pass ] 90
> query_log.file [ pass ] 727
> query_log.thresholds [ pass ] 1110
>
>> http://jenkins.drizzle.org/view/Drizzle-build/job/drizzle-build-freebsd-8.0/1613/console
>
> This ^ is FreeBSD which I didn't test since it's not part of drizzle-param. When I test my branch, should I test with just drizzle-param or others? Is there a super job that will test on every platform on which code must pass?
>
> Thanks,
>
> Daniel
>
>
> --
> https://code.launchpad.net/~daniel-nichter/drizzle/query-log-plugin/+merge/61034
> You are the owner of lp:~daniel-nichter/drizzle/query-log-plugin.

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

Hi Daniel,

You might want to format file-scope namespaces like "namespace drizzled {".

Revision history for this message
Daniel Nichter (daniel-nichter) wrote :

Hi Olaf,

They're formatted according to http://wiki.drizzle.org/Coding_Standards#Namespaces_2. Are those coding standards out of date?

-Daniel

Le 30 juin 2011 à 14:02, Olaf van der Spek a écrit :

> Hi Daniel,
>
> You might want to format file-scope namespaces like "namespace drizzled {".
> --
> https://code.launchpad.net/~daniel-nichter/drizzle/query-log-plugin/+merge/61034
> You are the owner of lp:~daniel-nichter/drizzle/query-log-plugin.

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

> They're formatted according to
> http://wiki.drizzle.org/Coding_Standards#Namespaces_2. Are those coding
> standards out of date?

Yes, they are. I've updated them.

Revision history for this message
Mark Atwood (fallenpegasus) wrote :

add plugin/query_log/module.cc to po/POTFILES.in

=== modified file 'po/POTFILES.in'
--- po/POTFILES.in 2011-05-25 07:26:17 +0000
+++ po/POTFILES.in 2011-07-09 15:53:26 +0000
@@ -87,6 +87,7 @@
 plugin/mysql_unix_socket_protocol/protocol.cc
 plugin/pbms/src/parameters_ms.cc
 plugin/pbms/src/plugin_ms.cc
+plugin/query_log/module.cc
 plugin/rabbitmq/rabbitmq_handler.cc
 plugin/rabbitmq/rabbitmq_log.cc
 plugin/session_dictionary/processlist.cc

review: Needs Fixing
Revision history for this message
Mark Atwood (fallenpegasus) wrote :

fix precedence bug in plugin/query_log/file.cc ('not' has higher precedence than '==')

--- plugin/query_log/file.cc 2011-06-25 15:06:32 +0000
+++ plugin/query_log/file.cc 2011-07-09 16:01:18 +0000
@@ -90,7 +90,7 @@

 bool QueryLoggerFile::closeLogFile()
 {
- if (not _fd == LOG_FILE_CLOSED)
+ if (_fd != LOG_FILE_CLOSED)
     close(_fd); // TODO: catch errors
   _fd= LOG_FILE_CLOSED;
   return false; // success

review: Needs Fixing
Revision history for this message
Mark Atwood (fallenpegasus) wrote :

Valgrind problems.

Refer to http://jenkins.drizzle.org/view/Drizzle-build/job/drizzle-build-ubuntu10.04-64bit-valgrind/759/console

"15 warnings in query_log.thresholds"

We are trying to get the valgrind warning count down to zero.

review: Needs Fixing
Revision history for this message
Daniel Nichter (daniel-nichter) wrote :

Thanks for working on this. I'm not sure what to do about the valgrind warnings; perhaps you can point me in the correct direction. For example:

464 bytes in 13 blocks are possibly lost in loss record 41 of 52
    at 0x4C28973: operator new(unsigned long) (vg_replace_malloc.c:261)
    by 0x70B9E98: std::string::_Rep::_S_create(unsigned long, unsigned long, std::allocator<char> const&) (in /usr/lib/libstdc++.so.6.0.14)
    by 0x70BA0BD: std::string::_M_mutate(unsigned long, unsigned long, unsigned long) (in /usr/lib/libstdc++.so.6.0.14)
    by 0x70BA28B: std::string::_M_replace_safe(unsigned long, unsigned long, char const*, unsigned long) (in /usr/lib/libstdc++.so.6.0.14)
    by 0x70BBA8C: std::string::replace(unsigned long, unsigned long, char const*, unsigned long) (in /usr/lib/libstdc++.so.6.0.14)
    by 0xC349952: boost::basic_format<char, std::char_traits<char>, std::allocator<char> >::parse(std::string const&) (basic_string.h:1493)
    by 0xC3429D6: QueryLoggerFile::QueryLoggerFile() (file.cc:41)
    by 0xC336478: drizzle_plugin::init_options(drizzled::module::option_context&) (module.cc:159)
    by 0x4EFBA1: drizzled::plugin_load_list(drizzled::module::Registry&, drizzled::memory::Root*, std::set<std::string, std::less<std::string>, std::allocator<std::string> > const&, boost::program_options::options_description&, bool) (loader.cc:502)
    by 0x4F0F53: drizzled::plugin_init(drizzled::module::Registry&, boost::program_options::options_description&) (loader.cc:291)
    by 0x44ED1B: drizzled::init_remaining_variables(drizzled::module::Registry&) (drizzled.cc:1345)
    by 0x4E9978: main (main.cc:273)

Where or what might be the cause of that? It seems related to boost::basic_format, but beyond that I'm not sure what needs to be fixed.

Thanks,

Daniel

Le 12 juil. 2011 à 16:21, Mark Atwood a écrit :

> Review: Needs Fixing
> Valgrind problems.
>
> Refer to http://jenkins.drizzle.org/view/Drizzle-build/job/drizzle-build-ubuntu10.04-64bit-valgrind/759/console
>
> "15 warnings in query_log.thresholds"
>
> We are trying to get the valgrind warning count down to zero.
> --
> https://code.launchpad.net/~daniel-nichter/drizzle/query-log-plugin/+merge/61034
> You are the owner of lp:~daniel-nichter/drizzle/query-log-plugin.

Revision history for this message
Mark Atwood (fallenpegasus) wrote :

I'm not sure of the problem myself. The valgrind docs tell how to
read its messages.

On Tue, Jul 12, 2011 at 4:33 PM, Daniel Nichter <email address hidden> wrote:
> Thanks for working on this.  I'm not sure what to do about the valgrind warnings; perhaps you can point me in the correct direction.  For example:
>
> 464 bytes in 13 blocks are possibly lost in loss record 41 of 52
>    at 0x4C28973: operator new(unsigned long) (vg_replace_malloc.c:261)
>    by 0x70B9E98: std::string::_Rep::_S_create(unsigned long, unsigned long, std::allocator<char> const&) (in /usr/lib/libstdc++.so.6.0.14)
>    by 0x70BA0BD: std::string::_M_mutate(unsigned long, unsigned long, unsigned long) (in /usr/lib/libstdc++.so.6.0.14)
>    by 0x70BA28B: std::string::_M_replace_safe(unsigned long, unsigned long, char const*, unsigned long) (in /usr/lib/libstdc++.so.6.0.14)
>    by 0x70BBA8C: std::string::replace(unsigned long, unsigned long, char const*, unsigned long) (in /usr/lib/libstdc++.so.6.0.14)
>    by 0xC349952: boost::basic_format<char, std::char_traits<char>, std::allocator<char> >::parse(std::string const&) (basic_string.h:1493)
>    by 0xC3429D6: QueryLoggerFile::QueryLoggerFile() (file.cc:41)
>    by 0xC336478: drizzle_plugin::init_options(drizzled::module::option_context&) (module.cc:159)
>    by 0x4EFBA1: drizzled::plugin_load_list(drizzled::module::Registry&, drizzled::memory::Root*, std::set<std::string, std::less<std::string>, std::allocator<std::string> > const&, boost::program_options::options_description&, bool) (loader.cc:502)
>    by 0x4F0F53: drizzled::plugin_init(drizzled::module::Registry&, boost::program_options::options_description&) (loader.cc:291)
>    by 0x44ED1B: drizzled::init_remaining_variables(drizzled::module::Registry&) (drizzled.cc:1345)
>    by 0x4E9978: main (main.cc:273)
>
> Where or what might be the cause of that?  It seems related to boost::basic_format, but beyond that I'm not sure what needs to be fixed.
>
> Thanks,
>
> Daniel
>
> Le 12 juil. 2011 à 16:21, Mark Atwood a écrit :
>
>> Review: Needs Fixing
>> Valgrind problems.
>>
>> Refer to http://jenkins.drizzle.org/view/Drizzle-build/job/drizzle-build-ubuntu10.04-64bit-valgrind/759/console
>>
>> "15 warnings in query_log.thresholds"
>>
>> We are trying to get the valgrind warning count down to zero.
>> --
>> https://code.launchpad.net/~daniel-nichter/drizzle/query-log-plugin/+merge/61034
>> You are the owner of lp:~daniel-nichter/drizzle/query-log-plugin.
>
>
> --
> https://code.launchpad.net/~daniel-nichter/drizzle/query-log-plugin/+merge/61034
> You are reviewing the proposed merge of lp:~daniel-nichter/drizzle/query-log-plugin into lp:drizzle.
>

Revision history for this message
Joe Daly (skinny.moey) wrote :

On Tue, Jul 12, 2011 at 7:33 PM, Daniel Nichter <email address hidden> wrote:

> Thanks for working on this. I'm not sure what to do about the valgrind
> warnings; perhaps you can point me in the correct direction. For example:
>
> 464 bytes in 13 blocks are possibly lost in loss record 41 of 52
> at 0x4C28973: operator new(unsigned long) (vg_replace_malloc.c:261)
> by 0x70B9E98: std::string::_Rep::_S_create(unsigned long, unsigned long,
> std::allocator<char> const&) (in /usr/lib/libstdc++.so.6.0.14)
> by 0x70BA0BD: std::string::_M_mutate(unsigned long, unsigned long,
> unsigned long) (in /usr/lib/libstdc++.so.6.0.14)
> by 0x70BA28B: std::string::_M_replace_safe(unsigned long, unsigned long,
> char const*, unsigned long) (in /usr/lib/libstdc++.so.6.0.14)
> by 0x70BBA8C: std::string::replace(unsigned long, unsigned long, char
> const*, unsigned long) (in /usr/lib/libstdc++.so.6.0.14)
> by 0xC349952: boost::basic_format<char, std::char_traits<char>,
> std::allocator<char> >::parse(std::string const&) (basic_string.h:1493)
> by 0xC3429D6: QueryLoggerFile::QueryLoggerFile() (file.cc:41)
> by 0xC336478:
> drizzle_plugin::init_options(drizzled::module::option_context&)
> (module.cc:159)
> by 0x4EFBA1: drizzled::plugin_load_list(drizzled::module::Registry&,
> drizzled::memory::Root*, std::set<std::string, std::less<std::string>,
> std::allocator<std::string> > const&,
> boost::program_options::options_description&, bool) (loader.cc:502)
> by 0x4F0F53: drizzled::plugin_init(drizzled::module::Registry&,
> boost::program_options::options_description&) (loader.cc:291)
> by 0x44ED1B:
> drizzled::init_remaining_variables(drizzled::module::Registry&)
> (drizzled.cc:1345)
> by 0x4E9978: main (main.cc:273)
>
> Where or what might be the cause of that? It seems related to
> boost::basic_format, but beyond that I'm not sure what needs to be fixed.
>
>
You might want to try to move the code to a simple example and run it with
valgrind, and see if you still see the problem. It looks like the only other
place boost::basic_format is used is in the logging_query plugin which
doesn't have any tests so the warning would not show up in there. A quick
glance of the code and it looked correct.

> Thanks,
>
> Daniel
>
> Le 12 juil. 2011 à 16:21, Mark Atwood a écrit :
>
> > Review: Needs Fixing
> > Valgrind problems.
> >
> > Refer to
> http://jenkins.drizzle.org/view/Drizzle-build/job/drizzle-build-ubuntu10.04-64bit-valgrind/759/console
> >
> > "15 warnings in query_log.thresholds"
> >
> > We are trying to get the valgrind warning count down to zero.
> > --
> >
> https://code.launchpad.net/~daniel-nichter/drizzle/query-log-plugin/+merge/61034<https://code.launchpad.net/%7Edaniel-nichter/drizzle/query-log-plugin/+merge/61034>
> > You are the owner of lp:~daniel-nichter/drizzle/query-log-plugin.
>
>
> --
>
> https://code.launchpad.net/~daniel-nichter/drizzle/query-log-plugin/+merge/61034<https://code.launchpad.net/%7Edaniel-nichter/drizzle/query-log-plugin/+merge/61034>
> You are subscribed to branch lp:drizzle.
>

2319. By Daniel Nichter

Use C++ iostream instead of Boost format.

2320. By Daniel Nichter

Remove assert.

Revision history for this message
Daniel Nichter (daniel-nichter) wrote :
Download full text (4.0 KiB)

It occurred to me that Boost formatter is overkill. So, the latest code (https://code.launchpad.net/~daniel-nichter/drizzle/query-log-plugin) removes that and instead uses standard C++ iostream. I think this is a lot better because it's simpler and native and pure OO (unlike previous implementation using C-style open, file descriptors, etc.). Perhaps there's some technical reason for not using it? If not, then I believe the current code passes valgrind: http://jenkins.drizzle.org/job/Drizzle-param-valgrind/301/ The error is some po thing; I think that's easy to fix? It also passes tests, http://jenkins.drizzle.org/job/drizzle-param/871/, again minus some po errors.

-Daniel

Le 14 juil. 2011 à 06:41, Joe Daly a écrit :

> On Tue, Jul 12, 2011 at 7:33 PM, Daniel Nichter <email address hidden> wrote:
>
>> Thanks for working on this. I'm not sure what to do about the valgrind
>> warnings; perhaps you can point me in the correct direction. For example:
>>
>> 464 bytes in 13 blocks are possibly lost in loss record 41 of 52
>> at 0x4C28973: operator new(unsigned long) (vg_replace_malloc.c:261)
>> by 0x70B9E98: std::string::_Rep::_S_create(unsigned long, unsigned long,
>> std::allocator<char> const&) (in /usr/lib/libstdc++.so.6.0.14)
>> by 0x70BA0BD: std::string::_M_mutate(unsigned long, unsigned long,
>> unsigned long) (in /usr/lib/libstdc++.so.6.0.14)
>> by 0x70BA28B: std::string::_M_replace_safe(unsigned long, unsigned long,
>> char const*, unsigned long) (in /usr/lib/libstdc++.so.6.0.14)
>> by 0x70BBA8C: std::string::replace(unsigned long, unsigned long, char
>> const*, unsigned long) (in /usr/lib/libstdc++.so.6.0.14)
>> by 0xC349952: boost::basic_format<char, std::char_traits<char>,
>> std::allocator<char> >::parse(std::string const&) (basic_string.h:1493)
>> by 0xC3429D6: QueryLoggerFile::QueryLoggerFile() (file.cc:41)
>> by 0xC336478:
>> drizzle_plugin::init_options(drizzled::module::option_context&)
>> (module.cc:159)
>> by 0x4EFBA1: drizzled::plugin_load_list(drizzled::module::Registry&,
>> drizzled::memory::Root*, std::set<std::string, std::less<std::string>,
>> std::allocator<std::string> > const&,
>> boost::program_options::options_description&, bool) (loader.cc:502)
>> by 0x4F0F53: drizzled::plugin_init(drizzled::module::Registry&,
>> boost::program_options::options_description&) (loader.cc:291)
>> by 0x44ED1B:
>> drizzled::init_remaining_variables(drizzled::module::Registry&)
>> (drizzled.cc:1345)
>> by 0x4E9978: main (main.cc:273)
>>
>> Where or what might be the cause of that? It seems related to
>> boost::basic_format, but beyond that I'm not sure what needs to be fixed.
>>
>>
> You might want to try to move the code to a simple example and run it with
> valgrind, and see if you still see the problem. It looks like the only other
> place boost::basic_format is used is in the logging_query plugin which
> doesn't have any tests so the warning would not show up in there. A quick
> glance of the code and it looked correct.
>
>
>
>> Thanks,
>>
>> Daniel
>>
>> Le 12 juil. 2011 à 16:21, Mark Atwood a écrit :
>>
>>> Review: Needs Fixing
>>> Valgrind problems.
>>>
>>> Refer to
>> http://jenkins.driz...

Read more...

Revision history for this message
Mark Atwood (fallenpegasus) wrote :
Download full text (4.3 KiB)

Cool. I will review it, and then Jenkins it.

On Sat, Jul 30, 2011 at 5:41 PM, Daniel Nichter <email address hidden> wrote:
> It occurred to me that Boost formatter is overkill.  So, the latest code (https://code.launchpad.net/~daniel-nichter/drizzle/query-log-plugin) removes that and instead uses standard C++ iostream.  I think this is a lot better because it's simpler and native and pure OO (unlike previous implementation using C-style open, file descriptors, etc.).  Perhaps there's some technical reason for not using it?  If not, then I believe the current code passes valgrind: http://jenkins.drizzle.org/job/Drizzle-param-valgrind/301/  The error is some po thing; I think that's easy to fix?  It also passes tests, http://jenkins.drizzle.org/job/drizzle-param/871/, again minus some po errors.
>
> -Daniel
>
> Le 14 juil. 2011 à 06:41, Joe Daly a écrit :
>
>> On Tue, Jul 12, 2011 at 7:33 PM, Daniel Nichter <email address hidden> wrote:
>>
>>> Thanks for working on this.  I'm not sure what to do about the valgrind
>>> warnings; perhaps you can point me in the correct direction.  For example:
>>>
>>> 464 bytes in 13 blocks are possibly lost in loss record 41 of 52
>>>   at 0x4C28973: operator new(unsigned long) (vg_replace_malloc.c:261)
>>>   by 0x70B9E98: std::string::_Rep::_S_create(unsigned long, unsigned long,
>>> std::allocator<char> const&) (in /usr/lib/libstdc++.so.6.0.14)
>>>   by 0x70BA0BD: std::string::_M_mutate(unsigned long, unsigned long,
>>> unsigned long) (in /usr/lib/libstdc++.so.6.0.14)
>>>   by 0x70BA28B: std::string::_M_replace_safe(unsigned long, unsigned long,
>>> char const*, unsigned long) (in /usr/lib/libstdc++.so.6.0.14)
>>>   by 0x70BBA8C: std::string::replace(unsigned long, unsigned long, char
>>> const*, unsigned long) (in /usr/lib/libstdc++.so.6.0.14)
>>>   by 0xC349952: boost::basic_format<char, std::char_traits<char>,
>>> std::allocator<char> >::parse(std::string const&) (basic_string.h:1493)
>>>   by 0xC3429D6: QueryLoggerFile::QueryLoggerFile() (file.cc:41)
>>>   by 0xC336478:
>>> drizzle_plugin::init_options(drizzled::module::option_context&)
>>> (module.cc:159)
>>>   by 0x4EFBA1: drizzled::plugin_load_list(drizzled::module::Registry&,
>>> drizzled::memory::Root*, std::set<std::string, std::less<std::string>,
>>> std::allocator<std::string> > const&,
>>> boost::program_options::options_description&, bool) (loader.cc:502)
>>>   by 0x4F0F53: drizzled::plugin_init(drizzled::module::Registry&,
>>> boost::program_options::options_description&) (loader.cc:291)
>>>   by 0x44ED1B:
>>> drizzled::init_remaining_variables(drizzled::module::Registry&)
>>> (drizzled.cc:1345)
>>>   by 0x4E9978: main (main.cc:273)
>>>
>>> Where or what might be the cause of that?  It seems related to
>>> boost::basic_format, but beyond that I'm not sure what needs to be fixed.
>>>
>>>
>> You might want to try to move the code to a simple example and run it with
>> valgrind, and see if you still see the problem. It looks like the only other
>> place boost::basic_format is used is in the logging_query plugin which
>> doesn't have any tests so the warning would not show up in there. A quick
>> glance of the code and it looked correct.
>>
>>
>>
>>> ...

Read more...

Revision history for this message
Mark Atwood (fallenpegasus) wrote :

Failed Jenkins Build Test

http://jenkins.drizzle.org/view/Drizzle-build/job/drizzle-build-repeat-tests-twice/567/console

query_log.file [ fail ]

The tests have to be idempotent and not leave behind a trace. The repeat-tests-twice test helps discover test cases that are not.

Please fix and resubmit.

review: Approve
2321. By Daniel Nichter

Make tests idempotent.

Revision history for this message
Daniel Nichter (daniel-nichter) wrote :

Latest rev 2321 is idempotent: it passes --repeat-test 1, 2, 5, and 10. :-)
It also removes its tmp and .bak files.

Le 2 août 2011 à 20:51, Mark Atwood a écrit :

> Review: Approve
> Failed Jenkins Build Test
>
> http://jenkins.drizzle.org/view/Drizzle-build/job/drizzle-build-repeat-tests-twice/567/console
>
> query_log.file [ fail ]
>
> The tests have to be idempotent and not leave behind a trace. The repeat-tests-twice test helps discover test cases that are not.
>
> Please fix and resubmit.
> --
> https://code.launchpad.net/~daniel-nichter/drizzle/query-log-plugin/+merge/61034
> You are the owner of lp:~daniel-nichter/drizzle/query-log-plugin.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.