[Tarantool-patches] [PATCH v2 5/6] sql: extend result set with autoincrement
Vladislav Shpilevoy
v.shpilevoy at tarantool.org
Tue Dec 24 18:30:41 MSK 2019
Thanks for the patch!
>> @@ -1845,12 +1846,9 @@ generate_column_metadata(struct Parse *pParse, struct SrcList *pTabList,
>> space_def->fields[iCol].is_nullable;
>> vdbe_metadata_set_col_nullability(v, i,
>> is_nullable);
>> - if (pTabList->a[j].space->sequence != NULL) {
>> - int afno =
>> - pTabList->a[j].space->sequence_fieldno;
>> - if (afno == iCol)
>> - vdbe_metadata_set_col_autoincrement(v, i);
>> - }
>> + if (space->sequence != NULL &&
>> + space->sequence_fieldno == iCol)
>> + vdbe_metadata_set_col_autoincrement(v, i);
Sorry, I know that I proposed this, but now I am getting a compilation
error here:
tarantool/src/box/sql/select.c:1850:33: error: comparison of integers of different signs: 'uint32_t' (aka 'unsigned int') and 'int' [-Werror,-Wsign-compare]
space->sequence_fieldno == iCol)
I don't know why was not it raised earlier.
I've pushed my review fix on top of this commit. See it below
and on the branch.
================================================================================
commit 53fd4b3b3a27cf99c6c7a71a085574b2fd8a0dc7
Author: Vladislav Shpilevoy <v.shpilevoy at tarantool.org>
Date: Tue Dec 24 15:56:24 2019 +0100
Review fix 5/6
diff --git a/src/box/sql/select.c b/src/box/sql/select.c
index ddb2509f4..a19494ed9 100644
--- a/src/box/sql/select.c
+++ b/src/box/sql/select.c
@@ -1847,7 +1847,7 @@ generate_column_metadata(struct Parse *pParse, struct SrcList *pTabList,
vdbe_metadata_set_col_nullability(v, i,
is_nullable);
if (space->sequence != NULL &&
- space->sequence_fieldno == iCol)
+ space->sequence_fieldno == (uint32_t) iCol)
vdbe_metadata_set_col_autoincrement(v, i);
}
} else {
More information about the Tarantool-patches
mailing list