dynamobi/dynamobi — Issue #292: [LDB-29] assertion error parsing flatfiles with DOS line endings
Author: dynamobi-build
Created: 2011-12-30 02:27:15+00:00
State: closed
Labels: Flatfile, LDB

[reporter="schoi", created="Mon, 13 Feb 2006 12:38:07 -0500 (GMT-05:00)"]
Flatfile parser throws assertion error on files with DOS line endings ("\r\n")

Repro steps:

--------------------

create foreign data wrapper ff_jdbc

library 'class com.lucidera.farrago.namespace.flatfile.FlatFileDataWrapper'

language java;

create server ff_server

foreign data wrapper ff_jdbc

options(

directory '/mnt/raksha/engineering/testdata/From_dif_delphi/eng/testdata/pge/',

file_extension '.tab',

ctrl_file_extension '.bcp',

field_delimiter ',',

line_delimiter '\r\n',

quote_char '"',

escape_char '',

with_header 'no',

num_rows_scan '1'

);

create schema PGE_REMOTE;

import foreign schema "BCP" from server ff_server into PGE_REMOTE;

select * from PGE_REMOTE."g";

Failure:

------------

java: FlatFileParser.cpp:189: bool fennel::FlatFileParser::isRowDelim(char): Assertion `c != '\r'' failed.

*** CAUGHT SIGNAL 6; BACKTRACE:

/home/schoi/open/fennel/libfennel/.libs/libfennel_common-0.5.0.so(fennel::AutoBacktrace::signal_handler(int)+0x29) [0x3ae41]

[0xffffe420]

[0xffffe410]

/lib/tls/i686/cmov/libc.so.6(gsignal+0x51) [0xb7e129b1]

/lib/tls/i686/cmov/libc.so.6(abort+0xe9) [0xb7e142c9]

/lib/tls/i686/cmov/libc.so.6(__assert_fail+0x101) [0x21f51]

/home/schoi/open/fennel/lucidera/libfennel_lu/.libs/libfennel_lu_flatfile-0.5.0.so(fennel::FlatFileParser::isRowDelim(char)+0x48) [0x26f16]

/home/schoi/open/fennel/lucidera/libfennel_lu/.libs/libfennel_lu_flatfile-0.5.0.so(fennel::FlatFileParser::scanColumn(char const*, unsigned, unsigned, fennel::FlatFileColumnParseResult&)+0x18a) [0x270ea]

/home/schoi/open/fennel/lucidera/libfennel_lu/.libs/libfennel_lu_flatfile-0.5.0.so(fennel::FlatFileParser::scanRow(char const*, i nt, fennel::FlatFileRowDescriptor const&, fennel::FlatFileRowParseResult&)+0x137) [0x26bb3]

/home/schoi/open/fennel/lucidera/libfennel_lu/.libs/libfennel_lu_flatfile-0.5.0.so(fennel::FlatFileExecStreamImpl::execute(fennel::ExecStreamQuantum const&)+0x19d) [0x1e6fb]

/home/schoi/open/fennel/libfennel/.libs/libfennel_exec-0.5.0.so(fennel::ExecStreamScheduler::executeStream(fennel::ExecStream&, f ennel::ExecStreamQuantum const&)+0x8c) [0xbc6b8]

/home/schoi/open/fennel/libfennel/.libs/libfennel_exec-0.5.0.so(fennel::DfsTreeExecStreamScheduler::readStream(fennel::ExecStream&)+0x4a5) [0xba82b]

/home/schoi/open/fennel/farrago/.libs/libfarrago-0.5.0.so(Java_net_sf_farrago_fennel_FennelStorage_tupleStreamFetch+0xa6) [0xb1254cce]