From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id F06AF275C5 for ; Tue, 26 Feb 2019 12:50:09 -0500 (EST) Received: from turing.freelists.org ([127.0.0.1]) by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id rsyYg0rNyWUX for ; Tue, 26 Feb 2019 12:50:09 -0500 (EST) 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 turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTPS id 4BA3126A05 for ; Tue, 26 Feb 2019 12:50:09 -0500 (EST) From: "n.pettik" Message-Id: Content-Type: multipart/alternative; boundary="Apple-Mail=_158E7141-C8F2-4C7A-BB4F-B391B7E329B3" Mime-Version: 1.0 (Mac OS X Mail 12.2 \(3445.102.3\)) Subject: [tarantool-patches] Re: [PATCH] sql: LIKE/LENGTH process '\0' Date: Tue, 26 Feb 2019 20:50:07 +0300 In-Reply-To: References: <15e143f4-3ea7-c7d6-d8ac-8a0e20b76449@tarantool.org> <1560FF96-FECD-4368-8AF8-F8F2AE7696E3@tarantool.org> <07DBA796-6DD4-41DD-8438-104FE3AE05BB@tarantool.org> <4F4E0A7E-199C-4647-A49C-DD0E8A216527@tarantool.org> <8EF5CE57-C6B5-493C-94CC-AA3C88639485@tarantool.org> <7E6CE8AA-512D-4472-9DBD-8159073386C5@tarantool.org> <25649276-74CD-46E7-A1EB-F4CE299E637C@tarantool.org> <427EE913-3E58-413F-A645-DBF83C809334@tarantool.org> <583EC402-D1FF-45C4-B18B-8A06D4362200@tarantool.org> <3377BC01-D943-4D24-A9A2-BA9B9C67EA92@tarantool.org> Sender: tarantool-patches-bounce@freelists.org Errors-to: tarantool-patches-bounce@freelists.org Reply-To: tarantool-patches@freelists.org List-help: List-unsubscribe: List-software: Ecartis version 1.0.0 List-Id: tarantool-patches List-subscribe: List-owner: List-post: List-archive: To: tarantool-patches@freelists.org Cc: Ivan Koptelov --Apple-Mail=_158E7141-C8F2-4C7A-BB4F-B391B7E329B3 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=utf-8 > On 26 Feb 2019, at 16:33, i.koptelov = wrote: >> On 25 Feb 2019, at 18:10, n.pettik wrote: >>=20 >> That=E2=80=99s I was talking about. But using the macros with the = same >> name as in utf library doesn=E2=80=99t look like a good pattern. Yep, = you >> can use define guards like: >>=20 >> #ifdef U8_COUNT_TRAIL_BYTES_UNSAFE >> #undef U8_COUNT_TRAIL_BYTES_UNSAFE >> #endif >> #define U8_COUNT_TRAIL_BYTES_UNSAFE >>=20 >> But I=E2=80=99d rather just give it another name. >> Hence, taking into account comment below, >> we are going to substitute SQL_SKIP_UTF8() with >> implementation borrowed from icu library. > I changed the names to SQL_UTF8_FWD_1_UNSAFE and > SQL_UTF8_COUNT_TRAIL_BYTES_UNSAFE. Won=E2=80=99t bother you with portion of minor comments. I=E2=80=99ve pushed them, take a look. If they are OK, just squash (but don=E2=80=99t squash last commit) them and patch will be OK as well. Also, I=E2=80=99ve fixed a bit commit message. Add please doc request which includes user-visible changes.= --Apple-Mail=_158E7141-C8F2-4C7A-BB4F-B391B7E329B3 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=utf-8

On 26 Feb 2019, at 16:33, i.koptelov <ivan.koptelov@tarantool.org> wrote:
On 25 = Feb 2019, at 18:10, n.pettik <korablev@tarantool.org> wrote:

That=E2=80=99s I was talking about. But using the macros with = the same
name as in utf library doesn=E2=80=99t look like = a good pattern. Yep, you
can use define guards like:

#ifdef  U8_COUNT_TRAIL_BYTES_UNSAFE
#undef U8_COUNT_TRAIL_BYTES_UNSAFE
#endif
#define U8_COUNT_TRAIL_BYTES_UNSAFE

But I=E2=80=99d rather just give it another name.
Hence, taking into account comment below,
we = are going to substitute SQL_SKIP_UTF8() with
implementation = borrowed from icu library.
I changed the names to = SQL_UTF8_FWD_1_UNSAFE and
SQL_UTF8_COUNT_TRAIL_BYTES_UNSAFE.
Won=E2=80=99t bother you with portion of minor = comments.
I=E2=80=99ve pushed them, take a look. If they are = OK, just
squash (but don=E2=80=99t squash last commit) them = and
patch will be OK as well.

Also, I=E2=80=99ve fixed a bit commit message. Add = please
doc request which includes user-visible = changes.
= --Apple-Mail=_158E7141-C8F2-4C7A-BB4F-B391B7E329B3--