-- MySQL dump 10.13 Distrib 5.1.31, for Win32 (ia32) -- -- Host: localhost Database: bug43485 -- ------------------------------------------------------ -- Server version 5.1.31-community /*!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 */; -- -- Current Database: `bug43485` -- CREATE DATABASE /*!32312 IF NOT EXISTS*/ `bug43485` /*!40100 DEFAULT CHARACTER SET latin1 */; USE `bug43485`; -- -- Table structure for table `languages` -- DROP TABLE IF EXISTS `languages`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `languages` ( `LanguageCode` char(2) CHARACTER SET latin1 COLLATE latin1_general_cs NOT NULL COMMENT 'The ISO 639-1\nlanguage code', `IsActivated` tinyint(1) unsigned NOT NULL COMMENT 'Has this language been activated?', `IsApplicationLanguage` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT 'Is this a\nlanguage used by the applications?', PRIMARY KEY (`LanguageCode`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; SET character_set_client = @saved_cs_client; -- -- Dumping data for table `languages` -- LOCK TABLES `languages` WRITE; /*!40000 ALTER TABLE `languages` DISABLE KEYS */; /*!40000 ALTER TABLE `languages` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `t1` -- DROP TABLE IF EXISTS `t1`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `t1` ( `i` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `j` int(11) DEFAULT NULL, UNIQUE KEY `i` (`i`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; SET character_set_client = @saved_cs_client; -- -- Dumping data for table `t1` -- LOCK TABLES `t1` WRITE; /*!40000 ALTER TABLE `t1` DISABLE KEYS */; /*!40000 ALTER TABLE `t1` ENABLE KEYS */; UNLOCK TABLES; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = utf8 */ ; /*!50003 SET character_set_results = utf8 */ ; /*!50003 SET collation_connection = utf8_general_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = '' */ ; DELIMITER ;; /*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 trigger tt1 before insert on t1 for each row begin set new.j=5; end */;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; -- -- Table structure for table `t2` -- DROP TABLE IF EXISTS `t2`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `t2` ( `i` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `t1` bigint(20) unsigned DEFAULT NULL, `j` int(11) DEFAULT NULL, UNIQUE KEY `i` (`i`), KEY `t1` (`t1`), CONSTRAINT `t2_ibfk_1` FOREIGN KEY (`t1`) REFERENCES `t1` (`i`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; SET character_set_client = @saved_cs_client; -- -- Dumping data for table `t2` -- LOCK TABLES `t2` WRITE; /*!40000 ALTER TABLE `t2` DISABLE KEYS */; /*!40000 ALTER TABLE `t2` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `t3` -- DROP TABLE IF EXISTS `t3`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `t3` ( `i` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `t1` bigint(20) unsigned DEFAULT NULL, `t2` bigint(20) unsigned DEFAULT NULL, `j` int(11) DEFAULT NULL, UNIQUE KEY `i` (`i`), KEY `t2` (`t2`), KEY `t1` (`t1`), CONSTRAINT `t3_ibfk_1` FOREIGN KEY (`t2`) REFERENCES `t2` (`i`), CONSTRAINT `t3_ibfk_2` FOREIGN KEY (`t1`) REFERENCES `t1` (`i`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; SET character_set_client = @saved_cs_client; -- -- Dumping data for table `t3` -- LOCK TABLES `t3` WRITE; /*!40000 ALTER TABLE `t3` DISABLE KEYS */; /*!40000 ALTER TABLE `t3` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `t4` -- DROP TABLE IF EXISTS `t4`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `t4` ( `i` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `t3` bigint(20) unsigned DEFAULT NULL, `j` int(11) DEFAULT NULL, UNIQUE KEY `i` (`i`), KEY `t3` (`t3`), CONSTRAINT `t4_ibfk_1` FOREIGN KEY (`t3`) REFERENCES `t3` (`i`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; SET character_set_client = @saved_cs_client; -- -- Dumping data for table `t4` -- LOCK TABLES `t4` WRITE; /*!40000 ALTER TABLE `t4` DISABLE KEYS */; /*!40000 ALTER TABLE `t4` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `t5` -- DROP TABLE IF EXISTS `t5`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `t5` ( `i` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `t3` bigint(20) unsigned DEFAULT NULL, `j` int(11) DEFAULT NULL, UNIQUE KEY `i` (`i`), KEY `t3` (`t3`), CONSTRAINT `t5_ibfk_1` FOREIGN KEY (`t3`) REFERENCES `t3` (`i`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; SET character_set_client = @saved_cs_client; -- -- Dumping data for table `t5` -- LOCK TABLES `t5` WRITE; /*!40000 ALTER TABLE `t5` DISABLE KEYS */; /*!40000 ALTER TABLE `t5` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `t6` -- DROP TABLE IF EXISTS `t6`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `t6` ( `i` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `t3` bigint(20) unsigned DEFAULT NULL, `t5` bigint(20) unsigned DEFAULT NULL, `j` int(11) DEFAULT NULL, UNIQUE KEY `i` (`i`), KEY `t3` (`t3`), KEY `t5` (`t5`), CONSTRAINT `t6_ibfk_1` FOREIGN KEY (`t3`) REFERENCES `t3` (`i`), CONSTRAINT `t6_ibfk_2` FOREIGN KEY (`t5`) REFERENCES `t5` (`i`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; SET character_set_client = @saved_cs_client; -- -- Dumping data for table `t6` -- LOCK TABLES `t6` WRITE; /*!40000 ALTER TABLE `t6` DISABLE KEYS */; /*!40000 ALTER TABLE `t6` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `t7` -- DROP TABLE IF EXISTS `t7`; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; CREATE TABLE `t7` ( `i` bigint(20) unsigned NOT NULL AUTO_INCREMENT, `t4` bigint(20) unsigned DEFAULT NULL, `t2` bigint(20) unsigned DEFAULT NULL, `j` int(11) DEFAULT NULL, UNIQUE KEY `i` (`i`), KEY `t4` (`t4`), KEY `t2` (`t2`), CONSTRAINT `t7_ibfk_1` FOREIGN KEY (`t4`) REFERENCES `t4` (`i`), CONSTRAINT `t7_ibfk_2` FOREIGN KEY (`t2`) REFERENCES `t2` (`i`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1; SET character_set_client = @saved_cs_client; -- -- Dumping data for table `t7` -- LOCK TABLES `t7` WRITE; /*!40000 ALTER TABLE `t7` DISABLE KEYS */; /*!40000 ALTER TABLE `t7` ENABLE KEYS */; UNLOCK TABLES; -- -- Temporary table structure for view `v1` -- DROP TABLE IF EXISTS `v1`; /*!50001 DROP VIEW IF EXISTS `v1`*/; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v1` ( `a` int(11), `b` int(11) ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; -- -- Temporary table structure for view `v2` -- DROP TABLE IF EXISTS `v2`; /*!50001 DROP VIEW IF EXISTS `v2`*/; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v2` ( `a` int(11), `b` int(11) ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; -- -- Temporary table structure for view `v3` -- DROP TABLE IF EXISTS `v3`; /*!50001 DROP VIEW IF EXISTS `v3`*/; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v3` ( `a` int(11), `b` int(11) ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; -- -- Dumping routines for database 'bug43485' -- /*!50003 DROP FUNCTION IF EXISTS `f1` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = utf8 */ ; /*!50003 SET character_set_results = utf8 */ ; /*!50003 SET collation_connection = utf8_general_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = '' */ ; DELIMITER ;; /*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 FUNCTION `f1`() RETURNS int(11) begin declare a integer; select 23 into a; return a; end */;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; /*!50003 DROP PROCEDURE IF EXISTS `p1` */; /*!50003 SET @saved_cs_client = @@character_set_client */ ; /*!50003 SET @saved_cs_results = @@character_set_results */ ; /*!50003 SET @saved_col_connection = @@collation_connection */ ; /*!50003 SET character_set_client = utf8 */ ; /*!50003 SET character_set_results = utf8 */ ; /*!50003 SET collation_connection = utf8_general_ci */ ; /*!50003 SET @saved_sql_mode = @@sql_mode */ ; /*!50003 SET sql_mode = '' */ ; DELIMITER ;; /*!50003 CREATE*/ /*!50020 DEFINER=`root`@`localhost`*/ /*!50003 PROCEDURE `p1`() begin insert into t2(t1,j) select i,42 from t1; end */;; DELIMITER ; /*!50003 SET sql_mode = @saved_sql_mode */ ; /*!50003 SET character_set_client = @saved_cs_client */ ; /*!50003 SET character_set_results = @saved_cs_results */ ; /*!50003 SET collation_connection = @saved_col_connection */ ; -- -- Current Database: `bug43485` -- USE `bug43485`; -- -- Final view structure for view `v1` -- /*!50001 DROP TABLE `v1`*/; /*!50001 DROP VIEW IF EXISTS `v1`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v1` AS select `t1`.`j` AS `a`,`t2`.`j` AS `b` from (`t1` join `t2`) where (`t1`.`i` = `t2`.`i`) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; -- -- Final view structure for view `v2` -- /*!50001 DROP TABLE `v2`*/; /*!50001 DROP VIEW IF EXISTS `v2`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v2` AS select `t4`.`j` AS `a`,`t3`.`j` AS `b` from (`t4` join `t3`) where (`t4`.`i` = `t3`.`i`) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; -- -- Final view structure for view `v3` -- /*!50001 DROP TABLE `v3`*/; /*!50001 DROP VIEW IF EXISTS `v3`*/; /*!50001 SET @saved_cs_client = @@character_set_client */; /*!50001 SET @saved_cs_results = @@character_set_results */; /*!50001 SET @saved_col_connection = @@collation_connection */; /*!50001 SET character_set_client = utf8 */; /*!50001 SET character_set_results = utf8 */; /*!50001 SET collation_connection = utf8_general_ci */; /*!50001 CREATE ALGORITHM=UNDEFINED */ /*!50013 DEFINER=`root`@`localhost` SQL SECURITY DEFINER */ /*!50001 VIEW `v3` AS select `v1`.`a` AS `a`,`v2`.`b` AS `b` from (`v1` join `v2`) where (`v1`.`a` = `v2`.`a`) */; /*!50001 SET character_set_client = @saved_cs_client */; /*!50001 SET character_set_results = @saved_cs_results */; /*!50001 SET collation_connection = @saved_col_connection */; /*!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 */; -- Dump completed on 2009-03-11 15:26:29