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 46D9725DC0 for ; Wed, 16 Jan 2019 10:35:00 -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 FuAUBsrzFIZL for ; Wed, 16 Jan 2019 10:35:00 -0500 (EST) Received: from smtpng2.m.smailru.net (smtpng2.m.smailru.net [94.100.179.3]) (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 A63DE25DBE for ; Wed, 16 Jan 2019 10:34:59 -0500 (EST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 12.0 \(3445.100.39\)) Subject: [tarantool-patches] Re: [PATCH v3 1/6] sql: remove unused macros from pragma.c and pragma.h From: "n.pettik" In-Reply-To: Date: Wed, 16 Jan 2019 18:34:57 +0300 Content-Transfer-Encoding: quoted-printable Message-Id: <2AF2069E-C6DE-4B03-B86A-F979BB32A1A1@tarantool.org> References: 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 Cc: Imeev Mergen > On 26 Dec 2018, at 20:17, imeevma@tarantool.org wrote: >=20 > Hi! Thank you for review! My answers and new version below. I > didn't include diff, because all that changed was the commit > message. >=20 >=20 > On 12/24/18 5:01 PM, n.pettik wrote: >> Nit: at the end of commit subject redundant =E2=80=98*=E2=80=99 and = dot. > Fixed. >=20 >> They weren=E2=80=99t deleted, they are simply not used. >> I guess they still can be enabled, if add appropriate commands >> to cmake lists. On the other hand, I doubt that someday we >> really may need them. > Made changes in in commit-message. >=20 >> In fact, this commit has nothing in common with mentioned issue. > Removed from commit-message. >=20 >> Why didn=E2=80=99t you remove ENABLE_SELECTTRACE as well? > I didn't remove it because it can be set through cmake. So? As I already said, I also was able to set OMIT_FLAG_PRAGMAS=20 Look: diff --git a/src/box/sql/CMakeLists.txt b/src/box/sql/CMakeLists.txt index 7f7b60e22..4d4cbb21f 100644 --- a/src/box/sql/CMakeLists.txt +++ b/src/box/sql/CMakeLists.txt @@ -1,6 +1,7 @@ if(CMAKE_BUILD_TYPE STREQUAL "Debug") add_definitions(-DSQLITE_DEBUG=3D1) add_definitions(-DSQLITE_ENABLE_SELECTTRACE) + add_definitions(-DSQLITE_OMIT_FLAG_PRAGMAS=3D1) add_definitions(-DSQLITE_ENABLE_WHERETRACE) endif() Make sure that build is debug but flag-pragmas are disabled: tarantool> \set language sql --- - true ... tarantool> pragma vdbe_debug=3D1 --- - error: 'no such pragma: VDBE_DEBUG' ... tarantool> pragma parser_trace=3D1 parser: Shift 'cmd', go to state 419 parser: Shift 'SEMI' parser: Return. Stack=3D[explain cmd SEMI] parser: Input '$' parser: Reduce [ecmd ::=3D explain cmdx SEMI], go to state 0. parser: Shift 'ecmd', go to state 420 parser: Reduce [input ::=3D ecmd], go to state 0. parser: Accept! parser: Return. Stack=3D] --- - [] ... Lets remove it and replace with simple ifdef debug. The same if for ENABLE_WHERETRACE