[tarantool-patches] Re: [PATCH v1 1/1] sql: fix boolean variables binding
n.pettik
korablev at tarantool.org
Thu Apr 25 17:52:37 MSK 2019
> diff --git a/src/box/bind.c b/src/box/bind.c
> index 5aa79751a..b01ad4a74 100644
> --- a/src/box/bind.c
> +++ b/src/box/bind.c
> @@ -98,8 +98,7 @@ sql_bind_decode(struct sql_bind *bind, int i, const char **packet)
> bind->bytes = 1;
> break;
> case MP_BOOL:
> - /* sql doesn't support boolean. Use int instead. */
> - bind->i64 = mp_decode_bool(packet) ? 1 : 0;
> + bind->b = mp_decode_bool(packet);
> bind->bytes = sizeof(bind->i64);
sizeof(bind->b);
The rest is OK as obvious.
More information about the Tarantool-patches
mailing list