From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtpng2.m.smailru.net (smtpng2.m.smailru.net [94.100.179.3]) (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 703E742EF5C for ; Thu, 11 Jun 2020 20:06:51 +0300 (MSK) References: <401a596ba9864ddf4ffc687f4313a60dbc664a28.1591371404.git.k.sosnin@tarantool.org> From: Vladislav Shpilevoy Message-ID: <2458dc72-22ed-2618-00b0-c80bfc47333f@tarantool.org> Date: Thu, 11 Jun 2020 19:06:49 +0200 MIME-Version: 1.0 In-Reply-To: <401a596ba9864ddf4ffc687f4313a60dbc664a28.1591371404.git.k.sosnin@tarantool.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [Tarantool-patches] [PATCH 1/2] Allow leading and trailing whitespaces in FromString List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Chris Sosnin , tarantool-patches@dev.tarantool.org, sergepetrenko@tarantool.org Hi! Thanks for the patch! I am afraid this may be a dead end. You didn't check for tabs, new lines, \r, and whatever else can be treated as a whitespace. Moreover, for some other code it may be necessary not to skip whitespaces. Why can't you trim whitespace symbols in SQL code? sql_atoi64(), for example, trims them, before calling strtoll()/strtoull(). To trim right spaces you could make this function return a position where did it stop, so as to ensure that all the rest is whitespaces, in SQL code. That also would be consistent with strtoll()/strtoull().