Skip to content

Comments

fix: MVCC cursor ignored left join null flag#5514

Open
jussisaurio wants to merge 2 commits intomainfrom
fix-mvcc-left-join-null-flag
Open

fix: MVCC cursor ignored left join null flag#5514
jussisaurio wants to merge 2 commits intomainfrom
fix-mvcc-left-join-null-flag

Conversation

@jussisaurio
Copy link
Collaborator

turso> pragma journal_mode='experimental_mvcc';
turso> CREATE TABLE t1(x INTEGER PRIMARY KEY);
CREATE TABLE t2(x INTEGER PRIMARY KEY, v TEXT);
INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1, 'hello');
SELECT t1.x, t2.x FROM t1 LEFT JOIN t2 ON t1.x = t2.x AND t2.v = 'nonexistent';
┌───┬───┐
│ x │ x │
├───┼───┤
│ 1 │ 1 │
└───┴───┘

turso> CREATE TABLE t1(x INTEGER PRIMARY KEY);
CREATE TABLE t2(x INTEGER PRIMARY KEY, v TEXT);
INSERT INTO t1 VALUES (1);
INSERT INTO t2 VALUES (1, 'hello');
SELECT t1.x, t2.x FROM t1 LEFT JOIN t2 ON t1.x = t2.x AND t2.v = 'nonexistent';
┌───┬───┐
│ x │ x │
├───┼───┤
│ 1 │   │
└───┴───┘

fix: put a shared null flag check in op_row_id so both mvcc/btree cursors check it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants