summaryrefslogtreecommitdiff
path: root/mysql-test/t/partition_pruning.test
diff options
context:
space:
mode:
authorunknown <sergefp@mysql.com>2006-06-05 15:15:28 +0400
committerunknown <sergefp@mysql.com>2006-06-05 15:15:28 +0400
commit027d90bc58c11838d0c25e524a902b4eb7971618 (patch)
tree4fb56353b4cef320a5e86f34d75267bafa9e2e0e /mysql-test/t/partition_pruning.test
parent6ccab8d4deabce37b7a975f56dd1232a2ecb99e6 (diff)
downloadmariadb-git-027d90bc58c11838d0c25e524a902b4eb7971618.tar.gz
BUG#19684: Garbage in 'partitions' column in EXPLAIN output:
In select_describe(), make the String object that holds the value of "partitions" column to "own" the value buffer, so the buffer isn't prematurely freed. [this is the second attempt with review fixes] mysql-test/r/partition_pruning.result: BUG#19684: Testcase mysql-test/t/partition_pruning.test: BUG#19684: Testcase sql/sql_select.cc: BUG#19684: Garbage in 'partitions' column in EXPLAIN output: - Added comment - Make the String object that holds the value of "partitions" column to "own" the value buffer, so the buffer isn't prematurely freed.
Diffstat (limited to 'mysql-test/t/partition_pruning.test')
-rw-r--r--mysql-test/t/partition_pruning.test16
1 files changed, 16 insertions, 0 deletions
diff --git a/mysql-test/t/partition_pruning.test b/mysql-test/t/partition_pruning.test
index 3e9a59d1069..976466e1578 100644
--- a/mysql-test/t/partition_pruning.test
+++ b/mysql-test/t/partition_pruning.test
@@ -574,3 +574,19 @@ insert into t1 values ('aa'),('bb'),('0');
explain partitions select * from t1 where s1 = 0 or s1 is null;
drop table t1;
+#
+# BUG#19684: EXPLAIN PARTITIONS produces garbage in 'partitions' column when
+# the length of string to be displayed exceeds some limit.
+create table t2 (a int, b int)
+ partition by LIST(a)
+ subpartition by HASH(b) subpartitions 40
+( partition p_0_long_partition_name values in(1),
+ partition p_1_long_partition_name values in(2));
+
+insert into t2 values (1,1),(2,2);
+
+--vertical_results
+explain partitions select * from t2;
+--horizontal_results
+drop table t2;
+