-
Notifications
You must be signed in to change notification settings - Fork 62
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
maxLookup index out of range on update #54
Comments
anoopr
added a commit
to homelight/dat
that referenced
this issue
Feb 13, 2017
anoopr
added a commit
to homelight/dat
that referenced
this issue
Feb 13, 2017
Not ignoring this. I'm in a bit of time crunch right now. |
np! thanks |
See the open PR referenced above. Since we use our large table extensively, it might still be good to update maxLookup for us (although probably very marginally), but in general the PR fixes the bug. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
Upon adding a new column to a table that was already large I started experiencing index out of range at
https://github.com/mgutz/dat/blob/v1/update.go#L178
It seems the condition that triggers hand off between preallocated parameter conversions and ad hoc conversions may be off by one. If I change
i < maxLookup
toi < maxLookup - 1
everything works fine but not sure if that's right, as the last element inequalsPlaceholderTab
will not be used. Also, is it right thatequalsPlaceholderTab
starts with$0
?I wrote a little snippet to test for various values of maxLookup (https://github.com/mgutz/dat/blob/v1/init.go#L19):
This breaks for
maxLookup <= 3
but works for larger values.Cheers,
Luis
The text was updated successfully, but these errors were encountered: