summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibSQL
diff options
context:
space:
mode:
authorTimothy Flynn <trflynn89@pm.me>2022-10-28 18:42:04 -0400
committerLinus Groh <mail@linusgroh.de>2022-11-01 14:52:59 +0000
commit4283109c13260cf45982852ceac1de572efe7f74 (patch)
tree12ad9bfeca06644186d7c9d06dbd61227a82ef9f /Userland/Libraries/LibSQL
parent3f8a4f69c676e46acc680d03896dc518d9f8581e (diff)
downloadserenity-4283109c13260cf45982852ceac1de572efe7f74.zip
LibSQL: Fix typo in debugging statement
Also put new lines between these statements as that was the only way I saw the typo.
Diffstat (limited to 'Userland/Libraries/LibSQL')
-rw-r--r--Userland/Libraries/LibSQL/Heap.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/Userland/Libraries/LibSQL/Heap.cpp b/Userland/Libraries/LibSQL/Heap.cpp
index 6e12c5de2b..0cb5f36571 100644
--- a/Userland/Libraries/LibSQL/Heap.cpp
+++ b/Userland/Libraries/LibSQL/Heap.cpp
@@ -192,17 +192,24 @@ ErrorOr<void> Heap::read_zero_block()
warnln("{}: Zero page corrupt. This is probably not a {} heap file"sv, name(), FILE_ID);
return Error::from_string_literal("Heap()::read_zero_block(): Zero page corrupt. This is probably not a SerenitySQL heap file");
}
+
dbgln_if(SQL_DEBUG, "Read zero block from {}", name());
+
memcpy(&m_version, buffer.offset_pointer(VERSION_OFFSET), sizeof(u32));
dbgln_if(SQL_DEBUG, "Version: {}.{}", (m_version & 0xFFFF0000) >> 16, (m_version & 0x0000FFFF));
+
memcpy(&m_schemas_root, buffer.offset_pointer(SCHEMAS_ROOT_OFFSET), sizeof(u32));
- dbgln_if(SQL_DEBUG, "Schemas root node: {}", m_tables_root);
+ dbgln_if(SQL_DEBUG, "Schemas root node: {}", m_schemas_root);
+
memcpy(&m_tables_root, buffer.offset_pointer(TABLES_ROOT_OFFSET), sizeof(u32));
dbgln_if(SQL_DEBUG, "Tables root node: {}", m_tables_root);
+
memcpy(&m_table_columns_root, buffer.offset_pointer(TABLE_COLUMNS_ROOT_OFFSET), sizeof(u32));
dbgln_if(SQL_DEBUG, "Table columns root node: {}", m_table_columns_root);
+
memcpy(&m_free_list, buffer.offset_pointer(FREE_LIST_OFFSET), sizeof(u32));
dbgln_if(SQL_DEBUG, "Free list: {}", m_free_list);
+
memcpy(m_user_values.data(), buffer.offset_pointer(USER_VALUES_OFFSET), m_user_values.size() * sizeof(u32));
for (auto ix = 0u; ix < m_user_values.size(); ix++) {
if (m_user_values[ix]) {