[Tarantool-patches] [PATCH] box: sql prepare and execute statistics should be reflected in box.stat()

Nikita Pettik korablev at tarantool.org
Wed Mar 4 16:47:00 MSK 2020


On 03 Mar 19:42, Maria Khaydich wrote:
> 
> > Please send smth like 'hotfix' for the last commit, I guess it is too late to force push to master.
>  
> If I understood you correctly:
> ----------------------------------------------------------------------
> Calling prepare and execute did not update corresponding request statistics
> in the box.stat table. This happened because methods that collect stats were
> never called where they should have been.
> 
> There was a bug in previous commit resulting in collecting statistics on
> box.execute twice in some cases.
>  
> Closes #4756
> ---
> diff --git a/test/sql/iproto.test.lua b/test/sql/iproto.test.lua
> index 9eac91d2c..ec1f37035 100644
> --- a/test/sql/iproto.test.lua
> +++ b/test/sql/iproto.test.lua
> @@ -249,11 +249,12 @@ p = box.stat().PREPARE.total
>  e = box.stat().EXECUTE.total
>  
>  s = box.prepare([[ SELECT ?; ]])
> -s:execute({42})

Why did you get rid of s:execute() call? Now both prepared:execute()
and box.execute() use the same function (sql_execute()) under the hood,
but it may change in future. Please, leave both test cases.

Lgtm otherwise.



More information about the Tarantool-patches mailing list