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

odbc does not play nice with sqlite's binary blobs. #6050

Open
fmv1992 opened this issue Jun 5, 2022 · 5 comments
Open

odbc does not play nice with sqlite's binary blobs. #6050

fmv1992 opened this issue Jun 5, 2022 · 5 comments
Labels
bug Issue is reported as a bug help wanted Issue not worked on by OTP; help wanted from the community team:PS Assigned to OTP team PS

Comments

@fmv1992
Copy link

fmv1992 commented Jun 5, 2022

Describe the bug
odbc does not play nice with binary blobs.

To Reproduce

  1. Create a table in sqlite:

    CREATE TABLE blob_data(
        md5sum text NOT NULL,
        chunk_number int NOT NULL,
        data blob NOT NULL
    );
    
  2. Store a moderately sized blob in it: anything greater than 400 bytes (I suspect 255 is the threshold).

  3. Try to retrieve it with odbc. The first 255 bytes come ok, the rest is just random garbage.

    Curiously, inserting big blobs (≈ 900 megabytes) works ok.

Expected behavior
I expected that inserting a big blob and retrieving it would restore the same byte sequence.

Affected versions
Erlang/OTP 24 [erts-12.3.1]

Additional context
I played with other data types and by using text or varchar I can get that 400 limit to increase, but I'm never able to get past the 10 megabytes mark with any current data types.

@fmv1992 fmv1992 added the bug Issue is reported as a bug label Jun 5, 2022
@garazdawi
Copy link
Contributor

Could this be related to #3321?

@rickard-green rickard-green added the team:PS Assigned to OTP team PS label Jun 7, 2022
@IngelaAndin
Copy link
Contributor

The odbc application has not been actively developed for a very long time, and hence is not a high priority for Ericsson. So a PR is more than welcome to address any issues.

@IngelaAndin IngelaAndin added the help wanted Issue not worked on by OTP; help wanted from the community label Jun 9, 2022
@josevalim
Copy link
Contributor

I hope I am not opening a can of worms with this question but would it make sense in this case to move the application out of Erlang/OTP? Perhaps some external team would then pick it up and develop it? Or is the application in a "it just works for our intended use cases" scenario and that's why it has not been developed?

@KennethL
Copy link
Contributor

Yes it is worth considering.

@IngelaAndin
Copy link
Contributor

@josevalim I think we actually have considered it a candidate for that on several occasions, but as it has not caused a lot of work in the past it has tagged along and other changes were prioritized. I think that it is still used for the use case it was developed for (which was not ours, but this is not a story to tell here) and I guess many others use more specialized SQL-server apps as ODBC does not make the backend as transparent as you might have hoped. But if there is someone interested in taking it on please let us know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is reported as a bug help wanted Issue not worked on by OTP; help wanted from the community team:PS Assigned to OTP team PS
Projects
None yet
Development

No branches or pull requests

6 participants