From: dan Date: Mon, 8 Dec 2014 07:28:26 +0000 (+0000) Subject: Update comments in sqlite3ota.h to remove the "must have PRIMARY KEY" restriction. X-Git-Tag: version-3.8.11~252^2~69 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fdf3a8970d71e1a2e51d47c2c391264cad834952;p=thirdparty%2Fsqlite.git Update comments in sqlite3ota.h to remove the "must have PRIMARY KEY" restriction. FossilOrigin-Name: 088a41eb8c18886a260cf53fa0cca3bd1958dc05 --- diff --git a/ext/ota/sqlite3ota.h b/ext/ota/sqlite3ota.h index a652316ca2..44aff2e30d 100644 --- a/ext/ota/sqlite3ota.h +++ b/ext/ota/sqlite3ota.h @@ -61,9 +61,9 @@ ** ** * INSERT statements may not use any default values. ** -** * Non-virtual tables that do not have declared primary keys may not -** be updated. UPDATE and DELETE statements must identify their target -** rows by PRIMARY KEY values. +** * UPDATE and DELETE statements must identify their target rows by +** PRIMARY KEY values. If the table being written has no PRIMARY KEY +** declaration, affected rows must be identified by rowid. ** ** * UPDATE statements may not modify PRIMARY KEY columns. ** @@ -94,17 +94,19 @@ ** ** The order of the columns in the data_% table does not matter. ** -** If the target database table is a virtual table, the data_% table should -** also contain a column named "ota_rowid". This column is mapped to the -** virtual tables implicit primary key column - "rowid". Virtual tables -** for which the "rowid" column does not function like a primary key value -** can not be updated using OTA. For example, if the target db contains: +** If the target database table is a virtual table or a table that has no +** PRIMARY KEY declaration, the data_% table must also contain a column +** named "ota_rowid". This column is mapped to the tables implicit primary +** key column - "rowid". Virtual tables for which the "rowid" column does +** not function like a primary key value cannot be updated using OTA. For +** example, if the target db contains either of the following: ** -** CREATE VIRTUAL TABLE ft1 USING fts3(a, b); +** CREATE VIRTUAL TABLE x1 USING fts3(a, b); +** CREATE TABLE x1(a, b) ** ** then the OTA database should contain: ** -** CREATE TABLE data_ft1(a, b, ota_rowid, ota_control); +** CREATE TABLE data_x1(a, b, ota_rowid, ota_control); ** ** All non-hidden columns (i.e. all columns matched by "SELECT *") of the ** target table must be present in the input table. For virtual tables, @@ -173,12 +175,12 @@ ** ** UPDATE t1 SET c = ota_delta(c, 'usa') WHERE a = 4; ** -** If the target database table is a virtual table, the ota_control value -** should not include a character corresponding to the ota_rowid value. -** For example, this: +** If the target database table is a virtual table or a table with no PRIMARY +** KEY, the ota_control value should not include a character corresponding +** to the ota_rowid value. For example, this: ** ** INSERT INTO data_ft1(a, b, ota_rowid, ota_control) -** VALUES(NULL, 'usa', 12, '..d'); +** VALUES(NULL, 'usa', 12, '.x'); ** ** causes a result similar to: ** diff --git a/manifest b/manifest index 4cb31a632e..61039ed68d 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Extra\stests\sfor\sthe\sota_rowid\scolumn. -D 2014-12-08T07:22:34.951 +C Update\scomments\sin\ssqlite3ota.h\sto\sremove\sthe\s"must\shave\sPRIMARY\sKEY"\srestriction. +D 2014-12-08T07:28:26.753 F Makefile.arm-wince-mingw32ce-gcc d6df77f1f48d690bd73162294bbba7f59507c72f F Makefile.in a226317fdf3f4c895fb3cfedc355b4d0868ce1fb F Makefile.linux-gcc 91d710bdc4998cb015f39edf3cb314ec4f4d7e23 @@ -137,7 +137,7 @@ F ext/ota/ota8.test cd70e63a0c29c45c0906692827deafa34638feda F ext/ota/ota9.test d3eee95dd836824d07a22e5efcdb7bf6e869358b F ext/ota/otafault.test be02466863015a583cc0ceb6aca871a5e6f7a71b F ext/ota/sqlite3ota.c 84cab0f965144772068ec0183252ae5e5278f0be -F ext/ota/sqlite3ota.h 8dc9c812e61f47f497336a45f820bee88b33a2c5 +F ext/ota/sqlite3ota.h ce378c0c503f625611713133f9c79704ea4ee7a4 F ext/rtree/README 6315c0d73ebf0ec40dedb5aa0e942bc8b54e3761 F ext/rtree/rtree.c 57bec53e1a677ab74217fe1f20a58c3a47261d6b F ext/rtree/rtree.h 834dbcb82dc85b2481cde6a07cdadfddc99e9b9e @@ -1237,7 +1237,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 ba59a7e2ba97244492cbca9247456df0f3f19248 -R 06c52933f7ce4a2123403894b1b52edd +P 46069393b3141ab198f0fcc4f6c05229f06bf1e8 +R 2ff45547a2c264d0b419c476d87c1792 U dan -Z 372aa0d2cbd560795c244eab3953e926 +Z 50a00d12069d2404879b86db79315481 diff --git a/manifest.uuid b/manifest.uuid index 2086ff8c78..85a4152dfb 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -46069393b3141ab198f0fcc4f6c05229f06bf1e8 \ No newline at end of file +088a41eb8c18886a260cf53fa0cca3bd1958dc05 \ No newline at end of file