From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng3.m.smailru.net (smtpng3.m.smailru.net [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 783D9445320 for ; Tue, 14 Jul 2020 18:48:10 +0300 (MSK) From: imeevma@tarantool.org Date: Tue, 14 Jul 2020 18:48:09 +0300 Message-Id: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [Tarantool-patches] [PATCH v5 00/17] sql: change implicit cast for assignment List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: korablev@tarantool.org, tsafin@tarantool.org, tarantool-patches@dev.tarantool.org This patch-set changes implicit cast for assignment. https://github.com/tarantool/tarantool/issues/3809 https://github.com/tarantool/tarantool/tree/imeevma/gh-3809-disallow-imlicit-cast-from-string-to-nums @ChangeLog - [Breaking change] Define new rules for implicit cast for assignment (gh-3809). v2: - Added a commit that changes the type mismatch error description. v3: - Introduction of mem_set_double() was moved to another commit. - Implicit cast rules for assigning were changed. v4: - Added type checking and implicit casting of arguments to built-in functions. - Removed unnecessary patches from the set. - Now this patch-set fixes implicit cast only for assignment. v5: - Removed unnecessary patches from the set. - The patch that changes the type checking of arguments to built-in functions is divided into 15 patches. Mergen Imeev (17): sql: set field_type in mem_set_*() functions sql: change implicit cast for assignment sql: use ApplyType to check function arguments sql: check args of abs() sql: check args of avg(), sum() and total() sql: check args of char() sql: check args of length() sql: check operands of LIKE sql: check args of lower() and upper() sql: check args of position() sql: check args of randomblob() sql: check args of replace() sql: check args of round() sql: check args of soundex() sql: check args of substr() sql: check args of unicode() sql: check args of zeroblob() src/box/sql/expr.c | 2 + src/box/sql/func.c | 437 ++++++++----- src/box/sql/select.c | 35 + src/box/sql/sqlInt.h | 35 + src/box/sql/vdbe.c | 184 +++++- src/box/sql/vdbeInt.h | 4 + src/box/sql/vdbemem.c | 10 + test/sql-tap/autoinc.test.lua | 2 +- test/sql-tap/cse.test.lua | 8 +- test/sql-tap/default.test.lua | 6 +- test/sql-tap/e_select1.test.lua | 27 +- test/sql-tap/func.test.lua | 44 +- test/sql-tap/func2.test.lua | 18 +- test/sql-tap/func5.test.lua | 936 ++++++++++++++++++++++++++- test/sql-tap/in3.test.lua | 14 +- test/sql-tap/in4.test.lua | 96 +-- test/sql-tap/index1.test.lua | 24 +- test/sql-tap/insert3.test.lua | 10 +- test/sql-tap/intpkey.test.lua | 133 +--- test/sql-tap/limit.test.lua | 2 +- test/sql-tap/minmax2.test.lua | 6 +- test/sql-tap/misc1.test.lua | 24 +- test/sql-tap/numcast.test.lua | 6 +- test/sql-tap/orderby1.test.lua | 2 +- test/sql-tap/position.test.lua | 6 +- test/sql-tap/select1.test.lua | 8 +- test/sql-tap/select4.test.lua | 12 +- test/sql-tap/select7.test.lua | 2 +- test/sql-tap/sort.test.lua | 8 +- test/sql-tap/subquery.test.lua | 69 +- test/sql-tap/tkt-3998683a16.test.lua | 26 +- test/sql-tap/tkt-54844eea3f.test.lua | 8 +- test/sql-tap/tkt-7bbfb7d442.test.lua | 4 +- test/sql-tap/tkt-9a8b09f8e6.test.lua | 62 +- test/sql-tap/tkt-f973c7ac31.test.lua | 18 +- test/sql-tap/tkt-fc7bd6358f.test.lua | 111 ---- test/sql-tap/tkt1444.test.lua | 4 +- test/sql-tap/tkt3493.test.lua | 6 +- test/sql-tap/tkt3841.test.lua | 12 +- test/sql-tap/transitive1.test.lua | 4 +- test/sql-tap/triggerA.test.lua | 4 +- test/sql-tap/unique.test.lua | 8 +- test/sql-tap/view.test.lua | 2 +- test/sql-tap/where5.test.lua | 10 +- test/sql-tap/whereB.test.lua | 908 -------------------------- test/sql-tap/whereC.test.lua | 8 +- test/sql/boolean.result | 32 +- test/sql/collation.result | 2 +- test/sql/types.result | 684 ++++++++++++++++++-- test/sql/types.test.lua | 129 ++++ 50 files changed, 2440 insertions(+), 1772 deletions(-) delete mode 100755 test/sql-tap/tkt-fc7bd6358f.test.lua delete mode 100755 test/sql-tap/whereB.test.lua -- 2.25.1