mirror of
https://github.com/sqlite/sqlite.git
synced 2024-11-21 11:19:14 +01:00
Realignment of begin-concurrent with trunk.
FossilOrigin-Name: 3823295299f7f834e0be1310083afd106ade84b87c27839e68c78676fc8982df
This commit is contained in:
commit
a835f61c01
14
manifest
14
manifest
@ -1,5 +1,5 @@
|
||||
C Reduce\sdivergence\sfrom\strunk.
|
||||
D 2024-11-18T18:45:53.682
|
||||
C Realignment\sof\sbegin-concurrent\swith\strunk.
|
||||
D 2024-11-18T18:49:05.591
|
||||
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
|
||||
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
|
||||
F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d
|
||||
@ -809,7 +809,7 @@ F src/test_demovfs.c 3efa2adf4f21e10d95521721687d5ca047aea91fa62dd8cc22ac9e5a9c9
|
||||
F src/test_devsym.c 649434ed34d0b03fbd5a6b42df80f0f9a7e53f94dd1710aad5dd8831e91c4e86
|
||||
F src/test_fs.c c411c40baba679536fc34e2679349f59d8225570aed3488b5b3ef1908525a3d5
|
||||
F src/test_func.c 8c0e89192f70fac307822d1ac2911ee51751288780b3db0c5ab5ca75fa0fe851
|
||||
F src/test_hexio.c 0f777bf9fbb2684bb4978372bacc90ef7337d5d9e3cebe067a9409941e88bacf
|
||||
F src/test_hexio.c 7449504e4bde876ba91b202617a9228c7c8c2e7bd8b957302f3803ac0e9e353c
|
||||
F src/test_init.c 17313332d58e90defc527129d5eda4a08bd6b6e8de7207a231523c8d98fb445e
|
||||
F src/test_intarray.c e4216aadee9df2de7d1aee7e70f6b22c80ee79ece72a63d57105db74217639e5
|
||||
F src/test_intarray.h 6c3534641108cd1bea517a8e117dcba237081310a29a4c35bd2190caa8972293
|
||||
@ -1599,7 +1599,7 @@ F test/savepoint.test 6e9804a17767f08432c7a5e738b9a8f4b891d243110b63d3a41d270d3d
|
||||
F test/savepoint2.test 9b8543940572a2f01a18298c3135ad0c9f4f67d7
|
||||
F test/savepoint4.test c8f8159ade6d2acd9128be61e1230f1c1edc6cc0
|
||||
F test/savepoint5.test 0735db177e0ebbaedc39812c8d065075d563c4fd
|
||||
F test/savepoint6.test f41279c5e137139fa5c21485773332c7adb98cd7
|
||||
F test/savepoint6.test 48a645a7bb3a59a6fcf06a7364cfe5b655c336760de39068f7c241b0fc80d963
|
||||
F test/savepoint7.test cde525ea3075283eb950cdcdefe23ead4f700daa
|
||||
F test/savepointfault.test f044eac64b59f09746c7020ee261734de82bf9b2
|
||||
F test/scanstatus.test b249328caf4d317e71058006872b8012598a5fa045b30bf24a81eeff650ab49e
|
||||
@ -2215,8 +2215,8 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
|
||||
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
|
||||
F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
|
||||
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
|
||||
P b92c9a66ba78d4c435aac74426904ba56dc5846306187686e2fd818b631178b8
|
||||
R d460e39b7c2053c66d076ba14a431bf1
|
||||
P c5d77671c4867f713ece13057b639da551e365c9de49728c401af50bffa420d7 84d41e9d04c62601e84621e8edb3b81abbacc366a6b5e7059f8b6796fade7ffa
|
||||
R 0a152f8cf7e2407b3448854137f4da98
|
||||
U drh
|
||||
Z 14ee37a1fd6dc207f1a1673dd0f85278
|
||||
Z 6ecb10709d853017b3c9ebb1e86778e7
|
||||
# Remove this line to create a well-formed Fossil manifest.
|
||||
|
@ -1 +1 @@
|
||||
c5d77671c4867f713ece13057b639da551e365c9de49728c401af50bffa420d7
|
||||
3823295299f7f834e0be1310083afd106ade84b87c27839e68c78676fc8982df
|
||||
|
@ -187,7 +187,7 @@ static int SQLITE_TCLAPI hexio_write(
|
||||
}
|
||||
|
||||
/*
|
||||
** USAGE: hexio_get_int HEXDATA
|
||||
** USAGE: hexio_get_int [-littleendian] HEXDATA
|
||||
**
|
||||
** Interpret the HEXDATA argument as a big-endian integer. Return
|
||||
** the value of that integer. HEXDATA can contain between 2 and 8
|
||||
@ -205,12 +205,20 @@ static int SQLITE_TCLAPI hexio_get_int(
|
||||
const unsigned char *zIn;
|
||||
unsigned char *aOut;
|
||||
unsigned char aNum[4];
|
||||
int bLittle = 0;
|
||||
|
||||
if( objc!=2 ){
|
||||
Tcl_WrongNumArgs(interp, 1, objv, "HEXDATA");
|
||||
if( objc==3 ){
|
||||
Tcl_Size n;
|
||||
char *z = Tcl_GetStringFromObj(objv[1], &n);
|
||||
if( n>=2 && n<=13 && memcmp(z, "-littleendian", n)==0 ){
|
||||
bLittle = 1;
|
||||
}
|
||||
}
|
||||
if( (objc-bLittle)!=2 ){
|
||||
Tcl_WrongNumArgs(interp, 1, objv, "[-littleendian] HEXDATA");
|
||||
return TCL_ERROR;
|
||||
}
|
||||
zIn = (const unsigned char *)Tcl_GetStringFromObj(objv[1], &nIn);
|
||||
zIn = (const unsigned char *)Tcl_GetStringFromObj(objv[1+bLittle], &nIn);
|
||||
aOut = sqlite3_malloc64( 1 + nIn/2 );
|
||||
if( aOut==0 ){
|
||||
return TCL_ERROR;
|
||||
@ -223,7 +231,11 @@ static int SQLITE_TCLAPI hexio_get_int(
|
||||
memcpy(&aNum[4-nOut], aOut, nOut);
|
||||
}
|
||||
sqlite3_free(aOut);
|
||||
val = (aNum[0]<<24) | (aNum[1]<<16) | (aNum[2]<<8) | aNum[3];
|
||||
if( bLittle ){
|
||||
val = (int)((u32)aNum[3]<<24) | (aNum[2]<<16) | (aNum[1]<<8) | aNum[0];
|
||||
}else{
|
||||
val = (int)((u32)aNum[0]<<24) | (aNum[1]<<16) | (aNum[2]<<8) | aNum[3];
|
||||
}
|
||||
Tcl_SetObjResult(interp, Tcl_NewIntObj(val));
|
||||
return TCL_OK;
|
||||
}
|
||||
|
@ -15,6 +15,10 @@ set testdir [file dirname $argv0]
|
||||
source $testdir/tester.tcl
|
||||
|
||||
proc sql {zSql} {
|
||||
if {0 && $::debug_op} {
|
||||
puts stderr "$zSql ;"
|
||||
flush stderr
|
||||
}
|
||||
uplevel db eval [list $zSql]
|
||||
#puts stderr "$zSql ;"
|
||||
}
|
||||
@ -67,11 +71,13 @@ proc x_to_y {x} {
|
||||
# delete_rows XVALUES
|
||||
#
|
||||
proc savepoint {zName} {
|
||||
if {$::debug_op} { puts stderr "savepoint $zName" ; flush stderr }
|
||||
catch { sql "SAVEPOINT $zName" }
|
||||
lappend ::lSavepoint [list $zName [array get ::aEntry]]
|
||||
}
|
||||
|
||||
proc rollback {zName} {
|
||||
if {$::debug_op} { puts stderr "rollback $zName" ; flush stderr }
|
||||
catch { sql "ROLLBACK TO $zName" }
|
||||
for {set i [expr {[llength $::lSavepoint]-1}]} {$i>=0} {incr i -1} {
|
||||
set zSavepoint [lindex $::lSavepoint $i 0]
|
||||
@ -89,6 +95,7 @@ proc rollback {zName} {
|
||||
}
|
||||
|
||||
proc release {zName} {
|
||||
if {$::debug_op} { puts stderr "release $zName" ; flush stderr }
|
||||
catch { sql "RELEASE $zName" }
|
||||
for {set i [expr {[llength $::lSavepoint]-1}]} {$i>=0} {incr i -1} {
|
||||
set zSavepoint [lindex $::lSavepoint $i 0]
|
||||
@ -104,6 +111,7 @@ proc release {zName} {
|
||||
}
|
||||
|
||||
proc insert_rows {lX} {
|
||||
if {$::debug_op} { puts stderr "insert_rows $lX" ; flush stderr }
|
||||
foreach x $lX {
|
||||
set y [x_to_y $x]
|
||||
|
||||
@ -116,6 +124,7 @@ proc insert_rows {lX} {
|
||||
}
|
||||
|
||||
proc delete_rows {lX} {
|
||||
if {$::debug_op} { puts stderr "delete_rows $lX" ; flush stderr }
|
||||
foreach x $lX {
|
||||
# Update database [db]
|
||||
sql "DELETE FROM t1 WHERE x = $x"
|
||||
@ -164,6 +173,11 @@ proc random_integers {nRes nRange} {
|
||||
}
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
set ::debug_op 0
|
||||
proc debug_ops {} {
|
||||
set ::debug_op 1
|
||||
}
|
||||
|
||||
proc database_op {} {
|
||||
set i [expr int(rand()*2)]
|
||||
if {$i==0} {
|
||||
@ -185,9 +199,6 @@ proc savepoint_op {} {
|
||||
set C [lindex $cmds [expr int(rand()*6)]]
|
||||
set N [lindex $names [expr int(rand()*5)]]
|
||||
|
||||
#puts stderr " $C $N ; "
|
||||
#flush stderr
|
||||
|
||||
$C $N
|
||||
return ok
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user