0
0
mirror of https://github.com/sqlite/sqlite.git synced 2024-11-21 11:19:14 +01:00

Adjust the behavior of sqlite3_changes64() so that it counts INSERTs into

a new table created using "CREATE TABLE name AS SELECT ...".  It has never
done this before.  The documentation is a little ambiguous about whether or
not it actually should.  This check-in is on a branch because it will probably
never make it to trunk for fear of breaking some legacy program.

FossilOrigin-Name: b741608cd399b725f9a2d7966068247f58da8ce236dd801176d716eee618e0d3
This commit is contained in:
drh 2024-11-11 21:07:57 +00:00
parent be46f935dc
commit 6f0ec6fd2d
3 changed files with 12 additions and 7 deletions

View File

@ -1,5 +1,5 @@
C Add\sthe\s".dbtotxt"\scommand\sto\sthe\sCLI.
D 2024-11-11T19:07:58.682
C Adjust\sthe\sbehavior\sof\ssqlite3_changes64()\sso\sthat\sit\scounts\sINSERTs\sinto\na\snew\stable\screated\susing\s"CREATE\sTABLE\sname\sAS\sSELECT\s...".\s\sIt\shas\snever\ndone\sthis\sbefore.\s\sThe\sdocumentation\sis\sa\slittle\sambiguous\sabout\swhether\sor\nnot\sit\sactually\sshould.\s\sThis\scheck-in\sis\son\sa\sbranch\sbecause\sit\swill\sprobably\nnever\smake\sit\sto\strunk\sfor\sfear\sof\sbreaking\ssome\slegacy\sprogram.
D 2024-11-11T21:07:57.343
F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1
F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea
F LICENSE.md e108e1e69ae8e8a59e93c455654b8ac9356a11720d3345df2a4743e9590fb20d
@ -717,7 +717,7 @@ F src/btmutex.c 79a43670447eacc651519a429f6ece9fd638563cf95b469d6891185ddae2b522
F src/btree.c 63ca6b647342e8cef643863cd0962a542f133e1069460725ba4461dcda92b03c
F src/btree.h 18e5e7b2124c23426a283523e5f31a4bff029131b795bb82391f9d2f3136fc50
F src/btreeInt.h 98aadb6dcb77b012cab2574d6a728fad56b337fc946839b9898c4b4c969e30b6
F src/build.c c6b09342d870a509529244ed8e19b4175a261f2e3163c199241d69e1d8a57607
F src/build.c b6e5691ab8115d83234d1d8505f9b4299a2a1260daff048a465625208fb4db40
F src/callback.c db3a45e376deff6a16c0058163fe0ae2b73a2945f3f408ca32cf74960b28d490
F src/complete.c a3634ab1e687055cd002e11b8f43eb75c17da23e
F src/ctime.c d35723024b963edce9c0fad5b3303e8bb9266083784844baed10a6dedfe26f3b
@ -2198,8 +2198,11 @@ F tool/version-info.c 3b36468a90faf1bbd59c65fd0eb66522d9f941eedd364fabccd7227350
F tool/warnings-clang.sh bbf6a1e685e534c92ec2bfba5b1745f34fb6f0bc2a362850723a9ee87c1b31a7
F tool/warnings.sh 49a486c5069de041aedcbde4de178293e0463ae9918ecad7539eedf0ec77a139
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
P 073080cae3ea0d12b133d9c9ae98413bb32870a9738c98b89bc345181be81f23
R 6bdbd63031b22370793e2437aff7acb5
P b43acf5a8cd4a5efbb90b71af7710084f49bb90ffe4f56de168e8c3a6b679124
R 54da862609181f5826ec8b59b8cc4d73
T *branch * chngcnt-create-as
T *sym-chngcnt-create-as *
T -sym-trunk *
U drh
Z d185df0f51d41a6d3859bb43f39c0c62
Z cca2277bcbf1bf4fe10b4b5094c73634
# Remove this line to create a well-formed Fossil manifest.

View File

@ -1 +1 @@
b43acf5a8cd4a5efbb90b71af7710084f49bb90ffe4f56de168e8c3a6b679124
b741608cd399b725f9a2d7966068247f58da8ce236dd801176d716eee618e0d3

View File

@ -2836,6 +2836,8 @@ void sqlite3EndTable(
sqlite3TableAffinity(v, p, 0);
sqlite3VdbeAddOp2(v, OP_NewRowid, iCsr, regRowid);
sqlite3VdbeAddOp3(v, OP_Insert, iCsr, regRec, regRowid);
sqlite3VdbeChangeP5(v, OPFLAG_NCHANGE);
sqlite3VdbeCountChanges(v);
sqlite3VdbeGoto(v, addrInsLoop);
sqlite3VdbeJumpHere(v, addrInsLoop);
sqlite3VdbeAddOp1(v, OP_Close, iCsr);