From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id D082C24725 for ; Tue, 12 Jun 2018 14:26:15 -0400 (EDT) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4HXQlfLpTEGl for ; Tue, 12 Jun 2018 14:26:15 -0400 (EDT) Received: from smtp42.i.mail.ru (smtp42.i.mail.ru [94.100.177.102]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 0FAE124537 for ; Tue, 12 Jun 2018 14:26:14 -0400 (EDT) From: Nikita Pettik Subject: [tarantool-patches] [PATCH] sql: remove redundant goto from VDBE prologue Date: Tue, 12 Jun 2018 21:26:07 +0300 Message-Id: <20180612182607.53450-1-korablev@tarantool.org> Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: tarantool-patches@freelists.org Cc: v.shpilevoy@tarantool.org, Nikita Pettik Structure of VDBE prologue: 0: OP_Init 0 N (address to start) 0 --| |-> 1: ... | | ... | | N: OP_Transaction <------------ | N+1: (Constant expressions to be saved in registers) | ... |-- M: OP_Goto 0 1 0 However, last opcode in VDBE program (i.e. OP_Goto) is generated always, despite the existence of OP_Transaction or constant expressions. Thus, VDBE program for queries like