Skip to content

Alpha 0.2

Pre-release
Pre-release
Compare
Choose a tag to compare
@foxcpp foxcpp released this 20 May 17:48
· 174 commits to master since this release
v0.2.0
c62e523

⚠️ DB schema is incompatible with 0.1
⚠️ Backwards-incompatible interface changes present (due to go-imap update)

The main focus of this release is to improve performance to a reasonable level and to fix some conformance problems.

Repository rewrite

I'm really sorry for the inconvenience. I accidentally left imapsql-ctl binary in the repository even before 0.1 and I don't want repo to weight 18MB. So I decided to rewrite Git history, removing this file from all commits. All references (including 0.1 tag) are updated to point to new commits. go.sum checksum is invalidated. Only last commit is GPG-signed.

Performance improvements

  • SearchMessages does not read body from DB unless it is necessary (9207da6)
  • Body structure and a subset of the header are statically cached to make ListMessages faster (037e62d)
  • SearchMessages takes shortcuts using denormalized data on simple search criterias (f432507)
  • (SQLite only) 16KB pages are used by default (ab50fa6)
  • (SQLite only) Set of performance tuning options is added to Opts (ab50fa6)

External store interface

  • Message bodies can now be stored in stores external to database (a1937ab)
  • FS directory can be used as external store (943fcae)

RFC 3501 compliance improvements

  • The \Seen flag is set when the body is fetched without PEEK (0f43478)
  • Used keywords are added to FLAGS and PERMANENTFLAGS (206e4e8)

Interface changes

  • imap subpackage is merged with root package (5250812)
  • imapsql.NewBackend is renamed to imapsql.New (1039e44)
  • Get*User functions are renamed (a43a168)
  • Backend.DB and Backend.Opts are exported now (a1937ab)

Schema upgrade

  • Incremental schema upgrades are implemented. This should allow us to remove DB schema from compatibility requirements. Note that upgrades are one-way and a new database will likely be unreadable by older versions. Always make backups before any updates (ca9e1d5).
  • This version supports schema upgrade from 0.1, but it will be removed before 1.0 release so you shouldn't rely on its existence (ca9e1d5).

Note to 0.1 users

go-imap-sql 0.1 does not create the version tag required for schema upgrade to work correctly. You need to execute the following SQL statements to fix it.

CREATE TABLE schema_version ( version INTEGER NOT NULL );
INSERT INTO schema_version VALUES (1);

Then you need to run any action with imapsql-ctl with --allow-schema-upgrade option. Server should not be running during it.

imapsql-ctl --driver ... --dsn ... --allow-schema-upgrade users list

RDBMS compatibility

  • MySQL 5.7 support is removed (3d8b54e)

Dependencies

Misc