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 B016E68713; Mon, 1 Feb 2021 11:17:21 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org B016E68713 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1612167441; bh=fC4elZikAto28qs6ZwfrYeYXf48Pis+i8CsiH9Znknk=; 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=nHHhJtvwuXVADFTTiusHvlblMoN53o7IK92AKo8jo3Bv4y9UJm/qEdtRBb7jfwniB yHA0sIzGkAj691fu7bNynuwfomsgLrvJMUpSFEhS4z1V5vGY4JqOxgD52XxFT/yqc2 RzJH632tnl3588XPjrHBDJFy9D6A/EMUQZuh1AOA= Received: from smtp45.i.mail.ru (smtp45.i.mail.ru [94.100.177.105]) (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 0E46A63343 for ; Mon, 1 Feb 2021 11:15:00 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 0E46A63343 Received: by smtp45.i.mail.ru with esmtpa (envelope-from ) id 1l6UMN-0002i1-43; Mon, 01 Feb 2021 11:14:59 +0300 To: s.ostanevich@corp.mail.ru, tsafin@tarantool.org Cc: tarantool-patches@dev.tarantool.org Date: Mon, 1 Feb 2021 11:14:58 +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: 4F1203BC0FB41BD953AC099BC0052A9C55152E5B36F7009490E3DBC75EBFD4CE182A05F5380850409C621D0C10229849DCA4C194F27CA100EA7230871C5A954337A426812412B927 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7BC4E2FB7ADD5BA16EA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637D58A1C8964E53F0E8638F802B75D45FF5571747095F342E8C7A0BC55FA0FE5FC632E30DA10E3D6BDD41791F6F0D8A47162902FD24B046B55389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C05A64D9A1E9CA65708941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B6AEEA5BB16A939343CC7F00164DA146DA6F5DAA56C3B73B237318B6A418E8EAB8D32BA5DBAC0009BE9E8FC8737B5C2249731CE4949D5892AD76E601842F6C81A12EF20D2F80756B5F7E9C4E3C761E06A776E601842F6C81A127C277FBC8AE2E8BAC789644CEAC50343AA81AA40904B5D9DBF02ECDB25306B2B25CBF701D1BE8734AD6D5ED66289B5278DA827A17800CE7C7AF01494741750667F23339F89546C5A8DF7F3B2552694A6FED454B719173D6725E5C173C3A84C3D703628AB378667775ECD9A6C639B01B4E70A05D1297E1BBC6867C52282FAC85D9B7C4F32B44FF57D4B828FA1BC0F1ACBD9CCCA9EDD067B1EDA766A37F9254B7 X-C1DE0DAB: C20DE7B7AB408E4181F030C43753B8186998911F362727C414F749A5E30D975C6FA9FB90A9CF7018C30E103792E1112AB0DCEA083435A3419C2B6934AE262D3EE7EAB7254005DCED7532B743992DF240BDC6A1CF3F042BAD6DF99611D93F60EF31C0090ACECF247D699F904B3F4130E343918A1A30D5E7FCCB5012B2E24CD356 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3482189E76C6218D8FC5ABC7E69710BBB9A981EFAFF605DAB639E97ABC5943F3FE1876C82A649862D91D7E09C32AA3244C24FA08E428B73FED2E0966CE8467B6306C24832127668422FACE5A9C96DEB163 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojyKiJYJ15DtLnXzwQoFszGQ== X-Mailru-Sender: 5C3750E245F362008BC1685FEC6306ED542D6F3AB6845DE0DCA4C194F27CA100F7F5837242FA16B25105BD0848736F9966FEC6BF5C9C28D97E07721503EA2E00ED97202A5A4E92BF7402F9BA4338D657ED14614B50AE0675 X-Mras: Ok Subject: [Tarantool-patches] [PATCH v1 05/10] sql: refactor vdbesort.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/vdbesort.c | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/box/sql/vdbesort.c b/src/box/sql/vdbesort.c index a2d681255..46759e591 100644 --- a/src/box/sql/vdbesort.c +++ b/src/box/sql/vdbesort.c @@ -2163,13 +2163,8 @@ sqlVdbeSorterRowkey(const VdbeCursor * pCsr, Mem * pOut) assert(pCsr->eCurType == CURTYPE_SORTER); pSorter = pCsr->uc.pSorter; pKey = vdbeSorterRowkey(pSorter, &nKey); - if (sqlVdbeMemClearAndResize(pOut, nKey)) { + if (mem_set_bin(pOut, pKey, nKey, 0, false) != 0) return -1; - } - pOut->n = nKey; - MemSetTypeFlag(pOut, MEM_Blob); - memcpy(pOut->z, pKey, nKey); - return 0; } @@ -2217,7 +2212,7 @@ sqlVdbeSorterCompare(const VdbeCursor * pCsr, /* Sorter cursor */ pKey = vdbeSorterRowkey(pSorter, &nKey); sqlVdbeRecordUnpackMsgpack(pCsr->key_def, pKey, r2); for (i = 0; i < nKeyCol; i++) { - if (r2->aMem[i].flags & MEM_Null) { + if (mem_is_null(&r2->aMem[i])) { *pRes = -1; return 0; } -- 2.25.1