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 75CED26373 for ; Thu, 14 Jun 2018 13:32:35 -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 2KJlYsc30z83 for ; Thu, 14 Jun 2018 13:32:35 -0400 (EDT) Received: from smtpng1.m.smailru.net (smtpng1.m.smailru.net [94.100.181.251]) (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 35AA82635B for ; Thu, 14 Jun 2018 13:32:35 -0400 (EDT) From: Kirill Shcherbatov Subject: [tarantool-patches] [PATCH v3 03/10] sql: fix sql len in tarantoolSqlite3RenameTrigger Date: Thu, 14 Jun 2018 20:32:21 +0300 Message-Id: <011f58ddf20c04b169800216d93f50b111064f1e.1528997527.git.kshcherbatov@tarantool.org> In-Reply-To: References: In-Reply-To: References: 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, Kirill Shcherbatov Part of #3273. --- src/box/sql.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/box/sql.c b/src/box/sql.c index 509e581..85de926 100644 --- a/src/box/sql.c +++ b/src/box/sql.c @@ -690,8 +690,8 @@ int tarantoolSqlite3RenameTrigger(const char *trig_name, bool is_quoted = false; trigger_stmt = rename_trigger(db, trigger_stmt, new_table_name, &is_quoted); - uint32_t trigger_stmt_new_len = trigger_stmt_len + old_table_name_len - - new_table_name_len + 2 * (!is_quoted); + uint32_t trigger_stmt_new_len = trigger_stmt_len + new_table_name_len - + old_table_name_len + 2 * (!is_quoted); assert(trigger_stmt_new_len > 0); key_len = mp_sizeof_array(2) + mp_sizeof_str(trig_name_len) + mp_sizeof_map(1) + mp_sizeof_str(3) + -- 2.7.4