mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
BUG#21658: Crash when creating table with item in prepared statement that allocates memory in fix_fields
We need to use an arena to indicate we are preparing a statement when loading partition function and parsing it as part of an open table. mysql-test/r/partition.result: Moved test case mysql-test/t/partition.test: Moved test case sql/item.cc: Shouldn't call change_item_tree in prepare statement phase even if arena was already activated sql/sql_partition.cc: We need to use an arena to indicate we are preparing a statement when loading partition function and parsing it as part of an open table. sql/table.cc: We need to use an arena to indicate we are preparing a statement when loading partition function and parsing it as part of an open table.
This commit is contained in:
@ -9,6 +9,15 @@
|
||||
drop table if exists t1;
|
||||
--enable_warnings
|
||||
|
||||
#
|
||||
# Bug#14367: Partitions: crash if utf8 column
|
||||
#
|
||||
create table t1 (s1 char(2) character set utf8)
|
||||
partition by list (case when s1 > 'cz' then 1 else 2 end)
|
||||
(partition p1 values in (1),
|
||||
partition p2 values in (2));
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug 15890: Strange number of partitions accepted
|
||||
#
|
||||
@ -939,15 +948,6 @@ show create table t2;
|
||||
|
||||
drop table t2;
|
||||
|
||||
#
|
||||
# Bug#14367: Partitions: crash if utf8 column
|
||||
#
|
||||
create table t1 (s1 char(2) character set utf8)
|
||||
partition by list (case when s1 > 'cz' then 1 else 2 end)
|
||||
(partition p1 values in (1),
|
||||
partition p2 values in (2));
|
||||
drop table t1;
|
||||
|
||||
#
|
||||
# Bug#15336 Partitions: crash if create table as select
|
||||
#
|
||||
|
Reference in New Issue
Block a user