GET_VERSIONSTAMP_INCARNATION¶
The incarnation is intended to be incremented when moving data from one cluster. By combining the incarnation with the __ROW_VERSION field you can maintain proper ordering of inserts/updates even when data is moved between clusters.
There is currently no automatic updating of the version, see: Issue #3866
Syntax¶
GET_VERSIONSTAMP_INCARNATION()
Parameters¶
This function does not take any parameters
Returns¶
Returns the current incarnation of the schema.
Example¶
Insert¶
INSERT INTO T (key, incarnation, data) VALUES ('r1', get_versionstamp_incarnation(), 'something0')
SELECT key, incarnation FROM T
|
|
|---|---|
|
|
Update¶
UPDATE T set incarnation=get_versionstamp_incarnation(), data='banana' WHERE key='r1'
SELECT key, incarnation, data FROM T
|
|
|
|---|---|---|
|
|
|