mirror of
https://github.com/sqlite/sqlite.git
synced 2025-07-30 19:03:16 +03:00
Modify the sqlite3session_diff() API so that tables with no PRIMARY KEYs are ignored. This matches the other sessions APIs. Also change sqlite3session_diff() so that it returns SQLITE_SCHEMA, instead of SQLITE_ERROR, if the tables being compared do not have compatible schemas.
FossilOrigin-Name: aada0ad08e3baa10d14d1f3393183110289e068e
This commit is contained in:
@ -293,6 +293,11 @@ int sqlite3session_changeset(
|
||||
** <li> Has the same PRIMARY KEY definition.
|
||||
** </ul>
|
||||
**
|
||||
** If the tables are not compatible, SQLITE_SCHEMA is returned. If the tables
|
||||
** are compatible but do not have any PRIMARY KEY columns, it is not an error
|
||||
** but no changes are added to the session object. As with other session
|
||||
** APIs, tables without PRIMARY KEYs are simply ignored.
|
||||
**
|
||||
** This function adds a set of changes to the session object that could be
|
||||
** used to update the table in database zFrom (call this the "from-table")
|
||||
** so that its content is the same as the table attached to the session
|
||||
|
Reference in New Issue
Block a user