[tarantool-patches] Re: [PATCH v1 1/1] sql: refactor vdbe_emit_open_cursor calls

  • From: Vladislav Shpilevoy <v.shpilevoy@xxxxxxxxxxxxx>
  • To: Kirill Shcherbatov <kshcherbatov@xxxxxxxxxxxxx>, tarantool-patches@xxxxxxxxxxxxx
  • Date: Tue, 10 Jul 2018 17:59:08 +0300


2. vdbe_emit_open_cursor has outdated comment in the header.
   * @param parse_context Parse context.
   * @param cursor Number of cursor to be created.
- * @param index_id Encoded index id (encoding is void actually, so
- *        pas it as is). In future will be replaced with pointer
- *        to struct index.
+ * @param index_id index id. In future will be replaced with
+ *        pointer to struct index.
   * @retval address of last opcode.

1. Still out dated. Where is '@param space'?

2. Why vdbe_emit_open_cursor opens the cursor using index_id,
but opcode OP_OpenRead/Write still uses it as tnum?

=========================================

Made vdbe_emit_open_cursor calls consistent:
now it uses index id everywhere.
This required to change a way to detect that
VDBE has openned Read cursor to specified table
in vdbe_has_table_read to write result of insert
in temp table if required.
---
  src/box/sql/analyze.c   |  3 +-
  src/box/sql/build.c     |  3 +-
  src/box/sql/expr.c      |  5 ++-
  src/box/sql/fkey.c      |  3 +-
  src/box/sql/insert.c    | 96 +++++++++++++++++++++++++++++--------------------
  src/box/sql/select.c    |  4 +--
  src/box/sql/sqliteInt.h |  5 ++-
  src/box/sql/where.c     | 10 ++++--
  8 files changed, 77 insertions(+), 52 deletions(-)


Other related posts: