mysql-warmup 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ef5600e2b1d9462f2e8653caa0ae64a1e373ae4d
4
- data.tar.gz: aa4a0595091db470b66d079784d4dacadded57ca
3
+ metadata.gz: 528bec2ec40aebd23618e7b565ad1ebc56fecc2e
4
+ data.tar.gz: 826ada4963a4bbaeb26915ffe68ece199f994650
5
5
  SHA512:
6
- metadata.gz: ac489f240575c9f49f7e8bc4cb4217e899c29c2282eafffbfe1ad445085f03d806055e632ff204026acfaafdcbff2ebd33ac77e7949c7b99674df434ce789278
7
- data.tar.gz: 9fcb4721c49c1a29a34e1e7349f4e066f4699a00b338041d924fb7dd9ec48ba5270f4baf25727344a2f8a5186300ae4ee39b9affe67e59552ca1c37cf6414873
6
+ metadata.gz: b372e3fe62daddca167677763348853b0f7067188056fa076e16b3db0caa6e7688cb8dd1552521658fb41d8e965d877005d6466c365a9f83bac8840e97a6587b
7
+ data.tar.gz: c5ef0652894e93a7542f0fd349b81aae5f6511ae1a53686a0ea35265f0c08e7e36cdd5d7b6c30ffc4ba6d974e0f7e70a34b89c0f9cffb04fe65f720fb0a99c7a
data/CHANGELOG.md ADDED
@@ -0,0 +1,8 @@
1
+ # Changelog
2
+
3
+ ### v.0.0.2 (2017/01/14)
4
+ * Change check type_primary? condition to regardless to field type
5
+ * Add `char` to regex of checking type_var_char? condition
6
+
7
+ ### v.0.0.1 (2017/01/12)
8
+ * First release
data/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # mysql_warmup
2
- Simple mysql-wamup command tool for warming up mysql server after create/reboot
3
- [Github](https://github.com/manhdaovan/mysql_warmup)
2
+ Simple mysql-wamup command tool for warming up mysql server after create/reboot <br/>
3
+ [Github](https://github.com/manhdaovan/mysql_warmup) <br/>
4
+ [RubyGems](https://rubygems.org/gems/mysql-warmup)
4
5
 
5
6
  # Background
6
7
  With InnoDB storage engine, when you've just created new slave instance,
@@ -42,3 +43,9 @@ You can use this tool for warming up buffer poll before the first requests come.
42
43
  * All PR are welcome.
43
44
  * Be sure all test cases are passed by command: `$rake test`
44
45
 
46
+ # Changelog
47
+ Please ref to [Changelog](./CHANGELOG.md)
48
+
49
+ # License
50
+ MIT
51
+
@@ -15,7 +15,7 @@ module MysqlWarmup
15
15
  private
16
16
 
17
17
  def build_query_string(table_name, column_name, column_type, column_key)
18
- if type_primary?(column_key) && type_integer?(column_type)
18
+ if type_primary?(column_key)
19
19
  format_query("sum(`#{table_name}`.`#{column_name}`)", "`#{table_name}`", '1')
20
20
  elsif type_integer?(column_type)
21
21
  format_query('count(*)', "`#{table_name}`", "`#{table_name}`.`#{column_name}` LIKE '%0%'")
@@ -41,7 +41,7 @@ module MysqlWarmup
41
41
  end
42
42
 
43
43
  def type_var_char?(column_type)
44
- !(column_type.downcase =~ /varchar|index/).nil?
44
+ !(column_type.downcase =~ /char|varchar|index/).nil?
45
45
  end
46
46
 
47
47
  def format_query(*params)
@@ -1,3 +1,3 @@
1
1
  module MysqlWarmup
2
- VERSION = '0.0.1'.freeze
2
+ VERSION = '0.0.2'.freeze
3
3
  end
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mysql-warmup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Manh Dao Van
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-12 00:00:00.000000000 Z
11
+ date: 2017-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mysql
@@ -50,6 +50,7 @@ executables:
50
50
  extensions: []
51
51
  extra_rdoc_files: []
52
52
  files:
53
+ - CHANGELOG.md
53
54
  - README.md
54
55
  - Rakefile
55
56
  - bin/console
@@ -60,6 +61,7 @@ files:
60
61
  - lib/mysql_warmup/table.rb
61
62
  - lib/mysql_warmup/version.rb
62
63
  - lib/mysql_warmup/warmer.rb
64
+ - mysql-warmup-0.0.1.gem
63
65
  - mysql-warmup.gemspec
64
66
  - test/helper.rb
65
67
  - test/test_index.rb