Tarantool development patches archive
 help / color / mirror / Atom feed
From: "n.pettik" <korablev@tarantool.org>
To: tarantool-patches@freelists.org
Cc: Imeev Mergen <imeevma@tarantool.org>
Subject: [tarantool-patches] Re: [PATCH v4 8/8] sql: remove sqlErrorMsg()
Date: Tue, 26 Mar 2019 21:28:21 +0300	[thread overview]
Message-ID: <E6B9A671-5627-434A-8CFF-91F6A45E4ECA@tarantool.org> (raw)
In-Reply-To: <20190326175219.GA30438@tarantool.org>

[-- Attachment #1: Type: text/plain, Size: 1022 bytes --]


> diff --git a/src/box/sql/select.c b/src/box/sql/select.c
> index e217c19..778de2c 100644
> --- a/src/box/sql/select.c
> +++ b/src/box/sql/select.c
> @@ -1466,25 +1466,25 @@ sql_expr_list_to_key_info(struct Parse *parse, struct ExprList *list, int start)
> /*
>  * Name of the connection operator, used for error messages.
>  */
> -static const char *
> -selectOpName(int id)
> +const char *
> +select_op_name(int op_id)

Add sql_ prefix.

> {
> -	char *z;
> -	switch (id) {
> +	const char *op_name;

IMHO don’t see much sense in this renaming: function is small and straight
enough to use old brief names.

> +	switch (op_id) {
> 	case TK_ALL:
> -		z = "UNION ALL";
> +		op_name = "UNION ALL";
> 		break;
> 	case TK_INTERSECT:
> -		z = "INTERSECT";
> +		op_name = "INTERSECT";
> 		break;
> 	case TK_EXCEPT:
> -		z = "EXCEPT";
> +		op_name = "EXCEPT";
> 		break;
> 	default:
> -		z = "UNION";
> +		op_name = "UNION";
> 		break;
> 	}
> -	return z;
> +	return op_name;
> }


[-- Attachment #2: Type: text/html, Size: 45535 bytes --]

  reply	other threads:[~2019-03-26 18:28 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-13 17:03 [tarantool-patches] [PATCH v4 0/8] sql: use diag_set() for errors in SQL imeevma
2019-03-13 17:03 ` [tarantool-patches] [PATCH v4 1/8] sql: rework syntax errors imeevma
2019-03-14 18:24   ` [tarantool-patches] " n.pettik
2019-03-14 18:28     ` Imeev Mergen
2019-03-15 14:09   ` Kirill Yukhin
2019-03-13 17:03 ` [tarantool-patches] [PATCH v4 2/8] sql: set SQL parser errors via diag_set() imeevma
2019-03-14 19:26   ` [tarantool-patches] " n.pettik
2019-03-14 19:36     ` n.pettik
2019-03-18 15:06     ` Mergen Imeev
2019-03-19  9:41       ` n.pettik
2019-03-19 11:24   ` Kirill Yukhin
2019-03-13 17:03 ` [tarantool-patches] [PATCH v4 3/8] sql: replace rc with is_aborted status in struct Parse imeevma
2019-03-14 19:53   ` [tarantool-patches] " n.pettik
2019-03-18 15:28     ` Mergen Imeev
2019-03-19  9:54       ` n.pettik
2019-03-19 13:17   ` Kirill Yukhin
2019-03-13 17:03 ` [tarantool-patches] [PATCH v4 4/8] sql: remove field nErr from " imeevma
2019-03-14 19:58   ` [tarantool-patches] " n.pettik
2019-03-19 13:27   ` Kirill Yukhin
2019-03-13 17:03 ` [tarantool-patches] [PATCH v4 5/8] sql: remove field zErrMsg " imeevma
2019-03-14 22:15   ` [tarantool-patches] " n.pettik
2019-03-19 13:20   ` Kirill Yukhin
2019-03-13 17:03 ` [tarantool-patches] [PATCH v4 6/8] sql: rework three errors of "unsupported" type imeevma
2019-03-14 22:15   ` [tarantool-patches] " n.pettik
2019-03-19 13:30   ` Kirill Yukhin
2019-03-13 17:03 ` [tarantool-patches] [PATCH v4 7/8] sql: rework semantic errors imeevma
2019-03-15 15:49   ` [tarantool-patches] " n.pettik
2019-03-22 12:48     ` Mergen Imeev
2019-03-26 14:14       ` n.pettik
2019-03-26 16:56         ` Mergen Imeev
2019-03-26 18:16           ` n.pettik
2019-03-26 19:20             ` Mergen Imeev
2019-03-26 21:36               ` n.pettik
2019-03-27  6:48   ` Kirill Yukhin
2019-03-13 17:03 ` [tarantool-patches] [PATCH v4 8/8] sql: remove sqlErrorMsg() imeevma
2019-03-15 13:36   ` [tarantool-patches] " n.pettik
2019-03-25 18:47     ` Mergen Imeev
2019-03-26 13:34       ` n.pettik
2019-03-26 17:52         ` Mergen Imeev
2019-03-26 18:28           ` n.pettik [this message]
2019-03-26 19:21             ` Mergen Imeev
2019-03-26 21:36               ` n.pettik
2019-03-27  6:49   ` 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=E6B9A671-5627-434A-8CFF-91F6A45E4ECA@tarantool.org \
    --to=korablev@tarantool.org \
    --cc=imeevma@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='[tarantool-patches] Re: [PATCH v4 8/8] sql: remove sqlErrorMsg()' \
    /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