From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id A1A0C68713; Mon, 1 Feb 2021 11:18:22 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org A1A0C68713 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1612167502; bh=YoazefzzQB9B9L+Layb67AISMBHBGjSNgmjMZP7/TlI=; h=To:Cc:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=JowTJhBlpBVGAMzMwaKcCtu8gys+O/WPlExJHA3dQjdlAKJfN7LjXRqidTtR2XljU OYLiZ9gA50DdCQhSyWdzo2ft3A9wQr7tueFOOegJmF9NespyV8+CfNOJRrtxdEw21M h3gFTXyQxvvJ33bW7LueQxfCQX2jhG6Eu4HLY75U= Received: from smtp34.i.mail.ru (smtp34.i.mail.ru [94.100.177.94]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id D9040632D1 for ; Mon, 1 Feb 2021 11:15:03 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org D9040632D1 Received: by smtp34.i.mail.ru with esmtpa (envelope-from ) id 1l6UMQ-000638-V5; Mon, 01 Feb 2021 11:15:03 +0300 To: s.ostanevich@corp.mail.ru, tsafin@tarantool.org Cc: tarantool-patches@dev.tarantool.org Date: Mon, 1 Feb 2021 11:15:02 +0300 Message-Id: X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD953AC099BC0052A9CC9F923E808BA4A11AAD7C69F0036037C182A05F5380850408AB9F0CCB91A3A643DD89D552E4490A780FCD7DED02C0F357BF08BC6395B8E62 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7AC4684DF4EC4B256EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637889C00975665ABF68638F802B75D45FF5571747095F342E8C7A0BC55FA0FE5FC632E30DA10E3D6BDC5B6DEACCE491B7266C8879FEE06417D389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C0AD76BF5943A59ECC8941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B6F7EC8CC465A83DA3CC7F00164DA146DA6F5DAA56C3B73B237318B6A418E8EAB8D32BA5DBAC0009BE9E8FC8737B5C22490899CC1EBF3A5B0D76E601842F6C81A12EF20D2F80756B5F7E9C4E3C761E06A776E601842F6C81A127C277FBC8AE2E8BDBDA8B4665B4DC893AA81AA40904B5D9DBF02ECDB25306B2B25CBF701D1BE8734AD6D5ED66289B5278DA827A17800CE7C7AF01494741750667F23339F89546C5A8DF7F3B2552694A6FED454B719173D6725E5C173C3A84C3D703628AB378667775ECD9A6C639B01B4E70A05D1297E1BBC6867C52282FAC85D9B7C4F32B44FF57D4B828FA1BC0F1ACBD9CCCA9EDD067B1EDA766A37F9254B7 X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8186998911F362727C414F749A5E30D975C6FA9FB90A9CF70186F22D6981F9643A17FAFDCFA577CC45D9C2B6934AE262D3EE7EAB7254005DCED7532B743992DF240BDC6A1CF3F042BAD6DF99611D93F60EF31C0090ACECF247D699F904B3F4130E343918A1A30D5E7FCCB5012B2E24CD356 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34C6EC1BD9807109D2D2D9626933E586FE819CF28C97F5AFCD0119C79D584BB785C3322BAE6DBBC22F1D7E09C32AA3244C9D572A22829B3C8BDAA4F275D220479505AB220A9D022EBCFACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojyKiJYJ15DtKwEAatwxqLXg== X-Mailru-Sender: 5C3750E245F362008BC1685FEC6306ED8BC75607A0BE2F603DD89D552E4490A760497F7EF99AAC8F5105BD0848736F9966FEC6BF5C9C28D97E07721503EA2E00ED97202A5A4E92BF7402F9BA4338D657ED14614B50AE0675 X-Mras: Ok Subject: [Tarantool-patches] [PATCH v1 07/10] sql: refactor vdbetrace.c X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Mergen Imeev via Tarantool-patches Reply-To: imeevma@tarantool.org Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" --- src/box/sql/vdbetrace.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/box/sql/vdbetrace.c b/src/box/sql/vdbetrace.c index 2ee9f668c..175cbc0a6 100644 --- a/src/box/sql/vdbetrace.c +++ b/src/box/sql/vdbetrace.c @@ -147,15 +147,15 @@ sqlVdbeExpandSql(Vdbe * p, /* The prepared statement being evaluated */ nextIndex = idx + 1; assert(idx > 0 && idx <= p->nVar); pVar = &p->aVar[idx - 1]; - if (pVar->flags & MEM_Null) { + if (mem_is_null(pVar)) { sqlStrAccumAppend(&out, "NULL", 4); - } else if (pVar->flags & MEM_Int) { + } else if (mem_is_neg_int(pVar)) { sqlXPrintf(&out, "%lld", pVar->u.i); - } else if (pVar->flags & MEM_UInt) { + } else if (mem_is_pos_int(pVar)) { sqlXPrintf(&out, "%llu", pVar->u.u); - } else if (pVar->flags & MEM_Real) { + } else if (mem_is_double(pVar)) { sqlXPrintf(&out, "%!.15g", pVar->u.r); - } else if (pVar->flags & MEM_Str) { + } else if (mem_is_string(pVar)) { int nOut; /* Number of bytes of the string text to include in output */ nOut = pVar->n; sqlXPrintf(&out, "'%.*q'", nOut, pVar->z); @@ -164,7 +164,7 @@ sqlVdbeExpandSql(Vdbe * p, /* The prepared statement being evaluated */ pVar->u.nZero); } else { int nOut; /* Number of bytes of the blob to include in output */ - assert(pVar->flags & MEM_Blob); + assert(mem_is_binary(pVar)); sqlStrAccumAppend(&out, "x'", 2); nOut = pVar->n; for (i = 0; i < nOut; i++) { -- 2.25.1