List:Commits« Previous MessageNext Message »
From:Georgi Kodinov Date:June 16 2009 10:00am
Subject:bzr commit into mysql-5.1-bugteam branch (joro:2949) Bug#44821
View as plain text  
#At file:///Users/kgeorge/mysql/work/fix-5.1-bugteam/ based on revid:kristofer.pettersson@stripped

 2949 Georgi Kodinov	2009-06-16
      Addendum to the fix for bug #44821: move partition dependent test 
      to a test file that guarantees the presence of partition code

    modified:
      mysql-test/r/group_min_max.result
      mysql-test/r/partition.result
      mysql-test/t/group_min_max.test
      mysql-test/t/partition.test
=== modified file 'mysql-test/r/group_min_max.result'
--- a/mysql-test/r/group_min_max.result	2009-06-16 08:34:32 +0000
+++ b/mysql-test/r/group_min_max.result	2009-06-16 09:59:57 +0000
@@ -2502,61 +2502,3 @@ a	MAX(b)
 2	1
 DROP TABLE t;
 End of 5.0 tests
-CREATE TABLE t1 ( a INT, b INT, c INT, KEY bc(b, c) )
-PARTITION BY KEY (a, b) PARTITIONS 3
-;
-INSERT INTO t1 VALUES
-(17, 1, -8),
-(3,  1, -7),
-(23, 1, -6),
-(22, 1, -5),
-(11, 1, -4),
-(21, 1, -3),
-(19, 1, -2),
-(30, 1, -1),
-(20, 1, 1),
-(16, 1, 2),
-(18, 1, 3),
-(9,  1, 4),
-(15, 1, 5),
-(28, 1, 6),
-(29, 1, 7),
-(25, 1, 8),
-(10, 1, 9),
-(13, 1, 10),
-(27, 1, 11),
-(24, 1, 12),
-(12, 1, 13),
-(26, 1, 14),
-(14, 1, 15)
-;
-SELECT b, c FROM t1 WHERE b = 1 GROUP BY b, c;
-b	c
-1	-8
-1	-7
-1	-6
-1	-5
-1	-4
-1	-3
-1	-2
-1	-1
-1	1
-1	2
-1	3
-1	4
-1	5
-1	6
-1	7
-1	8
-1	9
-1	10
-1	11
-1	12
-1	13
-1	14
-1	15
-EXPLAIN
-SELECT b, c FROM t1 WHERE b = 1 GROUP BY b, c;
-id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
-1	SIMPLE	t1	range	bc	bc	10	NULL	7	Using where; Using index for group-by
-DROP TABLE t1;

=== modified file 'mysql-test/r/partition.result'
--- a/mysql-test/r/partition.result	2009-04-01 05:34:59 +0000
+++ b/mysql-test/r/partition.result	2009-06-16 09:59:57 +0000
@@ -1924,5 +1924,63 @@ EXPLAIN PARTITIONS SELECT * FROM t1 WHER
 id	select_type	table	partitions	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	p2,p3	ALL	NULL	NULL	NULL	NULL	3	Using where
 DROP TABLE t1;
+CREATE TABLE t1 ( a INT, b INT, c INT, KEY bc(b, c) )
+PARTITION BY KEY (a, b) PARTITIONS 3
+;
+INSERT INTO t1 VALUES
+(17, 1, -8),
+(3,  1, -7),
+(23, 1, -6),
+(22, 1, -5),
+(11, 1, -4),
+(21, 1, -3),
+(19, 1, -2),
+(30, 1, -1),
+(20, 1, 1),
+(16, 1, 2),
+(18, 1, 3),
+(9,  1, 4),
+(15, 1, 5),
+(28, 1, 6),
+(29, 1, 7),
+(25, 1, 8),
+(10, 1, 9),
+(13, 1, 10),
+(27, 1, 11),
+(24, 1, 12),
+(12, 1, 13),
+(26, 1, 14),
+(14, 1, 15)
+;
+SELECT b, c FROM t1 WHERE b = 1 GROUP BY b, c;
+b	c
+1	-8
+1	-7
+1	-6
+1	-5
+1	-4
+1	-3
+1	-2
+1	-1
+1	1
+1	2
+1	3
+1	4
+1	5
+1	6
+1	7
+1	8
+1	9
+1	10
+1	11
+1	12
+1	13
+1	14
+1	15
+EXPLAIN
+SELECT b, c FROM t1 WHERE b = 1 GROUP BY b, c;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
+1	SIMPLE	t1	range	bc	bc	10	NULL	7	Using where; Using index for group-by
+DROP TABLE t1;
 End of 5.1 tests
 SET @@global.general_log= @old_general_log;

