-
Notifications
You must be signed in to change notification settings - Fork 174
Issue647 and 648 - FreeBCP #684
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
base: master
Are you sure you want to change the base?
Conversation
|
Update: have got my ASE 16.0 SP04 evaluation working again; and using the Format file appears to work correctly, although I only did an ad-hoc test with a simple table containing an int and a datetime. |
dc8f8e5 to
dbc61a2
Compare
src/apps/freebcp.c
Outdated
| #include <freetds/replacements.h> | ||
| #include <sybfront.h> | ||
| #include <sybdb.h> | ||
| #include <dblib.h> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please not, FreeBCP should use dblib, not abuse it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK, have copied what was done for bcp_getbatchsize to avoid this include. Pushed fix on top of the commit you commented on, but before my refactor.
I guess for future maintainability we may want to consider changing these two functions into something like bcp_control but for reading instead of writing.
dbc61a2 to
77029ac
Compare
|
First 2 commits merged |
77029ac to
6a468ca
Compare
|
There's been a fair bit of progress on "master" since I opened this, I'll squash the dblib.h fix and rebase . Also fixed problem with mixed code/declarations that failed the VS2008/2010 appveyor |
The bcp_init() already performs the zero-row SELECT to
obtain column formats, and already calls bcp_columns().
Signed-off-by: Matt McNabb <[email protected]>
Commit 9058123 causes dbresults(dbproc) loop to free the structures used by dbcoltype(), so perform the bcp_colfmt() loop before the -E flag processing Signed-off-by: Matt McNabb <[email protected]>
…inition Signed-off-by: Matt McNabb <[email protected]>
6a468ca to
436a110
Compare
The commits here are:
-Eis used. The underlying cause is that commit 9058123 added logic todbresults()to freetds->res_infoon completion, so subsequent calls todbcoltype()fail. I avoided the problem by performing thebcp_colfmtbefore making the queries for the-Eswitch.BCPBATCHcommand was set for Character files but not for Native or Format files, not sure what the rationale was for that.I have done various ad-hoc testing with SQL Server in different operating systems with large tables with varied column types, and not found any problems.