summaryrefslogtreecommitdiff
path: root/mysql-test
diff options
context:
space:
mode:
authorOleksandr Byelkin <sanja@mariadb.com>2022-08-03 19:51:44 +0200
committerOleksandr Byelkin <sanja@mariadb.com>2022-08-03 19:51:44 +0200
commite509065247b1a0cda0bc7863ac1d43d0fab9acc8 (patch)
tree0a89b1350bbf06177b63c92111e769a71a4b84c0 /mysql-test
parent8fd8a81a9933e6a5b8afe2e7a2655652bd7c7190 (diff)
parent37a3d4467e3115f4d4dfcad0a6ee3c23e785f524 (diff)
downloadmariadb-git-e509065247b1a0cda0bc7863ac1d43d0fab9acc8.tar.gz
Merge branch '10.3' into 10.4
Diffstat (limited to 'mysql-test')
-rw-r--r--mysql-test/main/func_group.result25
-rw-r--r--mysql-test/main/func_group.test19
-rw-r--r--mysql-test/main/insert_select.result89
-rw-r--r--mysql-test/main/insert_select.test82
-rw-r--r--mysql-test/main/lock_view.result49
-rw-r--r--mysql-test/main/mysqldump-nl.result11
-rw-r--r--mysql-test/main/mysqldump-timing.result71
-rw-r--r--mysql-test/main/mysqldump-timing.test26
-rw-r--r--mysql-test/main/mysqldump.result117
-rw-r--r--mysql-test/suite/innodb_fts/r/ft_result_cache_limit.result39
-rw-r--r--mysql-test/suite/innodb_fts/t/ft_result_cache_limit.test57
-rw-r--r--mysql-test/suite/roles/definer.result47
12 files changed, 500 insertions, 132 deletions
diff --git a/mysql-test/main/func_group.result b/mysql-test/main/func_group.result
index 071c155cd6b..afe8a2e2ddc 100644
--- a/mysql-test/main/func_group.result
+++ b/mysql-test/main/func_group.result
@@ -2524,5 +2524,30 @@ DROP TABLE t2;
DROP VIEW v1;
DROP TABLE t1;
#
+# MDEV-23809: Server crash in JOIN_CACHE::free or ...
+#
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2);
+SELECT DISTINCT CASE CONVERT(EXPORT_SET(0, COLLATION(BENCHMARK(1, BIT_OR(0))),0),TIME) WHEN a THEN 1 END AS f FROM t1;
+f
+NULL
+Warnings:
+Warning 1292 Truncated incorrect time value: '0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0'
+DROP TABLE t1;
+CREATE TABLE t1 (a VARCHAR(8) NULL, b BIGINT);
+INSERT INTO t1 (a,b) VALUES (NULL,NULL),('foo',NULL);
+SELECT DISTINCT STRCMP((b > COLLATION(STDDEV_SAMP(15750))), a) AS f FROM t1;
+f
+NULL
+DROP TABLE t1;
+CREATE TABLE t1 (a BIGINT) AS SELECT 1 AS v3 UNION SELECT FALSE ;
+SELECT DISTINCT a IN ( COLLATION (AVG ('x'))) FROM t1 ;
+a IN ( COLLATION (AVG ('x')))
+NULL
+Warnings:
+Warning 1292 Truncated incorrect DOUBLE value: 'x'
+Warning 1292 Truncated incorrect DOUBLE value: 'x'
+DROP TABLE t1;
+#
# End of 10.3 tests
#
diff --git a/mysql-test/main/func_group.test b/mysql-test/main/func_group.test
index a28b39c28f6..d536f6ead1f 100644
--- a/mysql-test/main/func_group.test
+++ b/mysql-test/main/func_group.test
@@ -1758,5 +1758,24 @@ DROP VIEW v1;
DROP TABLE t1;
--echo #
+--echo # MDEV-23809: Server crash in JOIN_CACHE::free or ...
+--echo #
+
+CREATE TABLE t1 (a INT);
+INSERT INTO t1 VALUES (1),(2);
+SELECT DISTINCT CASE CONVERT(EXPORT_SET(0, COLLATION(BENCHMARK(1, BIT_OR(0))),0),TIME) WHEN a THEN 1 END AS f FROM t1;
+DROP TABLE t1;
+
+
+CREATE TABLE t1 (a VARCHAR(8) NULL, b BIGINT);
+INSERT INTO t1 (a,b) VALUES (NULL,NULL),('foo',NULL);
+SELECT DISTINCT STRCMP((b > COLLATION(STDDEV_SAMP(15750))), a) AS f FROM t1;
+DROP TABLE t1;
+
+CREATE TABLE t1 (a BIGINT) AS SELECT 1 AS v3 UNION SELECT FALSE ;
+SELECT DISTINCT a IN ( COLLATION (AVG ('x'))) FROM t1 ;
+DROP TABLE t1;
+
+--echo #
--echo # End of 10.3 tests
--echo #
diff --git a/mysql-test/main/insert_select.result b/mysql-test/main/insert_select.result
index ea770535e8f..3f9ac8c6322 100644
--- a/mysql-test/main/insert_select.result
+++ b/mysql-test/main/insert_select.result
@@ -954,3 +954,92 @@ ERROR 23000: Duplicate entry '-128' for key 'a'
DROP TABLE t1, t2;
DROP PROCEDURE p1;
# End of 10.2 test
+#
+# MDEV-28617: INSERT ... SELECT with redundant IN subquery in GROUP BY
+# list that uses mergeable derived table containing
+# reference to target table
+#
+create table t1 (a int);
+create table t2 (b int);
+create table t3 (c int);
+insert into t1 values (3), (1);
+insert into t2 values (3), (2);
+insert into t3 values (4), (2);
+insert into t1
+select b from t2
+where b in (select c from t3
+group by (select * from (select a from t1) dt where a = 1));
+select * from t1;
+a
+3
+1
+2
+delete from t1;
+insert into t1 values (3), (1);
+insert into t1
+select b from t2
+where b >= any (select c from t3
+group by (select * from (select a from t1) dt where a = 1));
+select * from t1;
+a
+3
+1
+3
+2
+delete from t1;
+insert into t1 values (3), (1);
+insert into t1
+select b from t2
+where b <= all (select c from t3
+group by (select * from (select a from t1) dt where a = 1));
+select * from t1;
+a
+3
+1
+2
+delete from t1;
+insert into t1 values (3), (1);
+insert into t1
+select b from t2
+where exists (select c from t3
+group by (select * from (select a from t1) dt where a = 1));
+select * from t1;
+a
+3
+1
+3
+2
+delete from t1;
+insert into t1 values (3), (1);
+prepare stmt from "
+insert into t1
+select b from t2
+ where b in (select c from t3
+ group by (select * from (select a from t1) dt where a = 1));
+";
+execute stmt;
+select * from t1;
+a
+3
+1
+2
+delete from t1;
+insert into t1 values (3), (1);
+execute stmt;
+select * from t1;
+a
+3
+1
+2
+delete from t1;
+insert into t1 values (3), (1);
+delete from t1
+where exists (select b from t2
+where b in (select c from t3
+group by (select * from (select a from t1) dt
+where a = 1)));
+select * from t1;
+a
+deallocate prepare stmt;
+drop table t1,t2,t3;
+# End of 10.3 test
diff --git a/mysql-test/main/insert_select.test b/mysql-test/main/insert_select.test
index 1f672acc203..6baa7e43c34 100644
--- a/mysql-test/main/insert_select.test
+++ b/mysql-test/main/insert_select.test
@@ -514,3 +514,85 @@ DROP TABLE t1, t2;
DROP PROCEDURE p1;
--echo # End of 10.2 test
+
+--echo #
+--echo # MDEV-28617: INSERT ... SELECT with redundant IN subquery in GROUP BY
+--echo # list that uses mergeable derived table containing
+--echo # reference to target table
+--echo #
+
+create table t1 (a int);
+create table t2 (b int);
+create table t3 (c int);
+
+insert into t1 values (3), (1);
+insert into t2 values (3), (2);
+insert into t3 values (4), (2);
+
+insert into t1
+select b from t2
+ where b in (select c from t3
+ group by (select * from (select a from t1) dt where a = 1));
+select * from t1;
+
+delete from t1;
+insert into t1 values (3), (1);
+
+insert into t1
+select b from t2
+ where b >= any (select c from t3
+ group by (select * from (select a from t1) dt where a = 1));
+select * from t1;
+
+delete from t1;
+insert into t1 values (3), (1);
+
+insert into t1
+select b from t2
+ where b <= all (select c from t3
+ group by (select * from (select a from t1) dt where a = 1));
+select * from t1;
+
+delete from t1;
+insert into t1 values (3), (1);
+
+insert into t1
+select b from t2
+ where exists (select c from t3
+ group by (select * from (select a from t1) dt where a = 1));
+select * from t1;
+
+delete from t1;
+insert into t1 values (3), (1);
+
+prepare stmt from "
+insert into t1
+select b from t2
+ where b in (select c from t3
+ group by (select * from (select a from t1) dt where a = 1));
+";
+
+execute stmt;
+select * from t1;
+
+delete from t1;
+insert into t1 values (3), (1);
+
+execute stmt;
+select * from t1;
+
+delete from t1;
+insert into t1 values (3), (1);
+
+delete from t1
+ where exists (select b from t2
+ where b in (select c from t3
+ group by (select * from (select a from t1) dt
+ where a = 1)));
+select * from t1;
+
+deallocate prepare stmt;
+
+drop table t1,t2,t3;
+
+--echo # End of 10.3 test
diff --git a/mysql-test/main/lock_view.result b/mysql-test/main/lock_view.result
index 48c45dcf23d..6cc788f86f1 100644
--- a/mysql-test/main/lock_view.result
+++ b/mysql-test/main/lock_view.result
@@ -32,9 +32,8 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest2` /*!40100 DEFAULT CHARACTER
USE `mysqltest2`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `v2` (
- `a` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `v2` AS SELECT
+ 1 AS `a` */;
SET character_set_client = @saved_cs_client;
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest3` /*!40100 DEFAULT CHARACTER SET latin1 */;
@@ -42,39 +41,34 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest3` /*!40100 DEFAULT CHARACTER
USE `mysqltest3`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `v3` (
- `a` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `v3` AS SELECT
+ 1 AS `a` */;
SET character_set_client = @saved_cs_client;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `v3i` (
- `a` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `v3i` AS SELECT
+ 1 AS `a` */;
SET character_set_client = @saved_cs_client;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `v3is` (
- `schema_name` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `v3is` AS SELECT
+ 1 AS `schema_name` */;
SET character_set_client = @saved_cs_client;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `v3nt` (
- `1` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `v3nt` AS SELECT
+ 1 AS `1` */;
SET character_set_client = @saved_cs_client;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `v3ps` (
- `user` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `v3ps` AS SELECT
+ 1 AS `user` */;
SET character_set_client = @saved_cs_client;
USE `mysqltest1`;
USE `mysqltest2`;
-/*!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 */;
@@ -89,7 +83,7 @@ USE `mysqltest2`;
/*!50001 SET collation_connection = @saved_col_connection */;
USE `mysqltest3`;
-/*!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 */;
@@ -102,7 +96,7 @@ USE `mysqltest3`;
/*!50001 SET character_set_client = @saved_cs_client */;
/*!50001 SET character_set_results = @saved_cs_results */;
/*!50001 SET collation_connection = @saved_col_connection */;
-/*!50001 DROP TABLE IF EXISTS `v3i`*/;
+/*!50001 DROP VIEW IF EXISTS `v3i`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
/*!50001 SET @saved_col_connection = @@collation_connection */;
@@ -115,7 +109,7 @@ USE `mysqltest3`;
/*!50001 SET character_set_client = @saved_cs_client */;
/*!50001 SET character_set_results = @saved_cs_results */;
/*!50001 SET collation_connection = @saved_col_connection */;
-/*!50001 DROP TABLE IF EXISTS `v3is`*/;
+/*!50001 DROP VIEW IF EXISTS `v3is`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
/*!50001 SET @saved_col_connection = @@collation_connection */;
@@ -128,7 +122,7 @@ USE `mysqltest3`;
/*!50001 SET character_set_client = @saved_cs_client */;
/*!50001 SET character_set_results = @saved_cs_results */;
/*!50001 SET collation_connection = @saved_col_connection */;
-/*!50001 DROP TABLE IF EXISTS `v3nt`*/;
+/*!50001 DROP VIEW IF EXISTS `v3nt`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
/*!50001 SET @saved_col_connection = @@collation_connection */;
@@ -141,7 +135,7 @@ USE `mysqltest3`;
/*!50001 SET character_set_client = @saved_cs_client */;
/*!50001 SET character_set_results = @saved_cs_results */;
/*!50001 SET collation_connection = @saved_col_connection */;
-/*!50001 DROP TABLE IF EXISTS `v3ps`*/;
+/*!50001 DROP VIEW IF EXISTS `v3ps`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
/*!50001 SET @saved_col_connection = @@collation_connection */;
@@ -243,11 +237,10 @@ disconnect con1;
connection default;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `v1` (
- `id` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `v1` AS SELECT
+ 1 AS `id` */;
SET character_set_client = @saved_cs_client;
-/*!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 */;
diff --git a/mysql-test/main/mysqldump-nl.result b/mysql-test/main/mysqldump-nl.result
index 89fb3144867..bac1ccb6ea0 100644
--- a/mysql-test/main/mysqldump-nl.result
+++ b/mysql-test/main/mysqldump-nl.result
@@ -53,11 +53,10 @@ raboof` int(11) DEFAULT NULL
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `v1
-1v` (
- `foobar
-raboof` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `v1
+1v` AS SELECT
+ 1 AS `foobar
+raboof` */;
SET character_set_client = @saved_cs_client;
--
@@ -95,7 +94,7 @@ USE `mysqltest1
-- 1v`
--
-/*!50001 DROP TABLE IF EXISTS `v1
+/*!50001 DROP VIEW IF EXISTS `v1
1v`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
diff --git a/mysql-test/main/mysqldump-timing.result b/mysql-test/main/mysqldump-timing.result
new file mode 100644
index 00000000000..71120ebf2d5
--- /dev/null
+++ b/mysql-test/main/mysqldump-timing.result
@@ -0,0 +1,71 @@
+#
+# MDEV-18702 mysqldump should use max_statement_time=0 and/or allow setting one
+#
+CREATE DATABASE test1;
+USE test1;
+CREATE TABLE t1 (i INT);
+INSERT INTO t1 VALUES (0);
+LOCK TABLE t1 WRITE;
+timeout without t1 contents expected
+
+/*!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 utf8mb4 */;
+/*!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 `t1`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t1` (
+ `i` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+SET @save_max_statement_time=@@max_statement_time;
+SET GLOBAL max_statement_time=0.1;
+UNLOCK TABLES;;
+This would be a race condition otherwise, but default max_statement_time=0 makes it succeed
+
+/*!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 utf8mb4 */;
+/*!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 `t1`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `t1` (
+ `i` int(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1;
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+LOCK TABLES `t1` WRITE;
+/*!40000 ALTER TABLE `t1` DISABLE KEYS */;
+INSERT INTO `t1` VALUES (0);
+/*!40000 ALTER TABLE `t1` 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 */;
+
+SET GLOBAL max_statement_time=@save_max_statement_time;
+DROP DATABASE test1;
+#
+# End of 10.3 test
+#
diff --git a/mysql-test/main/mysqldump-timing.test b/mysql-test/main/mysqldump-timing.test
new file mode 100644
index 00000000000..25921fdd0cd
--- /dev/null
+++ b/mysql-test/main/mysqldump-timing.test
@@ -0,0 +1,26 @@
+
+
+--echo #
+--echo # MDEV-18702 mysqldump should use max_statement_time=0 and/or allow setting one
+--echo #
+
+CREATE DATABASE test1;
+USE test1;
+CREATE TABLE t1 (i INT);
+INSERT INTO t1 VALUES (0);
+LOCK TABLE t1 WRITE;
+--echo timeout without t1 contents expected
+--error 2
+--exec $MYSQL_DUMP --max-statement-time=1 --skip-lock-tables --skip-comments test1 t1
+SET @save_max_statement_time=@@max_statement_time;
+SET GLOBAL max_statement_time=0.1;
+--send UNLOCK TABLES;
+--echo This would be a race condition otherwise, but default max_statement_time=0 makes it succeed
+--exec $MYSQL_DUMP --skip-lock-tables --skip-comments test1 t1
+--reap
+SET GLOBAL max_statement_time=@save_max_statement_time;
+DROP DATABASE test1;
+
+--echo #
+--echo # End of 10.3 test
+--echo #
diff --git a/mysql-test/main/mysqldump.result b/mysql-test/main/mysqldump.result
index 33fb00a2876..d61d77e7478 100644
--- a/mysql-test/main/mysqldump.result
+++ b/mysql-test/main/mysqldump.result
@@ -2068,11 +2068,9 @@ 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` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `v2` AS SELECT
+ 1 AS `a` */;
SET character_set_client = @saved_cs_client;
-/*!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 */;
@@ -2162,11 +2160,9 @@ 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` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `v1` AS SELECT
+ 1 AS `a` */;
SET character_set_client = @saved_cs_client;
-/*!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 */;
@@ -2236,11 +2232,9 @@ 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` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `v2` AS SELECT
+ 1 AS `a` */;
SET character_set_client = @saved_cs_client;
-/*!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 */;
@@ -2350,31 +2344,27 @@ 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` tinyint NOT NULL,
- `b` tinyint NOT NULL,
- `c` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `v1` AS SELECT
+ 1 AS `a`,
+ 1 AS `b`,
+ 1 AS `c` */;
SET character_set_client = @saved_cs_client;
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` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `v2` AS SELECT
+ 1 AS `a` */;
SET character_set_client = @saved_cs_client;
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` tinyint NOT NULL,
- `b` tinyint NOT NULL,
- `c` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `v3` AS SELECT
+ 1 AS `a`,
+ 1 AS `b`,
+ 1 AS `c` */;
SET character_set_client = @saved_cs_client;
-/*!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 */;
@@ -2388,7 +2378,6 @@ SET character_set_client = @saved_cs_client;
/*!50001 SET character_set_client = @saved_cs_client */;
/*!50001 SET character_set_results = @saved_cs_results */;
/*!50001 SET collation_connection = @saved_col_connection */;
-/*!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 */;
@@ -2402,7 +2391,6 @@ SET character_set_client = @saved_cs_client;
/*!50001 SET character_set_client = @saved_cs_client */;
/*!50001 SET character_set_results = @saved_cs_results */;
/*!50001 SET collation_connection = @saved_col_connection */;
-/*!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 */;
@@ -3109,35 +3097,31 @@ 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` (
- `a` tinyint NOT NULL,
- `b` tinyint NOT NULL,
- `c` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `v0` AS SELECT
+ 1 AS `a`,
+ 1 AS `b`,
+ 1 AS `c` */;
SET character_set_client = @saved_cs_client;
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` tinyint NOT NULL,
- `b` tinyint NOT NULL,
- `c` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `v1` AS SELECT
+ 1 AS `a`,
+ 1 AS `b`,
+ 1 AS `c` */;
SET character_set_client = @saved_cs_client;
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` tinyint NOT NULL,
- `b` tinyint NOT NULL,
- `c` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `v2` AS SELECT
+ 1 AS `a`,
+ 1 AS `b`,
+ 1 AS `c` */;
SET character_set_client = @saved_cs_client;
USE `test`;
-/*!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 */;
@@ -3151,7 +3135,6 @@ USE `test`;
/*!50001 SET character_set_client = @saved_cs_client */;
/*!50001 SET character_set_results = @saved_cs_results */;
/*!50001 SET collation_connection = @saved_col_connection */;
-/*!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 */;
@@ -3165,7 +3148,6 @@ USE `test`;
/*!50001 SET character_set_client = @saved_cs_client */;
/*!50001 SET character_set_results = @saved_cs_results */;
/*!50001 SET collation_connection = @saved_col_connection */;
-/*!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 */;
@@ -3403,7 +3385,7 @@ insert into t values(5, 51);
create view v1 as select qty, price, qty*price as value from t;
create view v2 as select qty from v1;
mysqldump {
-/*!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 */;
@@ -3418,7 +3400,7 @@ mysqldump {
/*!50001 SET collation_connection = @saved_col_connection */;
} mysqldump {
-/*!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 */;
@@ -3511,13 +3493,11 @@ 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` (
- `id` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `v1` AS SELECT
+ 1 AS `id` */;
SET character_set_client = @saved_cs_client;
USE `mysqldump_test_db`;
-/*!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 */;
@@ -3571,15 +3551,14 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqldump_views` /*!40100 DEFAULT CHAR
USE `mysqldump_views`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `nasishnasifu` (
- `id` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `nasishnasifu` AS SELECT
+ 1 AS `id` */;
SET character_set_client = @saved_cs_client;
USE `mysqldump_tables`;
USE `mysqldump_views`;
-/*!50001 DROP TABLE IF EXISTS `nasishnasifu`*/;
+/*!50001 DROP VIEW IF EXISTS `nasishnasifu`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
/*!50001 SET @saved_col_connection = @@collation_connection */;
@@ -3980,11 +3959,9 @@ 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` (
- `c` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `v2` AS SELECT
+ 1 AS `c` */;
SET character_set_client = @saved_cs_client;
-/*!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 */;
@@ -4402,13 +4379,11 @@ 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` (
- `id` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `v1` AS SELECT
+ 1 AS `id` */;
SET character_set_client = @saved_cs_client;
USE `mysqldump_test_db`;
-/*!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 */;
@@ -5496,9 +5471,8 @@ CREATE TABLE `nonunique_table_name` (
/*!40101 SET character_set_client = @saved_cs_client */;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `nonunique_table_view_name` (
- `1` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `nonunique_table_view_name` AS SELECT
+ 1 AS `1` */;
SET character_set_client = @saved_cs_client;
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `db2` /*!40100 DEFAULT CHARACTER SET utf8 */;
@@ -5521,7 +5495,7 @@ CREATE TABLE `nonunique_table_view_name` (
INSERT INTO `nonunique_table_view_name` VALUES (3),(4);
USE `db1`;
-/*!50001 DROP TABLE IF EXISTS `nonunique_table_view_name`*/;
+/*!50001 DROP VIEW IF EXISTS `nonunique_table_view_name`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
/*!50001 SET @saved_col_connection = @@collation_connection */;
@@ -5597,15 +5571,14 @@ CREATE TABLE `nonunique_table_name` (
INSERT INTO `nonunique_table_name` VALUES (5),(6);
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `nonunique_table_view_name` (
- `1` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `nonunique_table_view_name` AS SELECT
+ 1 AS `1` */;
SET character_set_client = @saved_cs_client;
USE `db2`;
USE `db1`;
-/*!50001 DROP TABLE IF EXISTS `nonunique_table_view_name`*/;
+/*!50001 DROP VIEW IF EXISTS `nonunique_table_view_name`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
/*!50001 SET @saved_col_connection = @@collation_connection */;
diff --git a/mysql-test/suite/innodb_fts/r/ft_result_cache_limit.result b/mysql-test/suite/innodb_fts/r/ft_result_cache_limit.result
new file mode 100644
index 00000000000..2dbdd5a04bc
--- /dev/null
+++ b/mysql-test/suite/innodb_fts/r/ft_result_cache_limit.result
@@ -0,0 +1,39 @@
+#
+# Bug 1634932: Assertion failure in thread x in
+# file fts0que.cc
+#
+SET @saved_innodb_ft_result_cache_limit= @@global.innodb_ft_result_cache_limit;
+CREATE TABLE `t1` (
+`FTS_DOC_ID` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
+`text_content` MEDIUMTEXT, PRIMARY KEY (`FTS_DOC_ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+CREATE UNIQUE INDEX FTS_DOC_ID_INDEX ON t1(FTS_DOC_ID);
+SET autocommit=0;
+CREATE PROCEDURE populate_t1()
+BEGIN
+DECLARE i INT DEFAULT 1;
+WHILE (i <= 250) DO
+INSERT INTO t1 (text_content) VALUES ("some_text_1234 aaa");
+SET i = i + 1;
+END WHILE;
+END//
+CALL populate_t1;
+SET autocommit=1;
+SET SESSION debug="+d,fts_instrument_result_cache_limit";
+Warnings:
+Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead
+ALTER TABLE t1 ADD FULLTEXT INDEX `text_content_idx` (`text_content`);
+SELECT FTS_DOC_ID, text_content
+FROM t1
+WHERE MATCH text_content AGAINST ('+some_text_1234' IN BOOLEAN MODE);
+ERROR HY000: Table handler out of memory
+UPDATE t1
+SET text_content='some_text_12345'
+where MATCH text_content AGAINST ('+some_text_1234' IN BOOLEAN MODE);
+ERROR HY000: Table handler out of memory
+DELETE FROM t1
+WHERE MATCH text_content AGAINST ('+some_text_1234' IN BOOLEAN MODE);
+ERROR HY000: Table handler out of memory
+SET GLOBAL innodb_ft_result_cache_limit = @saved_innodb_ft_result_cache_limit;
+DROP TABLE t1;
+DROP PROCEDURE populate_t1;
diff --git a/mysql-test/suite/innodb_fts/t/ft_result_cache_limit.test b/mysql-test/suite/innodb_fts/t/ft_result_cache_limit.test
new file mode 100644
index 00000000000..84254a182d7
--- /dev/null
+++ b/mysql-test/suite/innodb_fts/t/ft_result_cache_limit.test
@@ -0,0 +1,57 @@
+--echo #
+--echo # Bug 1634932: Assertion failure in thread x in
+--echo # file fts0que.cc
+--echo #
+
+--source include/have_innodb.inc
+--source include/have_debug.inc
+
+SET @saved_innodb_ft_result_cache_limit= @@global.innodb_ft_result_cache_limit;
+
+CREATE TABLE `t1` (
+ `FTS_DOC_ID` BIGINT UNSIGNED NOT NULL AUTO_INCREMENT,
+ `text_content` MEDIUMTEXT, PRIMARY KEY (`FTS_DOC_ID`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+
+CREATE UNIQUE INDEX FTS_DOC_ID_INDEX ON t1(FTS_DOC_ID);
+
+SET autocommit=0;
+
+DELIMITER //;
+CREATE PROCEDURE populate_t1()
+BEGIN
+ DECLARE i INT DEFAULT 1;
+ WHILE (i <= 250) DO
+ INSERT INTO t1 (text_content) VALUES ("some_text_1234 aaa");
+ SET i = i + 1;
+ END WHILE;
+END//
+
+DELIMITER ;//
+
+CALL populate_t1;
+SET autocommit=1;
+
+SET SESSION debug="+d,fts_instrument_result_cache_limit";
+
+ALTER TABLE t1 ADD FULLTEXT INDEX `text_content_idx` (`text_content`);
+
+# HA_ERR_FTS_EXCEED_RESULT_CACHE_LIMIT = 188
+--error 128
+SELECT FTS_DOC_ID, text_content
+FROM t1
+WHERE MATCH text_content AGAINST ('+some_text_1234' IN BOOLEAN MODE);
+
+--error 128
+UPDATE t1
+SET text_content='some_text_12345'
+where MATCH text_content AGAINST ('+some_text_1234' IN BOOLEAN MODE);
+
+--error 128
+DELETE FROM t1
+WHERE MATCH text_content AGAINST ('+some_text_1234' IN BOOLEAN MODE);
+
+SET GLOBAL innodb_ft_result_cache_limit = @saved_innodb_ft_result_cache_limit;
+
+DROP TABLE t1;
+DROP PROCEDURE populate_t1;
diff --git a/mysql-test/suite/roles/definer.result b/mysql-test/suite/roles/definer.result
index a5551e7dede..bc79ad8a98c 100644
--- a/mysql-test/suite/roles/definer.result
+++ b/mysql-test/suite/roles/definer.result
@@ -280,39 +280,34 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `test` /*!40100 DEFAULT CHARACTER SET l
USE `test`;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `v1` (
- `a+b` tinyint NOT NULL,
- `c` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `v1` AS SELECT
+ 1 AS `a+b`,
+ 1 AS `c` */;
SET character_set_client = @saved_cs_client;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `v2` (
- `a+b` tinyint NOT NULL,
- `c` tinyint NOT NULL,
- `current_role()` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `v2` AS SELECT
+ 1 AS `a+b`,
+ 1 AS `c`,
+ 1 AS `current_role()` */;
SET character_set_client = @saved_cs_client;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `v3` (
- `a+b` tinyint NOT NULL,
- `c` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `v3` AS SELECT
+ 1 AS `a+b`,
+ 1 AS `c` */;
SET character_set_client = @saved_cs_client;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `v4` (
- `a+b` tinyint NOT NULL,
- `c` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `v4` AS SELECT
+ 1 AS `a+b`,
+ 1 AS `c` */;
SET character_set_client = @saved_cs_client;
SET @saved_cs_client = @@character_set_client;
SET character_set_client = utf8;
-/*!50001 CREATE TABLE `v5` (
- `a+b` tinyint NOT NULL,
- `c` tinyint NOT NULL
-) ENGINE=MyISAM */;
+/*!50001 CREATE VIEW `v5` AS SELECT
+ 1 AS `a+b`,
+ 1 AS `c` */;
SET character_set_client = @saved_cs_client;
CREATE DATABASE /*!32312 IF NOT EXISTS*/ `mysqltest1` /*!40100 DEFAULT CHARACTER SET latin1 */;
@@ -536,7 +531,7 @@ DELIMITER ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
USE `test`;
-/*!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 */;
@@ -547,7 +542,7 @@ USE `test`;
/*!50001 SET character_set_client = @saved_cs_client */;
/*!50001 SET character_set_results = @saved_cs_results */;
/*!50001 SET collation_connection = @saved_col_connection */;
-/*!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 */;
@@ -558,7 +553,7 @@ USE `test`;
/*!50001 SET character_set_client = @saved_cs_client */;
/*!50001 SET character_set_results = @saved_cs_results */;
/*!50001 SET collation_connection = @saved_col_connection */;
-/*!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 */;
@@ -571,7 +566,7 @@ USE `test`;
/*!50001 SET character_set_client = @saved_cs_client */;
/*!50001 SET character_set_results = @saved_cs_results */;
/*!50001 SET collation_connection = @saved_col_connection */;
-/*!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 */;
@@ -584,7 +579,7 @@ USE `test`;
/*!50001 SET character_set_client = @saved_cs_client */;
/*!50001 SET character_set_results = @saved_cs_results */;
/*!50001 SET collation_connection = @saved_col_connection */;
-/*!50001 DROP TABLE IF EXISTS `v5`*/;
+/*!50001 DROP VIEW IF EXISTS `v5`*/;
/*!50001 SET @saved_cs_client = @@character_set_client */;
/*!50001 SET @saved_cs_results = @@character_set_results */;
/*!50001 SET @saved_col_connection = @@collation_connection */;