diff --git a/src/box/sql.c b/src/box/sql.c
index 3511690ef9f12ed34523d5581c5b2a933640543e..d4b343b4abed03c42435b419047354ba0d108c82 100644
--- a/src/box/sql.c
+++ b/src/box/sql.c
@@ -215,7 +215,8 @@ tarantoolSqlite3TupleColumnFast(BtCursor *pCur, u32 fieldno, u32 *field_size)
 	assert(c != NULL);
 	assert(c->tuple_last != NULL);
 	struct tuple_format *format = tuple_format(c->tuple_last);
-	assert(fieldno < format->field_count);
+	assert(format->exact_field_count == 0
+	       || fieldno < format->exact_field_count);
 	if (format->fields[fieldno].offset_slot == TUPLE_OFFSET_SLOT_NIL)
 		return NULL;
 	const char *field = tuple_field(c->tuple_last, fieldno);
@@ -562,7 +563,7 @@ int tarantoolSqlite3RenameTrigger(const char *trig_name,
 	mp_decode_map(&field);
 	uint32_t key_len;
 	const char *sql_str = mp_decode_str(&field, &key_len);
-	assert(sqlite3StrNICmp(sql_str, "sql", 3));
+	assert(sqlite3StrNICmp(sql_str, "sql", 3) == 0);
 	(void)sql_str;
 	uint32_t trigger_stmt_len;
 	const char *trigger_stmt_old = mp_decode_str(&field, &trigger_stmt_len);
@@ -653,7 +654,7 @@ int tarantoolSqlite3RenameTable(int iTab, const char *new_name,
 	(void)map_size;
 	uint32_t key_len;
 	const char *sql_str = mp_decode_str(&sql_stmt_map, &key_len);
-	assert(sqlite3StrNICmp(sql_str, "sql", 3));
+	assert(sqlite3StrNICmp(sql_str, "sql", 3) == 0);
 	(void)sql_str;
 	uint32_t sql_stmt_decoded_len;
 	const char *sql_stmt_old = mp_decode_str(&sql_stmt_map,
@@ -762,7 +763,7 @@ int tarantoolSqlite3RenameParentTable(int iTab, const char *old_parent_name,
 	(void)map_size;
 	uint32_t key_len;
 	const char *sql_str = mp_decode_str(&sql_stmt_map, &key_len);
-	assert(sqlite3StrNICmp(sql_str, "sql", 3));
+	assert(sqlite3StrNICmp(sql_str, "sql", 3) == 0);
 	(void)sql_str;
 	uint32_t create_stmt_decoded_len;
 	const char *create_stmt_old = mp_decode_str(&sql_stmt_map,
diff --git a/src/box/sql/sqliteInt.h b/src/box/sql/sqliteInt.h
index ea5f13af6681192c3fc499989c39dd24ecf67f74..9df6d9d7acd33ac44249f4347646d7ccf3def3d0 100644
--- a/src/box/sql/sqliteInt.h
+++ b/src/box/sql/sqliteInt.h
@@ -262,24 +262,6 @@
 #define _XOPEN_SOURCE 600
 #endif
 
-/*
- * NDEBUG and SQLITE_DEBUG are opposites.  It should always be true that
- * defined(NDEBUG)==!defined(SQLITE_DEBUG).  If this is not currently true,
- * make it true by defining or undefining NDEBUG.
- *
- * Setting NDEBUG makes the code smaller and faster by disabling the
- * assert() statements in the code.  So we want the default action
- * to be for NDEBUG to be set and NDEBUG to be undefined only if SQLITE_DEBUG
- * is set.  Thus NDEBUG becomes an opt-in rather than an opt-out
- * feature.
- */
-#if !defined(NDEBUG) && !defined(SQLITE_DEBUG)
-#define NDEBUG 1
-#endif
-#if defined(NDEBUG) && defined(SQLITE_DEBUG)
-#undef NDEBUG
-#endif
-
 /*
  * Enable SQLITE_ENABLE_EXPLAIN_COMMENTS if SQLITE_DEBUG is turned on.
  */