[tarantool-patches] [PATCH 2/3] sql: remove sql_like_count global counter
Nikita Pettik
korablev at tarantool.org
Sat Mar 9 20:00:01 MSK 2019
We don't rely on this debug facility anymore, so let's remove it.
---
src/box/sql/func.c | 14 --------------
1 file changed, 14 deletions(-)
diff --git a/src/box/sql/func.c b/src/box/sql/func.c
index a0df830f6..0c07f7e3c 100644
--- a/src/box/sql/func.c
+++ b/src/box/sql/func.c
@@ -800,14 +800,6 @@ sql_strlike_ci(const char *zPattern, const char *zStr, unsigned int esc)
zStr + strlen(zStr), 1, esc);
}
-/**
- * Count the number of times that the LIKE operator gets called.
- * This is used for testing only.
- */
-#ifdef SQL_TEST
-int sql_like_count = 0;
-#endif
-
/**
* Implementation of the like() SQL function. This function
* implements the built-in LIKE operator. The first argument to
@@ -828,9 +820,6 @@ likeFunc(sql_context *context, int argc, sql_value **argv)
if (sql_value_type(argv[0]) == SQL_BLOB
|| sql_value_type(argv[1]) == SQL_BLOB) {
-#ifdef SQL_TEST
- sql_like_count++;
-#endif
sql_result_int(context, 0);
return;
}
@@ -874,9 +863,6 @@ likeFunc(sql_context *context, int argc, sql_value **argv)
}
if (!zA || !zB)
return;
-#ifdef SQL_TEST
- sql_like_count++;
-#endif
int res;
res = sql_utf8_pattern_compare(zB, zA, zB_end, zA_end,
is_like_ci, escape);
--
2.15.1
More information about the Tarantool-patches
mailing list