Merge lp:~sergei.glushchenko/percona-server/5.5-bug1155859 into lp:percona-server/5.5

Proposed by Sergei Glushchenko
Status: Merged
Approved by: Laurynas Biveinis
Approved revision: no longer in the source branch.
Merged at revision: 489
Proposed branch: lp:~sergei.glushchenko/percona-server/5.5-bug1155859
Merge into: lp:percona-server/5.5
Diff against target: 23 lines (+3/-3)
1 file modified
Percona-Server/sql-common/client.c (+3/-3)
To merge this branch: bzr merge lp:~sergei.glushchenko/percona-server/5.5-bug1155859
Reviewer Review Type Date Requested Status
Laurynas Biveinis (community) Approve
Review via email: mp+156362@code.launchpad.net

Description of the change

This is aa fix for bug in client library which makes plugin-dir setting in my.cnf impossible to use if my.cnf is passed to library by using mysql_options(..., MYSQL_READ_DEFAULT_FILE, "my.cnf"). The cause of this bug is incorrect use of convert_dirname. Fixed library has been checked and work correctly with MySQLdb (MySQL connector for Python which uses libmysqlclient). Python script is able to authorize via PAM and load dialog.so plugin from Percona Server distribution.

Did not test with Perl, assuming that if Perl connector work correct there should't be any issues with it as well.

http://jenkins.percona.com/view/PS%205.5/job/percona-server-5.5-param/710/

To post a comment you must log in.
Revision history for this message
Sergei Glushchenko (sergei.glushchenko) wrote :

forgot to mention, it is #29131

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

The fix looks good, feel free to point out the wrong convert_dirname() call on the upstream bug report.

For approval it needs the 5.6 MP however.

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Percona-Server/sql-common/client.c'
--- Percona-Server/sql-common/client.c 2012-09-17 13:08:32 +0000
+++ Percona-Server/sql-common/client.c 2013-04-01 15:08:30 +0000
@@ -1385,7 +1385,7 @@
1385 break;1385 break;
1386 case OPT_plugin_dir:1386 case OPT_plugin_dir:
1387 {1387 {
1388 char buff[FN_REFLEN], buff2[FN_REFLEN];1388 char buff[FN_REFLEN];
1389 if (strlen(opt_arg) >= FN_REFLEN)1389 if (strlen(opt_arg) >= FN_REFLEN)
1390 opt_arg[FN_REFLEN]= '\0';1390 opt_arg[FN_REFLEN]= '\0';
1391 if (my_realpath(buff, opt_arg, 0))1391 if (my_realpath(buff, opt_arg, 0))
@@ -1394,8 +1394,8 @@
1394 opt_arg));1394 opt_arg));
1395 break;1395 break;
1396 }1396 }
1397 convert_dirname(buff, buff2, NULL);1397 convert_dirname(buff, buff, NULL);
1398 EXTENSION_SET_STRING(options, plugin_dir, buff2);1398 EXTENSION_SET_STRING(options, plugin_dir, buff);
1399 }1399 }
1400 break;1400 break;
1401 case OPT_default_auth:1401 case OPT_default_auth:

Subscribers

People subscribed via source and target branches