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 73F43287D8 for ; Thu, 31 May 2018 07:22:59 -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 44EeUtox8j7h for ; Thu, 31 May 2018 07:22:59 -0400 (EDT) Received: from smtpng2.m.smailru.net (smtpng2.m.smailru.net [94.100.179.3]) (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 31906284FB for ; Thu, 31 May 2018 07:22:59 -0400 (EDT) From: Kirill Shcherbatov Subject: [tarantool-patches] [PATCH v1 2/4] sql: fix sql len in tarantoolSqlite3RenameTrigger Date: Thu, 31 May 2018 14:22:51 +0300 Message-Id: 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 47d1739..eacb288 100644 --- a/src/box/sql.c +++ b/src/box/sql.c @@ -686,8 +686,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