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

sqlite unique primary key generation bug #155

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Paberu85
Copy link

@Paberu85 Paberu85 commented Nov 5, 2019

"continue" statement forces loop condition re-evaluation - while(conflict), this "conflict" value is initialized to false and does not change inside of loop body (loop will repeat itself only if condition is true, but condition is hardcoded false and will exit after first iteration) - loop will execute only once even if non unique primary key was generated, which will result in a sqlite crash (unique pk assertion failure)

…ict), this "conflict" value is set initially to false value before loop start and does not change in loop body, loop will repeate itself only if condition is true, but condition is hardcoded false and will exit after first iteration without any conditions, which in turn leads to potential generation of nonunique primary keys.
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

Successfully merging this pull request may close these issues.

None yet

1 participant