Merge lp:~vlad-lesin/percona-server/5.5-bug-1322218 into lp:percona-server/5.5

Proposed by Vlad Lesin
Status: Work in progress
Proposed branch: lp:~vlad-lesin/percona-server/5.5-bug-1322218
Merge into: lp:percona-server/5.5
Diff against target: 86 lines (+52/-2) (has conflicts)
2 files modified
scripts/mysql_install_db.pl.in (+28/-2)
sql/sql_acl.cc (+24/-0)
Text conflict in sql/sql_acl.cc
To merge this branch: bzr merge lp:~vlad-lesin/percona-server/5.5-bug-1322218
Reviewer Review Type Date Requested Status
Laurynas Biveinis (community) Needs Information
Review via email: mp+234292@code.launchpad.net

Description of the change

To post a comment you must log in.
692. By Vlad Lesin

Bug #1322218 fix.

Merged from 5.1.

The difference between this and 5.1 fix is in preventing floating point error
in the case if "users" table is not created.

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

    - Same comments as for the 5.1 fix, and
    - Is it feasible to create a MTR testcase? I.e. create a new temp
    instance, truncate mysql.user, start and shutdown the server,
    destroy the instance?

review: Needs Information

Unmerged revisions

692. By Vlad Lesin

Bug #1322218 fix.

Merged from 5.1.

The difference between this and 5.1 fix is in preventing floating point error
in the case if "users" table is not created.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'scripts/mysql_install_db.pl.in'
--- scripts/mysql_install_db.pl.in 2014-04-18 04:02:37 +0000
+++ scripts/mysql_install_db.pl.in 2014-09-11 11:26:18 +0000
@@ -466,7 +466,20 @@
466466
467 print PIPE $_;467 print PIPE $_;
468 }468 }
469 close PIPE;469 if (!close PIPE)
470 {
471 if ($!)
472 {
473 error($opt, "Error closing mysqld pipe: $!");
474 }
475 else
476 {
477 error($opt,
478 "Installation of system tables failed!",
479 "mysqld returned $? exit status",
480 "Examine the logs in $opt->{ldata} for more information.");
481 }
482 };
470 close SQL;483 close SQL;
471 close SQL2;484 close SQL2;
472485
@@ -487,7 +500,20 @@
487 {500 {
488 print PIPE $_;501 print PIPE $_;
489 }502 }
490 close PIPE;503 if (!close PIPE)
504 {
505 if ($!)
506 {
507 error($opt, "Error closing mysqld pipe: $!");
508 }
509 else
510 {
511 error($opt,
512 "Installation of system tables failed!",
513 "mysqld returned $? exit status",
514 "Examine the logs in $opt->{ldata} for more information.");
515 }
516 };
491 close SQL;517 close SQL;
492518
493 report_verbose($opt,"OK");519 report_verbose($opt,"OK");
494520
=== modified file 'sql/sql_acl.cc'
--- sql/sql_acl.cc 2014-08-22 09:58:37 +0000
+++ sql/sql_acl.cc 2014-09-11 11:26:18 +0000
@@ -8688,10 +8688,34 @@
8688 Pretend the user exists; let the plugin decide how to handle8688 Pretend the user exists; let the plugin decide how to handle
8689 bad credentials.8689 bad credentials.
8690 */8690 */
8691<<<<<<< TREE
8691 LEX_STRING usr= { mpvio->auth_info.user_name,8692 LEX_STRING usr= { mpvio->auth_info.user_name,
8692 mpvio->auth_info.user_name_length };8693 mpvio->auth_info.user_name_length };
8693 mpvio->acl_user= decoy_user(usr, mpvio->mem_root);8694 mpvio->acl_user= decoy_user(usr, mpvio->mem_root);
8694 mpvio->acl_user_plugin= mpvio->acl_user->plugin;8695 mpvio->acl_user_plugin= mpvio->acl_user->plugin;
8696=======
8697 ulong nr1=1, nr2=4;
8698 CHARSET_INFO *cs= &my_charset_latin1;
8699 cs->coll->hash_sort(cs, (uchar*) mpvio->auth_info.user_name,
8700 mpvio->auth_info.user_name_length, &nr1, &nr2);
8701
8702 mysql_mutex_lock(&acl_cache->lock);
8703 if (!acl_users.elements)
8704 {
8705 mysql_mutex_unlock(&acl_cache->lock);
8706 DBUG_RETURN(1);
8707 }
8708 uint i= nr1 % acl_users.elements;
8709 ACL_USER *acl_user_tmp= dynamic_element(&acl_users, i, ACL_USER*);
8710 mpvio->acl_user= acl_user_tmp->copy(mpvio->mem_root);
8711 make_lex_string_root(mpvio->mem_root,
8712 &mpvio->acl_user_plugin,
8713 acl_user_tmp->plugin.str,
8714 acl_user_tmp->plugin.length, 0);
8715 mysql_mutex_unlock(&acl_cache->lock);
8716
8717 mpvio->make_it_fail= true;
8718>>>>>>> MERGE-SOURCE
8695 }8719 }
86968720
8697 /* user account requires non-default plugin and the client is too old */8721 /* user account requires non-default plugin and the client is too old */

Subscribers

People subscribed via source and target branches