myreplicator 1.1.54 → 1.1.55

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -27,8 +27,11 @@ module Myreplicator
27
27
 
28
28
  cmd = Myreplicator.mysqldump
29
29
  cmd += "#{flags} -u#{db_configs(db)["username"]} -p#{db_configs(db)["password"]} "
30
- cmd += "-h#{db_host} "
31
- cmd += " -P#{db_configs(db)["port"]} " if db_configs(db)["port"]
30
+ Kernel.p "==== db_configs(db)['unuse_host_and_port'].blank? ====="
31
+ Kernel.p db_configs(db)
32
+ Kernel.p db_configs(db)["unuse_host_and_port"].blank?
33
+ cmd += "-h#{db_host} " if db_configs(db)["unuse_host_and_port"].blank?
34
+ cmd += " -P#{db_configs(db)["port"]} " if (db_configs(db)["port"] && db_configs(db)["unuse_host_and_port"].blank?)
32
35
  cmd += " #{db} "
33
36
  cmd += " #{options[:table_name]} "
34
37
  cmd += "--result-file=#{options[:filepath]} "
@@ -60,7 +63,7 @@ module Myreplicator
60
63
  # Default dump flags
61
64
  ##
62
65
  def self.dump_flags
63
- {"add-locks" => true,
66
+ {"add-locks" => false,
64
67
  "compact" => false,
65
68
  "lock-tables" => false,
66
69
  "no-create-db" => true,
@@ -242,8 +245,10 @@ module Myreplicator
242
245
  if db_configs(db).has_key? "socket"
243
246
  cmd += "--socket=#{db_configs(db)["socket"]} "
244
247
  else
245
- cmd += "-h#{db_host} "
246
- cmd += db_configs(db)["port"].blank? ? "-P3306 " : "-P#{db_configs(db)["port"]} "
248
+ cmd += "-h#{db_host} " if db_configs(db)["unuse_host_and_port"].blank?
249
+ if db_configs(db)["unuse_host_and_port"].blank?
250
+ cmd += db_configs(db)["port"].blank? ? "-P3306 " : "-P#{db_configs(db)["port"]} "
251
+ end
247
252
  end
248
253
 
249
254
  cmd += "--execute=\"#{get_outfile_sql(options)}\" "
@@ -1,3 +1,3 @@
1
1
  module Myreplicator
2
- VERSION = "1.1.54"
2
+ VERSION = "1.1.55"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: myreplicator
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.54
4
+ version: 1.1.55
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -354,7 +354,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
354
354
  version: '0'
355
355
  segments:
356
356
  - 0
357
- hash: 3415407350311219470
357
+ hash: -3832052584967901586
358
358
  required_rubygems_version: !ruby/object:Gem::Requirement
359
359
  none: false
360
360
  requirements:
@@ -363,7 +363,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
363
363
  version: '0'
364
364
  segments:
365
365
  - 0
366
- hash: 3415407350311219470
366
+ hash: -3832052584967901586
367
367
  requirements: []
368
368
  rubyforge_project:
369
369
  rubygems_version: 1.8.24