From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 0F56A2C1D9 for ; Thu, 29 Nov 2018 09:09:29 -0500 (EST) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id RfTAFYEWCiyL for ; Thu, 29 Nov 2018 09:09:28 -0500 (EST) Received: from smtp50.i.mail.ru (smtp50.i.mail.ru [94.100.177.110]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id C259727EE4 for ; Thu, 29 Nov 2018 09:09:28 -0500 (EST) Subject: [tarantool-patches] Re: [PATCH v1 6/6] sql: make sql checks on server side References: From: Kirill Shcherbatov Message-ID: <64471afd-a041-d302-28ff-cfa36404e12c@tarantool.org> Date: Thu, 29 Nov 2018 17:09:26 +0300 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: tarantool-patches@freelists.org, Vladislav Shpilevoy Sorry, there are a few minor fixes that I pushed on branch. > + if (new_tuple != NULL && space->sql_checks != NULL) { > + const char *old_tuple_raw = old_tuple != NULL ? > + tuple_data(old_tuple) : NULL; > + const char *new_tuple_raw = new_tuple != NULL ? > + tuple_data(new_tuple) : NULL; I've dropped this redundant new_tuple != NULL on branch > +/* > + * Terminate the current execution of an SQL statement and reset > + * it back to its starting state so that it can be reused. A > + * success code from the prior execution is returned. > + * > + * This routine sets the error code and string returned by > + * sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16(). > + */ > +int > +sqlite3_reset(sqlite3_stmt * pStmt); I've written doxigen comment on branch and have refactored body to follow our codestyle. > +static inline char * > +sql_stmt_err(struct sqlite3_stmt *stmt) > +{ > + struct Vdbe *v = (struct Vdbe *)stmt; > + return v->zErrMsg; > +} I've dropped this useless routine on branch.