mirror of
https://github.com/aljazceru/turso.git
synced 2026-02-23 17:05:36 +01:00
fix seekrowid operator not emitting result when root
This commit is contained in:
@@ -276,6 +276,11 @@ impl Emitter for Operator {
|
||||
program.resolve_label(jump_target_when_true, program.offset());
|
||||
}
|
||||
}
|
||||
|
||||
if is_root {
|
||||
return self.result_row(program, referenced_tables, m, None);
|
||||
}
|
||||
|
||||
Ok(true)
|
||||
}
|
||||
Operator::Limit { source, .. } => {
|
||||
|
||||
@@ -12,4 +12,4 @@ source $testdir/where.test
|
||||
source $testdir/like.test
|
||||
source $testdir/scalar-functions.test
|
||||
source $testdir/orderby.test
|
||||
source $testdir/json.test
|
||||
source $testdir/json.test
|
||||
|
||||
@@ -34,3 +34,7 @@ do_execsql_test table-star {
|
||||
do_execsql_test table-star-2 {
|
||||
select p.*, u.age from users u join products p limit 1;
|
||||
} {1|hat|79.0|94}
|
||||
|
||||
do_execsql_test seekrowid {
|
||||
select * from users u where u.id = 5;
|
||||
} {"5|Edward|Miller|christiankramer@example.com|725-281-1033|08522 English Plain|Lake Keith|ID|23283|15"}
|
||||
|
||||
Reference in New Issue
Block a user