From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org> To: tarantool-patches@freelists.org, Kirill Shcherbatov <kshcherbatov@tarantool.org> Subject: [tarantool-patches] Re: [PATCH v2 3/7] sql: refactor sql_src_list_append to set diag Date: Mon, 18 Mar 2019 22:33:59 +0300 [thread overview] Message-ID: <2c6214c0-dc40-bb33-283b-781234ad3360@tarantool.org> (raw) In-Reply-To: <8743fe4b-6485-9b72-dd40-e4d2ecab5801@tarantool.org> Hi! Thanks for the fixes! See 2 comments below. > diff --git a/src/box/sql/build.c b/src/box/sql/build.c > index f53b2561c..04f65f165 100644 > --- a/src/box/sql/build.c > +++ b/src/box/sql/build.c > @@ -2821,6 +2785,7 @@ sqlSrcListAppendFromTerm(Parse * pParse, /* Parsing context */ > sqlIdListDelete(db, pUsing); > sql_select_delete(db, pSubquery); > return 0; > + > } 1. Stray empty line. Please, do self-review before sending a patch. Such a stray change says that you did not scan the patch before a send. > diff --git a/src/box/sql/sqlInt.h b/src/box/sql/sqlInt.h > index 0895f7de1..2df1830d6 100644 > --- a/src/box/sql/sqlInt.h > +++ b/src/box/sql/sqlInt.h > @@ -3428,7 +3428,27 @@ sql_src_list_enlarge(struct sql *db, struct SrcList *src_list, int new_slots, > struct SrcList * > sql_src_list_new(struct sql *db); > > -SrcList *sqlSrcListAppend(sql *, SrcList *, Token *); > +/** > + * Append a new table name to the given list. Create a new > + * SrcList if need be. A new entry is created in the list even > + * if name_token is NULL. > + * > + * A SrcList is returned, or NULL if there is an OOM error. 2. This should be said in @retval sections. > + * The returned SrcList might be the same as the list that was > + * input or it might be a new one. If an OOM error does occurs, > + * then the prior value of list that is input to this routine is > + * automatically freed. > + * > + * @param db The database connection. > + * @param list Append to this SrcList. NULL creates a new SrcList. > + * @param name_token Token representing table name. > + * @retval Not NULL SrcList pointer on success. > + * @retval NULL Otherwise. The diag message is set. > + */ > +struct SrcList * > +sql_src_list_append(struct sql *db, struct SrcList *list, > + struct Token *name_token); > + > SrcList *sqlSrcListAppendFromTerm(Parse *, SrcList *, Token *, > Token *, Select *, Expr *, IdList *); > void sqlSrcListIndexedBy(Parse *, SrcList *, Token *);
next prev parent reply other threads:[~2019-03-18 19:34 UTC|newest] Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-02-27 11:13 [tarantool-patches] [PATCH v2 0/7] sql: store regular identifiers in case-normal form Kirill Shcherbatov 2019-02-27 11:13 ` [tarantool-patches] [PATCH v2 1/7] sql: refactor sql_alloc_src_list to set diag Kirill Shcherbatov 2019-03-07 17:34 ` [tarantool-patches] " Vladislav Shpilevoy 2019-03-11 15:04 ` Kirill Shcherbatov 2019-02-27 11:13 ` [tarantool-patches] [PATCH v2 2/7] sql: rework sql_src_list_enlarge " Kirill Shcherbatov 2019-03-07 17:34 ` [tarantool-patches] " Vladislav Shpilevoy 2019-03-11 15:04 ` Kirill Shcherbatov 2019-02-27 11:13 ` [tarantool-patches] [PATCH v2 3/7] sql: refactor sql_src_list_append " Kirill Shcherbatov 2019-03-07 17:34 ` [tarantool-patches] " Vladislav Shpilevoy 2019-03-11 15:04 ` Kirill Shcherbatov 2019-03-18 19:33 ` Vladislav Shpilevoy [this message] 2019-03-20 11:02 ` Kirill Shcherbatov 2019-03-26 17:08 ` Vladislav Shpilevoy 2019-03-26 18:07 ` Vladislav Shpilevoy 2019-02-27 11:13 ` [tarantool-patches] [PATCH v2 4/7] sql: refactor sql_name_from_token " Kirill Shcherbatov 2019-03-07 17:34 ` [tarantool-patches] " Vladislav Shpilevoy 2019-03-11 15:04 ` Kirill Shcherbatov 2019-03-18 19:33 ` Vladislav Shpilevoy 2019-03-20 11:02 ` Kirill Shcherbatov 2019-02-27 11:13 ` [tarantool-patches] [PATCH v2 5/7] sql: refactor sql_trigger_step_allocate " Kirill Shcherbatov 2019-03-07 17:34 ` [tarantool-patches] " Vladislav Shpilevoy 2019-03-11 15:04 ` Kirill Shcherbatov 2019-03-18 19:33 ` Vladislav Shpilevoy 2019-03-20 11:02 ` Kirill Shcherbatov 2019-03-26 17:08 ` Vladislav Shpilevoy 2019-02-27 11:13 ` [tarantool-patches] [PATCH v2 6/7] sql: refactor sql_expr_create " Kirill Shcherbatov 2019-03-07 17:34 ` [tarantool-patches] " Vladislav Shpilevoy 2019-03-11 15:04 ` Kirill Shcherbatov 2019-03-18 19:33 ` Vladislav Shpilevoy 2019-03-20 11:02 ` Kirill Shcherbatov 2019-03-26 17:08 ` Vladislav Shpilevoy 2019-02-27 11:13 ` [tarantool-patches] [PATCH v2 7/7] sql: store regular identifiers in case-normal form Kirill Shcherbatov 2019-03-07 17:34 ` [tarantool-patches] " Vladislav Shpilevoy 2019-03-11 15:04 ` Kirill Shcherbatov 2019-03-18 19:33 ` Vladislav Shpilevoy 2019-03-20 11:02 ` Kirill Shcherbatov 2019-03-26 17:08 ` Vladislav Shpilevoy 2019-03-18 19:33 ` [tarantool-patches] Re: [PATCH v2 0/7] " Vladislav Shpilevoy 2019-03-20 11:02 ` Kirill Shcherbatov 2019-03-26 17:09 ` Vladislav Shpilevoy 2019-03-27 14:06 ` Kirill Yukhin
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=2c6214c0-dc40-bb33-283b-781234ad3360@tarantool.org \ --to=v.shpilevoy@tarantool.org \ --cc=kshcherbatov@tarantool.org \ --cc=tarantool-patches@freelists.org \ --subject='[tarantool-patches] Re: [PATCH v2 3/7] sql: refactor sql_src_list_append to set diag' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox