Skip to content
Snippets Groups Projects
Commit a2a2c4a9 authored by Ivan Tashkinov's avatar Ivan Tashkinov
Browse files

Critical fix: new lines treatment in fields' values.

parent 04eebc84
No related branches found
No related tags found
No related merge requests found
......@@ -5,3 +5,9 @@ MDB_SYS_SCHEMA = "sys." # explicitly specifying system schema
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
# 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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment