1
0
mirror of https://github.com/MariaDB/server.git synced 2026-01-06 05:22:24 +03:00

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]
This commit is contained in:
sergefp@mysql.com
2006-06-05 15:15:28 +04:00
parent 9e425092d6
commit 6c07c9132b
3 changed files with 42 additions and 5 deletions

View File

@@ -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;