Commit a2a2c4a9 authored by Ivan Tashkinov's avatar Ivan Tashkinov

Critical fix: new lines treatment in fields' values.

parent 04eebc84
......@@ -4,4 +4,10 @@ MDB_SYS_SCHEMA = "sys." # explicitly specifying system schema
#MDB_NON_SYSTEM_TABLES_ONLY = "" # initial value [before fix] - I.T.
MDB_NON_SYSTEM_TABLES_ONLY = "and system = false" # ignoring columns from system tables (in order not to mix in 'default_schema' and other fields from sys.users to OLDS users table)
MDB_LOG_USER_QUERIES = false
\ No newline at end of file
MDB_LOG_USER_QUERIES = false
# NOTE: critical fix: lib/MonetDBData.rb, line 280:
# fields << f.gsub(/\\/, '').gsub(/^"/,'').gsub(/"$/,'').gsub(/\"/, '')
# should be
# fields << f.gsub(/\\n/, "\n").gsub(/\\/, '').gsub(/^"/,'').gsub(/"$/,'').gsub(/\"/, '')
# in order to treat line breaks correctly
\ No newline at end of file
......@@ -277,7 +277,8 @@ class MonetDBData
tuple = tuple.to_s.gsub(/^\[\s+/,'')
tuple.split(/,\t/).each do |f|
fields << f.gsub(/\\/, '').gsub(/^"/,'').gsub(/"$/,'').gsub(/\"/, '')
#fields << f.gsub(/\\/, '').gsub(/^"/,'').gsub(/"$/,'').gsub(/\"/, '')
fields << f.gsub(/\\n/, "\n").gsub(/\\/, '').gsub(/^"/,'').gsub(/"$/,'').gsub(/\"/, '')
end
return fields.freeze
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment