+USE tap;
+
 DELIMITER //
 
 /****************************************************************************/

      (SELECT SHA1( -- INDEXES
        GROUP_CONCAT(
          SHA1(
            CONCAT_WS('',`table_catalog`,`table_schema`,`table_name`,`index_name`,`non_unique`,
              `index_schema`,`index_name`,`seq_in_index`,`column_name`,`collation`,`cardinality`,
              `sub_part`,`packed`,`nullable`,`index_type`,`comment`,`index_comment`)
      ))) sha

DETERMINISTIC
BEGIN
  DECLARE ret CHAR(40);
  DECLARE ver INT;

  SET ver = (SELECT tap.mysql_version());

  SELECT SHA1(GROUP_CONCAT(sha)) INTO ret
  FROM 
