changeset 217:4f5fc5c72aee

Extend upgrade test to check permissions.
author Daniele Nicolodi <daniele@grinta.net>
date Mon, 21 Nov 2011 16:10:15 +0100
parents 66de4aa7d53a
children 54cde8e2da5b
files src/ltpdarepo/sql/dump-v2.4.sql src/ltpdarepo/sql/dump-v24.sql src/ltpdarepo/tests/test_schema_upgrade.py
diffstat 3 files changed, 624 insertions(+), 498 deletions(-) [+]
line wrap: on
line diff
--- a/src/ltpdarepo/sql/dump-v2.4.sql	Mon Nov 21 16:10:13 2011 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,479 +0,0 @@
-/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
-/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
-/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
-/*!40101 SET NAMES utf8 */;
-/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
-/*!40103 SET TIME_ZONE='+00:00' */;
-/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
-/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
-/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
-/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
-
-CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysql` /*!40100 DEFAULT CHARACTER SET latin1 */;
-
-USE `mysql`;
-
-DROP TABLE IF EXISTS `db`;
-/*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `db` (
-  `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
-  `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
-  `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '',
-  `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
-  `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
-  `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
-  `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
-  `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
-  `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
-  `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
-  `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
-  `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
-  `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
-  `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
-  `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
-  `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
-  `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
-  `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
-  `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
-  `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
-  `Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
-  `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
-  PRIMARY KEY (`Host`,`Db`,`User`),
-  KEY `User` (`User`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Database privileges';
-/*!40101 SET character_set_client = @saved_cs_client */;
-
-LOCK TABLES `db` WRITE;
-/*!40000 ALTER TABLE `db` DISABLE KEYS */;
-INSERT INTO `db` VALUES ('127.0.0.1','test','u1','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N'),('127.0.0.1','db1','u1','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N'),('localhost','test','u1','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N'),('localhost','db1','u1','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N'),('%','test','u2','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N'),('%','db1','u2','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N'),('127.0.0.1','test','u2','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N'),('127.0.0.1','db1','u2','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N'),('localhost','test','u2','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N'),('localhost','db1','u2','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N');
-/*!40000 ALTER TABLE `db` ENABLE KEYS */;
-UNLOCK TABLES;
-
-DROP TABLE IF EXISTS `tables_priv`;
-/*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `tables_priv` (
-  `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
-  `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
-  `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '',
-  `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
-  `Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '',
-  `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
-  `Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') CHARACTER SET utf8 NOT NULL DEFAULT '',
-  `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '',
-  PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`),
-  KEY `Grantor` (`Grantor`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Table privileges';
-/*!40101 SET character_set_client = @saved_cs_client */;
-
-LOCK TABLES `tables_priv` WRITE;
-/*!40000 ALTER TABLE `tables_priv` DISABLE KEYS */;
-INSERT INTO `tables_priv` VALUES ('localhost','db1','u1','transactions','root@localhost','2011-09-11 20:47:21','Select,Insert',''),('127.0.0.1','db1','u1','transactions','root@localhost','2011-09-11 20:47:21','Select,Insert',''),('localhost','db1','u2','transactions','root@localhost','2011-09-12 08:49:35','Select,Insert',''),('127.0.0.1','db1','u2','transactions','root@localhost','2011-09-12 08:49:35','Select,Insert',''),('%','db1','u2','transactions','root@localhost','2011-09-12 08:49:35','Select,Insert','');
-/*!40000 ALTER TABLE `tables_priv` ENABLE KEYS */;
-UNLOCK TABLES;
-
-DROP TABLE IF EXISTS `user`;
-/*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `user` (
-  `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
-  `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '',
-  `Password` char(41) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '',
-  `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
-  `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
-  `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
-  `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
-  `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
-  `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
-  `Reload_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
-  `Shutdown_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
-  `Process_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
-  `File_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
-  `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
-  `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
-  `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
-  `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
-  `Show_db_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
-  `Super_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
-  `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
-  `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
-  `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
-  `Repl_slave_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
-  `Repl_client_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
-  `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
-  `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
-  `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
-  `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
-  `Create_user_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
-  `Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
-  `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
-  `ssl_type` enum('','ANY','X509','SPECIFIED') CHARACTER SET utf8 NOT NULL DEFAULT '',
-  `ssl_cipher` blob NOT NULL,
-  `x509_issuer` blob NOT NULL,
-  `x509_subject` blob NOT NULL,
-  `max_questions` int(11) unsigned NOT NULL DEFAULT '0',
-  `max_updates` int(11) unsigned NOT NULL DEFAULT '0',
-  `max_connections` int(11) unsigned NOT NULL DEFAULT '0',
-  `max_user_connections` int(11) unsigned NOT NULL DEFAULT '0',
-  PRIMARY KEY (`Host`,`User`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges';
-/*!40101 SET character_set_client = @saved_cs_client */;
-
-LOCK TABLES `user` WRITE;
-/*!40000 ALTER TABLE `user` DISABLE KEYS */;
-INSERT INTO `user` VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0),('localhost','','','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','','','','',0,0,0,0),('%','','','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','','','','',0,0,0,0),('127.0.0.1','u1','*556BEF296211C2AF58F53DA3EDDD0A3371B6ECD5','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','','','','',0,0,0,0),('localhost','u1','*556BEF296211C2AF58F53DA3EDDD0A3371B6ECD5','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','','','','',0,0,0,0),('localhost','u2','*8F5AC958192622AED07C928249FF6BF22EBCF45C','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','','','','',0,0,0,0),('127.0.0.1','u2','*8F5AC958192622AED07C928249FF6BF22EBCF45C','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','','','','',0,0,0,0),('%','u2','*8F5AC958192622AED07C928249FF6BF22EBCF45C','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','','','','',0,0,0,0);
-/*!40000 ALTER TABLE `user` ENABLE KEYS */;
-UNLOCK TABLES;
-
-/*!40000 DROP DATABASE IF EXISTS `ltpda`*/;
-
-CREATE DATABASE /*!32312 IF NOT EXISTS*/ `ltpda` /*!40100 DEFAULT CHARACTER SET latin1 */;
-
-USE `ltpda`;
-DROP TABLE IF EXISTS `available_dbs`;
-/*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `available_dbs` (
-  `id` int(10) NOT NULL AUTO_INCREMENT,
-  `db_name` varchar(50) NOT NULL,
-  `name` varchar(50) NOT NULL,
-  `description` text NOT NULL,
-  `version` int(11) DEFAULT '1',
-  PRIMARY KEY (`id`),
-  UNIQUE KEY `database` (`db_name`)
-) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
-LOCK TABLES `available_dbs` WRITE;
-/*!40000 ALTER TABLE `available_dbs` DISABLE KEYS */;
-INSERT INTO `available_dbs` VALUES (1,'db1','db1','Test database one',1);
-/*!40000 ALTER TABLE `available_dbs` ENABLE KEYS */;
-UNLOCK TABLES;
-DROP TABLE IF EXISTS `options`;
-/*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `options` (
-  `name` varchar(50) NOT NULL,
-  `value` text NOT NULL,
-  PRIMARY KEY (`name`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
-LOCK TABLES `options` WRITE;
-/*!40000 ALTER TABLE `options` DISABLE KEYS */;
-INSERT INTO `options` VALUES 
-  ('plot_path','/var/www/html/ltpdarepo/plots'),
-  ('robot_path','/var/www/html/ltpdarepo/ltpdareporobot.rb'),
-  ('version','2.4'),
-  ('mail_text','Hello\nA new account for the LTPDA project has been created for you.\n\nYour login data:\nUsername: %username%\nPassword: %password%\nProject URL: http://127.0.0.1/ltpda24//\n\nThe LTPDA project manager'),
-  ('mail_subject','New LTPDA-Account'),
-  ('project_url','http://127.0.0.1/ltpda24//'),
-  ('mail_text_reset','Hello\nYou asked to reset your password. You can login with this new password now. You can change it on your profile page.\n\nYour login data:\nUsername: %username%\nPassword: %password%\nProject URL: http://127.0.0.1/ltpda24//\n\nThe LTPDA project manager'),('mail_subject_reset','LTPDA-Account reset'),
-  ('ext_plot_path','http://127.0.0.1/ltpda24//plots'),
-  ('admin_mail','One User <u1@example.net>');
-/*!40000 ALTER TABLE `options` ENABLE KEYS */;
-UNLOCK TABLES;
-DROP TABLE IF EXISTS `user_access`;
-/*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `user_access` (
-  `user_id` int(10) NOT NULL,
-  `db_name` varchar(50) NOT NULL,
-  `select_priv` tinyint(1) NOT NULL DEFAULT '0',
-  `insert_priv` tinyint(1) NOT NULL DEFAULT '0',
-  `update_priv` tinyint(1) NOT NULL DEFAULT '0',
-  `delete_priv` tinyint(1) NOT NULL DEFAULT '0',
-  PRIMARY KEY (`user_id`,`db_name`)
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
-LOCK TABLES `user_access` WRITE;
-/*!40000 ALTER TABLE `user_access` DISABLE KEYS */;
-INSERT INTO `user_access` VALUES (1,'db1',1,1,0,0),(2,'db1',1,0,0,0);
-/*!40000 ALTER TABLE `user_access` ENABLE KEYS */;
-UNLOCK TABLES;
-DROP TABLE IF EXISTS `user_hosts`;
-/*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `user_hosts` (
-  `user_id` int(10) NOT NULL,
-  `hostname` varchar(100) NOT NULL
-) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
-LOCK TABLES `user_hosts` WRITE;
-/*!40000 ALTER TABLE `user_hosts` DISABLE KEYS */;
-INSERT INTO `user_hosts` VALUES (0,'localhost'),(0,'127.0.0.1'),(2,'%');
-/*!40000 ALTER TABLE `user_hosts` ENABLE KEYS */;
-UNLOCK TABLES;
-DROP TABLE IF EXISTS `users`;
-/*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `users` (
-  `id` int(11) NOT NULL AUTO_INCREMENT,
-  `username` varchar(50) NOT NULL,
-  `password` varchar(50) NOT NULL,
-  `family_name` varchar(50) NOT NULL,
-  `given_name` varchar(50) NOT NULL,
-  `email` varchar(80) NOT NULL,
-  `institution` varchar(150) NOT NULL,
-  `telephone` varchar(50) NOT NULL,
-  `is_admin` tinyint(1) NOT NULL,
-  PRIMARY KEY (`id`)
-) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
-LOCK TABLES `users` WRITE;
-/*!40000 ALTER TABLE `users` DISABLE KEYS */;
-INSERT INTO `users` VALUES (1,'u1','*556BEF296211C2AF58F53DA3EDDD0A3371B6ECD5','User','One','u1@example.net','','',1),(2,'u2','*8F5AC958192622AED07C928249FF6BF22EBCF45C','User','Two','u2@example.net','Foo','00 123 4567890',0);
-/*!40000 ALTER TABLE `users` ENABLE KEYS */;
-UNLOCK TABLES;
-
-/*!40000 DROP DATABASE IF EXISTS `db1`*/;
-
-CREATE DATABASE /*!32312 IF NOT EXISTS*/ `db1` /*!40100 DEFAULT CHARACTER SET latin1 */;
-
-USE `db1`;
-DROP TABLE IF EXISTS `ao`;
-/*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `ao` (
-  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique ID of every data set in this table',
-  `obj_id` int(11) DEFAULT NULL COMMENT 'ID of the object this data set belongs to',
-  `data_type` text COMMENT 'Data type of the object, see corresponding table',
-  `data_id` int(11) DEFAULT NULL COMMENT 'ID of the data set in the corresponding table',
-  `description` text COMMENT 'Description of the object',
-  `mfilename` text,
-  `mdlfilename` text,
-  PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
-LOCK TABLES `ao` WRITE;
-/*!40000 ALTER TABLE `ao` DISABLE KEYS */;
-/*!40000 ALTER TABLE `ao` ENABLE KEYS */;
-UNLOCK TABLES;
-DROP TABLE IF EXISTS `bobjs`;
-/*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `bobjs` (
-  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique ID of every data set in this table',
-  `obj_id` int(11) DEFAULT NULL COMMENT 'ID of the object this data set belongs to',
-  `mat` longblob COMMENT 'Binary version of the object',
-  PRIMARY KEY (`id`),
-  KEY `object_index` (`obj_id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
-LOCK TABLES `bobjs` WRITE;
-/*!40000 ALTER TABLE `bobjs` DISABLE KEYS */;
-/*!40000 ALTER TABLE `bobjs` ENABLE KEYS */;
-UNLOCK TABLES;
-DROP TABLE IF EXISTS `cdata`;
-/*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `cdata` (
-  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique ID of every data set in this table',
-  `xunits` text COMMENT 'Units of the x axis',
-  `yunits` text COMMENT 'Units of the y axis',
-  PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
-LOCK TABLES `cdata` WRITE;
-/*!40000 ALTER TABLE `cdata` DISABLE KEYS */;
-/*!40000 ALTER TABLE `cdata` ENABLE KEYS */;
-UNLOCK TABLES;
-DROP TABLE IF EXISTS `collections`;
-/*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `collections` (
-  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique ID of every data set in this table',
-  `nobjs` int(11) DEFAULT NULL COMMENT 'Number of objects in a collection',
-  `obj_ids` text COMMENT 'List of objects in a collection',
-  PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
-LOCK TABLES `collections` WRITE;
-/*!40000 ALTER TABLE `collections` DISABLE KEYS */;
-/*!40000 ALTER TABLE `collections` ENABLE KEYS */;
-UNLOCK TABLES;
-DROP TABLE IF EXISTS `fsdata`;
-/*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `fsdata` (
-  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique ID of every data set in this table',
-  `xunits` text COMMENT 'Units of the x axis',
-  `yunits` text COMMENT 'Units of the y axis',
-  `fs` double DEFAULT NULL,
-  PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
-LOCK TABLES `fsdata` WRITE;
-/*!40000 ALTER TABLE `fsdata` DISABLE KEYS */;
-/*!40000 ALTER TABLE `fsdata` ENABLE KEYS */;
-UNLOCK TABLES;
-DROP TABLE IF EXISTS `mfir`;
-/*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `mfir` (
-  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique ID of every data set in this table',
-  `obj_id` int(11) DEFAULT NULL COMMENT 'The ID of the object this data set belongs to',
-  `in_file` text,
-  `fs` double DEFAULT NULL,
-  PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
-LOCK TABLES `mfir` WRITE;
-/*!40000 ALTER TABLE `mfir` DISABLE KEYS */;
-/*!40000 ALTER TABLE `mfir` ENABLE KEYS */;
-UNLOCK TABLES;
-DROP TABLE IF EXISTS `miir`;
-/*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `miir` (
-  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique ID of every data set in this table',
-  `obj_id` int(11) DEFAULT NULL COMMENT 'ID of the object this data set belongs to',
-  `in_file` text,
-  `fs` double DEFAULT NULL,
-  PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
-LOCK TABLES `miir` WRITE;
-/*!40000 ALTER TABLE `miir` DISABLE KEYS */;
-/*!40000 ALTER TABLE `miir` ENABLE KEYS */;
-UNLOCK TABLES;
-DROP TABLE IF EXISTS `objmeta`;
-/*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `objmeta` (
-  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'A unique ID of every data set in this table',
-  `obj_id` int(11) DEFAULT NULL COMMENT 'The ID of the object this data set belongs to',
-  `obj_type` text COMMENT 'Object type, e.g. ao, mfir, miir',
-  `name` text COMMENT 'Name of an object',
-  `created` datetime DEFAULT NULL COMMENT 'Creation time of an object',
-  `version` text COMMENT 'Version string of an object',
-  `ip` text COMMENT 'IP address of the creator',
-  `hostname` text COMMENT 'Hostname of the ceator',
-  `os` text COMMENT 'Operating system of the creator',
-  `submitted` datetime DEFAULT NULL COMMENT 'Submission time of an object',
-  `experiment_title` text COMMENT 'Experiment title',
-  `experiment_desc` text COMMENT 'Experiment description',
-  `analysis_desc` text COMMENT 'Analysis description',
-  `quantity` text COMMENT 'Quantity',
-  `additional_authors` text COMMENT 'Additional authors of an object',
-  `additional_comments` text COMMENT 'Additional comments to an object',
-  `keywords` text COMMENT 'Keywords',
-  `reference_ids` text COMMENT 'Reference IDs',
-  `validated` tinyint(4) DEFAULT NULL COMMENT 'Validated',
-  `vdate` datetime DEFAULT NULL COMMENT 'Validation time',
-  `author` text COMMENT 'Author of the object',
-  PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
-LOCK TABLES `objmeta` WRITE;
-/*!40000 ALTER TABLE `objmeta` DISABLE KEYS */;
-/*!40000 ALTER TABLE `objmeta` ENABLE KEYS */;
-UNLOCK TABLES;
-DROP TABLE IF EXISTS `objs`;
-/*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `objs` (
-  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique ID of every object in this database',
-  `xml` longtext COMMENT 'Raw XML representation of the object',
-  `uuid` text COMMENT 'Unique Global Identifier for this object',
-  `hash` text COMMENT 'MD5 hash of an object',
-  PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
-LOCK TABLES `objs` WRITE;
-/*!40000 ALTER TABLE `objs` DISABLE KEYS */;
-/*!40000 ALTER TABLE `objs` ENABLE KEYS */;
-UNLOCK TABLES;
-DROP TABLE IF EXISTS `transactions`;
-/*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `transactions` (
-  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique ID of every data set in this table',
-  `obj_id` int(11) DEFAULT NULL COMMENT 'ID of the object the transaction belongs to',
-  `user_id` int(11) DEFAULT NULL COMMENT 'ID of the User of the transactions',
-  `transdate` datetime DEFAULT NULL COMMENT 'Date and time of the transaction',
-  `direction` text COMMENT 'Direction of the transaction',
-  PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
-LOCK TABLES `transactions` WRITE;
-/*!40000 ALTER TABLE `transactions` DISABLE KEYS */;
-/*!40000 ALTER TABLE `transactions` ENABLE KEYS */;
-UNLOCK TABLES;
-DROP TABLE IF EXISTS `tsdata`;
-/*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `tsdata` (
-  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique ID of every data set in this table',
-  `xunits` text COMMENT 'Units of the x axis',
-  `yunits` text COMMENT 'Units of the y axis',
-  `fs` double DEFAULT NULL COMMENT 'Sample frequency [Hz]',
-  `nsecs` double DEFAULT NULL COMMENT 'Number of nanoseconds',
-  `t0` datetime DEFAULT NULL COMMENT 'Starting time of the time series',
-  PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
-LOCK TABLES `tsdata` WRITE;
-/*!40000 ALTER TABLE `tsdata` DISABLE KEYS */;
-/*!40000 ALTER TABLE `tsdata` ENABLE KEYS */;
-UNLOCK TABLES;
-DROP TABLE IF EXISTS `users`;
-/*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `users` (
-  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique ID of every data set in this table',
-  `firstname` text COMMENT 'The first name of the user',
-  `familyname` text COMMENT 'The family name of the user',
-  `username` text COMMENT 'The username/login of the user',
-  `email` text COMMENT 'The email address of the user',
-  `telephone` text COMMENT 'Telephone number of the user',
-  `institution` text COMMENT 'Institution of the user',
-  PRIMARY KEY (`id`)
-) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
-LOCK TABLES `users` WRITE;
-/*!40000 ALTER TABLE `users` DISABLE KEYS */;
-INSERT INTO `users` VALUES (1,'One','User','u1','u1@example.net','',''),(2,'Two','User','u2','u2@example.net','00 123 4567890','Foo');
-/*!40000 ALTER TABLE `users` ENABLE KEYS */;
-UNLOCK TABLES;
-DROP TABLE IF EXISTS `xydata`;
-/*!40101 SET @saved_cs_client     = @@character_set_client */;
-/*!40101 SET character_set_client = utf8 */;
-CREATE TABLE `xydata` (
-  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique ID of every data set in this table',
-  `xunits` text COMMENT 'Units of the x axis',
-  `yunits` text COMMENT 'Units of the y axis',
-  PRIMARY KEY (`id`)
-) ENGINE=MyISAM DEFAULT CHARSET=latin1;
-/*!40101 SET character_set_client = @saved_cs_client */;
-
-LOCK TABLES `xydata` WRITE;
-/*!40000 ALTER TABLE `xydata` DISABLE KEYS */;
-/*!40000 ALTER TABLE `xydata` ENABLE KEYS */;
-UNLOCK TABLES;
-
-/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
-/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
-/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
-/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
-/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
-/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
-/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
-/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
-
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/ltpdarepo/sql/dump-v24.sql	Mon Nov 21 16:10:15 2011 +0100
@@ -0,0 +1,585 @@
+
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
+/*!40101 SET NAMES utf8 */;
+/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
+/*!40103 SET TIME_ZONE='+00:00' */;
+/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
+/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
+/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
+/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
+DROP TABLE IF EXISTS `columns_priv`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `columns_priv` (
+  `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+  `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+  `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '',
+  `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+  `Column_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+  `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+  `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '',
+  PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`,`Column_name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Column privileges';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+LOCK TABLES `columns_priv` WRITE;
+/*!40000 ALTER TABLE `columns_priv` DISABLE KEYS */;
+/*!40000 ALTER TABLE `columns_priv` ENABLE KEYS */;
+UNLOCK TABLES;
+DROP TABLE IF EXISTS `db`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `db` (
+  `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+  `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+  `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '',
+  `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  PRIMARY KEY (`Host`,`Db`,`User`),
+  KEY `User` (`User`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Database privileges';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+LOCK TABLES `db` WRITE;
+/*!40000 ALTER TABLE `db` DISABLE KEYS */;
+INSERT INTO `db` VALUES ('127.0.0.1','test','u1','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N'),('127.0.0.1','db1','u1','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N'),('localhost','test','u1','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N'),('localhost','db1','u1','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N'),('%','test','u2','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N'),('%','db1','u2','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N'),('127.0.0.1','test','u2','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N'),('127.0.0.1','db1','u2','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N'),('localhost','test','u2','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N'),('localhost','db1','u2','Y','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N');
+/*!40000 ALTER TABLE `db` ENABLE KEYS */;
+UNLOCK TABLES;
+DROP TABLE IF EXISTS `host`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `host` (
+  `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+  `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+  `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  PRIMARY KEY (`Host`,`Db`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Host privileges;  Merged with database privileges';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+LOCK TABLES `host` WRITE;
+/*!40000 ALTER TABLE `host` DISABLE KEYS */;
+/*!40000 ALTER TABLE `host` ENABLE KEYS */;
+UNLOCK TABLES;
+DROP TABLE IF EXISTS `proc`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `proc` (
+  `db` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
+  `name` char(64) NOT NULL DEFAULT '',
+  `type` enum('FUNCTION','PROCEDURE') NOT NULL,
+  `specific_name` char(64) NOT NULL DEFAULT '',
+  `language` enum('SQL') NOT NULL DEFAULT 'SQL',
+  `sql_data_access` enum('CONTAINS_SQL','NO_SQL','READS_SQL_DATA','MODIFIES_SQL_DATA') NOT NULL DEFAULT 'CONTAINS_SQL',
+  `is_deterministic` enum('YES','NO') NOT NULL DEFAULT 'NO',
+  `security_type` enum('INVOKER','DEFINER') NOT NULL DEFAULT 'DEFINER',
+  `param_list` blob NOT NULL,
+  `returns` longblob NOT NULL,
+  `body` longblob NOT NULL,
+  `definer` char(77) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
+  `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+  `modified` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
+  `sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE','NO_ENGINE_SUBSTITUTION','PAD_CHAR_TO_FULL_LENGTH') NOT NULL DEFAULT '',
+  `comment` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
+  `character_set_client` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
+  `collation_connection` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
+  `db_collation` char(32) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
+  `body_utf8` longblob,
+  PRIMARY KEY (`db`,`name`,`type`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Stored Procedures';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+LOCK TABLES `proc` WRITE;
+/*!40000 ALTER TABLE `proc` DISABLE KEYS */;
+/*!40000 ALTER TABLE `proc` ENABLE KEYS */;
+UNLOCK TABLES;
+DROP TABLE IF EXISTS `procs_priv`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `procs_priv` (
+  `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+  `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+  `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '',
+  `Routine_name` char(64) CHARACTER SET utf8 NOT NULL DEFAULT '',
+  `Routine_type` enum('FUNCTION','PROCEDURE') COLLATE utf8_bin NOT NULL,
+  `Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '',
+  `Proc_priv` set('Execute','Alter Routine','Grant') CHARACTER SET utf8 NOT NULL DEFAULT '',
+  `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+  PRIMARY KEY (`Host`,`Db`,`User`,`Routine_name`,`Routine_type`),
+  KEY `Grantor` (`Grantor`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Procedure privileges';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+LOCK TABLES `procs_priv` WRITE;
+/*!40000 ALTER TABLE `procs_priv` DISABLE KEYS */;
+/*!40000 ALTER TABLE `procs_priv` ENABLE KEYS */;
+UNLOCK TABLES;
+DROP TABLE IF EXISTS `tables_priv`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `tables_priv` (
+  `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+  `Db` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+  `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '',
+  `Table_name` char(64) COLLATE utf8_bin NOT NULL DEFAULT '',
+  `Grantor` char(77) COLLATE utf8_bin NOT NULL DEFAULT '',
+  `Timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+  `Table_priv` set('Select','Insert','Update','Delete','Create','Drop','Grant','References','Index','Alter','Create View','Show view','Trigger') CHARACTER SET utf8 NOT NULL DEFAULT '',
+  `Column_priv` set('Select','Insert','Update','References') CHARACTER SET utf8 NOT NULL DEFAULT '',
+  PRIMARY KEY (`Host`,`Db`,`User`,`Table_name`),
+  KEY `Grantor` (`Grantor`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Table privileges';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+LOCK TABLES `tables_priv` WRITE;
+/*!40000 ALTER TABLE `tables_priv` DISABLE KEYS */;
+INSERT INTO `tables_priv` VALUES ('localhost','db1','u1','transactions','ltpda@localhost','2011-11-18 17:41:08','Select,Insert',''),('127.0.0.1','db1','u1','transactions','ltpda@localhost','2011-11-18 17:41:08','Select,Insert',''),('localhost','db1','u2','transactions','ltpda@localhost','2011-11-18 17:42:30','Select,Insert',''),('127.0.0.1','db1','u2','transactions','ltpda@localhost','2011-11-18 17:42:30','Select,Insert',''),('%','db1','u2','transactions','ltpda@localhost','2011-11-18 17:42:30','Select,Insert','');
+/*!40000 ALTER TABLE `tables_priv` ENABLE KEYS */;
+UNLOCK TABLES;
+DROP TABLE IF EXISTS `user`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `user` (
+  `Host` char(60) COLLATE utf8_bin NOT NULL DEFAULT '',
+  `User` char(16) COLLATE utf8_bin NOT NULL DEFAULT '',
+  `Password` char(41) CHARACTER SET latin1 COLLATE latin1_bin NOT NULL DEFAULT '',
+  `Select_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Insert_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Update_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Delete_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Create_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Drop_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Reload_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Shutdown_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Process_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `File_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Grant_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `References_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Index_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Alter_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Show_db_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Super_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Create_tmp_table_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Lock_tables_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Execute_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Repl_slave_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Repl_client_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Create_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Show_view_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Create_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Alter_routine_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Create_user_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Event_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `Trigger_priv` enum('N','Y') CHARACTER SET utf8 NOT NULL DEFAULT 'N',
+  `ssl_type` enum('','ANY','X509','SPECIFIED') CHARACTER SET utf8 NOT NULL DEFAULT '',
+  `ssl_cipher` blob NOT NULL,
+  `x509_issuer` blob NOT NULL,
+  `x509_subject` blob NOT NULL,
+  `max_questions` int(11) unsigned NOT NULL DEFAULT '0',
+  `max_updates` int(11) unsigned NOT NULL DEFAULT '0',
+  `max_connections` int(11) unsigned NOT NULL DEFAULT '0',
+  `max_user_connections` int(11) unsigned NOT NULL DEFAULT '0',
+  PRIMARY KEY (`Host`,`User`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='Users and global privileges';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+LOCK TABLES `user` WRITE;
+/*!40000 ALTER TABLE `user` DISABLE KEYS */;
+INSERT INTO `user` VALUES ('localhost','root','','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','Y','','','','',0,0,0,0),('localhost','','','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','','','','',0,0,0,0),('%','','','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','','','','',0,0,0,0),('127.0.0.1','u2','*200C0BA6195ABB48ABC1FEDC3626479539F5C0F6','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','','','','',0,0,0,0),('localhost','u2','*200C0BA6195ABB48ABC1FEDC3626479539F5C0F6','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','','','','',0,0,0,0),('localhost','ltpda','*5C2735F7BBBC711F15D32770B0D9CE0D205E6A24','Y','Y','Y','Y','Y','Y','Y','N','N','N','Y','N','N','Y','N','N','N','N','N','N','N','N','N','N','N','N','N','N','','','','',0,0,0,0),('127.0.0.1','u1','*556BEF296211C2AF58F53DA3EDDD0A3371B6ECD5','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','','','','',0,0,0,0),('localhost','u1','*556BEF296211C2AF58F53DA3EDDD0A3371B6ECD5','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','','','','',0,0,0,0),('%','u2','*200C0BA6195ABB48ABC1FEDC3626479539F5C0F6','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','N','','','','',0,0,0,0);
+/*!40000 ALTER TABLE `user` ENABLE KEYS */;
+UNLOCK TABLES;
+/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
+
+/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
+/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
+/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
+/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
+/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
+/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
+/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+
+
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
+/*!40101 SET NAMES utf8 */;
+/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
+/*!40103 SET TIME_ZONE='+00:00' */;
+/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
+/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
+/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
+/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
+
+CREATE DATABASE /*!32312 IF NOT EXISTS*/ `ltpda` /*!40100 DEFAULT CHARACTER SET latin1 */;
+
+USE `ltpda`;
+DROP TABLE IF EXISTS `available_dbs`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `available_dbs` (
+  `id` int(10) NOT NULL AUTO_INCREMENT,
+  `db_name` varchar(50) NOT NULL,
+  `name` varchar(50) NOT NULL,
+  `description` text NOT NULL,
+  `version` int(11) DEFAULT '1',
+  PRIMARY KEY (`id`),
+  UNIQUE KEY `database` (`db_name`)
+) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+LOCK TABLES `available_dbs` WRITE;
+/*!40000 ALTER TABLE `available_dbs` DISABLE KEYS */;
+INSERT INTO `available_dbs` VALUES (1,'db1','db1','Test database One',1);
+/*!40000 ALTER TABLE `available_dbs` ENABLE KEYS */;
+UNLOCK TABLES;
+DROP TABLE IF EXISTS `options`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `options` (
+  `name` varchar(50) NOT NULL,
+  `value` text NOT NULL,
+  PRIMARY KEY (`name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+LOCK TABLES `options` WRITE;
+/*!40000 ALTER TABLE `options` DISABLE KEYS */;
+INSERT INTO `options` VALUES ('plot_path','/var/www/html/ltpdarepo/plots'),('robot_path','/var/www/html/ltpdarepo/ltpdareporobot.rb'),('version','2.4'),('mail_text','Hello\nA new account for the LTPDA project has been created for you.\n\nYour login data:\nUsername: %username%\nPassword: %password%\nProject URL: http://dhcp010.science.unitn.it/ltpda24//\n\nThe LTPDA project manager'),('mail_subject','New LTPDA-Account'),('project_url','http://dhcp010.science.unitn.it/ltpda24//'),('mail_text_reset','Hello\nYou asked to reset your password. You can login with this new password now. You can change it on your profile page.\n\nYour login data:\nUsername: %username%\nPassword: %password%\nProject URL: http://dhcp010.science.unitn.it/ltpda24//\n\nThe LTPDA project manager'),('mail_subject_reset','LTPDA-Account reset'),('ext_plot_path','http://dhcp010.science.unitn.it/ltpda24//plots'),('admin_mail','  <>');
+/*!40000 ALTER TABLE `options` ENABLE KEYS */;
+UNLOCK TABLES;
+DROP TABLE IF EXISTS `user_access`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `user_access` (
+  `user_id` int(10) NOT NULL,
+  `db_name` varchar(50) NOT NULL,
+  `select_priv` tinyint(1) NOT NULL DEFAULT '0',
+  `insert_priv` tinyint(1) NOT NULL DEFAULT '0',
+  `update_priv` tinyint(1) NOT NULL DEFAULT '0',
+  `delete_priv` tinyint(1) NOT NULL DEFAULT '0',
+  PRIMARY KEY (`user_id`,`db_name`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+LOCK TABLES `user_access` WRITE;
+/*!40000 ALTER TABLE `user_access` DISABLE KEYS */;
+INSERT INTO `user_access` VALUES (1,'db1',1,1,0,0),(2,'db1',1,1,0,0);
+/*!40000 ALTER TABLE `user_access` ENABLE KEYS */;
+UNLOCK TABLES;
+DROP TABLE IF EXISTS `user_hosts`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `user_hosts` (
+  `user_id` int(10) NOT NULL,
+  `hostname` varchar(100) NOT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+LOCK TABLES `user_hosts` WRITE;
+/*!40000 ALTER TABLE `user_hosts` DISABLE KEYS */;
+INSERT INTO `user_hosts` VALUES (0,'localhost'),(0,'127.0.0.1'),(2,'%');
+/*!40000 ALTER TABLE `user_hosts` ENABLE KEYS */;
+UNLOCK TABLES;
+DROP TABLE IF EXISTS `users`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `users` (
+  `id` int(11) NOT NULL AUTO_INCREMENT,
+  `username` varchar(50) NOT NULL,
+  `password` varchar(50) NOT NULL,
+  `family_name` varchar(50) NOT NULL,
+  `given_name` varchar(50) NOT NULL,
+  `email` varchar(80) NOT NULL,
+  `institution` varchar(150) NOT NULL,
+  `telephone` varchar(50) NOT NULL,
+  `is_admin` tinyint(1) NOT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+LOCK TABLES `users` WRITE;
+/*!40000 ALTER TABLE `users` DISABLE KEYS */;
+INSERT INTO `users` VALUES (1,'u1','*556BEF296211C2AF58F53DA3EDDD0A3371B6ECD5','','','','','',1),(2,'u2','*200C0BA6195ABB48ABC1FEDC3626479539F5C0F6','User','Two','u2@example.net','Foo','+12 345 67890',0);
+/*!40000 ALTER TABLE `users` ENABLE KEYS */;
+UNLOCK TABLES;
+
+CREATE DATABASE /*!32312 IF NOT EXISTS*/ `db1` /*!40100 DEFAULT CHARACTER SET latin1 */;
+
+USE `db1`;
+DROP TABLE IF EXISTS `ao`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `ao` (
+  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique ID of every data set in this table',
+  `obj_id` int(11) DEFAULT NULL COMMENT 'ID of the object this data set belongs to',
+  `data_type` text COMMENT 'Data type of the object, see corresponding table',
+  `data_id` int(11) DEFAULT NULL COMMENT 'ID of the data set in the corresponding table',
+  `description` text COMMENT 'Description of the object',
+  `mfilename` text,
+  `mdlfilename` text,
+  PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+LOCK TABLES `ao` WRITE;
+/*!40000 ALTER TABLE `ao` DISABLE KEYS */;
+/*!40000 ALTER TABLE `ao` ENABLE KEYS */;
+UNLOCK TABLES;
+DROP TABLE IF EXISTS `bobjs`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `bobjs` (
+  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique ID of every data set in this table',
+  `obj_id` int(11) DEFAULT NULL COMMENT 'ID of the object this data set belongs to',
+  `mat` longblob COMMENT 'Binary version of the object',
+  PRIMARY KEY (`id`),
+  KEY `object_index` (`obj_id`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+LOCK TABLES `bobjs` WRITE;
+/*!40000 ALTER TABLE `bobjs` DISABLE KEYS */;
+/*!40000 ALTER TABLE `bobjs` ENABLE KEYS */;
+UNLOCK TABLES;
+DROP TABLE IF EXISTS `cdata`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `cdata` (
+  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique ID of every data set in this table',
+  `xunits` text COMMENT 'Units of the x axis',
+  `yunits` text COMMENT 'Units of the y axis',
+  PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+LOCK TABLES `cdata` WRITE;
+/*!40000 ALTER TABLE `cdata` DISABLE KEYS */;
+/*!40000 ALTER TABLE `cdata` ENABLE KEYS */;
+UNLOCK TABLES;
+DROP TABLE IF EXISTS `collections`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `collections` (
+  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique ID of every data set in this table',
+  `nobjs` int(11) DEFAULT NULL COMMENT 'Number of objects in a collection',
+  `obj_ids` text COMMENT 'List of objects in a collection',
+  PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+LOCK TABLES `collections` WRITE;
+/*!40000 ALTER TABLE `collections` DISABLE KEYS */;
+/*!40000 ALTER TABLE `collections` ENABLE KEYS */;
+UNLOCK TABLES;
+DROP TABLE IF EXISTS `fsdata`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `fsdata` (
+  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique ID of every data set in this table',
+  `xunits` text COMMENT 'Units of the x axis',
+  `yunits` text COMMENT 'Units of the y axis',
+  `fs` double DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+LOCK TABLES `fsdata` WRITE;
+/*!40000 ALTER TABLE `fsdata` DISABLE KEYS */;
+/*!40000 ALTER TABLE `fsdata` ENABLE KEYS */;
+UNLOCK TABLES;
+DROP TABLE IF EXISTS `mfir`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `mfir` (
+  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique ID of every data set in this table',
+  `obj_id` int(11) DEFAULT NULL COMMENT 'The ID of the object this data set belongs to',
+  `in_file` text,
+  `fs` double DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+LOCK TABLES `mfir` WRITE;
+/*!40000 ALTER TABLE `mfir` DISABLE KEYS */;
+/*!40000 ALTER TABLE `mfir` ENABLE KEYS */;
+UNLOCK TABLES;
+DROP TABLE IF EXISTS `miir`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `miir` (
+  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique ID of every data set in this table',
+  `obj_id` int(11) DEFAULT NULL COMMENT 'ID of the object this data set belongs to',
+  `in_file` text,
+  `fs` double DEFAULT NULL,
+  PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+LOCK TABLES `miir` WRITE;
+/*!40000 ALTER TABLE `miir` DISABLE KEYS */;
+/*!40000 ALTER TABLE `miir` ENABLE KEYS */;
+UNLOCK TABLES;
+DROP TABLE IF EXISTS `objmeta`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `objmeta` (
+  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'A unique ID of every data set in this table',
+  `obj_id` int(11) DEFAULT NULL COMMENT 'The ID of the object this data set belongs to',
+  `obj_type` text COMMENT 'Object type, e.g. ao, mfir, miir',
+  `name` text COMMENT 'Name of an object',
+  `created` datetime DEFAULT NULL COMMENT 'Creation time of an object',
+  `version` text COMMENT 'Version string of an object',
+  `ip` text COMMENT 'IP address of the creator',
+  `hostname` text COMMENT 'Hostname of the ceator',
+  `os` text COMMENT 'Operating system of the creator',
+  `submitted` datetime DEFAULT NULL COMMENT 'Submission time of an object',
+  `experiment_title` text COMMENT 'Experiment title',
+  `experiment_desc` text COMMENT 'Experiment description',
+  `analysis_desc` text COMMENT 'Analysis description',
+  `quantity` text COMMENT 'Quantity',
+  `additional_authors` text COMMENT 'Additional authors of an object',
+  `additional_comments` text COMMENT 'Additional comments to an object',
+  `keywords` text COMMENT 'Keywords',
+  `reference_ids` text COMMENT 'Reference IDs',
+  `validated` tinyint(4) DEFAULT NULL COMMENT 'Validated',
+  `vdate` datetime DEFAULT NULL COMMENT 'Validation time',
+  `author` text COMMENT 'Author of the object',
+  PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+LOCK TABLES `objmeta` WRITE;
+/*!40000 ALTER TABLE `objmeta` DISABLE KEYS */;
+/*!40000 ALTER TABLE `objmeta` ENABLE KEYS */;
+UNLOCK TABLES;
+DROP TABLE IF EXISTS `objs`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `objs` (
+  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique ID of every object in this database',
+  `xml` longtext COMMENT 'Raw XML representation of the object',
+  `uuid` text COMMENT 'Unique Global Identifier for this object',
+  `hash` text COMMENT 'MD5 hash of an object',
+  PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+LOCK TABLES `objs` WRITE;
+/*!40000 ALTER TABLE `objs` DISABLE KEYS */;
+/*!40000 ALTER TABLE `objs` ENABLE KEYS */;
+UNLOCK TABLES;
+DROP TABLE IF EXISTS `transactions`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `transactions` (
+  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique ID of every data set in this table',
+  `obj_id` int(11) DEFAULT NULL COMMENT 'ID of the object the transaction belongs to',
+  `user_id` int(11) DEFAULT NULL COMMENT 'ID of the User of the transactions',
+  `transdate` datetime DEFAULT NULL COMMENT 'Date and time of the transaction',
+  `direction` text COMMENT 'Direction of the transaction',
+  PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+LOCK TABLES `transactions` WRITE;
+/*!40000 ALTER TABLE `transactions` DISABLE KEYS */;
+/*!40000 ALTER TABLE `transactions` ENABLE KEYS */;
+UNLOCK TABLES;
+DROP TABLE IF EXISTS `tsdata`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `tsdata` (
+  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique ID of every data set in this table',
+  `xunits` text COMMENT 'Units of the x axis',
+  `yunits` text COMMENT 'Units of the y axis',
+  `fs` double DEFAULT NULL COMMENT 'Sample frequency [Hz]',
+  `nsecs` double DEFAULT NULL COMMENT 'Number of nanoseconds',
+  `t0` datetime DEFAULT NULL COMMENT 'Starting time of the time series',
+  PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+LOCK TABLES `tsdata` WRITE;
+/*!40000 ALTER TABLE `tsdata` DISABLE KEYS */;
+/*!40000 ALTER TABLE `tsdata` ENABLE KEYS */;
+UNLOCK TABLES;
+DROP TABLE IF EXISTS `users`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `users` (
+  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique ID of every data set in this table',
+  `firstname` text COMMENT 'The first name of the user',
+  `familyname` text COMMENT 'The family name of the user',
+  `username` text COMMENT 'The username/login of the user',
+  `email` text COMMENT 'The email address of the user',
+  `telephone` text COMMENT 'Telephone number of the user',
+  `institution` text COMMENT 'Institution of the user',
+  PRIMARY KEY (`id`)
+) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+LOCK TABLES `users` WRITE;
+/*!40000 ALTER TABLE `users` DISABLE KEYS */;
+INSERT INTO `users` VALUES (1,'','','u1','','',''),(2,'Two','User','u2','u2@example.net','+12 345 67890','Foo');
+/*!40000 ALTER TABLE `users` ENABLE KEYS */;
+UNLOCK TABLES;
+DROP TABLE IF EXISTS `xydata`;
+/*!40101 SET @saved_cs_client     = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `xydata` (
+  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Unique ID of every data set in this table',
+  `xunits` text COMMENT 'Units of the x axis',
+  `yunits` text COMMENT 'Units of the y axis',
+  PRIMARY KEY (`id`)
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+LOCK TABLES `xydata` WRITE;
+/*!40000 ALTER TABLE `xydata` DISABLE KEYS */;
+/*!40000 ALTER TABLE `xydata` ENABLE KEYS */;
+UNLOCK TABLES;
+/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
+
+/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
+/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
+/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
+/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
+/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
+/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
+/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
+
--- a/src/ltpdarepo/tests/test_schema_upgrade.py	Mon Nov 21 16:10:13 2011 +0100
+++ b/src/ltpdarepo/tests/test_schema_upgrade.py	Mon Nov 21 16:10:15 2011 +0100
@@ -1,11 +1,9 @@
 import unittest2 as unittest
 import os
 import warnings
+import MySQLdb as mysql
 
 from cStringIO import StringIO
-
-import MySQLdb as mysql
-
 from ltpdarepo import admin
 
 
@@ -13,7 +11,6 @@
 
     def setUp(self):
         self.app = admin.Application()
-        self.app.wipe()
 
     def tearDown(self):
         self.app.wipe()
@@ -21,40 +18,63 @@
     def test_schema_upgrade(self):
         warnings.simplefilter('ignore', category=mysql.Warning)
 
-        # load dump obtained with `mysqldump --add-drop-database --skip-comments --databases mysql ltpda db1`
-        conn = self.app.connect()
+        # load dump obtained with the `dump.sh` script
+        conn = self.app.connect(db='mysql')
         curs = conn.cursor()
         pwd = os.path.dirname(__file__)
-        sql = open(os.path.join(pwd, '..', 'sql', 'dump-v2.4.sql'))
+        sql = open(os.path.join(pwd, '..', 'sql', 'dump-v24.sql'))
         for stmt in [x.strip() for x in sql.read().split(';\n')]:
             if stmt:
                 curs.execute(stmt)
-        conn.commit()
+        # reload privileges
+        curs.execute("FLUSH PRIVILEGES")
         conn.close()
 
+        # proper configuration to match dump
+        app = admin.Application(USERNAME='ltpda', PASSWORD='ltpda')
+        # connect as root
+        app.username = 'root'
+        app.password = ''
         # upgrade
-        self.app.upgrade()
-        
+        app.upgrade()
+
         conn = self.app.connect()
         curs = conn.cursor()
 
+        # super user permissions
+        curs.execute("""SHOW GRANTS FOR 'ltpda'@'localhost'""")
+        permissions = [row[0] for row in curs.fetchall()]
+        self.assertEqual(len(permissions), 2)
+        self.assertTrue(permissions[0].startswith(
+            "GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP ON *.*"))
+        self.assertTrue(permissions[0].endswith(
+            "WITH GRANT OPTION"))
+        self.assertTrue(permissions[1].startswith(
+            "GRANT CREATE TEMPORARY TABLES, EXECUTE ON `ltpda`.*"))
+
         # no user accounts specified for host '127.0.0.1'
-        curs.execute("""SELECT Host FROM mysql.user WHERE User = 'u1'""")
+        curs.execute("SELECT Host FROM mysql.user")
+        hosts = [row[0] for row in curs.fetchall()]
+        self.assertTrue('127.0.0.1' not in hosts)
+        curs.execute("SELECT Host FROM mysql.user WHERE User = 'u1'")
         hosts = sorted([row[0] for row in curs.fetchall()])
-        #self.assertEqual(hosts, ['localhost'])
-        curs.execute("""SELECT Host FROM mysql.user WHERE User = 'u2'""")
+        self.assertEqual(hosts, ['localhost'])
+        curs.execute("SELECT Host FROM mysql.user WHERE User = 'u2'")
         hosts = sorted([row[0] for row in curs.fetchall()])
-        #self.assertEqual(hosts, ['%', 'localhost'])
+        self.assertEqual(hosts, ['%', 'localhost'])
 
         # check privileges
-        curs.execute("""SELECT Db FROM mysql.db WHERE User = 'u2'""")
+        curs.execute("SELECT Db FROM mysql.db WHERE User = 'u1'")
         dbs = [row[0] for row in curs.fetchall()]
-        #self.assertEqual(dbs, ['db1'])
+        self.assertEqual(dbs, [])
+        curs.execute("SELECT Db FROM mysql.db WHERE User = 'u2'")
+        dbs = [row[0] for row in curs.fetchall()]
+        self.assertEqual(dbs, ['db1'])
 
         # no explicit privileges on transactions table
-        curs.execute("""SELECT Table_name FROM mysql.tables_priv WHERE User = 'u2'""")
-        tables = [row[0] for row in curs.fetchall()]
-        #self.assertEqual(tables, [])
+        curs.execute("SELECT * FROM mysql.tables_priv")
+        tables = curs.fetchall()
+        self.assertEqual(tables, ())
 
         # dump database structure
         upgraded = StringIO()