Files
SQLWorkbench/docs/PHASE4-NOTES.md
T
Mark Gregory 5948387b4e The second file contains a SHA-256 checksum of the SQL backup.
This allows the application to detect whether the backup file has changed or become corrupted.

2. Verify Backup button

The Import/Export window now includes Verify Backup….

Select an exported SQL file, and the application calculates its checksum and compares it with the accompanying checksum file.

3. Automatic verification before import

When importing an SQL file, WorkbenchReplacement checks for an accompanying .sha256 file.

If one exists, its checksum must match before SQL execution begins.

Third-party SQL files without checksum files can still be imported.

4. Large-file handling

Checksum calculation reads files in 1 MB blocks rather than loading the entire file into memory.

This reduces memory usage when verifying large backups.
2026-10-16 22:00:32 +01:00

16 lines
1.0 KiB
Markdown

# Phase 4 — SQL dump importer
- Adds parsing for MySQL `DELIMITER` directives, including stored procedure/function/trigger bodies.
- Preserves MySQL executable comments (`/*! ... */`) and block comments.
- Handles quotes, escaped quotes, and semicolons inside strings.
- Updates the import interface explanation.
- Does not require mysql, mysqldump or Homebrew.
## Important limitations
This is not a production-ready backup/restore solution. The importer still reads the entire SQL file into memory, executes each statement through the existing connection runner, and does not roll back statements already executed after an error or cancellation. Server privileges and server-specific SQL syntax may prevent imports. Validate against a disposable database before using with valuable data. The macOS Xcode build has not been run in this environment.
## Build
`xcodebuild -project WorkbenchReplacement.xcodeproj -scheme WorkbenchReplacement -configuration Debug -destination 'platform=macOS,arch=arm64' -derivedDataPath ./build build`