[Tarantool-patches] [PATCH v2 11/16] sql: introduce sql_stmt_sizeof() function

Konstantin Osipov kostja.osipov at gmail.com
Wed Dec 4 14:59:54 MSK 2019


* Nikita Pettik <korablev at tarantool.org> [19/11/21 10:00]:
> To implement memory quota of prepared statement cache, we have to
> estimate size of prepared statement. This function attempts at that.

I suggest sql_stmt_est_size() as the name.

I would add size-caching right away, to make this function cheap.

if (size != 0)
    return size;

I wonder if we could use another region for the bytecode to 
make this quick & cheap to maintain...

I don't want to sidetrack this work, though.

So lgtm.


-- 
Konstantin Osipov, Moscow, Russia


More information about the Tarantool-patches mailing list