mysql_truck 0.6.0 → 0.6.1
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.
- data/lib/mysql_truck/dumper.rb +4 -2
- data/lib/mysql_truck/version.rb +1 -1
- metadata +2 -2
data/lib/mysql_truck/dumper.rb
CHANGED
@@ -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
|
-
|
51
|
-
|
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
|
data/lib/mysql_truck/version.rb
CHANGED
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.
|
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-
|
14
|
+
date: 2013-01-28 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: right_aws
|