Merge lp:~dveeden/mysql-server/mysql-5.5-bug61038 into lp:~mysql/mysql-server/mysql-trunk

Proposed by Daniël van Eeden
Status: Superseded
Proposed branch: lp:~dveeden/mysql-server/mysql-5.5-bug61038
Merge into: lp:~mysql/mysql-server/mysql-trunk
Diff against target: 82 lines (+29/-11)
2 files modified
client/mysqladmin.cc (+23/-6)
support-files/mysql-log-rotate.sh (+6/-5)
To merge this branch: bzr merge lp:~dveeden/mysql-server/mysql-5.5-bug61038
Reviewer Review Type Date Requested Status
Oracle/MySQL Engineering Pending
Review via email: mp+59763@code.launchpad.net
To post a comment you must log in.

Unmerged revisions

3454. By Daniël van Eeden

Change variables from log-err to error-log. Suggest the use of the
mysqld section instead of safe_mysqld. Also change safe_mysqld to
mysqld_safe.

3453. By Daniël van Eeden

Merge from mysql-5.5

3452. By Daniël van Eeden

Fix typo

3451. By Daniël van Eeden

Merge from mysql-5.5 branch

3450. By Daniël van Eeden

Update help info

3449. By Daniël van Eeden

Adjust version, this is supported from 5.5.3 according to
the docs, not since 5.5.0.

3448. By Daniël van Eeden

Add specific log flushing to mysqladmin (Bug #60878)

3447. By Serge Kozlov

autocommit 5.1 -> 5.5

3446. By Sergey Glukhov

automerge

3445. By Sergey Glukhov

5.1 -> 5.5 merge

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'client/mysqladmin.cc'
2--- client/mysqladmin.cc 2011-02-11 14:38:34 +0000
3+++ client/mysqladmin.cc 2011-05-03 12:09:59 +0000
4@@ -869,11 +869,28 @@
5 }
6 case ADMIN_FLUSH_LOGS:
7 {
8- if (mysql_refresh(mysql,REFRESH_LOG))
9- {
10- my_printf_error(0, "refresh failed; error: '%s'", error_flags,
11- mysql_error(mysql));
12- return -1;
13+ if ((argc == 2) && ((strcasecmp(argv[1],"binary") == 0)
14+ || (strcasecmp(argv[1],"engine") == 0)
15+ || (strcasecmp(argv[1],"error") == 0)
16+ || (strcasecmp(argv[1],"general") == 0)
17+ || (strcasecmp(argv[1],"relay") == 0)
18+ || (strcasecmp(argv[1],"slow") == 0))) {
19+ char buff[42];
20+ sprintf(buff,"FLUSH /*!50503 %s */ LOGS",argv[1]);
21+ if (mysql_query(mysql,buff))
22+ {
23+ my_printf_error(0, "refresh failed; error: '%s'", error_flags,
24+ mysql_error(mysql));
25+ return -1;
26+ }
27+ argc--; argv++;
28+ } else {
29+ if (mysql_refresh(mysql,REFRESH_LOG))
30+ {
31+ my_printf_error(0, "refresh failed; error: '%s'", error_flags,
32+ mysql_error(mysql));
33+ return -1;
34+ }
35 }
36 break;
37 }
38@@ -1104,7 +1121,7 @@
39 drop databasename Delete a database and all its tables\n\
40 extended-status Gives an extended status message from the server\n\
41 flush-hosts Flush all cached hosts\n\
42- flush-logs Flush all logs\n\
43+ flush-logs logtype Flush all logs or logs of just one logtype\n\
44 flush-status Clear status variables\n\
45 flush-tables Flush all tables\n\
46 flush-threads Flush the thread cache\n\
47
48=== modified file 'support-files/mysql-log-rotate.sh'
49--- support-files/mysql-log-rotate.sh 2005-01-18 16:35:32 +0000
50+++ support-files/mysql-log-rotate.sh 2011-05-03 12:09:59 +0000
51@@ -1,9 +1,9 @@
52 # This logname can be set in /etc/my.cnf
53 # by setting the variable "err-log"
54-# in the [safe_mysqld] section as follows:
55+# in the [mysqld] or [mysqld_safe] section as follows:
56 #
57-# [safe_mysqld]
58-# err-log=@localstatedir@/mysqld.log
59+# [mysqld]
60+# log-error=@localstatedir@/mysqld.log
61 #
62 # If the root user has a password you have to create a
63 # /root/.my.cnf configuration file with the following
64@@ -13,7 +13,8 @@
65 # password = <secret>
66 # user= root
67 #
68-# where "<secret>" is the password.
69+# where "<secret>" is the password. mysqladmin will also
70+# read the [client] section.
71 #
72 # ATTENTION: This /root/.my.cnf should be readable ONLY
73 # for root !
74@@ -22,7 +23,7 @@
75 # create 600 mysql mysql
76 notifempty
77 daily
78- rotate 3
79+ rotate 5
80 missingok
81 compress
82 postrotate

Subscribers

People subscribed via source and target branches

to status/vote changes: