[Rpm-maint] [rpm-software-management/rpm] Various sqlite backend optimizations and cleanups (#972)
Neal Gompa (ニール・ゴンパ)
notifications at github.com
Mon Dec 9 13:39:35 UTC 2019
Conan-Kudo requested changes on this pull request.
> @@ -584,11 +558,8 @@ static rpmRC sqlite_idxdbIter(dbiIndex dbi, dbiCursor dbc, const char *keyp, siz
dbc->key = sqlite3_column_blob(dbc->stmt, 0);
}
dbc->keylen = sqlite3_column_bytes(dbc->stmt, 0);
- if (set) {
- dbiCursor kc = dbiCursorInit(dbi, 0);
- rc = sqlite_idxdbByKey(dbi, kc, dbc->key, dbc->keylen, set);
- dbiCursorFree(dbi, kc);
- }
+ if (set)
+ rc = sqlite_idxdbByKey(dbi, dbc->subc, dbc->key, dbc->keylen, set);
I think there's an error here. It looks like there should be braces here...
> @@ -584,11 +558,8 @@ static rpmRC sqlite_idxdbIter(dbiIndex dbi, dbiCursor dbc, const char *keyp, siz
dbc->key = sqlite3_column_blob(dbc->stmt, 0);
}
dbc->keylen = sqlite3_column_bytes(dbc->stmt, 0);
- if (set) {
- dbiCursor kc = dbiCursorInit(dbi, 0);
- rc = sqlite_idxdbByKey(dbi, kc, dbc->key, dbc->keylen, set);
- dbiCursorFree(dbi, kc);
- }
+ if (set)
+ rc = sqlite_idxdbByKey(dbi, dbc->subc, dbc->key, dbc->keylen, set);
rc = RPMRC_OK;
Is this statement supposed to be here? It essentially clobbers the result from the line above...
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/972#pullrequestreview-328923549
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-maint/attachments/20191209/bbb40809/attachment.html>
More information about the Rpm-maint
mailing list