This commit deprecates the reuse-temp-schema option, since it is not commonly
used, and doesn't provide any real advantages over the default behavior of
dropping and recreating the temp schema each time.
This commit also fixes two edge case bugs in reuse-temp-schema's behavior:
* When used in an environment with multiple schemas per instance and
differing schema-level default charset or collation values, a previously-
processed schema's defaults could remain in-place on the temp schema,
inadvertently affecting the introspected workspace for subsequent schemas.
* When used in the presence of stored procs/funcs, the procs/funcs would not
be cleaned up between runs, typically causing the subsequent run to fail
with duplicate routine errors.
Integration testing coverage has been added to ensure that the temp schema is
truly empty of all supported object types prior to use. This will avoid an
undetected regression if e.g. support for views or triggers is added to a
future version of Skeema.
When Skeema commands need to temporarily create tables in a workspace (diff,
push, lint, pull) to introspect the filesystem's version of tables, these
CREATEs are executed concurrently using up to 10 threads. Historically this
has not been a problem, but the new data dictionary in MySQL 8 / Percona
Server 8 is pickier about concurrent DDL when the tables have foreign keys
pointing to each other. This can randomly result in deadlock errors in both
DROP TABLE (which Skeema already handles) as well as CREATE TABLE (which are
now handled as of this commit).
This commit also adds dep github.com/nozzle/throttler (Apache 2 license) for
cleaner concurrency management in this specific code path.
Fixes#105.