From 027d90bc58c11838d0c25e524a902b4eb7971618 Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 5 Jun 2006 15:15:28 +0400 Subject: 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. --- mysql-test/t/partition_pruning.test | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'mysql-test/t/partition_pruning.test') 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; + -- cgit v1.2.1