aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorlarrybr <larrybr@noemail.net>2021-06-23 16:07:20 +0000
committerlarrybr <larrybr@noemail.net>2021-06-23 16:07:20 +0000
commit10496f765752e4d2d89700360b2f172e11ae392d (patch)
tree552b5ee4b56a343b9bc4c32759dbf617ddd85434 /src
parent9b9f235165bd5a1093d6568ccc658a648b998412 (diff)
downloadsqlite-10496f765752e4d2d89700360b2f172e11ae392d.tar.gz
sqlite-10496f765752e4d2d89700360b2f172e11ae392d.zip
Fully incorporate *_changes64() API improvement.
FossilOrigin-Name: 6699a2f6bec9dfcdc456ff1cd8e652588b144ec28b7eac6e403a63eab61b416e
Diffstat (limited to 'src')
-rw-r--r--src/func.c8
-rw-r--r--src/loadext.c3
-rw-r--r--src/shell.c.in4
-rw-r--r--src/sqlite3ext.h3
4 files changed, 12 insertions, 6 deletions
diff --git a/src/func.c b/src/func.c
index 807b4574a..bb2f6c7b4 100644
--- a/src/func.c
+++ b/src/func.c
@@ -572,7 +572,7 @@ static void last_insert_rowid(
** Implementation of the changes() SQL function.
**
** IMP: R-62073-11209 The changes() SQL function is a wrapper
-** around the sqlite3_changes() C/C++ function and hence follows the same
+** around the sqlite3_changes64() C/C++ function and hence follows the same
** rules for counting changes.
*/
static void changes(
@@ -587,7 +587,7 @@ static void changes(
/*
** Implementation of the total_changes() SQL function. The return value is
-** the same as the sqlite3_total_changes() API function.
+** the same as the sqlite3_total_changes64() API function.
*/
static void total_changes(
sqlite3_context *context,
@@ -596,9 +596,9 @@ static void total_changes(
){
sqlite3 *db = sqlite3_context_db_handle(context);
UNUSED_PARAMETER2(NotUsed, NotUsed2);
- /* IMP: R-52756-41993 This function is a wrapper around the
+ /* IMP: R-52756-41993 This function was a wrapper around the
** sqlite3_total_changes() C/C++ interface. */
- sqlite3_result_int(context, sqlite3_total_changes(db));
+ sqlite3_result_int64(context, sqlite3_total_changes64(db));
}
/*
diff --git a/src/loadext.c b/src/loadext.c
index aeea837c9..29371336c 100644
--- a/src/loadext.c
+++ b/src/loadext.c
@@ -480,6 +480,9 @@ static const sqlite3_api_routines sqlite3Apis = {
sqlite3_database_file_object,
/* Version 3.34.0 and later */
sqlite3_txn_state,
+ /* Version 3.36.1 and later */
+ sqlite3_changes64,
+ sqlite3_total_changes64,
};
/* True if x is the directory separator character
diff --git a/src/shell.c.in b/src/shell.c.in
index 0f8de61a1..39f1d08b5 100644
--- a/src/shell.c.in
+++ b/src/shell.c.in
@@ -10523,8 +10523,8 @@ static int runOneSqlLine(ShellState *p, char *zSql, FILE *in, int startline){
}
return 1;
}else if( ShellHasFlag(p, SHFLG_CountChanges) ){
- raw_printf(p->out, "changes: %3d total_changes: %d\n",
- sqlite3_changes(p->db), sqlite3_total_changes(p->db));
+ raw_printf(p->out, "changes: %3lld total_changes: %lld\n",
+ sqlite3_changes64(p->db), sqlite3_total_changes64(p->db));
}
return 0;
}
diff --git a/src/sqlite3ext.h b/src/sqlite3ext.h
index 217601fd9..98d930524 100644
--- a/src/sqlite3ext.h
+++ b/src/sqlite3ext.h
@@ -337,6 +337,9 @@ struct sqlite3_api_routines {
sqlite3_file *(*database_file_object)(const char*);
/* Version 3.34.0 and later */
int (*txn_state)(sqlite3*,const char*);
+ /* Version 3.36.1 and later */
+ sqlite3_int64 (*changes64)(sqlite3*);
+ sqlite3_int64 (*total_changes64)(sqlite3*);
};
/*