diff --git a/mysql-test/r/analyze_stmt.result b/mysql-test/r/analyze_stmt.result index 8df6fe5127a..53c3188cd4c 100644 --- a/mysql-test/r/analyze_stmt.result +++ b/mysql-test/r/analyze_stmt.result @@ -251,3 +251,11 @@ analyze select * from t1 into @var; id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra 1 SIMPLE t1 system NULL NULL NULL NULL 1 NULL 100.00 NULL drop table t1; +# +# MDEV-6394: ANALYZE DELETE .. RETURNING fails with ERROR 2027 Malformed packet +# +create table t1 (i int); +analyze delete from t1 returning *; +id select_type table type possible_keys key key_len ref rows r_rows filtered r_filtered Extra +1 SIMPLE t1 ALL NULL NULL NULL NULL 0 0 100.00 100.00 +drop table t1; diff --git a/mysql-test/t/analyze_stmt.test b/mysql-test/t/analyze_stmt.test index 8bd4ce37dd3..214d80d840d 100644 --- a/mysql-test/t/analyze_stmt.test +++ b/mysql-test/t/analyze_stmt.test @@ -198,3 +198,11 @@ create table t1 (i int); insert into t1 values (1); analyze select * from t1 into @var; drop table t1; + +--echo # +--echo # MDEV-6394: ANALYZE DELETE .. RETURNING fails with ERROR 2027 Malformed packet +--echo # +create table t1 (i int); +analyze delete from t1 returning *; +drop table t1; +