Tarantool development patches archive
 help / color / mirror / Atom feed
* [Tarantool-patches] [PATCH] sql: add missed sqlReleaseTempRange()
@ 2020-09-11 22:22 Roman Khabibov
  2020-09-17 14:27 ` Vladislav Shpilevoy
  0 siblings, 1 reply; 3+ messages in thread
From: Roman Khabibov @ 2020-09-11 22:22 UTC (permalink / raw)
  To: tarantool-patches

Clean up temp registers with sqlReleaseTempRange() during check
constraint alter.
---

Branch: https://github.com/tarantool/tarantool/tree/romanhabibov/release-temp-reg
Issue: -

 src/box/sql/alter.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/src/box/sql/alter.c b/src/box/sql/alter.c
index 14f6c1a97..4874b46c9 100644
--- a/src/box/sql/alter.c
+++ b/src/box/sql/alter.c
@@ -136,6 +136,7 @@ sql_alter_ck_constraint_enable(struct Parse *parse)
 		      tuple_reg + field_count);
 	sqlVdbeAddOp4(v, OP_IdxReplace, tuple_reg + field_count, 0, 0,
 		      (char *)ck_space, P4_SPACEPTR);
+	sqlReleaseTempRange(parse, tuple_reg, field_count + 1);
 exit_alter_ck_constraint:
 	sqlDbFree(db, constraint_name);
 	sqlSrcListDelete(db, src_tab);
-- 
2.24.3 (Apple Git-128)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Tarantool-patches] [PATCH] sql: add missed sqlReleaseTempRange()
  2020-09-11 22:22 [Tarantool-patches] [PATCH] sql: add missed sqlReleaseTempRange() Roman Khabibov
@ 2020-09-17 14:27 ` Vladislav Shpilevoy
  2020-10-08 15:33   ` Roman Khabibov
  0 siblings, 1 reply; 3+ messages in thread
From: Vladislav Shpilevoy @ 2020-09-17 14:27 UTC (permalink / raw)
  To: Roman Khabibov, tarantool-patches

Hi! Thanks for the patch!

LGTM.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Tarantool-patches] [PATCH] sql: add missed sqlReleaseTempRange()
  2020-09-17 14:27 ` Vladislav Shpilevoy
@ 2020-10-08 15:33   ` Roman Khabibov
  0 siblings, 0 replies; 3+ messages in thread
From: Roman Khabibov @ 2020-10-08 15:33 UTC (permalink / raw)
  To: Nikita Pettik; +Cc: tarantool-patches, Vladislav Shpilevoy

Hi! Thanks! Nikita, can you see the patch?
https://github.com/tarantool/tarantool/tree/romanhabibov/release-temp-reg

> On Sep 17, 2020, at 17:27, Vladislav Shpilevoy <v.shpilevoy@tarantool.org> wrote:
> 
> Hi! Thanks for the patch!
> 
> LGTM.

commit 6eccc4f0b3d107d5963ea10e391ef8924cac381f (HEAD -> romanhabibov/release-temp-reg, origin/romanhabibov/release-temp-reg)
Author: Roman Khabibov <roman.habibov@tarantool.org>
Date:   Sat Sep 12 01:05:29 2020 +0300

    sql: add missed sqlReleaseTempRange()
    
    Clean up temp registers with sqlReleaseTempRange() during check
    constraint alter.

diff --git a/src/box/sql/alter.c b/src/box/sql/alter.c
index 14f6c1a97..4874b46c9 100644
--- a/src/box/sql/alter.c
+++ b/src/box/sql/alter.c
@@ -136,6 +136,7 @@ sql_alter_ck_constraint_enable(struct Parse *parse)
 		      tuple_reg + field_count);
 	sqlVdbeAddOp4(v, OP_IdxReplace, tuple_reg + field_count, 0, 0,
 		      (char *)ck_space, P4_SPACEPTR);
+	sqlReleaseTempRange(parse, tuple_reg, field_count + 1);
 exit_alter_ck_constraint:
 	sqlDbFree(db, constraint_name);
 	sqlSrcListDelete(db, src_tab);

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-10-08 15:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-11 22:22 [Tarantool-patches] [PATCH] sql: add missed sqlReleaseTempRange() Roman Khabibov
2020-09-17 14:27 ` Vladislav Shpilevoy
2020-10-08 15:33   ` Roman Khabibov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox