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

Proposed by Vlad Lesin on 2014-09-11
Status: Work in progress
Proposed branch: lp:~vlad-lesin/percona-server/5.1-bug-1322218
Merge into: lp:percona-server/5.1
Diff against target: 47 lines (+28/-2)
1 file modified
Percona-Server/scripts/mysql_install_db.pl.in (+28/-2)
To merge this branch: bzr merge lp:~vlad-lesin/percona-server/5.1-bug-1322218
Reviewer Review Type Date Requested Status
Laurynas Biveinis (community) 2014-09-11 Needs Information on 2014-09-25
Review via email: mp+234291@code.launchpad.net

Description of the change

To post a comment you must log in.

    - The fix is correct but across all three branches there are two
      distinct bugs fixed. Bug 1322218 should be assigned to one of
      them (e.g. handling of empty mysql.user) and a new one, with an
      upstream bug if applicable, should be logged for the other bug
      (mysql_install_db not handling mysqld startup failure)

review: Needs Information
Vlad Lesin (vlad-lesin) wrote :

> - The fix is correct but across all three branches there are two
> distinct bugs fixed. Bug 1322218 should be assigned to one of
> them (e.g. handling of empty mysql.user)
Yes, I checked all current versions and they do not contain failed code. So I think this bug can be closed.

> and a new one, with an
> upstream bug if applicable, should be logged for the other bug
> (mysql_install_db not handling mysqld startup failure)
Done, see bug #1382782.

Vlad Lesin (vlad-lesin) wrote :

> - The fix is correct but across all three branches there are two
> distinct bugs fixed. Bug 1322218 should be assigned to one of
> them (e.g. handling of empty mysql.user)
Yes, I checked all current versions and they do not contain failed code. So I think this bug can be closed.

> and a new one, with an
> upstream bug if applicable, should be logged for the other bug
> (mysql_install_db not handling mysqld startup failure)
Done, see bug #1382782.

Unmerged revisions

618. By Vlad Lesin on 2014-09-08

Bug #1322218 fix.

In the case if mysqld returns error don't continue mysql_install_db script
execution.

The second case when floating point error happens due to dividing by zero when
the number of records in "users" table is null or there is no such table is not
fixed as 5.1 does not contain such code.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'Percona-Server/scripts/mysql_install_db.pl.in'
2--- Percona-Server/scripts/mysql_install_db.pl.in 2013-02-25 14:26:00 +0000
3+++ Percona-Server/scripts/mysql_install_db.pl.in 2014-09-11 10:57:48 +0000
4@@ -466,7 +466,20 @@
5
6 print PIPE $_;
7 }
8- close PIPE;
9+ if (!close PIPE)
10+ {
11+ if ($!)
12+ {
13+ error($opt, "Error closing mysqld pipe: $!");
14+ }
15+ else
16+ {
17+ error($opt,
18+ "Installation of system tables failed!",
19+ "mysqld returned $? exit status",
20+ "Examine the logs in $opt->{ldata} for more information.");
21+ }
22+ };
23 close SQL;
24 close SQL2;
25
26@@ -487,7 +500,20 @@
27 {
28 print PIPE $_;
29 }
30- close PIPE;
31+ if (!close PIPE)
32+ {
33+ if ($!)
34+ {
35+ error($opt, "Error closing mysqld pipe: $!");
36+ }
37+ else
38+ {
39+ error($opt,
40+ "Installation of system tables failed!",
41+ "mysqld returned $? exit status",
42+ "Examine the logs in $opt->{ldata} for more information.");
43+ }
44+ };
45 close SQL;
46
47 report_verbose($opt,"OK");

Subscribers

People subscribed via source and target branches