-
Notifications
You must be signed in to change notification settings - Fork 24
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
Use global var for bdb_app_data
#203
Use global var for bdb_app_data
#203
Conversation
6f7d52c
to
7a46bf1
Compare
Thanks @emilienlemaire . To add more context, this comes from a client reporting a "bdb_bt_compare was set but no collating sequence was stored in DBT" error (triggered from For some reason, the I'd suggest we'd just stick with the global variable version. What would you say, @GitMensch ? |
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.
I'm not sure yet and need some more details.
I can reproduce this as well:
If you see the last line as well, please check if you can fix that (because that's an unrelated problem, which we normally can't reproduce, but can with the current other implementation). I'm inspecting the issue that this PR is really about now. |
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, this issue really took 2 hours to check. First I've did some debugging within fileio and BDB (using watchpoints), then I've hunted down different version of the docs and headers.
And this is the result:
- BDB 4.1 added it to the header
- BDB 6.0 (docs from 6.0.19 added it to the public API and included the ABI break for the function; note: most GNU/Linux (and BSD) distributions have BDB 5.3
So please
- create a bug report with the findings
- adjust the changelog to have something like "fileio.c: make [DBT_SET_APP_DATA] dependent on DB_VERSION_MAJOR >= 6
- adjust the code as noted
I'll check the the updated version of your PR but am positive that the next one is a "pass".
I do wonder - should we place that test Lines 929 to 938 in 9afa7a7
Lines 1035 to 1036 in d5abb19
|
minor comment typo-fix and rewording
changelog reference to bug and minor rewording
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.
good to go in its current state (please mind the updates to integrate it upstream)
Merged on behalf of @emilienlemaire at SVN @ 5398 |
Of course I've missed something... The line |
Noted - maybe when merging #201 . |
When using
DBT->app_data
to save the collating sequence function, BDB would not copy it to the DBT passed tobdb_bt_compare
after a number of comparison (it seems like this number depends on the size of the data of the record).The problems originates from BDB as everything is well set before any call to the BDB functions.
To avoid this problem the collating sequence is now always passed to global variable.