[tarantool-patches] Re: [PATCH v4 2/2] sql: remove busy handler

n.pettik korablev at tarantool.org
Tue Feb 12 20:05:55 MSK 2019


> -	 *
> -	 * 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.






More information about the Tarantool-patches mailing list