The assertion-fault fix in [53a61f7423a7f057] was not quite complete. This

additional change enhances it to deal with WITHOUT ROWID tables.  No changes
to deliverable code.

FossilOrigin-Name: 4d5af42c651bc1655a4f09b743f2a1424f19c1e4248e041b3fd4a042fd1f9799
This commit is contained in:
drh 2023-04-22 20:07:48 +00:00
parent 57114c256f
commit f661db3050
3 changed files with 15 additions and 9 deletions

View File

@ -1,5 +1,5 @@
C Add\sthe\s--unsafe-testing\scommand-line\soption\sto\sthe\sCLI.\s\sWithout\sthis\soption,\nfeatures\sof\sthe\sCLI\sthat\sare\sintended\sfor\stesting\sand\sthat\smight\sresult\sin\nincorrect\sanswers,\sassertion\sfaults,\sand/or\scorrupt\sdatabase\sfiles\sif\smisused\nare\sdisabled.
D 2023-04-22T17:41:53.196
C The\sassertion-fault\sfix\sin\s[53a61f7423a7f057]\swas\snot\squite\scomplete.\s\sThis\nadditional\schange\senhances\sit\sto\sdeal\swith\sWITHOUT\sROWID\stables.\s\sNo\schanges\nto\sdeliverable\scode.
D 2023-04-22T20:07:48.390
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md df5091916dbb40e6e9686186587125e1b2ff51f022cc334e886c19a0e9982724
@ -706,7 +706,7 @@ F src/vdbe.c a6c52ba65e8ceb574fe0eda62af84e6c50c176ffc5f310c613425f7ab2b1484b
F src/vdbe.h 637ae853b7d42ae3951034cc63ab7c8af837861f79504cdb5399552fcd89a884
F src/vdbeInt.h a4147a4ddf613cb1bcb555ace9e9e74a9c099d65facd88155f191b1fb4d74cfb
F src/vdbeapi.c 1a95162e26d5eda3b7b46fbe4fcbc33eb7f801529d66fc2e14c52094a5523339
F src/vdbeaux.c 958bb807a3756c34fc6e434065e134fa3ae5f7e46da615224e216b33d5dd4c8f
F src/vdbeaux.c 6ee48db408d4c297a363f1e31145c09793a580e7c508bb36063dd017d67117a2
F src/vdbeblob.c 5e61ce31aca17db8fb60395407457a8c1c7fb471dde405e0cd675974611dcfcd
F src/vdbemem.c 1d9a0f37b0097fbb53f0d7ba081f7181b83cee2c6f46364706ea0c3896bd8ec0
F src/vdbesort.c 43756031ca7430f7aec3ef904824a7883c4ede783e51f280d99b9b65c0796e35
@ -2059,9 +2059,8 @@ F vsixtest/vsixtest.tcl 6a9a6ab600c25a91a7acc6293828957a386a8a93
F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc
F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e
F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0
P cd485b302c54aef066d751a153df34eea0cd23e54a414e291f636ad9929fe78a b3d9ac052d5c2dd1afeeeb5c9cfac9dd91a1b8d6a74a2ef10aa2037ca505abce
R be58d94e52d56c14dee82adb68874a9b
T +closed b3d9ac052d5c2dd1afeeeb5c9cfac9dd91a1b8d6a74a2ef10aa2037ca505abce
P f28256a96af4263c0caded79b7481b88e9c7e7f1af7dbb3fd5e22ff07fbedaf3
R 88e863890132282405f3c5aef9851c53
U drh
Z 292d5d1b263a4abd453b30cd2562934c
Z 3ff454ccd561bde5a26c0c888ec2349a
# Remove this line to create a well-formed Fossil manifest.

View File

@ -1 +1 @@
f28256a96af4263c0caded79b7481b88e9c7e7f1af7dbb3fd5e22ff07fbedaf3
4d5af42c651bc1655a4f09b743f2a1424f19c1e4248e041b3fd4a042fd1f9799

View File

@ -5355,7 +5355,14 @@ void sqlite3VdbePreUpdateHook(
const char *zTbl = pTab->zName;
static const u8 fakeSortOrder = 0;
#ifdef SQLITE_DEBUG
int nRealCol = (pTab->tabFlags & TF_HasVirtual) ? pTab->nNVCol : pTab->nCol;
int nRealCol;
if( pTab->tabFlags & TF_WithoutRowid ){
nRealCol = sqlite3PrimaryKeyIndex(pTab)->nColumn;
}else if( pTab->tabFlags & TF_HasVirtual ){
nRealCol = pTab->nNVCol;
}else{
nRealCol = pTab->nCol;
}
#endif
assert( db->pPreUpdate==0 );