diff --git a/cli/app.rs b/cli/app.rs index bb9515660..9e296416e 100644 --- a/cli/app.rs +++ b/cli/app.rs @@ -797,7 +797,7 @@ impl<'a> Limbo<'a> { } } - if table.header().is_some() { + if !table.is_empty() { let _ = self.write_fmt(format_args!("{}", table)); } } diff --git a/core/translate/pragma.rs b/core/translate/pragma.rs index 668c1f214..bd120ecb8 100644 --- a/core/translate/pragma.rs +++ b/core/translate/pragma.rs @@ -160,6 +160,9 @@ fn update_pragma( // getting here unreachable!(); } + PragmaName::PageSize => { + todo!("updating page_size is not yet implemented") + } } } @@ -257,6 +260,10 @@ fn query_pragma( }); program.emit_result_row(register, 1); } + PragmaName::PageSize => { + program.emit_int(database_header.lock().page_size.into(), register); + program.emit_result_row(register, 1); + } } Ok(()) diff --git a/core/vdbe/execute.rs b/core/vdbe/execute.rs index 1185a77b0..fc7bb1833 100644 --- a/core/vdbe/execute.rs +++ b/core/vdbe/execute.rs @@ -1448,7 +1448,6 @@ pub fn op_result_row( values: &state.registers[*start_reg] as *const Register, count: *count, }; - state.result_row = Some(row); state.pc += 1; return Ok(InsnFunctionStepResult::Row); diff --git a/vendored/sqlite3-parser/src/parser/ast/mod.rs b/vendored/sqlite3-parser/src/parser/ast/mod.rs index 1aac9c2c4..74da5b647 100644 --- a/vendored/sqlite3-parser/src/parser/ast/mod.rs +++ b/vendored/sqlite3-parser/src/parser/ast/mod.rs @@ -1622,6 +1622,8 @@ pub enum PragmaName { LegacyFileFormat, /// Return the total number of pages in the database file. PageCount, + /// Return the page size of the database in bytes. + PageSize, /// returns information about the columns of a table TableInfo, /// Returns the user version of the database file.