summaryrefslogtreecommitdiff
path: root/mysql-test/t/analyze_stmt.test
diff options
context:
space:
mode:
authorVicențiu Ciorbaru <cvicentiu@gmail.com>2015-05-18 01:35:47 +0000
committerVicentiu Ciorbaru <vicentiu@mariadb.org>2015-05-19 11:57:47 +0000
commit29c7aff76784ff2b8329387f69c73e7282f28b2a (patch)
treef29eb6b81c99b9624e507cf39368d4d2dbf51cdd /mysql-test/t/analyze_stmt.test
parent20c23048c1d2f28942f2f99e4150a58b6545c0cd (diff)
downloadmariadb-git-29c7aff76784ff2b8329387f69c73e7282f28b2a.tar.gz
MDEV-8063: Unconditional ANALYZE DELETE does not delete rows
When detecting a statement that can make use of ha_delete_all_rows(), we refrained from running the statement when being presented with the analyze or explain prefix.
Diffstat (limited to 'mysql-test/t/analyze_stmt.test')
-rw-r--r--mysql-test/t/analyze_stmt.test15
1 files changed, 15 insertions, 0 deletions
diff --git a/mysql-test/t/analyze_stmt.test b/mysql-test/t/analyze_stmt.test
index 0355b4e4e0f..d02139fe0c8 100644
--- a/mysql-test/t/analyze_stmt.test
+++ b/mysql-test/t/analyze_stmt.test
@@ -258,3 +258,18 @@ insert into t2 values (0),(1);
analyze select * from t1 straight_join t2 force index(a) where t2.a=t1.a;
drop table t1,t2;
+
+--echo #
+--echo # MDEV-8063: Unconditional ANALYZE DELETE does not delete rows
+--echo #
+
+create table t1 (i int);
+insert into t1 values (1),(2);
+analyze delete from t1;
+select * from t1;
+
+insert into t1 values (1),(2);
+explain delete from t1;
+select * from t1;
+
+drop table t1;