summaryrefslogtreecommitdiff
path: root/mysql-test/t/analyse.test
diff options
context:
space:
mode:
authorunknown <evgen@moonbone.local>2005-10-28 23:17:51 +0400
committerunknown <evgen@moonbone.local>2005-10-28 23:17:51 +0400
commit32db1ff5a19f18f875b5b674b3b09dbac181ae76 (patch)
treee4d514921a292b318d9d0cb19dc40a379c6c35f0 /mysql-test/t/analyse.test
parentac8b32f9c07368e4d38a0ecd0564645483ef9295 (diff)
parenta7ed6ce441bd2ecdc7e12d9113b695ed3c1da45f (diff)
downloadmariadb-git-32db1ff5a19f18f875b5b674b3b09dbac181ae76.tar.gz
Manually merged
mysql-test/t/analyse.test: Auto merged sql/sql_select.h: Auto merged
Diffstat (limited to 'mysql-test/t/analyse.test')
-rw-r--r--mysql-test/t/analyse.test25
1 files changed, 25 insertions, 0 deletions
diff --git a/mysql-test/t/analyse.test b/mysql-test/t/analyse.test
index 4060892c389..a248c671c18 100644
--- a/mysql-test/t/analyse.test
+++ b/mysql-test/t/analyse.test
@@ -65,5 +65,30 @@ insert into t1 values (100000);
select * from t1 procedure analyse (1,1);
drop table t1;
+#
+# Bug #14138 ROLLUP and PROCEDURE ANALYSE() hang server
+#
+create table t1 (product varchar(32), country_id int not null, year int,
+ profit int);
+insert into t1 values ( 'Computer', 2,2000, 1200),
+ ( 'TV', 1, 1999, 150),
+ ( 'Calculator', 1, 1999,50),
+ ( 'Computer', 1, 1999,1500),
+ ( 'Computer', 1, 2000,1500),
+ ( 'TV', 1, 2000, 150),
+ ( 'TV', 2, 2000, 100),
+ ( 'TV', 2, 2000, 100),
+ ( 'Calculator', 1, 2000,75),
+ ( 'Calculator', 2, 2000,75),
+ ( 'TV', 1, 1999, 100),
+ ( 'Computer', 1, 1999,1200),
+ ( 'Computer', 2, 2000,1500),
+ ( 'Calculator', 2, 2000,75),
+ ( 'Phone', 3, 2003,10)
+ ;
+create table t2 (country_id int primary key, country char(20) not null);
+insert into t2 values (1, 'USA'),(2,'India'), (3,'Finland');
+select product, sum(profit),avg(profit) from t1 group by product with rollup procedure analyse();
+drop table t1,t2;
# End of 4.1 tests