From: Kirill Shcherbatov <kshcherbatov@tarantool.org> To: tarantool-patches@freelists.org Cc: korablev@tarantool.org, Kirill Shcherbatov <kshcherbatov@tarantool.org> Subject: [tarantool-patches] [PATCH v2 2/3] sql: fix SQL Count for vinyl engine Date: Thu, 28 Jun 2018 19:19:05 +0300 [thread overview] Message-ID: <6267859aa2ea6476eeea218408cea5e6fe1ed72d.1530202680.git.kshcherbatov@tarantool.org> (raw) In-Reply-To: <cover.1530202680.git.kshcherbatov@tarantool.org> In-Reply-To: <cover.1530202680.git.kshcherbatov@tarantool.org> As index_size does not match row count for vinyl engine, it was replaced with index_count that working for ITER_ALL in memtx same way. Part of #2199. --- src/box/sql.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/box/sql.c b/src/box/sql.c index 834a437..dc17438 100644 --- a/src/box/sql.c +++ b/src/box/sql.c @@ -355,7 +355,8 @@ int tarantoolSqlite3EphemeralCount(struct BtCursor *pCur, i64 *pnEntry) assert(pCur->curFlags & BTCF_TEphemCursor); struct index *primary_index = space_index(pCur->space, 0 /* PK */); - *pnEntry = index_size(primary_index); + *pnEntry = index_count(primary_index, pCur->iter_type, pCur->key, + pCur->nKey); return SQLITE_OK; } @@ -363,7 +364,8 @@ int tarantoolSqlite3Count(BtCursor *pCur, i64 *pnEntry) { assert(pCur->curFlags & BTCF_TaCursor); - *pnEntry = index_size(pCur->index); + *pnEntry = index_count(pCur->index, pCur->iter_type, pCur->key, + pCur->nKey); return SQLITE_OK; } -- 2.7.4
next prev parent reply other threads:[~2018-06-28 16:19 UTC|newest] Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top 2018-06-28 16:19 [tarantool-patches] [PATCH v2 0/3] sql: default engine pragma Kirill Shcherbatov 2018-06-28 16:19 ` [tarantool-patches] [PATCH v2 1/3] sql: introduce pragma sql_default_engine Kirill Shcherbatov 2018-06-29 14:00 ` [tarantool-patches] " n.pettik 2018-07-02 8:46 ` Kirill Shcherbatov 2018-07-02 10:23 ` n.pettik 2018-06-28 16:19 ` Kirill Shcherbatov [this message] 2018-06-28 16:19 ` [tarantool-patches] [PATCH v2 3/3] sql: enable multi-engine tests for SQL Kirill Shcherbatov 2018-06-29 14:14 ` [tarantool-patches] " n.pettik 2018-07-02 8:46 ` Kirill Shcherbatov 2018-07-03 8:04 ` [tarantool-patches] Re: [PATCH v2 0/3] sql: default engine pragma Kirill Yukhin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=6267859aa2ea6476eeea218408cea5e6fe1ed72d.1530202680.git.kshcherbatov@tarantool.org \ --to=kshcherbatov@tarantool.org \ --cc=korablev@tarantool.org \ --cc=tarantool-patches@freelists.org \ --subject='Re: [tarantool-patches] [PATCH v2 2/3] sql: fix SQL Count for vinyl engine' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox