[Tarantool-patches] [PATCH v5 17/52] sql: remove sql_column_to_messagepack()

Mergen Imeev imeevma at tarantool.org
Thu Apr 15 02:14:38 MSK 2021


Thank you for the review! My answer below.

On Thu, Apr 15, 2021 at 12:58:57AM +0200, Vladislav Shpilevoy wrote:
> I appreciate the work you did here!
> 
> > diff --git a/src/box/sql/sqlInt.h b/src/box/sql/sqlInt.h
> > index e075224c6..259ba3833 100644
> > --- a/src/box/sql/sqlInt.h
> > +++ b/src/box/sql/sqlInt.h
> > @@ -471,8 +461,9 @@ const unsigned char *
> >  sql_column_text(sql_stmt *,
> >  		    int iCol);
> >  
> > -enum mp_type
> > -sql_column_type(sql_stmt *stmt, int field_no);
> > +char *
> > +sql_result_to_msgpack(struct sql_stmt *stmt, uint32_t *tuple_size,
> > +		      struct region *region);
> 
> I noticed just now - this is a method of sql_stmt, and therefore
> must be called 'sql_stmt_result_to_msgpack()'. With 'sql_stmt'
> prefix.
Thanks, fixed.


diff --git a/src/box/execute.c b/src/box/execute.c
index f9c161ce4..70101d036 100644
--- a/src/box/execute.c
+++ b/src/box/execute.c
@@ -146,7 +146,7 @@ sql_row_to_port(struct sql_stmt *stmt, struct region *region, struct port *port)
 {
 	uint32_t size;
 	size_t svp = region_used(region);
-	char *pos = sql_result_to_msgpack(stmt, &size, region);
+	char *pos = sql_stmt_result_to_msgpack(stmt, &size, region);
 	struct tuple *tuple =
 		tuple_new(box_tuple_format_default(), pos, pos + size);
 	if (tuple == NULL)
diff --git a/src/box/sql/sqlInt.h b/src/box/sql/sqlInt.h
index 259ba3833..663f2841d 100644
--- a/src/box/sql/sqlInt.h
+++ b/src/box/sql/sqlInt.h
@@ -462,8 +462,8 @@ sql_column_text(sql_stmt *,
 		    int iCol);
 
 char *
-sql_result_to_msgpack(struct sql_stmt *stmt, uint32_t *tuple_size,
-		      struct region *region);
+sql_stmt_result_to_msgpack(struct sql_stmt *stmt, uint32_t *tuple_size,
+			   struct region *region);
 
 /*
  * Terminate the current execution of an SQL statement and reset
diff --git a/src/box/sql/vdbeapi.c b/src/box/sql/vdbeapi.c
index 3e9f1ff6f..7216ac12b 100644
--- a/src/box/sql/vdbeapi.c
+++ b/src/box/sql/vdbeapi.c
@@ -516,8 +516,8 @@ sql_column_text(sql_stmt * pStmt, int i)
 }
 
 char *
-sql_result_to_msgpack(struct sql_stmt *stmt, uint32_t *tuple_size,
-		      struct region *region)
+sql_stmt_result_to_msgpack(struct sql_stmt *stmt, uint32_t *tuple_size,
+			   struct region *region)
 {
 	struct Vdbe *vdbe = (struct Vdbe *)stmt;
 	return sql_vdbe_mem_encode_tuple(vdbe->pResultSet, vdbe->nResColumn,


More information about the Tarantool-patches mailing list