diff options
author | drh <drh@noemail.net> | 2018-09-27 17:15:21 +0000 |
---|---|---|
committer | drh <drh@noemail.net> | 2018-09-27 17:15:21 +0000 |
commit | 6dd5f07d3d30494ef8a9ffe6cd3238c62982baef (patch) | |
tree | ebea22a0b406a52d7b3a888f3f79177810e17bf2 /ext/misc/memstat.c | |
parent | 982c1fac2bada4e778e155ff8ad51924dd2ce974 (diff) | |
download | sqlite-6dd5f07d3d30494ef8a9ffe6cd3238c62982baef.tar.gz sqlite-6dd5f07d3d30494ef8a9ffe6cd3238c62982baef.zip |
Modify the memstat virtual table so that it works with SQLite version 3.9.2.
FossilOrigin-Name: 7171d8ae6b1e7c97b0cf06bcca2262674c9ce557c85666b4b77c16cbac508502
Diffstat (limited to 'ext/misc/memstat.c')
-rw-r--r-- | ext/misc/memstat.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/ext/misc/memstat.c b/ext/misc/memstat.c index 84078c9ce..e594d1de2 100644 --- a/ext/misc/memstat.c +++ b/ext/misc/memstat.c @@ -241,8 +241,15 @@ static int memstatNext(sqlite3_vtab_cursor *cur){ pCur->aVal[1] = 0; switch( aMemstatColumn[i].eType ){ case MSV_GSTAT: { - sqlite3_status64(aMemstatColumn[i].eOp, - &pCur->aVal[0], &pCur->aVal[1],0); + if( sqlite3_libversion_number()>=3010000 ){ + sqlite3_status64(aMemstatColumn[i].eOp, + &pCur->aVal[0], &pCur->aVal[1],0); + }else{ + int xCur, xHiwtr; + sqlite3_status(aMemstatColumn[i].eOp, &xCur, &xHiwtr, 0); + pCur->aVal[0] = xCur; + pCur->aVal[1] = xHiwtr; + } break; } case MSV_DB: { |