Tarantool development patches archive
 help / color / mirror / Atom feed
From: "n.pettik" <korablev@tarantool.org>
To: tarantool-patches@freelists.org
Cc: szudin@tarantool.org
Subject: [tarantool-patches] Re: [PATCH v4 2/2] sql: remove busy handler
Date: Tue, 12 Feb 2019 20:05:55 +0300	[thread overview]
Message-ID: <6210D946-7927-47A2-8598-E6F9B8309641@tarantool.org> (raw)
In-Reply-To: <20190212073151.27230-2-szudin@tarantool.org>

> -	 *
> -	 * Call sqlite3_busy_timeout(db, N).  Return the current
> -	 * timeout value * if one is set.  If no busy handler
> -	 * or a different busy handler is set * then 0 is
> -	 * returned.  Setting the busy_timeout to 0 or negative *
> -	 * disables the timeout.
> -	 */
> -	/* case PragTyp_BUSY_TIMEOUT */
> 	default:{
> -			assert(pPragma->ePragTyp == PragTyp_BUSY_TIMEOUT);
> -			if (zRight) {
> -				sqlite3_busy_timeout(db, sqlite3Atoi(zRight));
> -			}
> -			returnSingleInt(v, db->busyTimeout);
> -			break;
> +		/* We shouldn't get here. */
> +		diag_set(ClientError, ER_UNKNOWN);
> +		pParse->rc = SQL_TARANTOOL_ERROR;
> +		pParse->nErr++;
> +		goto pragma_out;

If we really can’t reach here under no circumstances
(which seems to be true - pragmaLocate checks this) then
it’s better to place unreachable(); assert. Fix this please.

  reply	other threads:[~2019-02-12 17:05 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-12  7:31 [tarantool-patches] [PATCH v4 1/2] sql: remove useless pragmas Stanislav Zudin
2019-02-12  7:31 ` [tarantool-patches] [PATCH v4 2/2] sql: remove busy handler Stanislav Zudin
2019-02-12 17:05   ` n.pettik [this message]
2019-02-13  7:10     ` [tarantool-patches] " Stanislav Zudin
2019-02-13 12:54       ` n.pettik
2019-02-12 17:05 ` [tarantool-patches] Re: [PATCH v4 1/2] sql: remove useless pragmas n.pettik
2019-02-18 10:28 ` 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=6210D946-7927-47A2-8598-E6F9B8309641@tarantool.org \
    --to=korablev@tarantool.org \
    --cc=szudin@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='[tarantool-patches] Re: [PATCH v4 2/2] sql: remove busy handler' \
    /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