mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
Updates to comments describing the changeset and patchset formats.
FossilOrigin-Name: 5342f721e878b52f207731ea57411f3669ae3f3f
This commit is contained in:
@ -159,7 +159,7 @@ struct SessionTable {
|
||||
** Each group of changes begins with a table header:
|
||||
**
|
||||
** 1 byte: Constant 0x54 (capital 'T')
|
||||
** Varint: Big-endian integer set to the number of columns in the table.
|
||||
** Varint: Number of columns in the table.
|
||||
** nCol bytes: 0x01 for PK columns, 0x00 otherwise.
|
||||
** N bytes: Unqualified table name (encoded using UTF-8). Nul-terminated.
|
||||
**
|
||||
@ -170,16 +170,38 @@ struct SessionTable {
|
||||
** old.* record: (delete and update only)
|
||||
** new.* record: (insert and update only)
|
||||
**
|
||||
** The "old.*" and "new.*" records, if present, are N field records in the
|
||||
** format described above under "RECORD FORMAT", where N is the number of
|
||||
** columns in the table. The i'th field of each record is associated with
|
||||
** the i'th column of the table, counting from left to right in the order
|
||||
** in which columns were declared in the CREATE TABLE statement.
|
||||
**
|
||||
** The new.* record that is part of each INSERT change contains the values
|
||||
** that make up the new row. Similarly, the old.* record that is part of each
|
||||
** DELETE change contains the values that made up the row that was deleted
|
||||
** from the database. In the changeset format, the records that are part
|
||||
** of INSERT or DELETE changes never contain any undefined (type byte 0x00)
|
||||
** fields.
|
||||
**
|
||||
** Within the old.* record associated with an UPDATE change, all fields
|
||||
** associated with table columns that are not PRIMARY KEY columns and are
|
||||
** not modified by the UPDATE change are set to "undefined". Other fields
|
||||
** are set to the values that made up the row before the UPDATE that the
|
||||
** change records took place. Within the new.* record, fields associated
|
||||
** with table columns modified by the UPDATE change contain the new
|
||||
** values. Fields associated with table columns that are not modified
|
||||
** are set to "undefined".
|
||||
**
|
||||
** PATCHSET FORMAT:
|
||||
**
|
||||
** A patchset is also a collection of changes. It is similar to a changeset,
|
||||
** but omits those fields that are not useful if no conflict resolution
|
||||
** is required when applying the changeset.
|
||||
** but leaves undefined those fields that are not useful if no conflict
|
||||
** resolution is required when applying the changeset.
|
||||
**
|
||||
** Each group of changes begins with a table header:
|
||||
**
|
||||
** 1 byte: Constant 0x50 (capital 'P')
|
||||
** Varint: Big-endian integer set to the number of columns in the table.
|
||||
** Varint: Number of columns in the table.
|
||||
** nCol bytes: 0x01 for PK columns, 0x00 otherwise.
|
||||
** N bytes: Unqualified table name (encoded using UTF-8). Nul-terminated.
|
||||
**
|
||||
@ -187,7 +209,26 @@ struct SessionTable {
|
||||
**
|
||||
** 1 byte: Either SQLITE_INSERT, UPDATE or DELETE.
|
||||
** 1 byte: The "indirect-change" flag.
|
||||
** single record: (PK fields for DELETE, or full record for INSERT/UPDATE).
|
||||
** single record: (PK fields for DELETE, PK and modified fields for UPDATE,
|
||||
** full record for INSERT).
|
||||
**
|
||||
** As in the changeset format, each field of the single record that is part
|
||||
** of a patchset change is associated with the correspondingly positioned
|
||||
** table column, counting from left to right within the CREATE TABLE
|
||||
** statement.
|
||||
**
|
||||
** For a DELETE change, all fields within the record except those associated
|
||||
** with PRIMARY KEY columns are set to "undefined". The PRIMARY KEY fields
|
||||
** contain the values identifying the row to delete.
|
||||
**
|
||||
** For an UPDATE change, all fields except those associated with PRIMARY KEY
|
||||
** columns and columns that are modified by the UPDATE are set to "undefined".
|
||||
** PRIMARY KEY fields contain the values identifying the table row to update,
|
||||
** and fields associated with modified columns contain the new column values.
|
||||
**
|
||||
** The records associated with INSERT changes are in the same format as for
|
||||
** changesets. It is not possible for a record associated with an INSERT
|
||||
** change to contain a field set to "undefined".
|
||||
*/
|
||||
|
||||
/*
|
||||
|
12
manifest
12
manifest
@ -1,5 +1,5 @@
|
||||
C Fix\sproblems\sin\sthe\ssessions\smodule\scausing\sit\sto\sproduce\sspurious\sSQLITE_NOMEM\serrors\swhen\shandling\sSQL\stext\sor\sblob\svalues\szero\sbytes\sin\ssize.
|
||||
D 2015-04-08T16:43:31.690
|
||||
C Updates\sto\scomments\sdescribing\sthe\schangeset\sand\spatchset\sformats.
|
||||
D 2015-04-09T19:19:22.574
|
||||
F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f
|
||||
F Makefile.in 3083cf0c2bc6618e532b9478ce735bb512322985
|
||||
F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23
|
||||
@ -160,7 +160,7 @@ F ext/session/sessionB.test 06961b7c3641151f5d23088250ecad132501113c
|
||||
F ext/session/sessionC.test 3982f8577b0744c5ce3aaef7cfeb5bd903f17fe4
|
||||
F ext/session/session_common.tcl 9de0451b6a47218fc16b9ed8876b6238a0a3d88d
|
||||
F ext/session/sessionfault.test bef044d0952c0d62c31c8d2400be72c8684545cc
|
||||
F ext/session/sqlite3session.c 7c6516f0342772441bcd2d845760902cfc0b39b8
|
||||
F ext/session/sqlite3session.c 27eb71e164a8e05d344c6254e8f906f093dfd4d1
|
||||
F ext/session/sqlite3session.h 16608d29879a0ed3c6be6b7fb18dcdb5c707aaef
|
||||
F ext/session/test_session.c a28352e99bc6a83b94e4cce99a7bf25c73d6d489
|
||||
F ext/userauth/sqlite3userauth.h 19cb6f0e31316d0ee4afdfb7a85ef9da3333a220
|
||||
@ -1267,7 +1267,7 @@ F tool/vdbe_profile.tcl 67746953071a9f8f2f668b73fe899074e2c6d8c1
|
||||
F tool/warnings-clang.sh f6aa929dc20ef1f856af04a730772f59283631d4
|
||||
F tool/warnings.sh 0abfd78ceb09b7f7c27c688c8e3fe93268a13b32
|
||||
F tool/win/sqlite.vsix deb315d026cc8400325c5863eef847784a219a2f
|
||||
P aeca95ac77f6f320a916f7e3c5a7a588ef4a20c8
|
||||
R 2b6c500da0e9b0a3fd57accc4dad1058
|
||||
P b9459d5980c6249a5c1bc5ea72cb4f3b1ba0e433
|
||||
R a602d0c91e77a7e6222a205b1b755ccf
|
||||
U dan
|
||||
Z aded3edd721aa55f05087866d9fe12cb
|
||||
Z 08fe7407f1e8070b595e48c16318a0a6
|
||||
|
@ -1 +1 @@
|
||||
b9459d5980c6249a5c1bc5ea72cb4f3b1ba0e433
|
||||
5342f721e878b52f207731ea57411f3669ae3f3f
|
Reference in New Issue
Block a user