Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression in mssql-jdbc version 12.8.1 #2573

Open
yatharthgovil opened this issue Jan 3, 2025 · 3 comments · May be fixed by #2575
Open

Regression in mssql-jdbc version 12.8.1 #2573

yatharthgovil opened this issue Jan 3, 2025 · 3 comments · May be fixed by #2575
Assignees
Labels
Under Investigation Used for issues under investigation

Comments

@yatharthgovil
Copy link

Driver version

12.8.1

SQL Server version

Microsoft SQL Server 2019 (RTM) - 15.0.2000.5 (X64)
Sep 24 2019 13:48:23
Copyright (C) 2019 Microsoft Corporation
Enterprise Edition (64-bit) on Windows Server 2019 Standard 10.0 (Build 17763: ) (Hypervisor)

Client Operating System

windows 10

JAVA/JVM version

java 17

Table schema

create table ygovil.VARCHAR_TABLE(
ID INT NOT NULL,
COL1 VARCHAR(10),
COL2 VARCHAR(10)
);

Problem description

Regression faced while uploading data from csv file to sql server table using SQLSERVERBULKCOPY. Earlier it was working. Its working fine until 12.6.4 version. Issue is that it loads one less record than the no of records present in the csv file. eg. lF we have 2 records in csv it loads only one record.
Also issue is happening when .setEscapeColumnDelimitersCSV(true) is set to true. its working otherwise, and previously was working with this option with older version.

Expected behavior

2 records should get loaded if 2 records are present in the csv

Actual behavior

1 record got loaded

Error message/stack trace

Run was successful

Any other details that can be helpful

NA

JDBC trace logs

NA

@github-project-automation github-project-automation bot moved this to To be triaged in MSSQL JDBC Jan 3, 2025
@machavan machavan self-assigned this Jan 6, 2025
@machavan machavan added the Under Investigation Used for issues under investigation label Jan 6, 2025
@machavan
Copy link
Contributor

machavan commented Jan 6, 2025

Thanks @yatharthgovil for reporting the issue with BulkCopy when .setEscapeColumnDelimitersCSV(true)

A suggested workaround to try out for this issue is to explicitly add a newline character at the end of the last record in the CSV file, while we address the issue.

@yatharthgovil
Copy link
Author

Hi @machavan
thanks for letting us know the workaround we are actually thinking of appending CRLF with every end of line and it actually worked for us, but can you provide any eta on this.
Thanks

@machavan
Copy link
Contributor

machavan commented Jan 7, 2025

Hi @yatharthgovil,

A PR to address the issue is up: #2575 and is currently under review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Under Investigation Used for issues under investigation
Projects
Status: To be triaged
2 participants