mirror of
https://github.com/sqlite/sqlite.git
synced 2025-08-08 14:02:16 +03:00
Merge recent trunk enhancements into the begin-concurrent-pnu branch.
FossilOrigin-Name: 514b3cef6b7403cde90dcc926d67355ad6340b79b6a1b06004d97bebfc4eaced
This commit is contained in:
@@ -166,6 +166,7 @@ foreach hdr {
|
||||
set available_hdr($hdr) 1
|
||||
}
|
||||
set available_hdr(sqliteInt.h) 0
|
||||
set available_hdr(os_common.h) 0
|
||||
set available_hdr(sqlite3session.h) 0
|
||||
|
||||
# These headers should be copied into the amalgamation without modifying any
|
||||
@@ -223,9 +224,7 @@ proc copy_file {filename} {
|
||||
if {[regexp {^\s*#\s*include\s+["<]([^">]+)[">]} $line all hdr]} {
|
||||
if {[info exists available_hdr($hdr)]} {
|
||||
if {$available_hdr($hdr)} {
|
||||
if {$hdr!="os_common.h" && $hdr!="hwtime.h"} {
|
||||
set available_hdr($hdr) 0
|
||||
}
|
||||
set available_hdr($hdr) 0
|
||||
section_comment "Include $hdr in the middle of $tail"
|
||||
copy_file $srcdir/$hdr
|
||||
section_comment "Continuing where we left off in $tail"
|
||||
@@ -327,6 +326,7 @@ proc copy_file {filename} {
|
||||
#
|
||||
foreach file {
|
||||
sqliteInt.h
|
||||
os_common.h
|
||||
ctime.c
|
||||
|
||||
global.c
|
||||
|
@@ -117,7 +117,7 @@ static void out_of_memory(void){
|
||||
** Space to hold the content is obtained from malloc() and needs to be
|
||||
** freed by the caller.
|
||||
*/
|
||||
static unsigned char *getContent(int ofst, int nByte){
|
||||
static unsigned char *getContent(i64 ofst, int nByte){
|
||||
unsigned char *aData;
|
||||
aData = malloc(nByte);
|
||||
if( aData==0 ) out_of_memory();
|
||||
@@ -204,10 +204,10 @@ static void print_decode_line(
|
||||
** Print an entire page of content as hex
|
||||
*/
|
||||
static void print_frame(int iFrame){
|
||||
int iStart;
|
||||
i64 iStart;
|
||||
unsigned char *aData;
|
||||
iStart = 32 + (iFrame-1)*(pagesize+24);
|
||||
fprintf(stdout, "Frame %d: (offsets 0x%x..0x%x)\n",
|
||||
iStart = 32 + (i64)(iFrame-1)*(pagesize+24);
|
||||
fprintf(stdout, "Frame %d: (offsets 0x%llx..0x%llx)\n",
|
||||
iFrame, iStart, iStart+pagesize+24);
|
||||
aData = getContent(iStart, pagesize+24);
|
||||
print_decode_line(aData, 0, 4, 0, "Page number");
|
||||
@@ -224,10 +224,10 @@ static void print_frame(int iFrame){
|
||||
** Summarize a single frame on a single line.
|
||||
*/
|
||||
static void print_oneline_frame(int iFrame, Cksum *pCksum){
|
||||
int iStart;
|
||||
i64 iStart;
|
||||
unsigned char *aData;
|
||||
unsigned int s0, s1;
|
||||
iStart = 32 + (iFrame-1)*(pagesize+24);
|
||||
iStart = 32 + (i64)(iFrame-1)*(pagesize+24);
|
||||
aData = getContent(iStart, 24);
|
||||
extendCksum(pCksum, aData, 8, 0);
|
||||
extendCksum(pCksum, getContent(iStart+24, pagesize), pagesize, 0);
|
||||
@@ -564,7 +564,8 @@ int main(int argc, char **argv){
|
||||
}else if( zLeft && zLeft[0]=='.' && zLeft[1]=='.' ){
|
||||
iEnd = strtol(&zLeft[2], 0, 0);
|
||||
}else if( zLeft && zLeft[0]=='b' ){
|
||||
int ofst, nByte, hdrSize;
|
||||
i64 ofst;
|
||||
int nByte, hdrSize;
|
||||
unsigned char *a;
|
||||
if( iStart==1 ){
|
||||
hdrSize = 100;
|
||||
@@ -572,10 +573,10 @@ int main(int argc, char **argv){
|
||||
nByte = pagesize-100;
|
||||
}else{
|
||||
hdrSize = 0;
|
||||
ofst = (iStart-1)*pagesize;
|
||||
ofst = (i64)(iStart-1)*pagesize;
|
||||
nByte = pagesize;
|
||||
}
|
||||
ofst = 32 + hdrSize + (iStart-1)*(pagesize+24) + 24;
|
||||
ofst = 32 + hdrSize + (i64)(iStart-1)*(pagesize+24) + 24;
|
||||
a = getContent(ofst, nByte);
|
||||
decode_btree_page(a, iStart, hdrSize, zLeft+1);
|
||||
free(a);
|
||||
|
Reference in New Issue
Block a user