Tarantool development patches archive
 help / color / mirror / Atom feed
From: Vladislav Shpilevoy <v.shpilevoy@tarantool.org>
To: Kirill Shcherbatov <kshcherbatov@tarantool.org>,
	tarantool-patches@freelists.org
Subject: [tarantool-patches] Re: [PATCH v1 1/1] sql: drop useless code from os_unix.c
Date: Mon, 2 Jul 2018 21:29:36 +0300	[thread overview]
Message-ID: <1e057fa9-11f5-8679-97c0-aa8f3fe53db7@tarantool.org> (raw)
In-Reply-To: <3ccffaa3-22be-3694-1d1d-e11e0b88a108@tarantool.org>



On 02/07/2018 17:55, Kirill Shcherbatov wrote:
>> Hello. Thanks for the patch! See 2 comments below.
> Hi! Thank you for review and fixes.
> 
>> 1. These functions still are visible in grep results.
>> 2. And much more functions and constants are either unused, or just
>> declared, but has no implementation. Please, complete the patch. I have
>> pushed some of removals on the branch as a separate commit. Please,
>> squash and finalize.
> I've find a few functions to drop. Is it enough?

Unfortunately no. I have removed 642 lines in the patch I pushed on
the branch. Please, squash and then LGTM.

> 
> diff --git a/src/box/sql/os.c b/src/box/sql/os.c
> index bec868b..7c11318 100644
> --- a/src/box/sql/os.c
> +++ b/src/box/sql/os.c
> @@ -70,11 +70,7 @@ int sqlite3_open_file_count = 0;
>    *
>    *     sqlite3OsRead()
>    *     sqlite3OsWrite()
> - *     sqlite3OsShmMap()
>    *     sqlite3OsOpen()
> - *     sqlite3OsDelete()
> - *     sqlite3OsAccess()
> - *     sqlite3OsFullPathname()
>    *
>    */
>   #if defined(SQLITE_TEST)
> diff --git a/src/box/sql/os.h b/src/box/sql/os.h
> index aaadd80..9476583 100644
> --- a/src/box/sql/os.h
> +++ b/src/box/sql/os.h
> @@ -41,13 +41,6 @@
>   #ifndef _SQLITE_OS_H_
>   #define _SQLITE_OS_H_
>   
> -/* If the SET_FULLSYNC macro is not defined above, then make it
> - * a no-op
> - */
> -#ifndef SET_FULLSYNC
> -#define SET_FULLSYNC(x,y)
> -#endif
> -
>   /*
>    * The default size of a disk sector
>    */
> @@ -128,11 +121,7 @@
>    * 1GB boundary.
>    *
>    */
> -#ifdef SQLITE_OMIT_WSD
> -#define PENDING_BYTE     (0x40000000)
> -#else
>   #define PENDING_BYTE      sqlite3PendingByte
> -#endif
>   #define RESERVED_BYTE     (PENDING_BYTE+1)
>   #define SHARED_FIRST      (PENDING_BYTE+2)
>   #define SHARED_SIZE       510
> @@ -149,12 +138,6 @@ void sqlite3OsClose(sqlite3_file *);
>   int sqlite3OsRead(sqlite3_file *, void *, int amt, i64 offset);
>   int sqlite3OsWrite(sqlite3_file *, const void *, int amt, i64 offset);
>   void sqlite3OsFileControlHint(sqlite3_file *, int, void *);
> -#define SQLITE_FCNTL_DB_UNCHANGED 0xca093fa0
> -int sqlite3OsDeviceCharacteristics(sqlite3_file * id);
> -int sqlite3OsShmMap(sqlite3_file *, int, int, int, void volatile **);
> -int sqlite3OsShmLock(sqlite3_file * id, int, int, int);
> -void sqlite3OsShmBarrier(sqlite3_file * id);
> -int sqlite3OsShmUnmap(sqlite3_file * id, int);
>   int sqlite3OsFetch(sqlite3_file * id, i64, int, void **);
>   int sqlite3OsUnfetch(sqlite3_file *, i64, void *);
>   
> @@ -162,14 +145,6 @@ int sqlite3OsUnfetch(sqlite3_file *, i64, void *);
>    * Functions for accessing sqlite3_vfs methods
>    */
>   int sqlite3OsOpen(sqlite3_vfs *, const char *, sqlite3_file *, int, int *);
> -int sqlite3OsDelete(sqlite3_vfs *, const char *, int);
> -int sqlite3OsAccess(sqlite3_vfs *, const char *, int, int *pResOut);
> -int sqlite3OsFullPathname(sqlite3_vfs *, const char *, int, char *);
> -#ifndef SQLITE_OMIT_LOAD_EXTENSION
> -void *sqlite3OsDlOpen(sqlite3_vfs *, const char *);
> -void sqlite3OsDlError(sqlite3_vfs *, int, char *);
> -void (*sqlite3OsDlSym(sqlite3_vfs *, void *, const char *)) (void);
> -#endif				/* SQLITE_OMIT_LOAD_EXTENSION */
>   int sqlite3OsRandomness(sqlite3_vfs *, int, char *);
>   int sqlite3OsSleep(sqlite3_vfs *, int);
>   int sqlite3OsGetLastError(sqlite3_vfs *);
> diff --git a/src/box/sql/pragma.c b/src/box/sql/pragma.c
> index 5fb29c7..334a257 100644
> --- a/src/box/sql/pragma.c
> +++ b/src/box/sql/pragma.c
> @@ -43,14 +43,6 @@
>   #include "box/schema.h"
>   #include "box/session.h"
>   
> -#if !defined(SQLITE_ENABLE_LOCKING_STYLE)
> -#if defined(__APPLE__)
> -#define SQLITE_ENABLE_LOCKING_STYLE 1
> -#else
> -#define SQLITE_ENABLE_LOCKING_STYLE 0
> -#endif
> -#endif
> -
>   /*
>    ************************************************************************
>    * pragma.h contains several pragmas, including utf's pragmas.
> 
> 

  reply	other threads:[~2018-07-02 18:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-28 15:21 [tarantool-patches] " Kirill Shcherbatov
2018-07-02 11:22 ` [tarantool-patches] " Vladislav Shpilevoy
2018-07-02 14:55   ` Kirill Shcherbatov
2018-07-02 18:29     ` Vladislav Shpilevoy [this message]
2018-07-03 11:27       ` Kirill Shcherbatov
2018-07-04 13:28         ` n.pettik
2018-08-08 16:00           ` Kirill Shcherbatov
2018-08-09  9:39             ` n.pettik
2018-08-14  7:45 ` Kirill Yukhin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1e057fa9-11f5-8679-97c0-aa8f3fe53db7@tarantool.org \
    --to=v.shpilevoy@tarantool.org \
    --cc=kshcherbatov@tarantool.org \
    --cc=tarantool-patches@freelists.org \
    --subject='[tarantool-patches] Re: [PATCH v1 1/1] sql: drop useless code from os_unix.c' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox