Skip to content

Initial Modular Refactor & Core Analysis Features

Latest

Choose a tag to compare

@formeo formeo released this 21 Dec 13:04
· 7 commits to master since this release
8eccc45

This release represents a significant refactor of the Firebird analysis tool, introducing a more robust and modular architecture for safer and deeper database inspection.

Key Changes:

  • Modular Architecture: Core logic has been split into dedicated units (uPageAnalyzer, uDatabaseStats, uFlagManager, uBtreePage, uRecordParser) for better maintainability and separation of concerns.
  • Corrected Data Structures: Fixed critical errors in TPag and THdr definitions in uStructs to align with Firebird's internal format (fbint-page-1.html).
  • Improved Data Page Analysis: uDataPage now correctly parses TData_Page_Fixed_Part and TDpg_rpt, including accurate calculation of the data area start and validation of record fragment offsets.
  • New Analysis Modules:
    • uPageAnalyzer: Centralizes page reading and type identification.
    • uDatabaseStats: Calculates and reports detailed statistics on page types, transaction states (via TIP), and relations.
    • uFlagManager: Provides safe reading and writing of database header flags.
    • uBtreePage: Adds capability to analyze B-Tree index pages.
    • uRecordParser: (New) Parses headers of individual record fragments, a foundational step towards MVCC analysis.
  • Refactored Main UI (main.pas): Now leverages the new modules for analysis, data extraction, and flag management. Improved error handling and UI updates. Removed dependency on incorrect structures from uCommon.
  • Enhanced uDatabase.pas: Updated to use corrected types and safer page I/O methods.
  • Updated Documentation: Improved README.md with clearer features, goals, and technical details. Added a basic user manual (manual.md).
  • Deprecated/Removed: Outdated modules like uHeaderPage, uPoiner, uGenPage are no longer used.

This lays the groundwork for more advanced recovery features, especially MVCC-aware data reconstruction.