Joro,
thanks for details. That means plugin authors should be very careful
when choosing plugin names.
Ok to push.
P.S. We have a few options here actually. E.g. cleanup argv before
calling handle_options() for a plugin. But I guess that's too much
for this bug.
Regards,
Sergey
On Wed, Feb 09, 2011 at 06:42:58PM +0200, Georgi Kodinov wrote:
> Svoj,
>
> Thanks for looking at it. See my replies inline.
>
> On 09.02.2011, at 13:40, Sergey Vojtovich wrote:
>
> > if you really want to rename the plugin - that's ok. But I have
> > a few questions about the problem.
> >
> > I assume that when the name "socket_peercred" was initially suggested,
> > things used to work. What has changed, so it doesn't load anymore?
>
> I've got that plugin as a part of an external contribution.
> I haven't really tested it except in my development environment, as it's an example
> plugin.
> I assume the contributor did the same (tested it in his development environment
> alone).
>
> > As far as I remember semantics of system variables is as following:
> > if plugin variable conflicts with server variable, server variable
> > wins. Still plugin variable may be referenced as "--plugin-...".
> > If this rule still applies, do we agree that there is something
> > wrong and are we going to fix what went wrong?
> >
> > More interesting, you say that "socket_peercred" conflicting with
> > "socket". But this way why "flush" is not conflicting with "flush_time",
> > "old" is not conflicting with "old_alter_table", "shared_memory" is
> > not conflicting with "shared_memory_base_name", etc?
>
> You're absolutely correct (and I have my explanations wrong).
> I've rerun the tests and I've remembered that I'm getting :
>
> 110209 17:04:44 [ERROR] /data0/gkodinov/work/B59017-5.5/sql/mysqld: Error while
> setting value '/dev/shm/gk-ts/var/tmp/mysqld.1.sock' to 'socket-peercred'
> 110209 17:04:44 [ERROR] Parsing options for plugin 'socket_peercred' failed.
>
> Note : it's not an ambiguity !
> It's just that when loading the plugin the server tries to match *all* of the initial
> server options from the command line and the INI file to the list of the following option
> slots :
> [--socket_peercred, --plugin-socket_peercred].
> Obviously if --socket is specified either on the command line or in the INI file it
> will find it to be a (partial unambiguous) match of '--socket-peercred' and it will try to
> set the value (whatever the string value supplied to --socket happens to be) to the
> --socket_peercred option slot. Now the --socket_peercred option slot is defined to be an
> enum with values "OFF", "ON", "FORCE" and "FORCE_PLUS_PERMANENT". Most of the times the
> path to the socket will not fit any of these, so as a result we get : Error while setting
> value '/dev/shm/gk-ts/var/tmp/mysqld.1.sock' to 'socket-peercred'.
>
> So to me renaming the plugin as the only option remains.
>
> Best Regards,
> Joro
>
>
> >
> > Regards,
> > Sergey
> >
> > On Tue, Jan 11, 2011 at 02:53:19PM +0000, Georgi Kodinov wrote:
> >> #At file:///Users/kgeorge/mysql/work/B59017-5.5/ based on
> revid:magne.mahre@stripped
> >>
> >> 3234 Georgi Kodinov 2011-01-11
> >> Bug #59017: Auth plugin socket_peercred fails to load in 5.5.8
> >>
> >> Due to how the server checks for option names the name of the
> >> plugin "socket_peercred" collides with the existing server side
> >> option "socket".
> >>
> >> Renamed the plugin from "socket_peercred" to "auth_socket" to
> >> avoid the name clash.
> >>
> >> modified:
> >> plugin/auth/auth_socket.c
> >> === modified file 'plugin/auth/auth_socket.c'
> >> --- a/plugin/auth/auth_socket.c 2010-09-20 16:38:27 +0000
> >> +++ b/plugin/auth/auth_socket.c 2011-01-11 14:53:14 +0000
> >> @@ -79,7 +79,7 @@ mysql_declare_plugin(socket_auth)
> >> {
> >> MYSQL_AUTHENTICATION_PLUGIN,
> >> &socket_auth_handler,
> >> - "socket_peercred",
> >> + "auth_socket",
> >> "Sergei Golubchik",
> >> "Unix Socket based authentication",
> >> PLUGIN_LICENSE_GPL,
> >>
> >
> >
> >>
> >> --
> >> MySQL Code Commits Mailing List
> >> For list archives: http://lists.mysql.com/commits
> >> To unsubscribe: http://lists.mysql.com/commits?unsub=1
> >
> >
> > --
> > Sergey Vojtovich <svoj@stripped>
> > MySQL AB, Software Engineer
> > Izhevsk, Russia, www.mysql.com
>
> --
> Georgi Kodinov | Software Development Manager | +359887700566
> Oracle MySQL
> ul. Belgrad 12, office 34, Plovdiv, 4003, Bulgaria
>
--
Sergey Vojtovich <svoj@stripped>
MySQL AB, Software Engineer
Izhevsk, Russia, www.mysql.com