Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH v1 1/1] sql: remove unecessary execute of space_cache_find()
@ 2020-12-05  9:35 imeevma
  2020-12-05 17:06 ` Vladislav Shpilevoy
  2020-12-07 14:17 ` Nikita Pettik
  0 siblings, 2 replies; 12+ messages in thread
From: imeevma @ 2020-12-05  9:35 UTC (permalink / raw)
  To: v.shpilevoy, lvasiliev; +Cc: tarantool-patches

Due to the fact that space_cache_find () is called unnecessarily, it is
possible to set diag "Space '0' does not exist", although in this case
it is not a wrong situation when the space id is 0.

Part of #5592
---
https://github.com/tarantool/tarantool/issues/5592
https://github.com/tarantool/tarantool/tree/imeevma/gh-5592-remove-unnecessary-diag-set

 src/box/sql/where.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/box/sql/where.c b/src/box/sql/where.c
index 0d7590f0e..65d4197f2 100644
--- a/src/box/sql/where.c
+++ b/src/box/sql/where.c
@@ -4581,7 +4581,7 @@ sqlWhereBegin(Parse * pParse,	/* The parser context */
 		struct SrcList_item *pTabItem = &pTabList->a[pLevel->iFrom];
 		struct space_def *space_def = pTabItem->space->def;
 		pLoop = pLevel->pWLoop;
-		struct space *space = space_cache_find(space_def->id);
+		struct space *space = pTabItem->space;
 		if (space_def->id == 0 || space_def->opts.is_view) {
 			/* Do nothing */
 		} else if ((pLoop->wsFlags & WHERE_IDX_ONLY) == 0 &&
-- 
2.25.1

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2020-12-11 14:31 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-05  9:35 [Tarantool-patches] [PATCH v1 1/1] sql: remove unecessary execute of space_cache_find() imeevma
2020-12-05 17:06 ` Vladislav Shpilevoy
2020-12-05 19:57   ` Mergen Imeev
2020-12-06 15:19     ` Vladislav Shpilevoy
2020-12-07 14:17 ` Nikita Pettik
2020-12-07 14:28   ` Mergen Imeev
2020-12-07 14:57     ` Nikita Pettik
2020-12-09  6:53       ` Mergen Imeev
2020-12-10 13:28       ` Mergen Imeev
2020-12-10 13:38         ` Nikita Pettik
2020-12-11 13:43           ` Alexander V. Tikhonov
2020-12-11 14:30             ` Nikita Pettik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox