freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
Re: [freetds] FreeBCP -n causes SIGSEGV, -c fails on input
- From: "ZIGLIO, Frediano, VF-IT" <Frediano.Ziglio AT vodafone.com>
- To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] FreeBCP -n causes SIGSEGV, -c fails on input
- Date: Tue, 31 Jan 2006 13:22:43 +0100
>
> Thanks Mark,
>
> Funnily enough, I discovered this myself only yesterday.
> A fix is being worked on as we speak.
>
We discovered a problem with nullable type and native format (fix
committed last week) however this problem didn't cause a SEGV...
> I will have a look at reproducing your problem with the -c option.
> Could you specify the -e <error file> option ?
> It should give us more information on which columns/fields are causing
> the problem
>
> regards,
>
> Bill
>
> -----Original Message-----
> From: freetds-bounces AT lists.ibiblio.org
> [mailto:freetds-bounces AT lists.ibiblio.org] On Behalf Of Mark Huber
> Sent: 31 January 2006 07:05
> To: freetds AT lists.ibiblio.org
> Subject: [freetds] FreeBCP -n causes SIGSEGV, -c fails on input
>
>
> Trying to use FreeBCP to transfer data from SQL Server 2K to
> another SQL
> Server 2K. Here's the gdb output for the core file:
>
> Core was generated by `./freebcp starsDEV.dbo.bcptest out /tmp/foo.out
> -n -U sa -P ****** -S ******'.
> Program terminated with signal 11, Segmentation fault.
>
> #0 dbcoltype (dbproc=0x0, column=0) at dblib.c:2321
> 2321 colinfo = resinfo->columns[column - 1];
>
Mmm... here I think debugger did not report correctly parameters... if
dbproc was NULL (0x0) program would have cored some lines above...
however this function did not check correctly parameters.
> Results in segmentation fault regardless of the table ( I tried 40+
> tables, all different structures)
>
> "-c" switch works fine for output but input falls over at the
> first line
> for this table structure:
>
> Column_name Type Computed Length Prec Scale
> Nullable
> TrimTrailingBlanks FixedLenNullInSource Collation
> PortID int no 4 10 0 no (n/a) (n/a)
> NULL
> PortName nvarchar no 100 yes
> (n/a) (n/a) SQL_Latin1_General_CP1_CI_AS
> PortSortOrder int no 4 10 0 yes (n/a)
> (n/a) NULL
> PortPM int no 4 10 0 yes (n/a) (n/a)
> NULL
> PortType nvarchar no 20 yes
> (n/a) (n/a) SQL_Latin1_General_CP1_CI_AS
>
> The output file looks like this: (freebcp starsDEV.dbo.tblPort out
> /tmp/wsotblFacilityName -c <password stuff> -t "@|@")
>
>
> 1@|@Carrera@|@12@|@4@|@CDO/CLO
> 2@|@Eagle@|@13@|@5@|@CDO/CLO
> 3@|@Hamilton@|@18@|@4@|@CDO/CLO
>
> freebcp with in results in:
>
> Msg 20050, Level 4
> Attempt to convert data stopped by syntax error in source field.
>
> Msg 20050, Level 4
> Attempt to convert data stopped by syntax error in source field.
>
> Msg 20049, Level 4
> Data-conversion resulted in overflow.
>
This can be a test...
At least 0.64 do not core :)
[fziglio@xxxx apps]$ ./freebcp dbo.bcp_in_test in mao.txt -c -U test -S
XXXX -P test -t "@|@"
Starting copy...
Msg 20050, Level 4
Attempt to convert data stopped by syntax error in source field
Msg 20050, Level 4
Attempt to convert data stopped by syntax error in source field
Msg 20049, Level 4
Data conversion resulted in overflow
Msg 20104, Level 3
Unexpected EOF encountered in bcp datafile
bcp copy in failed
[fziglio@xxxx apps]$ cat err.txt
#@ data conversion error on host data file Row 1 Column 3
#@ data conversion error on host data file Row 1 Column 4
#@ data conversion error on host data file Row 1 Column 5
1@|@Carrera@|@12@|@4@|@CDO/CLO
2@|@Eagle@|@13@|@5@|@CDO/CLO
3@|@Hamilton@|@1
>From dump
13:20:45.482732 (net.c:673):Sending packet
0000 07 01 00 79 00 00 01 00-81 04 00 00 00 09 00 e7 |...y.... ........|
0010 64 00 09 04 d0 00 00 08-50 00 6f 00 72 00 74 00 |d....... P.o.r.t.|
0020 4e 00 61 00 6d 00 65 00-00 00 09 00 26 04 0d 50 |N.a.m.e. ....&..P|
0030 00 6f 00 72 00 74 00 53-00 6f 00 72 00 74 00 4f |.o.r.t.S .o.r.t.O|
0040 00 72 00 64 00 65 00 72-00 00 00 09 00 26 04 06 |.r.d.e.r .....&..|
0050 50 00 6f 00 72 00 74 00-50 00 4d 00 00 00 09 00 |P.o.r.t. P.M.....|
0060 e7 14 00 09 04 d0 00 00-08 50 00 6f 00 72 00 74 |........ .P.o.r.t|
0070 00 54 00 79 00 70 00 65-00 |.T.y.p.e .|
Correctly PortID is not imported... perhaps this cause the issue...
freddy77
-
[freetds] FreeBCP -n causes SIGSEGV, -c fails on input,
Mark Huber, 01/31/2006
- <Possible follow-up(s)>
- Re: [freetds] FreeBCP -n causes SIGSEGV, -c fails on input, Thompson, Bill D (London), 01/31/2006
-
Re: [freetds] FreeBCP -n causes SIGSEGV, -c fails on input,
Thompson, Bill D (London), 01/31/2006
- Re: [freetds] FreeBCP -n causes SIGSEGV, -c fails on input, Mark Huber, 01/31/2006
- Re: [freetds] FreeBCP -n causes SIGSEGV, -c fails on input, ZIGLIO, Frediano, VF-IT, 01/31/2006
- Re: [freetds] FreeBCP -n causes SIGSEGV, -c fails on input, ZIGLIO, Frediano, VF-IT, 01/31/2006
- Re: [freetds] FreeBCP -n causes SIGSEGV, -c fails on input, Thompson, Bill D (London), 01/31/2006
Archive powered by MHonArc 2.6.24.