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

FBExport problem exporting SMALLINT with NEGATIVE values on Ubuntu 14.04 64 bits. #6

Open
rroque6428 opened this issue Feb 14, 2015 · 2 comments

Comments

@rroque6428
Copy link

Hi,

Firstly, I'd like to thank you for FBExport/FBCopy, very useful indeed!

I just want to give you a feedback about FBExport on 64 bits platforms. I faced the following problem:

All SMALLINT fields with NEGATIVE values are being converted to 4.294.967.294 - FieldValue. Example: if the value of the field is -180, FBExport outputs "4294967114" in the resulting export file, which is: 4294967294 -180.

I tried everything again in a 32 bits machine with Ubuntu 11.04 and everything was OK. No problem with SMALLINT types.

Cheers,

Roque
Ubuntu 14.04 64 bits LTS
FirebirdSS-2.5.2.26540-0.amd6
GCC 4.8.2
Command Used: fbexport -Sc -D mybase1 -U user1 -P user1 -J Y-M-D -F /tmp/foo.txt -Q "SELECT * FROM Users ORDER BY UsrID

@anuko
Copy link

anuko commented Oct 19, 2017

I had the same problem on 64-bit CentOS Linux 7.4.1708. Traced the problem down to the %ld formatter in FBExport::CreateHumanDString line #318 in fbexport/FBExport.cpp file inside a switch for IBPP::stdInteger and IBPP::sdSmallint. Had to change it to %d instead so that the line #318 becomes:

sprintf(str, "%d", x);

The second (and separate from the above) issue was to #include <stdio.h> in fbcopy/TableDependency.cpp to be able to build it on my machine.

@joelsamthomas2023
Copy link

Thank you anuko, I have faced same problem ,Resolved it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants