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 B46F96EC55; Mon, 26 Jul 2021 23:58:08 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org B46F96EC55 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1627333088; bh=Kag32U32a/dqFBjzC1ZSK2SsIJ1gFCoxmGScz3Y7e1w=; h=To:Cc:References:Date:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=cSePxqSAaAPvPudJ662ZDfdRVOq33zQSVaj+ogTiUSh54/Tav3UR07fKKjOIBAZaO 0bczAibhfk3xxtTNwZtwa3oF1pDWm61S8O971pvEa8M9JMjid1lK/ZLqWr6QnWRnNA qixY4G5KVDdA2h7j+Mqv02dmCJ9TywP3MKppXLTM= 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 B4A186EC55 for ; Mon, 26 Jul 2021 23:58:07 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org B4A186EC55 Received: by smtpng3.m.smailru.net with esmtpa (envelope-from ) id 1m87fq-0001Xo-VY; Mon, 26 Jul 2021 23:58:07 +0300 To: imeevma@tarantool.org Cc: tarantool-patches@dev.tarantool.org References: Message-ID: Date: Mon, 26 Jul 2021 22:58:05 +0200 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.12.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-7564579A: 646B95376F6C166E X-77F55803: 4F1203BC0FB41BD941C43E597735A9C33D83595CA30D6DC5179D1C9A908C47E5182A05F53808504035C6B72BFBCBC9F4CD3A367048CB2EE09A6C197DAED36D8603EBB61A6A1D68ED X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE746D93DAA4671895CEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637B05885A782BE20C5EA1F7E6F0F101C6723150C8DA25C47586E58E00D9D99D84E1BDDB23E98D2D38BBCA57AF85F7723F20C67AFD7663DA2E834B208F91960D534CC7F00164DA146DAFE8445B8C89999728AA50765F7900637F924B32C592EA89F389733CBF5DBD5E9C8A9BA7A39EFB766F5D81C698A659EA7CC7F00164DA146DA9985D098DBDEAEC81D471462564A2E19F6B57BC7E6449061A352F6E88A58FB86F5D81C698A659EA7E827F84554CEF5019E625A9149C048EE9ECD01F8117BC8BEE2021AF6380DFAD18AA50765F790063735872C767BF85DA227C277FBC8AE2E8BDCE939D40DBB93CA75ECD9A6C639B01B4E70A05D1297E1BBCB5012B2E24CD356 X-B7AD71C0: AC4F5C86D027EB782CDD5689AFBDA7A213B5FB47DCBC3458834459D11680B505A832975641E7F0040F3160E95EDF6713 X-C1DE0DAB: 0D63561A33F958A522EFC442E5B8A45581ABCFBE3E758C23EB50973DD9518AB0D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA7517A45118377F5F9E8E8E86DC7131B365E7726E8460B7C23C X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D34AA13E2DDB906786224CD7438F65CB93899FD01046D33700229B676CA27271C788E4FA51D8A61C5331D7E09C32AA3244CE1E7A877B5C3DC49C380FE82B6D622469CA7333006C390A0729B2BEF169E0186 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojMEANdStWW5+sceaoEY775A== X-Mailru-Sender: 689FA8AB762F7393C37E3C1AEC41BA5DD67A46F4C573EA0211F28FF76CA6D50B3841015FED1DE5223CC9A89AB576DD93FB559BB5D741EB963CF37A108A312F5C27E8A8C3839CE0E267EA787935ED9F1B X-Mras: Ok Subject: Re: [Tarantool-patches] [PATCH v1 1/1] sql: remove OP_Realify 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! See 2 comments below. > src/box/sql/expr.c | 13 ------- > src/box/sql/vdbe.c | 17 -------- > .../gh-5335-wrong-int-to-double-cast.test.lua | 39 +++++++++++++++++++ 1. Please, add a changelog file. > diff --git a/test/sql-tap/gh-5335-wrong-int-to-double-cast.test.lua b/test/sql-tap/gh-5335-wrong-int-to-double-cast.test.lua > new file mode 100755 > index 000000000..efcae911c > --- /dev/null > +++ b/test/sql-tap/gh-5335-wrong-int-to-double-cast.test.lua > @@ -0,0 +1,39 @@ > +#!/usr/bin/env tarantool > +local test = require("sqltester") > +test:plan(2) > + > +test:execsql([[ > + CREATE TABLE t1 (i NUMBER PRIMARY KEY, n NUMBER); > + CREATE TABLE t2 (i NUMBER PRIMARY KEY, n NUMBER); > + CREATE TRIGGER r AFTER INSERT ON t1 FOR EACH ROW BEGIN UPDATE t1 SET n = new.n; END; > + INSERT INTO t1 VALUES (1, 1); > + INSERT INTO t2 VALUES (1, 1); > +]]) > + > +-- > +-- Make sure that implicit cast from string to integer works correctly in > +-- arithmetic operations. 2. From string to integer? Where are the strings? > +-- > +test:do_execsql_test( > + "gh-5335-1", > + [[ > + SELECT i / 2, n / 2 FROM t1; > + ]], { > + 0, 0 > + }) > + > +test:do_execsql_test( > + "gh-5335-2", > + [[ > + SELECT i / 2, n / 2 FROM t2 GROUP BY n; > + ]], { > + 0, 0 > + }) > + > +test:execsql([[ > + DROP TRIGGER r; > + DROP TABLE t1; > + DROP TABLE t2; > +]]) > + > +test:finish_test() >