[Tarantool-patches] [PATCH v8 04/14] test: fix luacheck warnings W211 in test/sql-tap
Vladislav Shpilevoy
v.shpilevoy at tarantool.org
Sun Feb 28 18:30:56 MSK 2021
Thanks for the fixes!
> --- a/test/sql-tap/select9.test.lua
> +++ b/test/sql-tap/select9.test.lua
> @@ -274,10 +274,8 @@ test:do_execsql_test(
> -- </select9-2.0>
> })
>
> -local t1_space_id = ""
> -local t2_space_id = ""
> -t1_space_id = test:execsql([[SELECT * from "_space" where "name"='T1']])["id"]
> -t2_space_id = test:execsql([[SELECT * from "_space" where "name"='T2']])["id"]
> +local _ = test:execsql([[SELECT * from "_space" where "name"='T1']])["id"]
> +local _ = test:execsql([[SELECT * from "_space" where "name"='T2']])["id"]
But nothing changed. It was the same before my comment. By 'delete' them I
mean literally 'delete'. SELECTs don't have any effect unlike DML/DDL. You
can remove them and nothing will change.
====================
})
-local _ = test:execsql([[SELECT * from "_space" where "name"='T1']])["id"]
-local _ = test:execsql([[SELECT * from "_space" where "name"='T2']])["id"]
--X(276, "X!cmd", [=[["db","eval","SELECT * from _space where name='t2'","data","\n set t2_space_id $data(id)\n"]]=])
====================
However even if we would would to keep them you wouldn't need `local _ = `.
You can call functions without saving their result into a variable.
More information about the Tarantool-patches
mailing list