Skip to content
Snippets Groups Projects
Commit 9bddcdfb authored by Dmitry Ivanov's avatar Dmitry Ivanov
Browse files

sql: fix name resolution in HAVING if projection contains a param

Repro:

```lua
box.cfg {}
box.ctl.wait_rw()

box.execute([[
    WITH q(a) AS (VALUES (1))
    SELECT AVG(a), ? AS c1
    FROM q
    HAVING 1 = AVG(a)
]], {100})
```

Output:

```
Please file a bug at https://github.com/tarantool/tarantool/issues
Attempting backtrace... Note: since the server has already crashed,
this may fail as well

0x609a4705960a in luaT_pushdecimal+33530
0x70f7f904c1d0 in __sigaction+80
0x609a47230e15 in ibuf_reserve_slow+383333
0x609a46fd8e37 in box_decimal_mp_decode_data+363175
0x609a46fdcca1 in box_decimal_mp_decode_data+379153
0x609a46f80ce7 in box_decimal_mp_decode_data+2391
0x609a4701f167 in luaT_pushtuple+147927
0x609a4724a283 in ibuf_reserve_slow+486867
0x609a47092437 in lua_pcall+119
0x609a4702b4a3 in tarantool_lua_slab_cache+37907
0x609a4702d2a2 in luaL_setcdatagc+3810
0x609a46e6ee40 in ??+0
0x609a47061117 in fiber_self+1591
0x609a471d9129 in ibuf_reserve_slow+23673
```

NO_DOC=internal
NO_TEST=internal
NO_CHANGELOG=internal
parent e2911d68
No related branches found
No related tags found
1 merge request!224sql: fix name resolution in HAVING if projection contains a param
Pipeline #60987 passed
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment