diff --git a/src/box/sql/func.c b/src/box/sql/func.c index e02e7f0f6d1667fa17048acedbaaf361a09bbcfd..c4c3eeaae3d69a1f7898445e5bdb3037bc27cde1 100644 --- a/src/box/sql/func.c +++ b/src/box/sql/func.c @@ -600,28 +600,6 @@ changes(sqlite3_context * context, int NotUsed, sqlite3_value ** NotUsed2) sqlite3_result_int(context, sqlite3_changes(db)); } -/* - * Implementation of the total_changes() SQL function. The return value is - * the same as the sqlite3_total_changes() API function. - */ -static void -total_changes(sqlite3_context * context, int NotUsed, sqlite3_value ** NotUsed2) -{ - sqlite3 *db = sqlite3_context_db_handle(context); - UNUSED_PARAMETER2(NotUsed, NotUsed2); - /* IMP: R-52756-41993 This function is a wrapper around the - * sqlite3_total_changes() C/C++ interface. - */ - sqlite3_result_int(context, sqlite3_total_changes(db)); -} - -/** - * Providing there are symbols in string s this macro returns - * UTF-8 code of character and promotes pointer to the next - * symbol in the string. If s points to an invalid UTF-8 symbol - * return code is SQL_INVALID_UTF8_SYMBOL. If there're no symbols - * left in string s return code is SQL_END_OF_STRING. - */ #define Utf8Read(s, e) ucnv_getNextUChar(pUtf8conv, &(s), (e), &status) #define SQL_END_OF_STRING 0xffff @@ -1784,8 +1762,6 @@ sqlite3RegisterBuiltinFunctions(void) FUNCTION(version, 0, 0, 0, sql_func_version, AFFINITY_TEXT), FUNCTION(quote, 1, 0, 0, quoteFunc, AFFINITY_TEXT), VFUNCTION(changes, 0, 0, 0, changes, AFFINITY_INTEGER), - VFUNCTION(total_changes, 0, 0, 0, total_changes, - AFFINITY_INTEGER), FUNCTION(replace, 3, 0, 0, replaceFunc, AFFINITY_TEXT), FUNCTION(zeroblob, 1, 0, 0, zeroblobFunc, AFFINITY_BLOB), FUNCTION(substr, 2, 0, 0, substrFunc, AFFINITY_TEXT), diff --git a/src/box/sql/main.c b/src/box/sql/main.c index e1d61621fa9ee3a7c149ac9317a139d1fb9cedb8..76c152c685698a92d77adfb49d4f0810032f987a 100644 --- a/src/box/sql/main.c +++ b/src/box/sql/main.c @@ -498,21 +498,6 @@ sqlite3_changes(sqlite3 * db) return db->nChange; } -/* - * Return the number of changes since the database handle was opened. - */ -int -sqlite3_total_changes(sqlite3 * db) -{ -#ifdef SQLITE_ENABLE_API_ARMOR - if (!sqlite3SafetyCheckOk(db)) { - (void)SQLITE_MISUSE_BKPT; - return 0; - } -#endif - return db->nTotalChange; -} - /* * Close all open savepoints. * This procedure is trivial as savepoints are allocated on the "region" and diff --git a/src/box/sql/sqliteInt.h b/src/box/sql/sqliteInt.h index db0386db60de98c4c23809c32230ee14535e23e4..0aac2d84195fcebcb9f6c49922641a81928d1db4 100644 --- a/src/box/sql/sqliteInt.h +++ b/src/box/sql/sqliteInt.h @@ -659,9 +659,6 @@ sqlite3_randomness(int N, void *P); int sqlite3_changes(sqlite3 *); -int -sqlite3_total_changes(sqlite3 *); - void * sqlite3_user_data(sqlite3_context *); @@ -1518,7 +1515,6 @@ struct sqlite3 { u8 mTrace; /* zero or more SQLITE_TRACE flags */ u32 magic; /* Magic number for detect library misuse */ int nChange; /* Value returned by sqlite3_changes() */ - int nTotalChange; /* Value returned by sqlite3_total_changes() */ int aLimit[SQLITE_N_LIMIT]; /* Limits */ int nMaxSorterMmap; /* Maximum size of regions mapped by sorter */ struct sqlite3InitInfo { /* Information used during initialization */ diff --git a/src/box/sql/vdbeaux.c b/src/box/sql/vdbeaux.c index e0bf92acf3c9f4cd51075ad4ea249e461760620d..c0945d36d4736134ffe12b5499ec8ace6488beb1 100644 --- a/src/box/sql/vdbeaux.c +++ b/src/box/sql/vdbeaux.c @@ -3453,7 +3453,6 @@ void sqlite3VdbeSetChanges(sqlite3 * db, int nChange) { db->nChange = nChange; - db->nTotalChange += nChange; } /*