[tarantool-patches] [PATCH v3 03/10] sql: fix sql len in tarantoolSqlite3RenameTrigger
Kirill Shcherbatov
kshcherbatov at tarantool.org
Thu Jun 14 20:32:21 MSK 2018
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
More information about the Tarantool-patches
mailing list