NoConflict
If P4==0 then register P3 holds a blob constructed by MakeRecord.
Jumps: P2 is an instruction address. In the listings here, a jump is drawn as an arc and the address is a link.
An example
4 of the 178 statements we compiled against the sample database use NoConflict. This is the one with the shortest program; the rows that use NoConflict are highlighted.
INSERT INTO genres VALUES ('Jazz', 'Swing') ON CONFLICT (name) DO UPDATE SET description = excluded.description| addr | opcode | p1 | p2 | p3 | p4 | p5 |
|---|---|---|---|---|---|---|
| 0 | Init | 0 | 22 | 0 | 0 | |
| 1 | OpenWrite | 1 | 9 | 0 | k(1,) | 0 |
| 2 | String8 | 0 | 2 | 0 | Jazz | 0 |
| 3 | String8 | 0 | 3 | 0 | Swing | 0 |
| 4 | Null | 0 | 1 | 0 | 0 | |
| 5 | HaltIfNull | 1299 | 2 | 2 | genres.name | 1 |
| 6 | Affinity | 2 | 2 | 0 | BB | 0 |
| 7 | SCopy | 2 | 5 | 0 | 0 | |
| 8 | SCopy | 3 | 6 | 0 | 0 | |
| 9 | MakeRecord | 5 | 2 | 4 | 0 | |
| 10 | NoConflict | 1 | 20 | 5 | 1 | 0 |
| 11 | Column | 1 | 0 | 15 | 0 | |
| 12 | Column | 1 | 0 | 13 | 0 | |
| 13 | Copy | 3 | 14 | 0 | 0 | |
| 14 | Affinity | 13 | 2 | 0 | BB | 0 |
| 15 | SCopy | 13 | 9 | 0 | 0 | |
| 16 | SCopy | 14 | 10 | 0 | 0 | |
| 17 | MakeRecord | 9 | 2 | 8 | 0 | |
| 18 | IdxInsert | 1 | 8 | 9 | 1 | 1 |
| 19 | Goto | 0 | 21 | 0 | 0 | |
| 20 | IdxInsert | 1 | 4 | 5 | 1 | 17 |
| 21 | Halt | 0 | 0 | 0 | 0 | |
| 22 | Transaction | 0 | 1 | 1 | 0 | 1 |
| 23 | Goto | 0 | 1 | 0 | 0 |
Open it in the EXPLAIN visualizer →
Also in this program: Affinity, Column, Copy, Goto, Halt, HaltIfNull, IdxInsert, Init, MakeRecord, Null, OpenWrite, SCopy, String8, Transaction.
What the SQLite documentation says
If P4==0 then register P3 holds a blob constructed by MakeRecord. If P4>0 then register P3 is the first of P4 registers that form an unpacked record.
Cursor P1 is on an index btree. If the record identified by P3 and P4 contains any NULL value, jump immediately to P2. If all terms of the record are not-NULL then a check is done to determine if any row in the P1 index btree has a matching key prefix. If there are no matches, jump immediately to P2. If there is a match, fall through and leave the P1 cursor pointing to the matching row.
This opcode is similar to NotFound with the exceptions that the branch is always taken if any part of the search key input is NULL.
This operation leaves the cursor in a state where it cannot be advanced in either direction. In other words, the Next and Prev opcodes do not work after this operation.
From sqlite.org's list of opcodes for SQLite 3.54.1, in the public domain. Opcodes are not a stable interface and change between releases.