-- MySQL dump 10.13 Distrib 5.1.53, for Win32 (ia32) -- -- Host: 192.168.1.105 Database: test -- ------------------------------------------------------ -- Server version 5.5.9 /*!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 */; -- -- Table structure for table `t1` -- DROP TABLE IF EXISTS `t1`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `t1` ( `a1` int(10) unsigned NOT NULL, `col0` int(10) unsigned DEFAULT '14263', `col1` int(11) DEFAULT '-80357', `col3` int(10) unsigned zerofill DEFAULT '0000002464', `col4` int(11) NOT NULL DEFAULT '-38655', PRIMARY KEY (`col4`) USING HASH KEY_BLOCK_SIZE=7830, KEY `idx0` (`col4`) USING HASH ) ENGINE=InnoDB DEFAULT CHARSET=latin1 MIN_ROWS=9599700 MAX_ROWS=2355782 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2 /*!50100 PARTITION BY LINEAR KEY () PARTITIONS 46 */; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `t1` -- LOCK TABLES `t1` WRITE; /*!40000 ALTER TABLE `t1` DISABLE KEYS */; INSERT INTO `t1` VALUES (76,0,-2934927,0008388606,0),(126,0,0,0000000000,-2733); /*!40000 ALTER TABLE `t1` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `t2` -- DROP TABLE IF EXISTS `t2`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `t2` ( `a2` int(11) NOT NULL, `col5` int(10) unsigned zerofill DEFAULT '0000056755', `col7` int(10) unsigned DEFAULT '27059', PRIMARY KEY (`a2`) USING HASH KEY_BLOCK_SIZE=18328, UNIQUE KEY `idx24` (`a2`) USING HASH, UNIQUE KEY `idx14` (`col5`) USING BTREE, UNIQUE KEY `idx18` (`col5`,`a2`), UNIQUE KEY `idx19` (`col5`) USING BTREE, UNIQUE KEY `idx20` (`col7`,`col5`), UNIQUE KEY `idx25` (`a2`,`col7`), UNIQUE KEY `idx29` (`col7`,`a2`), UNIQUE KEY `idx31` (`col5`,`a2`) USING HASH, UNIQUE KEY `idx35` (`a2`,`col5`,`col7`) USING HASH, UNIQUE KEY `idx41` (`col7`,`col5`) USING HASH, UNIQUE KEY `idx50` (`col5`,`a2`) USING HASH, KEY `idx9` (`col7`,`a2`) USING BTREE, KEY `idx16` (`col5`,`col7`), KEY `idx17` (`col5`) USING HASH, KEY `idx47` (`a2`,`col5`), KEY `idx49` (`col7`) USING HASH, KEY `idx54` (`col5`,`a2`,`col7`), KEY `idx55` (`col7`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=latin1 MIN_ROWS=842258 MAX_ROWS=2949198 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `t2` -- LOCK TABLES `t2` WRITE; /*!40000 ALTER TABLE `t2` DISABLE KEYS */; INSERT INTO `t2` VALUES (0,0000015409,0),(1,0000000000,1712280466); /*!40000 ALTER TABLE `t2` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `t3` -- DROP TABLE IF EXISTS `t3`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `t3` ( `a3` int(11) NOT NULL, `col10` int(11) DEFAULT '67632', `col11` int(11) NOT NULL DEFAULT '76444', `col12` int(10) unsigned DEFAULT '62606', PRIMARY KEY (`col11`) USING HASH KEY_BLOCK_SIZE=2766, UNIQUE KEY `idx58` (`col11`) USING HASH, UNIQUE KEY `idx61` (`col11`) USING HASH, UNIQUE KEY `idx62` (`col10`), KEY `idx57` (`col12`) USING BTREE, KEY `idx60` (`a3`) USING HASH ) ENGINE=InnoDB DEFAULT CHARSET=latin1 MIN_ROWS=7175839 MAX_ROWS=1190174 PACK_KEYS=0 CHECKSUM=1 DELAY_KEY_WRITE=1 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `t3` -- LOCK TABLES `t3` WRITE; /*!40000 ALTER TABLE `t3` DISABLE KEYS */; INSERT INTO `t3` VALUES (0,30638,0,0),(1,6479998,206,68); /*!40000 ALTER TABLE `t3` ENABLE KEYS */; UNLOCK TABLES; -- -- Table structure for table `t4` -- DROP TABLE IF EXISTS `t4`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `t4` ( `a4` int(10) unsigned zerofill NOT NULL, `col13` int(11) DEFAULT '-43617', PRIMARY KEY (`a4`) USING BTREE KEY_BLOCK_SIZE=5757, UNIQUE KEY `idx73` (`a4`) USING HASH, UNIQUE KEY `idx75` (`a4`) USING BTREE, UNIQUE KEY `idx64` (`col13`) USING HASH, UNIQUE KEY `idx67` (`col13`) USING HASH, UNIQUE KEY `idx72` (`col13`,`a4`), UNIQUE KEY `idx74` (`col13`) USING BTREE, UNIQUE KEY `idx78` (`col13`) USING BTREE, UNIQUE KEY `idx80` (`col13`) USING BTREE, UNIQUE KEY `idx83` (`col13`) USING HASH, KEY `idx65` (`a4`) USING BTREE, KEY `idx77` (`col13`) USING BTREE, KEY `idx81` (`a4`) USING HASH, KEY `idx87` (`col13`) USING BTREE ) ENGINE=InnoDB DEFAULT CHARSET=latin1 MIN_ROWS=9519446 MAX_ROWS=9782488 ROW_FORMAT=COMPRESSED KEY_BLOCK_SIZE=2; /*!40101 SET character_set_client = @saved_cs_client */; -- -- Dumping data for table `t4` -- LOCK TABLES `t4` WRITE; /*!40000 ALTER TABLE `t4` DISABLE KEYS */; INSERT INTO `t4` VALUES (0000000094,0),(0000000001,66); /*!40000 ALTER TABLE `t4` ENABLE KEYS */; UNLOCK TABLES; -- -- Temporary table structure for view `v0` -- DROP TABLE IF EXISTS `v0`; /*!50001 DROP VIEW IF EXISTS `v0`*/; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v0` ( `1` int(1) ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; -- -- 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` ( `1` int(1) ) 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` ( `1` int(1) ) 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` ( `1` int(1) ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; -- -- Temporary table structure for view `v4` -- DROP TABLE IF EXISTS `v4`; /*!50001 DROP VIEW IF EXISTS `v4`*/; SET @saved_cs_client = @@character_set_client; SET character_set_client = utf8; /*!50001 CREATE TABLE `v4` ( `1` int(1) ) ENGINE=MyISAM */; SET character_set_client = @saved_cs_client; -- -- Final view structure for view `v0` -- /*!50001 DROP TABLE IF EXISTS `v0`*/; /*!50001 DROP VIEW IF EXISTS `v0`*/; /*!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 = latin1 */; /*!50001 SET character_set_results = latin1 */; /*!50001 SET collation_connection = latin1_swedish_ci */; /*!50001 CREATE ALGORITHM=MERGE */ /*!50013 DEFINER=``@`` SQL SECURITY DEFINER */ /*!50001 VIEW `v0` AS select 1 AS `1` from ((((`t1` `t1_0` join `t2` `t2_1` on((((((not((`t1_0`.`col3` like `t2_1`.`col5`))) xor (not((`t1_0`.`col0` like `t1_0`.`a1`)))) xor (`t1_0`.`a1` > `t1_0`.`col4`)) xor (`t1_0`.`col0` <> `t2_1`.`a2`)) or (`t2_1`.`col7` <= `t2_1`.`a2`)))) left join `v1` `v1_2` on(((`v1_2`.`1` >= `t1_0`.`col3`) xor ((`t1_0`.`a1` = `v1_2`.`1`) <> (select 1))))) left join `t2` `t2_3` on(((not((`t1_0`.`col4` like `v1_2`.`1`))) or ((not((`v1_2`.`1` like `t2_3`.`a2`))) xor (not((`t2_1`.`col7` like `t2_3`.`col5`))))))) join `v1` `v1_4` on(((`v1_2`.`1` = NULL) or ((`v1_2`.`1` >= `t2_3`.`col5`) <> (select 1))))) */; /*!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 `v1` -- /*!50001 DROP TABLE IF EXISTS `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 = latin1 */; /*!50001 SET character_set_results = latin1 */; /*!50001 SET collation_connection = latin1_swedish_ci */; /*!50001 CREATE ALGORITHM=MERGE */ /*!50013 DEFINER=``@`` SQL SECURITY DEFINER */ /*!50001 VIEW `v1` AS select 1 AS `1` from ((`t1` `t1_0` left join `t2` `t2_1` on(((`t2_1`.`col7` <> `t2_1`.`a2`) and (`t1_0`.`col1` <=> `t1_0`.`col0`)))) join `t2` `t2_2` on((((`t1_0`.`col4` like `t2_2`.`col5`) and (`t2_1`.`col5` <= `t2_2`.`col5`)) or (`t2_2`.`a2` = `t2_1`.`col7`)))) */; /*!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 IF EXISTS `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 = latin1 */; /*!50001 SET character_set_results = latin1 */; /*!50001 SET collation_connection = latin1_swedish_ci */; /*!50001 CREATE ALGORITHM=TEMPTABLE */ /*!50013 DEFINER=``@`` SQL SECURITY DEFINER */ /*!50001 VIEW `v2` AS select 1 AS `1` from ((`t1` `t1_0` left join `v3` `v3_1` on((((`v3_1`.`1` like `v3_1`.`1`) xor (isnull(`t1_0`.`col3`) and (`v3_1`.`1` <> `v3_1`.`1`))) or ((`v3_1`.`1` like `t1_0`.`col0`) xor (`v3_1`.`1` <= NULL))))) join `v3` `v3_2` on(((((`v3_2`.`1` <= `v3_1`.`1`) and (`t1_0`.`col4` >= '1%')) xor (`v3_1`.`1` >= `t1_0`.`col1`)) or (`v3_1`.`1` <= `v3_1`.`1`)))) */; /*!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 IF EXISTS `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 = latin1 */; /*!50001 SET character_set_results = latin1 */; /*!50001 SET collation_connection = latin1_swedish_ci */; /*!50001 CREATE ALGORITHM=TEMPTABLE */ /*!50013 DEFINER=``@`` SQL SECURITY DEFINER */ /*!50001 VIEW `v3` AS select 1 AS `1` from ((`t1` `t1_0` straight_join `v0` `v0_1` on(((`v0_1`.`1` like `v0_1`.`1`) or (`t1_0`.`col0` <= `t1_0`.`col1`)))) join `v1` `v1_2` on(((`v0_1`.`1` <> `v1_2`.`1`) or (`v0_1`.`1` > `t1_0`.`col4`) or ((`v1_2`.`1` = `t1_0`.`col4`) xor (`v0_1`.`1` is not null))))) */; /*!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 `v4` -- /*!50001 DROP TABLE IF EXISTS `v4`*/; /*!50001 DROP VIEW IF EXISTS `v4`*/; /*!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 = latin1 */; /*!50001 SET character_set_results = latin1 */; /*!50001 SET collation_connection = latin1_swedish_ci */; /*!50001 CREATE ALGORITHM=MERGE */ /*!50013 DEFINER=``@`` SQL SECURITY DEFINER */ /*!50001 VIEW `v4` AS select 1 AS `1` from (`t3` `t3_3` left join ((`t1` `t1_0` left join `v3` `v3_1` on((((not((`v3_1`.`1` like `v3_1`.`1`))) and (`v3_1`.`1` = `t1_0`.`col4`)) or isnull(`v3_1`.`1`)))) left join `v3` `v3_2` on(((`t1_0`.`col0` >= `v3_2`.`1`) or (`v3_1`.`1` <> `t1_0`.`a1`)))) on((((`v3_1`.`1` <> `t1_0`.`col4`) and (`t1_0`.`col0` is not null) and (not((`v3_2`.`1` like `v3_2`.`1`)))) xor (not((`v3_2`.`1` like `t1_0`.`col3`)))))) */; /*!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 2010-12-01 10:17:47 delimiter $ drop procedure if exists p$ drop procedure if exists killit$ create procedure p() begin declare continue handler for sqlexception begin end; repeat explain extended select 1 from `t1` as `t1_0` right join `t4` as `t4_1` on `t4_1`.`a4` not like `t1_0`.`a1` and `t1_0`.`col4` > `t1_0`.`a1` and `t1_0`.`col3` = `t1_0`.`col3` xor `t4_1`.`a4` < null xor `t4_1`.`a4` < `t4_1`.`col13` straight_join `t1` as `t1_2` on `t1_2`.`a1` <=> null or `t4_1`.`a4` >= `t1_2`.`col0` or `t1_2`.`col3` = `t4_1`.`col13` <> ( select 1 from `t1` as `t1_0` straight_join `v2` as `v2_1` on `v2_1`.`1` like '1%' or `t1_0`.`col1` >= `v2_1`.`1` <> ( select 1 from `t1` as `t1_0` left outer join `v3` as `v3_1` on `v3_1`.`1` like `v3_1`.`1` xor `t1_0`.`col3` is null and `v3_1`.`1` <> `v3_1`.`1` or `v3_1`.`1` like `t1_0`.`col0` xor `v3_1`.`1` <= null cross join `v3` as `v3_2` on `v3_2`.`1` <= `v3_1`.`1` and `t1_0`.`col4` >= '1%' xor `v3_1`.`1` >= `t1_0`.`col1` or `v3_1`.`1` <= `v3_1`.`1` limit 1 )or `t1_0`.`col3` like `t1_0`.`a1` right outer join `v1` as `v1_2` on `v2_1`.`1` > `t1_0`.`col4` xor `t1_0`.`col0` >= '1%' or `v2_1`.`1` > '1%' and `v2_1`.`1` < `v2_1`.`1` and `t1_0`.`col0` like `v1_2`.`1` limit 1 )xor `t1_0`.`col1` >= `t4_1`.`col13` or `t1_2`.`col3` >= `t1_2`.`col0` union select 1 from `t1` as `t1_0` right join `t4` as `t4_1` on `t4_1`.`a4` not like `t1_0`.`a1` and `t1_0`.`col4` > `t1_0`.`a1` and `t1_0`.`col3` = `t1_0`.`col3` xor `t4_1`.`a4` < null xor `t4_1`.`a4` < `t4_1`.`col13` straight_join `t1` as `t1_2` on `t1_2`.`a1` <=> null or `t4_1`.`a4` >= `t1_2`.`col0` or `t1_2`.`col3` = `t4_1`.`col13` <> ( select 1 from `t1` as `t1_0` straight_join `v2` as `v2_1` on `v2_1`.`1` like '1%' or `t1_0`.`col1` >= `v2_1`.`1` <> ( select 1 from `t1` as `t1_0` left outer join `v3` as `v3_1` on `v3_1`.`1` like `v3_1`.`1` xor `t1_0`.`col3` is null and `v3_1`.`1` <> `v3_1`.`1` or `v3_1`.`1` like `t1_0`.`col0` xor `v3_1`.`1` <= null cross join `v3` as `v3_2` on `v3_2`.`1` <= `v3_1`.`1` and `t1_0`.`col4` >= '1%' xor `v3_1`.`1` >= `t1_0`.`col1` or `v3_1`.`1` <= `v3_1`.`1` limit 1 )or `t1_0`.`col3` like `t1_0`.`a1` right outer join `v1` as `v1_2` on `v2_1`.`1` > `t1_0`.`col4` xor `t1_0`.`col0` >= '1%' or `v2_1`.`1` > '1%' and `v2_1`.`1` < `v2_1`.`1` and `t1_0`.`col0` like `v1_2`.`1` limit 1 )xor `t1_0`.`col1` >= `t4_1`.`col13` or `t1_2`.`col3` >= `t1_2`.`col0` ; until 1=2 end repeat; end $ create procedure killit() begin declare continue handler for sqlexception begin end; repeat set @sql=concat("kill query ",(select `id` from `information_schema`.`processlist` where `id`<>connection_id() order by rand() limit 1)); prepare stmt from @sql; execute stmt; deallocate prepare stmt; until 1=2 end repeat; end $ delimiter ; #call p(); #call killit(); #in another client connection#