=== modified file 'mysql-test/t/group_min_max.test'
--- a/mysql-test/t/group_min_max.test	2009-06-16 08:34:32 +0000
+++ b/mysql-test/t/group_min_max.test	2009-06-16 09:59:57 +0000
@@ -1018,43 +1018,3 @@ DROP TABLE t;
 
 
 --echo End of 5.0 tests
-#
-# Bug#44821: select distinct on partitioned table returns wrong results
-#
-CREATE TABLE t1 ( a INT, b INT, c INT, KEY bc(b, c) )
-PARTITION BY KEY (a, b) PARTITIONS 3
-;
-
-INSERT INTO t1 VALUES
-(17, 1, -8),
-(3,  1, -7),
-(23, 1, -6),
-(22, 1, -5),
-(11, 1, -4),
-(21, 1, -3),
-(19, 1, -2),
-(30, 1, -1),
-
-(20, 1, 1),
-(16, 1, 2),
-(18, 1, 3),
-(9,  1, 4),
-(15, 1, 5),
-(28, 1, 6),
-(29, 1, 7),
-(25, 1, 8),
-(10, 1, 9),
-(13, 1, 10),
-(27, 1, 11),
-(24, 1, 12),
-(12, 1, 13),
-(26, 1, 14),
-(14, 1, 15)
-;
-
-SELECT b, c FROM t1 WHERE b = 1 GROUP BY b, c;
-
-EXPLAIN
-SELECT b, c FROM t1 WHERE b = 1 GROUP BY b, c;
-
-DROP TABLE t1;

=== modified file 'mysql-test/t/partition.test'
--- a/mysql-test/t/partition.test	2009-04-01 05:34:59 +0000
+++ b/mysql-test/t/partition.test	2009-06-16 09:59:57 +0000
@@ -1935,7 +1935,47 @@ INSERT INTO t1 VALUES (10), (100), (200)
 EXPLAIN PARTITIONS SELECT * FROM t1 WHERE a>=200;
 DROP TABLE t1;
 
---echo End of 5.1 tests
+#
+# Bug#44821: select distinct on partitioned table returns wrong results
+#
+CREATE TABLE t1 ( a INT, b INT, c INT, KEY bc(b, c) )
+PARTITION BY KEY (a, b) PARTITIONS 3
+;
+
+INSERT INTO t1 VALUES
+(17, 1, -8),
+(3,  1, -7),
+(23, 1, -6),
+(22, 1, -5),
+(11, 1, -4),
+(21, 1, -3),
+(19, 1, -2),
+(30, 1, -1),
+
+(20, 1, 1),
+(16, 1, 2),
+(18, 1, 3),
+(9,  1, 4),
+(15, 1, 5),
+(28, 1, 6),
+(29, 1, 7),
+(25, 1, 8),
+(10, 1, 9),
+(13, 1, 10),
+(27, 1, 11),
+(24, 1, 12),
+(12, 1, 13),
+(26, 1, 14),
+(14, 1, 15)
+;
+
+SELECT b, c FROM t1 WHERE b = 1 GROUP BY b, c;
 
+EXPLAIN
+SELECT b, c FROM t1 WHERE b = 1 GROUP BY b, c;
+
+DROP TABLE t1;
+
+--echo End of 5.1 tests
 
 SET @@global.general_log= @old_general_log;


Attachment: [text/bzr-bundle] bzr/joro@sun.com-20090616095957-x865jcqrqmne7wlu.bundle
Thread
bzr commit into mysql-5.1-bugteam branch (joro:2949) Bug#44821Georgi Kodinov16 Jun