Permalink
Browse files

Fix config parsing bug for kill_long_tx

Change-Id: I5db1991b5a4178c741b8459f4e25fcafc7612121
  • Loading branch information...
1 parent a46f726 commit 45380e97690c7e31a4fbb8f9cf08c0012c6ad9da @EagleChen EagleChen committed Jul 30, 2012
Showing with 3 additions and 3 deletions.
  1. +1 −1 mysql/bin/mysql_node
  2. +1 −1 mysql/lib/mysql_service/node.rb
  3. +1 −1 mysql/spec/spec_helper.rb
View
@@ -27,7 +27,7 @@ class VCAP::Services::Mysql::NodeBin < VCAP::Services::Base::NodeBin
options[:max_db_size] = parse_property(config, "max_db_size", Integer)
options[:max_long_query] = parse_property(config, "max_long_query", Integer)
options[:max_long_tx] = parse_property(config, "max_long_tx", Integer)
- options[:kill_long_tx] = parse_property(config, "kill_long_tx", Boolean, :optional => true)
+ options[:kill_long_tx] = parse_property(config, "kill_long_tx", Boolean)
options[:max_user_conns] = parse_property(config, "max_user_conns", Integer, :optional => true)
options[:mysql] = parse_property(config, "mysql", Hash)
options[:socket] = parse_property(config, "socket", String, :optional => true)
@@ -52,7 +52,7 @@ def initialize(options)
@max_db_size = options[:max_db_size] * 1024 * 1024
@max_long_query = options[:max_long_query]
@max_long_tx = options[:max_long_tx]
- @kill_long_tx = options[:kill_long_tx] || true
+ @kill_long_tx = options[:kill_long_tx]
@max_user_conns = options[:max_user_conns] || 0
@mysqldump_bin = options[:mysqldump_bin]
@gzip_bin = options[:gzip_bin]
@@ -69,7 +69,7 @@ def getNodeTestConfig()
:mysql => parse_property(config, "mysql", Hash),
:ip_route => parse_property(config, "ip_route", String, :optional => true),
:max_long_tx => parse_property(config, "max_long_tx", Integer),
- :kill_long_tx => parse_property(config, "kill_long_tx", Boolean, :optional => true),
+ :kill_long_tx => parse_property(config, "kill_long_tx", Boolean),
:max_user_conns => parse_property(config, "max_user_conns", Integer, :optional => true),
:connection_wait_timeout => 10,
}

0 comments on commit 45380e9

Please sign in to comment.