common_schema, revision 218 is released, with major new features, top one being server side scripting. Here are the highlights:
- QueryScript: server side scripting is now supported by common_schema, which acts as an interpreter for QueryScript code.
- Throttling for queries is now made available via the throttle() function.
- Enhancements to processlist-related views, including the new slave_hosts view.
- Inline documentation/help is available via the help() routine.
- more…
QueryScript
common_schema makes for a QueryScript implementation for MySQL. You can run server side scripts, interpreted by common_schema, which allow for easy syntax and greater power than was otherwise previously available on the MySQL server. For example:
foreach($table, $schema, $engine: table like '%') if ($engine = 'ndbcluster') ALTER ONLINE TABLE :$schema.:$table REORGANIZE PARTITION;
QueryScript includes flow control, conditional branching, variables & variable expansion, script throttling and more.
Read more on common_schema’s QueryScript implementation.