mysql_manager 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -52,12 +52,24 @@ Or install it yourself as:
52
52
  -V, --version Display version information
53
53
  -h, --help Display this screen
54
54
 
55
+ ## How matching is done
56
+
57
+ If you specify a simple string as a parameter (e.g. `--kill:user api`), this is interpreted as an exactly matching
58
+ regular expression (e.g. `/^api$/`).
59
+
60
+ To specify your own regexp, include a leading and trailing slash. To match all usernames that *start* with `api`:
61
+ `--kill:user "/^api/"`
62
+
55
63
  ## Examples
56
64
 
57
65
  Kill all queries by user "api" that have been running longer than 30 seconds:
58
66
 
59
67
  mysql-manager --kill --kill:user api --kill:max-query-time 30 --log:level DEBUG --dry-run
60
68
 
69
+ Kill only SELECT queries by users starting with "api" from a host containing "test" that have been running longer than 30 seconds:
70
+
71
+ mysql-manager --kill --kill:user "/^api/" --kill:query "/^SELECT/" --kill:host "/test/" --kill:max-query-time 30 --dry-run
72
+
61
73
  Recover a MySQL Slave that has failed replication and wait for it to remain healthy (fully caught up to master) for 60 seconds.
62
74
 
63
75
  mysql-manager --skip-replication-errors --skip-replication-errors:min-healthy-duration 60 --log:level DEBUG
@@ -65,6 +77,10 @@ Recover a MySQL Slave that has failed replication and wait for it to remain heal
65
77
  Reload `/etc/my.cnf` without restarting MySQL:
66
78
 
67
79
  mysql-manager --reload-my-cnf --reload-my-cnf:config /etc/my.cnf --log:level DEBUG
80
+
81
+ ## Contributors
82
+
83
+ https://github.com/osterman/mysql_manager/graphs/contributors
68
84
 
69
85
  ## Contributing
70
86
 
@@ -81,7 +81,7 @@ module MysqlManager
81
81
 
82
82
  @options[:kill][:state] = []
83
83
  opts.on( '--kill:state STATE', 'Kill queries matching STATE (repeatable)') do |state|
84
- @options[:kill][:state] << to_patterns(state)
84
+ @options[:kill][:state] << to_pattern(state)
85
85
  end
86
86
 
87
87
  @options[:kill][:db] = []
@@ -18,5 +18,5 @@
18
18
  # along with MySQL Manager. If not, see <http://www.gnu.org/licenses/>.
19
19
  #
20
20
  module MysqlManager
21
- VERSION = "1.0.2"
21
+ VERSION = "1.0.3"
22
22
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 0
8
- - 2
9
- version: 1.0.2
8
+ - 3
9
+ version: 1.0.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Erik Osterman
@@ -14,13 +14,14 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2012-08-03 00:00:00 -07:00
17
+ date: 2012-08-09 00:00:00 -07:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: parseconfig
22
22
  prerelease: false
23
23
  requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
24
25
  requirements:
25
26
  - - ">="
26
27
  - !ruby/object:Gem::Version
@@ -35,6 +36,7 @@ dependencies:
35
36
  name: dbi
36
37
  prerelease: false
37
38
  requirement: &id002 !ruby/object:Gem::Requirement
39
+ none: false
38
40
  requirements:
39
41
  - - ">="
40
42
  - !ruby/object:Gem::Version
@@ -49,6 +51,7 @@ dependencies:
49
51
  name: dbd-mysql
50
52
  prerelease: false
51
53
  requirement: &id003 !ruby/object:Gem::Requirement
54
+ none: false
52
55
  requirements:
53
56
  - - ">="
54
57
  - !ruby/object:Gem::Version
@@ -90,6 +93,7 @@ rdoc_options: []
90
93
  require_paths:
91
94
  - lib
92
95
  required_ruby_version: !ruby/object:Gem::Requirement
96
+ none: false
93
97
  requirements:
94
98
  - - ">="
95
99
  - !ruby/object:Gem::Version
@@ -97,6 +101,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
97
101
  - 0
98
102
  version: "0"
99
103
  required_rubygems_version: !ruby/object:Gem::Requirement
104
+ none: false
100
105
  requirements:
101
106
  - - ">="
102
107
  - !ruby/object:Gem::Version
@@ -106,7 +111,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
106
111
  requirements: []
107
112
 
108
113
  rubyforge_project:
109
- rubygems_version: 1.3.6
114
+ rubygems_version: 1.3.7
110
115
  signing_key:
111
116
  specification_version: 3
112
117
  summary: MySQL Manager is a utility to perform routine tasks such as restoring replication after errors, killing queries based on a set of criteria, or reloading my.cnf without restarting the database.