[Tarantool-patches] [PATCH v1 1/1] sql: remove registerTrace() from mem.c
Mergen Imeev
imeevma at tarantool.org
Wed Dec 1 10:59:40 MSK 2021
Hi! Thank you for the review! My answer below.
On Tue, Nov 30, 2021 at 10:00:44PM +0100, Vladislav Shpilevoy wrote:
> Hi! Thanks for the patch looks good, but I would drop this 'register trace'
> entirely. Everything that uses 'printf' is dead anyway.
>
I'm not sure about that. For example, I have executed these statements on master and on my branch:
box.execute('set session "sql_vdbe_debug" = true;')
box.execute([[select 1;]])
Result on master:
SQL: [select 1;]
VDBE Program Listing:
103> 0 Init 0 1 0 00 Start at 1
103> 1 Integer 1 1 0 00 r[1]=1
103> 2 ResultRow 1 1 0 00 output=r[1]
103> 3 Halt 0 0 0 00
VDBE Trace:
103> 0 Init 0 1 0 00 Start at 1
SQL-trace: select 1;
103> 1 Integer 1 1 0 00 r[1]=1
REG[1] = u:1
103> 2 ResultRow 1 1 0 00 output=r[1]
REG[1] = u:1
103> 3 Halt 0 0 0 00
---
- metadata:
- name: COLUMN_1
type: integer
rows:
- [1]
...
Result on the branch:
SQL: [select 1;]
VDBE Program Listing:
103> 0 Init 0 1 0 00 Start at 1
103> 1 Integer 1 1 0 00 r[1]=1
103> 2 ResultRow 1 1 0 00 output=r[1]
103> 3 Halt 0 0 0 00
VDBE Trace:
103> 0 Init 0 1 0 00 Start at 1
SQL-trace: select 1;
103> 1 Integer 1 1 0 00 r[1]=1
REG[1] = integer(1)
103> 2 ResultRow 1 1 0 00 output=r[1]
REG[1] = integer(1)
103> 3 Halt 0 0 0 00
---
- metadata:
- name: COLUMN_1
type: integer
rows:
- [1]
...
As you can see, the contents of REG[1] are displayed differently.
> LGTM. Drop more code or send this patch further, does not matter.
More information about the Tarantool-patches
mailing list