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 80BDD25110 for ; Wed, 24 Jul 2019 09:55:56 -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 Bpz1Cek2W0BT for ; Wed, 24 Jul 2019 09:55:56 -0400 (EDT) Received: from smtp50.i.mail.ru (smtp50.i.mail.ru [94.100.177.110]) (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 3AD682510F for ; Wed, 24 Jul 2019 09:55:56 -0400 (EDT) Date: Wed, 24 Jul 2019 16:55:53 +0300 From: Kirill Yukhin Subject: [tarantool-patches] Re: [PATCH v4 0/4] sql: do not show IDs generated by trigger Message-ID: <20190724135553.zdk66lf2ohbpokd7@tarantool.org> References: MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: 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: korablev@tarantool.org Hello, On 17 Jul 12:54, imeevma@tarantool.org wrote: > Currently, if an INSERT was executed by a trigger during the > execution of a statement, if there were any generated identifiers, > they can be displayed as a result of the statement. This is > incorrect, since we are not able to divide the IDs obtained into > those that belong to the table mentioned in the statement and > those that do not belong to this table. > > https://github.com/tarantool/tarantool/issues/4188 > https://github.com/tarantool/tarantool/tree/imeevma/gh-4188-remove-additonal-generated-ids > > Changes in v2: > 1) Patch was divided into 3 new patches. > > Changes in v3: > 1) Removed tests in refactoring patch "sql: remove unnecessary > AUTOINCREMENT ID generation". They shows nothing. > 2) Changed the way to check that INSERT executed by trigger. > 3) Fixed a bug with the display of generated AUTOINCREMENT > identifiers, even if INSERT failed in the case of INSERT OR > IGNORE. > > Changes in v4: > 1) Changed the solution for the issue. Now it works without new > opcode. However, new argument was added to OP_IdxInsert. > 2) Now the patch in which VDBE does not take into account failed > inserts becomes practically useless. It has been removed. However, > a new patch was added that corrects row_count in the specified > case. > > Mergen Imeev (4): > sql: remove unnecessary AUTOINCREMENT ID generation > sql: skip autoinc IDs generated inside SQL trigger > sql: remove VDBE from TXN > sql: do not increase row-count if INSERT or REPLACE failed I've checked the patch set into master. -- Regards, Kirill Yukhin