nkiraly/DBSteward — pull request #70 by austinhyde (2014-08-22 16:24:24+00:00)
Title: Mysql function characteristics

Solves inadequate mapping from MySQL determinism and eval type ("SQL data access") to PgSQL cache policy.

* Add an optional `mysqlEvalType` attribute to the `function` element, with valid values corresponding to the MySQL keywords: `NO_SQL`, `CONTAINS_SQL`, `READS_SQL_DATA`, `MODIFIES_SQL_DATA` - *note*: the underscores are required for DTD validation.
* If `mysqlEvalType` is not present, fall back to the cachePolicy -> evalType mapping currently in effect (this is backwards compatible):

cachePolicy|evalType
---------------|-----------
IMMUTABLE | NO SQL
STABLE | READS SQL DATA
VOLATILE | MODIFIES SQL DATA

* Maintain the existing cachePolicy -> determinism mapping:

cachePolicy|determinism
---------------|-----------
IMMUTABLE | DETERMINISTIC
STABLE | NOT DETERMINISTIC
VOLATILE | NOT DETERMINISTIC

* When extracting procedures and functions, extract the evalType as found in the database (`information_schema.routines.sql_data_access`)
* When extracting, extract the cachePolicy according to the following table:

| NO SQL | CONTAINS SQL | READS SQL DATA | MODIFIES SQL DATA
--------------------------|------------|----------------------|------------------------|--------------------
**DETERMINISTIC** | IMMUTABLE | STABLE |STABLE | VOLATILE
**NOT DETERMINISTIC** | VOLATILE | VOLATILE | VOLATILE | VOLATILE