summaryrefslogtreecommitdiff
path: root/mysql-test/r
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/r')
-rw-r--r--mysql-test/r/ctype_utf8.result15
-rw-r--r--mysql-test/r/dyncol.result6
-rw-r--r--mysql-test/r/empty_server_name-8224.result1
-rw-r--r--mysql-test/r/group_by.result2
-rw-r--r--mysql-test/r/information_schema2.result12
-rw-r--r--mysql-test/r/myisam.result11
-rw-r--r--mysql-test/r/mysql_tzinfo_to_sql_symlink.result9
-rw-r--r--mysql-test/r/mysql_upgrade_view.result35
-rw-r--r--mysql-test/r/mysqlcheck.result23
-rw-r--r--mysql-test/r/partition_innodb.result23
-rw-r--r--mysql-test/r/range_innodb.result39
-rw-r--r--mysql-test/r/ssl_7937,nossl.result15
-rw-r--r--mysql-test/r/ssl_7937.result16
-rw-r--r--mysql-test/r/truncate-stale-6500.result33
-rw-r--r--mysql-test/r/type_decimal.result21
-rw-r--r--mysql-test/r/update_innodb.result31
-rw-r--r--mysql-test/r/view.result18
17 files changed, 303 insertions, 7 deletions
diff --git a/mysql-test/r/ctype_utf8.result b/mysql-test/r/ctype_utf8.result
index ef957c54f45..1f44d67661b 100644
--- a/mysql-test/r/ctype_utf8.result
+++ b/mysql-test/r/ctype_utf8.result
@@ -6040,6 +6040,21 @@ DROP TABLE t1;
# End of ctype_utf8_ilseq.inc
#
#
+# MDEV-8067 correct fix for MySQL Bug # 19699237: UNINITIALIZED VARIABLE IN ITEM_FIELD::STR_RESULT
+#
+CREATE TABLE t1 (a VARCHAR(10) CHARACTER SET utf8);
+CREATE TABLE t2 (a VARCHAR(10) CHARACTER SET latin1);
+INSERT INTO t1 VALUES ('aaa');
+INSERT INTO t2 VALUES ('aaa');
+SELECT (SELECT CONCAT(a),1 FROM t1) <=> (SELECT CONCAT(a),1 FROM t2);
+(SELECT CONCAT(a),1 FROM t1) <=> (SELECT CONCAT(a),1 FROM t2)
+1
+INSERT INTO t1 VALUES ('aaa');
+INSERT INTO t2 VALUES ('aaa');
+SELECT (SELECT CONCAT(a),1 FROM t1) <=> (SELECT CONCAT(a),1 FROM t2);
+ERROR 21000: Subquery returns more than 1 row
+DROP TABLE t1, t2;
+#
# End of 5.5 tests
#
#
diff --git a/mysql-test/r/dyncol.result b/mysql-test/r/dyncol.result
index cc4e8074395..04ab385bca6 100644
--- a/mysql-test/r/dyncol.result
+++ b/mysql-test/r/dyncol.result
@@ -1455,6 +1455,12 @@ Warnings:
Warning 1918 Encountered illegal value '18446744073709552001' when converting to INT
Note 1105 Cast to signed converted positive out-of-range integer to it's negative complement
#
+# MDEV-7505 - Too large scale in DECIMAL dynamic column getter crashes
+# mysqld
+#
+SELECT COLUMN_GET(`x`, 'y' AS DECIMAL(5,34));
+ERROR 42000: Too big scale 34 specified for ''y''. Maximum is 30.
+#
# test of symbolic names
#
# creation test (names)
diff --git a/mysql-test/r/empty_server_name-8224.result b/mysql-test/r/empty_server_name-8224.result
new file mode 100644
index 00000000000..6423114470d
--- /dev/null
+++ b/mysql-test/r/empty_server_name-8224.result
@@ -0,0 +1 @@
+create server '' foreign data wrapper w2 options (host '127.0.0.1');
diff --git a/mysql-test/r/group_by.result b/mysql-test/r/group_by.result
index 9f5eb053cb7..38abbfef261 100644
--- a/mysql-test/r/group_by.result
+++ b/mysql-test/r/group_by.result
@@ -2342,7 +2342,7 @@ DROP TABLE t1;
create table t1 (a int, b int);
insert into t1 values (1,11), (1,12), (2,22),(2,23), (4,44),(4,45);
create table t2 (c int, d int);
-insert into t2 values (1,11), (1,12), (2,22),(2,23), (4,44),(4,45);
+insert into t2 values (1,11), (2,22), (4,44);
select distinct a,sum(b), (select d from t2 where c=a order by max(b) limit 1) from t1 group by a order by max(b);
a sum(b) (select d from t2 where c=a order by max(b) limit 1)
1 23 11
diff --git a/mysql-test/r/information_schema2.result b/mysql-test/r/information_schema2.result
index 60a20944839..f82301699a7 100644
--- a/mysql-test/r/information_schema2.result
+++ b/mysql-test/r/information_schema2.result
@@ -6,3 +6,15 @@ select variable_name from information_schema.session_variables where variable_na
(select variable_name from information_schema.session_variables where variable_name = 'basedir');
variable_name
BASEDIR
+create table t1 (a char);
+insert t1 values ('a'),('t'),('z');
+flush status;
+select a, exists (select 1 from information_schema.columns where table_schema=concat('tes',a)) from t1;
+a exists (select 1 from information_schema.columns where table_schema=concat('tes',a))
+a 0
+t 1
+z 0
+show status like 'created_tmp_tables';
+Variable_name Value
+Created_tmp_tables 43
+drop table t1;
diff --git a/mysql-test/r/myisam.result b/mysql-test/r/myisam.result
index 3a6fa9a4673..5506e4e419c 100644
--- a/mysql-test/r/myisam.result
+++ b/mysql-test/r/myisam.result
@@ -2527,6 +2527,17 @@ test.t1 check error Size of indexfile is: 1024 Should be: 2048
test.t1 check warning Size of datafile is: 14 Should be: 7
test.t1 check error Corrupt
DROP TABLE t1;
+#
+# MDEV-3870 - Valgrind warnings on OPTIMIZE MyISAM or Aria TABLE with
+# disabled keys
+#
+CREATE TABLE t1 (a INT, KEY(a)) ENGINE=MyISAM;
+INSERT INTO t1 VALUES (4),(3),(1),(0);
+ALTER TABLE t1 DISABLE KEYS;
+OPTIMIZE TABLE t1;
+Table Op Msg_type Msg_text
+test.t1 optimize status OK
+DROP TABLE t1;
show variables like 'myisam_block_size';
Variable_name Value
myisam_block_size 1024
diff --git a/mysql-test/r/mysql_tzinfo_to_sql_symlink.result b/mysql-test/r/mysql_tzinfo_to_sql_symlink.result
index dda732937ee..f127e756987 100644
--- a/mysql-test/r/mysql_tzinfo_to_sql_symlink.result
+++ b/mysql-test/r/mysql_tzinfo_to_sql_symlink.result
@@ -60,3 +60,12 @@ INSERT INTO time_zone_transition_type (Time_zone_id, Transition_type_id, Offset,
#
TRUNCATE TABLE time_zone_leap_second;
ALTER TABLE time_zone_leap_second ORDER BY Transition_time;
+#
+# MDEV-6236 - [PATCH] mysql_tzinfo_to_sql may produce invalid SQL
+#
+TRUNCATE TABLE time_zone;
+TRUNCATE TABLE time_zone_name;
+TRUNCATE TABLE time_zone_transition;
+TRUNCATE TABLE time_zone_transition_type;
+ALTER TABLE time_zone_transition ORDER BY Time_zone_id, Transition_time;
+ALTER TABLE time_zone_transition_type ORDER BY Time_zone_id, Transition_type_id;
diff --git a/mysql-test/r/mysql_upgrade_view.result b/mysql-test/r/mysql_upgrade_view.result
index 37c9c926149..63f86af3591 100644
--- a/mysql-test/r/mysql_upgrade_view.result
+++ b/mysql-test/r/mysql_upgrade_view.result
@@ -3,6 +3,41 @@ drop table if exists t1,v1,v2,v3,v4,v1badcheck;
drop view if exists t1,v1,v2,v3,v4,v1badcheck;
create table t1(a int);
create table kv(k varchar(30) NOT NULL PRIMARY KEY,v varchar(50));
+create view v1 as select 1;
+repair table t1 quick;
+Table Op Msg_type Msg_text
+test.t1 repair status OK
+repair table t1 extended;
+Table Op Msg_type Msg_text
+test.t1 repair status OK
+repair table t1 use_frm;
+Table Op Msg_type Msg_text
+test.t1 repair status OK
+repair table t1 from mysql;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'from mysql' at line 1
+repair view v1 quick;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'quick' at line 1
+repair view v1 extended;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'extended' at line 1
+repair view v1 use_frm;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'use_frm' at line 1
+repair view v1 from mysql;
+Table Op Msg_type Msg_text
+test.v1 repair status OK
+check view v1 quick;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'quick' at line 1
+check view v1 fast;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'fast' at line 1
+check view v1 medium;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'medium' at line 1
+check view v1 extended;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'extended' at line 1
+check view v1 changed;
+ERROR 42000: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'changed' at line 1
+check view v1 for upgrade;
+Table Op Msg_type Msg_text
+test.v1 check status OK
+drop view v1;
flush tables;
check view v1;
Table Op Msg_type Msg_text
diff --git a/mysql-test/r/mysqlcheck.result b/mysql-test/r/mysqlcheck.result
index 2d4a053b3a2..b4bcdc495ae 100644
--- a/mysql-test/r/mysqlcheck.result
+++ b/mysql-test/r/mysqlcheck.result
@@ -347,3 +347,26 @@ CREATE TABLE test.`t.1` (id int);
mysqlcheck test t.1
test.t.1 OK
drop table test.`t.1`;
+create view v1 as select 1;
+mysqlcheck --process-views test
+test.v1 OK
+mysqlcheck --process-views --extended test
+test.v1 OK
+mysqlcheck --process-views --fast test
+mysqlcheck --process-views --quick test
+test.v1 OK
+mysqlcheck --process-views --check-only-changed test
+mysqlcheck --process-views --medium-check test
+test.v1 OK
+mysqlcheck --process-views --check-upgrade test
+test.v1 OK
+drop view v1;
+create table t1(a int);
+mysqlcheck --process-views --check-upgrade --auto-repair test
+test.t1 OK
+test.v1 Needs upgrade
+
+Repairing views
+test.v1 OK
+drop view v1;
+drop table t1;
diff --git a/mysql-test/r/partition_innodb.result b/mysql-test/r/partition_innodb.result
index 92c9c01db2d..798e3b9a6bf 100644
--- a/mysql-test/r/partition_innodb.result
+++ b/mysql-test/r/partition_innodb.result
@@ -380,33 +380,33 @@ DROP TABLE t1;
create table t1 (a int) engine=innodb partition by hash(a) ;
show table status like 't1';
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
-t1 InnoDB 10 Compact 2 8192 16384 0 0 # NULL NULL NULL NULL latin1_swedish_ci NULL partitioned
+t1 InnoDB 10 Compact 2 8192 16384 0 0 # NULL # NULL NULL latin1_swedish_ci NULL partitioned
drop table t1;
create table t1 (a int)
engine = innodb
partition by key (a);
show table status;
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
-t1 InnoDB 10 Compact 2 8192 16384 0 0 # NULL NULL NULL NULL latin1_swedish_ci NULL partitioned
+t1 InnoDB 10 Compact 2 8192 16384 0 0 # NULL # NULL NULL latin1_swedish_ci NULL partitioned
insert into t1 values (0), (1), (2), (3);
show table status;
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
-t1 InnoDB 10 Compact 4 4096 16384 0 0 # NULL NULL NULL NULL latin1_swedish_ci NULL partitioned
+t1 InnoDB 10 Compact 4 4096 16384 0 0 # NULL # NULL NULL latin1_swedish_ci NULL partitioned
drop table t1;
create table t1 (a int auto_increment primary key)
engine = innodb
partition by key (a);
show table status;
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
-t1 InnoDB 10 Compact 2 8192 16384 0 0 # 1 NULL NULL NULL latin1_swedish_ci NULL partitioned
+t1 InnoDB 10 Compact 2 8192 16384 0 0 # 1 # NULL NULL latin1_swedish_ci NULL partitioned
insert into t1 values (NULL), (NULL), (NULL), (NULL);
show table status;
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
-t1 InnoDB 10 Compact 4 4096 16384 0 0 # 5 NULL NULL NULL latin1_swedish_ci NULL partitioned
+t1 InnoDB 10 Compact 4 4096 16384 0 0 # 5 # NULL NULL latin1_swedish_ci NULL partitioned
insert into t1 values (NULL), (NULL), (NULL), (NULL);
show table status;
Name Engine Version Row_format Rows Avg_row_length Data_length Max_data_length Index_length Data_free Auto_increment Create_time Update_time Check_time Collation Checksum Create_options Comment
-t1 InnoDB 10 Compact 8 2048 16384 0 0 # 9 NULL NULL NULL latin1_swedish_ci NULL partitioned
+t1 InnoDB 10 Compact 8 2048 16384 0 0 # 9 # NULL NULL latin1_swedish_ci NULL partitioned
drop table t1;
create table t1 (a int)
partition by key (a)
@@ -588,6 +588,17 @@ a b
0 1
DROP TABLE t1;
#
+# Bug #17299181 CREATE_TIME AND UPDATE_TIME ARE
+# WRONG FOR PARTITIONED TABLES
+#
+CREATE TABLE t1 (a int, PRIMARY KEY (a)) ENGINE=InnoDB
+PARTITION BY HASH (a) PARTITIONS 2;
+SELECT COUNT(*) FROM INFORMATION_SCHEMA.TABLES WHERE
+CREATE_TIME IS NOT NULL AND TABLE_NAME='t1';
+COUNT(*)
+1
+DROP TABLE t1;
+#
# BUG#12912171 - ASSERTION FAILED: QUICK->HEAD->READ_SET ==
# SAVE_READ_SET
#
diff --git a/mysql-test/r/range_innodb.result b/mysql-test/r/range_innodb.result
new file mode 100644
index 00000000000..794e6c7b3cc
--- /dev/null
+++ b/mysql-test/r/range_innodb.result
@@ -0,0 +1,39 @@
+#
+# Range optimizer (and related) tests that need InnoDB.
+#
+drop table if exists t0, t1, t2;
+#
+# MDEV-6735: Range checked for each record used with key
+#
+create table t0(a int);
+insert into t0 values (0),(1),(2),(3),(4),(5),(6),(7),(8),(9);
+create table t1(a int);
+insert into t1 select A.a + B.a* 10 + C.a * 100 + D.a * 1000
+from t0 A, t0 B, t0 C, t0 D;
+create table t2 (
+a int,
+b int,
+filler1 char(100),
+filler2 char(100),
+filler3 char(100),
+filler4 char(100),
+key(a),
+key(b)
+) engine=innodb;
+insert into t2
+select
+a,a,
+repeat('0123456789', 10),
+repeat('0123456789', 10),
+repeat('0123456789', 10),
+repeat('0123456789', 10)
+from t1;
+analyze table t2;
+Table Op Msg_type Msg_text
+test.t2 analyze status OK
+# The following must not use "Range checked for each record":
+explain select * from t0 left join t2 on t2.a <t0.a and t2.b between 50 and 250;
+id select_type table type possible_keys key key_len ref rows Extra
+1 SIMPLE t0 ALL NULL NULL NULL NULL 10
+1 SIMPLE t2 range a,b b 5 NULL 201 Using where; Using join buffer (flat, BNL join)
+drop table t0,t1,t2;
diff --git a/mysql-test/r/ssl_7937,nossl.result b/mysql-test/r/ssl_7937,nossl.result
new file mode 100644
index 00000000000..72693233bc8
--- /dev/null
+++ b/mysql-test/r/ssl_7937,nossl.result
@@ -0,0 +1,15 @@
+create procedure have_ssl()
+select if(variable_value > '','yes','no') as 'have_ssl'
+ from information_schema.session_status
+where variable_name='ssl_cipher';
+mysql --ssl-ca=cacert.pem -e "call test.have_ssl()"
+have_ssl
+no
+mysql --ssl -e "call test.have_ssl()"
+have_ssl
+no
+mysql --ssl-ca=cacert.pem --ssl-verify-server-cert -e "call test.have_ssl()"
+ERROR 2026 (HY000): SSL connection error: SSL is required, but the server does not support it
+mysql --ssl --ssl-verify-server-cert -e "call test.have_ssl()"
+ERROR 2026 (HY000): SSL connection error: SSL is required, but the server does not support it
+drop procedure have_ssl;
diff --git a/mysql-test/r/ssl_7937.result b/mysql-test/r/ssl_7937.result
new file mode 100644
index 00000000000..a94ca3b3529
--- /dev/null
+++ b/mysql-test/r/ssl_7937.result
@@ -0,0 +1,16 @@
+create procedure have_ssl()
+select if(variable_value > '','yes','no') as 'have_ssl'
+ from information_schema.session_status
+where variable_name='ssl_cipher';
+mysql --ssl-ca=cacert.pem -e "call test.have_ssl()"
+have_ssl
+yes
+mysql --ssl -e "call test.have_ssl()"
+have_ssl
+yes
+mysql --ssl-ca=cacert.pem --ssl-verify-server-cert -e "call test.have_ssl()"
+have_ssl
+yes
+mysql --ssl --ssl-verify-server-cert -e "call test.have_ssl()"
+ERROR 2026 (HY000): SSL connection error: Failed to verify the server certificate
+drop procedure have_ssl;
diff --git a/mysql-test/r/truncate-stale-6500.result b/mysql-test/r/truncate-stale-6500.result
new file mode 100644
index 00000000000..b6222716953
--- /dev/null
+++ b/mysql-test/r/truncate-stale-6500.result
@@ -0,0 +1,33 @@
+SET GLOBAL query_cache_size=1024*1024*8;
+CREATE TABLE `test` (
+`uniqueId` INT NOT NULL,
+`partitionId` INT NOT NULL,
+PRIMARY KEY (`uniqueId`,`partitionId`)
+) ENGINE=InnoDB PARTITION BY LIST (partitionId) (
+PARTITION p01 VALUES IN (1),
+PARTITION p02 VALUES IN (2)
+);
+INSERT INTO `test`(`uniqueId`,`partitionId`) VALUES(407237055, 2);
+SELECT * FROM `test`;
+uniqueId partitionId
+407237055 2
+#Confirms 1 row in partition 'p02'
+SELECT TABLE_NAME, PARTITION_NAME, TABLE_ROWS FROM information_schema.PARTITIONS where TABLE_NAME = 'test';
+TABLE_NAME PARTITION_NAME TABLE_ROWS
+test p01 0
+test p02 1
+ALTER TABLE `test` TRUNCATE PARTITION `p02`;
+#Confirms no more rows in partition 'p02'
+SELECT TABLE_NAME, PARTITION_NAME, TABLE_ROWS FROM information_schema.PARTITIONS where TABLE_NAME = 'test';
+TABLE_NAME PARTITION_NAME TABLE_ROWS
+test p01 0
+test p02 0
+#Before the patch, this returned the previously existing values.
+SELECT * FROM `test`;
+uniqueId partitionId
+SELECT SQL_CACHE * FROM `test`;
+uniqueId partitionId
+SELECT SQL_NO_CACHE * FROM `test`;
+uniqueId partitionId
+DROP TABLE test;
+SET GLOBAL query_cache_size=DEFAULT;
diff --git a/mysql-test/r/type_decimal.result b/mysql-test/r/type_decimal.result
index f8649f030bb..cde8816dee4 100644
--- a/mysql-test/r/type_decimal.result
+++ b/mysql-test/r/type_decimal.result
@@ -994,3 +994,24 @@ GROUP BY t2.col0
WHERE CONCAT(t1.col1, CAST(subq.col0 AS DECIMAL));
1
DROP TABLE t1, t2;
+#
+# Start of 5.5 tests
+#
+#
+# MDEV-8267 Add /*old*/ comment into I_S.COLUMN_TYPE for old DECIMAL
+#
+SHOW CREATE TABLE t1dec102;
+Table Create Table
+t1dec102 CREATE TABLE `t1dec102` (
+ `a` decimal(10,2)/*old*/ DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+SHOW COLUMNS FROM t1dec102;
+Field Type Null Key Default Extra
+a decimal(10,2)/*old*/ YES NULL
+SELECT COLUMN_NAME, DATA_TYPE, COLUMN_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME='t1dec102';
+COLUMN_NAME DATA_TYPE COLUMN_TYPE
+a decimal decimal(10,2)/*old*/
+DROP TABLE t1dec102;
+#
+# End of 5.5 tests
+#
diff --git a/mysql-test/r/update_innodb.result b/mysql-test/r/update_innodb.result
new file mode 100644
index 00000000000..88c86c50625
--- /dev/null
+++ b/mysql-test/r/update_innodb.result
@@ -0,0 +1,31 @@
+CREATE TABLE `t1` (
+`c1` int(11) NOT NULL,
+`c2` datetime DEFAULT NULL,
+PRIMARY KEY (`c1`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+CREATE TABLE `t2` (
+`c0` varchar(10) NOT NULL,
+`c1` int(11) NOT NULL,
+`c2` int(11) NOT NULL,
+PRIMARY KEY (`c0`,`c1`),
+KEY `c1` (`c1`),
+KEY `c2` (`c2`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+CREATE TABLE `t3` (
+`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
+`c1` datetime NOT NULL,
+`c2` bigint(20) NOT NULL,
+`c3` int(4) unsigned NOT NULL,
+PRIMARY KEY (`id`),
+KEY `c2` (`c2`),
+KEY `c3` (`c3`)
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+CREATE TABLE `t4` (
+`c1` int(11) NOT NULL,
+`c2` bigint(20) DEFAULT NULL,
+`c3` int(11) NOT NULL
+) ENGINE=InnoDB DEFAULT CHARSET=latin1;
+CREATE ALGORITHM=UNDEFINED VIEW `v1` AS select `t4`.`c1` AS `c1`,`t4`.`c2` AS `c2`,`t4`.`c3` AS `c3` from `t4`;
+UPDATE t1 a JOIN t2 b ON a.c1 = b.c1 JOIN v1 vw ON b.c2 = vw.c1 JOIN t3 del ON vw.c2 = del.c2 SET a.c2 = ( SELECT max(t.c1) FROM t3 t, v1 i WHERE del.c2 = t.c2 AND vw.c3 = i.c3 AND t.c3 = 4 ) WHERE a.c2 IS NULL OR a.c2 < '2011-05-01';
+drop view v1;
+drop table t1,t2,t3,t4;
diff --git a/mysql-test/r/view.result b/mysql-test/r/view.result
index 083ed9686d4..d534cf4023a 100644
--- a/mysql-test/r/view.result
+++ b/mysql-test/r/view.result
@@ -5409,6 +5409,24 @@ create view v2 as select t2.* from (t2 left join v1 using (id));
update t3 left join v2 using (id) set flag=flag+1;
drop view v2, v1;
drop table t1, t2, t3;
+#
+# MDEV-7207 - ALTER VIEW does not change ALGORITM
+#
+create table t1 (a int, b int);
+create algorithm=temptable view v2 (c) as select b+1 from t1;
+show create view v2;
+View Create View character_set_client collation_connection
+v2 CREATE ALGORITHM=TEMPTABLE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select (`t1`.`b` + 1) AS `c` from `t1` latin1 latin1_swedish_ci
+alter algorithm=undefined view v2 (c) as select b+1 from t1;
+show create view v2;
+View Create View character_set_client collation_connection
+v2 CREATE ALGORITHM=UNDEFINED DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select (`t1`.`b` + 1) AS `c` from `t1` latin1 latin1_swedish_ci
+alter algorithm=merge view v2 (c) as select b+1 from t1;
+show create view v2;
+View Create View character_set_client collation_connection
+v2 CREATE ALGORITHM=MERGE DEFINER=`root`@`localhost` SQL SECURITY DEFINER VIEW `v2` AS select (`t1`.`b` + 1) AS `c` from `t1` latin1 latin1_swedish_ci
+drop view v2;
+drop table t1;
# -----------------------------------------------------------------
# -- End of 5.5 tests.
# -----------------------------------------------------------------