mysql_truck 0.6.0 → 0.6.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -45,10 +45,12 @@ module MysqlTruck
45
45
  config[:database],
46
46
  config[:port]
47
47
  )
48
+ mysql.query_with_result = false # Do not store result in memory
48
49
  mysql.query("SET NAMES utf8")
49
50
  CSV.open(filename(table)[:data_file], 'wb', :col_sep => "\t") do |csv|
50
- result = mysql.query("SELECT * FROM #{table}")
51
- result.each do |row|
51
+ mysql.query("SELECT * FROM #{table}")
52
+ results = mysql.use_result # Stream the rows
53
+ results.each do |row|
52
54
  csv << row.collect { |col| col && col.match(/\t/) ? " " : col }
53
55
  end
54
56
  end
@@ -1,3 +1,3 @@
1
1
  module MysqlTruck
2
- VERSION = "0.6.0"
2
+ VERSION = "0.6.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mysql_truck
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2013-01-25 00:00:00.000000000 Z
14
+ date: 2013-01-28 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: right_aws