[Tarantool-patches] [PATCH v1 13/13] sql: remove MEM_TYPE_AGG
imeevma at tarantool.org
imeevma at tarantool.org
Fri Sep 10 19:02:33 MSK 2021
This patch removed MEM_TYPE_AGG, which is no longer used due to recent
changes.
Part of #4145
---
src/box/sql/mem.c | 25 -------------------------
src/box/sql/mem.h | 9 +--------
2 files changed, 1 insertion(+), 33 deletions(-)
diff --git a/src/box/sql/mem.c b/src/box/sql/mem.c
index d3fce9cb7..e4c6c22d9 100644
--- a/src/box/sql/mem.c
+++ b/src/box/sql/mem.c
@@ -605,22 +605,6 @@ mem_set_frame(struct Mem *mem, struct VdbeFrame *frame)
mem->u.pFrame = frame;
}
-int
-mem_set_agg(struct Mem *mem, struct func *func, int size)
-{
- mem_clear(mem);
- if (size <= 0)
- return 0;
- if (sqlVdbeMemGrow(mem, size, 0) != 0)
- return -1;
- memset(mem->z, 0, size);
- mem->n = size;
- mem->type = MEM_TYPE_AGG;
- assert(mem->flags == 0);
- mem->u.func = func;
- return 0;
-}
-
void
mem_set_null_clear(struct Mem *mem)
{
@@ -1884,15 +1868,6 @@ mem_len(const struct Mem *mem, uint32_t *len)
return 0;
}
-int
-mem_get_agg(const struct Mem *mem, void **accum)
-{
- if (mem->type != MEM_TYPE_AGG)
- return -1;
- *accum = mem->z;
- return 0;
-}
-
int
mem_copy(struct Mem *to, const struct Mem *from)
{
diff --git a/src/box/sql/mem.h b/src/box/sql/mem.h
index c0993e573..9395f3224 100644
--- a/src/box/sql/mem.h
+++ b/src/box/sql/mem.h
@@ -54,7 +54,6 @@ enum mem_type {
MEM_TYPE_INVALID = 1 << 11,
MEM_TYPE_FRAME = 1 << 12,
MEM_TYPE_PTR = 1 << 13,
- MEM_TYPE_AGG = 1 << 14,
};
/*
@@ -187,12 +186,6 @@ mem_is_array(const struct Mem *mem)
return mem->type == MEM_TYPE_ARRAY;
}
-static inline bool
-mem_is_agg(const struct Mem *mem)
-{
- return mem->type == MEM_TYPE_AGG;
-}
-
static inline bool
mem_is_bytes(const struct Mem *mem)
{
@@ -967,7 +960,7 @@ int sqlVdbeMemTooBig(Mem *);
* that needs to be deallocated to avoid a leak.
*/
#define VdbeMemDynamic(X) (((X)->flags & MEM_Dyn) != 0 ||\
- ((X)->type & (MEM_TYPE_AGG | MEM_TYPE_FRAME)) != 0)
+ ((X)->type & MEM_TYPE_FRAME) != 0)
/**
* Perform comparison of two tuples: unpacked (key1) and packed (key2)
--
2.25.1
More information about the Tarantool-patches
mailing list