-
Notifications
You must be signed in to change notification settings - Fork 175
Open
Description
Using Branch-1_5 (0f7966), MSVC & Windows 11.
A connection established to SAP ASE 16.0 using freebcp sends the following query twice in a row during the login process:
SET FMTONLY ON select * from my_database.dbo.my_table SET FMTONLY OFF
The response received to this query is exactly identical in both cases.
SAP SDK's bcp sends select * from my_database.dbo.my_table where 1=2 instead, and only once.
The process works correctly but there is an optimization opportunity to be had by only sending the query once. Checking the source code, the two calls arise from:
tds_bcp_init(), inbulk.c, uses the result to set upbcpinfo->bindinfofile_character()andfile_native()infreebcp.cuse the result to obtain the column formats in order to pack/unpack the row data.
Would it be feasible for freebcp.c to read the information it needs out of bindinfo's column data, instead of repeating the query?
Metadata
Metadata
Assignees
Labels
No labels