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 217866EC55; Sat, 9 Oct 2021 01:02:17 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 217866EC55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1633730537; bh=RLduZYIytxKaF96us5uJTjAWDkK6Mvcwi8wCTWs4LXA=; h=Date:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=tgVYrBeOi4yr0WKv0reRRM7eCEnBhit9UDB+0Yb+7Vfk34unbdaT8VQ4CvTq2HvaC Tc0/Skzfc6BrU3bpMfFlGPdS0hDqQjkhXZ+4QsyP93d6cOQkOemy5pr9ONwjIltD4P PCkZswxsBd/cT95ksOz7sLqwfmy1jn188L9l9eMY= Received: from smtpng3.i.mail.ru (smtpng3.i.mail.ru [94.100.177.149]) (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 070AB6EC55 for ; Sat, 9 Oct 2021 01:02:16 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 070AB6EC55 Received: by smtpng3.m.smailru.net with esmtpa (envelope-from ) id 1mYxwV-0008VL-B7; Sat, 09 Oct 2021 01:02:15 +0300 Message-ID: Date: Sat, 9 Oct 2021 00:02:14 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.1.2 To: imeevma@tarantool.org Cc: tarantool-patches@dev.tarantool.org References: Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-4EC0790: 10 X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD9A6D4E3B1981C4C7DC8C09104FADB757A98AD8127042C5321182A05F5380850401198E96A47CDBBDBDB774027664A8B12F180EBEE8B0019C39B35CB7C50DD19B8 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE7548C33FFD72831AFEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F79006378D64EDD178B2A1008638F802B75D45FF36EB9D2243A4F8B5A6FCA7DBDB1FC311F39EFFDF887939037866D6147AF826D88B844DF6278A361C390B601FF9999BFE117882F4460429724CE54428C33FAD305F5C1EE8F4F765FC2EE5AD8F952D28FBA471835C12D1D9774AD6D5ED66289B52BA9C0B312567BB23117882F446042972877693876707352033AC447995A7AD186FD1C55BDD38FC3FD2E47CDBA5A96583BA9C0B312567BB231DD303D21008E29813377AFFFEAFD269A417C69337E82CC2E827F84554CEF50127C277FBC8AE2E8BA83251EDC214901ED5E8D9A59859A8B6B1CFA6D474D4A6A4089D37D7C0E48F6C5571747095F342E88FB05168BE4CE3AF X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A213B5FB47DCBC3458834459D11680B505178C323EEE45813B761891C12951EE38 X-C1DE0DAB: 0D63561A33F958A5A279C0F4899B3A5E7711EC91B9B891EFBC5C646C9A061CEDD59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA759D2A03B9C34326B3410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D3429499E429979B7C7DDEC2E82638A220E921FC8AC32889B4F55D87B5DA0C85BB018599950341031001D7E09C32AA3244CCB5997C73C632494EB09FA7DDC7DC8F9F94338140B71B8EE729B2BEF169E0186 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojMZ06aokA6brHScM9r0Yw6w== X-Mailru-Sender: 689FA8AB762F7393C37E3C1AEC41BA5DAF5115BF4E6E5FBAE239016E54E707393841015FED1DE5223CC9A89AB576DD93FB559BB5D741EB963CF37A108A312F5C27E8A8C3839CE0E267EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v1 7/8] sql: rework SUBSTR() function 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: Vladislav Shpilevoy via Tarantool-patches Reply-To: Vladislav Shpilevoy Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" Thanks for the patch! On 01.10.2021 18:29, Mergen Imeev via Tarantool-patches wrote: > This patch makes SUBSTR() work according to ANSI rules for SUBSTRING() > function. Also, SUBSTR() can now work correctly with large INTEGER > values. The SUBSTR() syntax has not changed. Does not make much sense given that Mem.n is just int. You can't have strings or blobs larger than that. > Part of #4145 > > @TarantoolBot document > Title: SUBSTR() function > > SUBSTR() now works according to the ANSI rules for SUBSTRING(), but with > no syntax changes. What changed: > 1) if the third argument is specified and it is less than 0, an error is > thrown; > 2) if the sum of the second and third arguments is less than 1, an empty > string is returned; > 3) if the second argument is less than 0, and the sum of the second and > third arguments is greater than 1, then the result is equal to the > result of SUBSTR() with the second argument equal to 1 and the third > argument equal to the sum of the original second and third arguments > minus 1. I don't understand how it works now. What are the arguments? What do they do? Can you explain fully? I see that a lot of tests now has turned into errors and I don't understand why did they stop working. In the code I couldn't find any comments.