michalc / sqlite-s3-query

Python functions to query SQLite files stored on S3
MIT License
251 stars 15 forks source link

change x_file_size to take an int64 pointer instead of an int pointer #35

Closed benjaminjackman closed 2 years ago

benjaminjackman commented 2 years ago

I get a message of 'database image is malformed' on files > 4GB

Changing:

    x_file_size_type = CFUNCTYPE(c_int, c_void_p, POINTER(c_int))
    def x_file_size(p_file, p_size):
        p_size[0] = size
        return SQLITE_OK

To accept a 64bit pointer

    x_file_size_type = CFUNCTYPE(c_int, c_void_p, POINTER(c_int64))

fixes the issue

michalc commented 2 years ago

Looks good - thanks!

michalc commented 2 years ago

Now released in v0.0.66