mysql_manager 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -46,7 +46,7 @@ module MysqlManager
46
46
  options[:command] ||= []
47
47
  options[:state] ||= []
48
48
  options[:db] ||= []
49
-
49
+
50
50
  @dbh.execute("SHOW FULL PROCESSLIST") do |sth|
51
51
  sth.fetch_hash() do |row|
52
52
  next if row['Command'] == 'Binlog Dump'
@@ -64,15 +64,18 @@ module MysqlManager
64
64
  end
65
65
  end
66
66
  when :user, :host, :query, :command, :state, :db
67
+
68
+ col = field == :query ? 'Info' : field.to_s.capitalize
69
+
67
70
  if criteria.length > 0
68
71
  matched = false
69
72
  criteria.each do |pattern|
70
- if pattern.match(row[field.to_s.capitalize])
73
+ if pattern.match(row[col])
71
74
  matched = true
72
75
  break
73
76
  end
74
77
  end
75
- #puts "#{row[field.to_s.capitalize]} #{criteria.inspect} == #{matched}"
78
+ #puts "#{row[col]} #{criteria.inspect} == #{matched}"
76
79
  results << matched
77
80
  end
78
81
  end
@@ -212,4 +215,4 @@ module MysqlManager
212
215
  end
213
216
  end
214
217
  end
215
- end
218
+ end
@@ -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.0"
21
+ VERSION = "1.0.1"
22
22
  end
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mysql_manager
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
5
4
  prerelease: false
6
5
  segments:
7
6
  - 1
8
7
  - 0
9
- - 0
10
- version: 1.0.0
8
+ - 1
9
+ version: 1.0.1
11
10
  platform: ruby
12
11
  authors:
13
12
  - Erik Osterman
@@ -15,18 +14,16 @@ autorequire:
15
14
  bindir: bin
16
15
  cert_chain: []
17
16
 
18
- date: 2012-07-19 00:00:00 -07:00
17
+ date: 2012-07-20 00:00:00 -07:00
19
18
  default_executable:
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
22
21
  name: parseconfig
23
22
  prerelease: false
24
23
  requirement: &id001 !ruby/object:Gem::Requirement
25
- none: false
26
24
  requirements:
27
25
  - - ">="
28
26
  - !ruby/object:Gem::Version
29
- hash: 19
30
27
  segments:
31
28
  - 1
32
29
  - 0
@@ -38,11 +35,9 @@ dependencies:
38
35
  name: dbi
39
36
  prerelease: false
40
37
  requirement: &id002 !ruby/object:Gem::Requirement
41
- none: false
42
38
  requirements:
43
39
  - - ">="
44
40
  - !ruby/object:Gem::Version
45
- hash: 5
46
41
  segments:
47
42
  - 0
48
43
  - 4
@@ -54,11 +49,9 @@ dependencies:
54
49
  name: dbd-mysql
55
50
  prerelease: false
56
51
  requirement: &id003 !ruby/object:Gem::Requirement
57
- none: false
58
52
  requirements:
59
53
  - - ">="
60
54
  - !ruby/object:Gem::Version
61
- hash: 7
62
55
  segments:
63
56
  - 0
64
57
  - 4
@@ -97,27 +90,23 @@ rdoc_options: []
97
90
  require_paths:
98
91
  - lib
99
92
  required_ruby_version: !ruby/object:Gem::Requirement
100
- none: false
101
93
  requirements:
102
94
  - - ">="
103
95
  - !ruby/object:Gem::Version
104
- hash: 3
105
96
  segments:
106
97
  - 0
107
98
  version: "0"
108
99
  required_rubygems_version: !ruby/object:Gem::Requirement
109
- none: false
110
100
  requirements:
111
101
  - - ">="
112
102
  - !ruby/object:Gem::Version
113
- hash: 3
114
103
  segments:
115
104
  - 0
116
105
  version: "0"
117
106
  requirements: []
118
107
 
119
108
  rubyforge_project:
120
- rubygems_version: 1.3.7
109
+ rubygems_version: 1.3.6
121
110
  signing_key:
122
111
  specification_version: 3
123
112
  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.