[tarantool-patches] Re: [PATCH v3 1/4] sql: Fix code style in sqlite3Pragma.

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Thu Apr 26 14:47:19 MSK 2018


Hello. Please, do not start a commit message from a capital letter, and do
not put dot at the end. Read this:
https://tarantool.io/en/doc/1.9/dev_guide/developer_guidelines.html#how-to-write-a-commit-message
Fix this in other commits too.

See below 1 comment.

On 25/04/2018 19:52, Kirill Shcherbatov wrote:
> ---
>   src/box/sql/pragma.c | 56 +++++++++++++++++++++++++---------------------------
>   1 file changed, 27 insertions(+), 29 deletions(-)
> 
> diff --git a/src/box/sql/pragma.c b/src/box/sql/pragma.c
> index e41f69b..4a68cad 100644
> --- a/src/box/sql/pragma.c
> +++ b/src/box/sql/pragma.c
> @@ -544,37 +544,35 @@ sqlite3Pragma(Parse * pParse, Token * pId,	/* First part of [schema.]id field */
>   
>   #ifndef SQLITE_OMIT_FOREIGN_KEY
>   	case PragTyp_FOREIGN_KEY_LIST:{
> -			if (zRight) {
> -				FKey *pFK;
> -				Table *pTab;
> -				pTab = sqlite3HashFind(&db->pSchema->tblHash,
> -						       zRight);
> -				if (pTab != NULL) {
> -					pFK = pTab->pFKey;
> -					if (pFK) {
> -						int i = 0;
> -						pParse->nMem = 8;
> -						while (pFK) {
> -							int j;
> -							for (j = 0;
> -							     j < pFK->nCol;
> -							     j++) {
> -								sqlite3VdbeMultiLoad(v, 1, "iissssss", i, j, pFK->zTo, pTab->aCol[pFK->aCol[j].iFrom].zName, pFK->aCol[j].zCol, actionName(pFK->aAction[1]),	/* ON UPDATE */
> -										     actionName(pFK->aAction[0]),	/* ON DELETE */
> -										     "NONE");
> -								sqlite3VdbeAddOp2
> -								    (v,
> -								     OP_ResultRow,
> -								     1, 8);
> -							}
> -							++i;
> -							pFK = pFK->pNextFrom;
> -						}
> -					}
> -				}
> -			}
> +		if (!zRight)

1. Please, use explicit == NULL. Same in other places.




More information about the Tarantool-patches mailing list