mirror of
https://github.com/MariaDB/server.git
synced 2025-09-02 09:41:40 +03:00
A number of after-merge fixes following merge of MySQL 5.1.44 into MariaDB.
Bug#46949: memory leak with failed alter table to create partitions based on extract() Bug#51830: Incorrect partition pruning on range partition (regression) Fixed valgrind failure in select_describe(), read of uninitialized Item_subselect::eliminated. PBXT test file updates to reflect changes done in MySQL. mysql-test/suite/pbxt/r/partition_error.result: Result file update following MySQL 5.1.44 changes. mysql-test/suite/pbxt/r/partition_pruning.result: Result file update following MySQL 5.1.44 changes. mysql-test/suite/pbxt/t/partition_error.test: Test file update following MySQL 5.1.44 changes. sql/item_subselect.cc: Fixed valgrind failure in select_describe(), read of uninitialized Item_subselect::eliminated: - it turns out we can call select_describe() without having fixed subquery items for child subselects. These are not the kind of subqueries that we could eliminate, so the fix is to ensure that item_subselect->eliminated==FALSE even before fix_fields is called. Also added code to reset item_subselect->eliminated back to FALSE in Item::reset() call. sql/item_subselect.h: Fixed valgrind failure in select_describe(), read of uninitialized Item_subselect::eliminated: - it turns out we can call select_describe() without having fixed subquery items for child subselects. These are not the kind of subqueries that we could eliminate, so the fix is to ensure that item_subselect->eliminated==FALSE even before fix_fields is called. Also added code to reset item_subselect->eliminated back to FALSE in Item::reset() call. sql/sql_partition.cc: Fix Bug#51830: Revert part of the patch for Bug#49742, which caused the regression. sql/table.cc: Fix Bug#46949: memory leak in failed ALTER TABLE with partitioning.
This commit is contained in:
@@ -107,7 +107,7 @@ primary key(a,b))
|
||||
partition by hash (rand(a))
|
||||
partitions 2
|
||||
(partition x1, partition x2);
|
||||
ERROR 42000: Constant/Random expression in (sub)partitioning function is not allowed near ')
|
||||
ERROR 42000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed near ')
|
||||
partitions 2
|
||||
(partition x1, partition x2)' at line 6
|
||||
CREATE TABLE t1 (
|
||||
@@ -118,7 +118,7 @@ primary key(a,b))
|
||||
partition by range (rand(a))
|
||||
partitions 2
|
||||
(partition x1 values less than (0), partition x2 values less than (2));
|
||||
ERROR 42000: Constant/Random expression in (sub)partitioning function is not allowed near ')
|
||||
ERROR 42000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed near ')
|
||||
partitions 2
|
||||
(partition x1 values less than (0), partition x2 values less than' at line 6
|
||||
CREATE TABLE t1 (
|
||||
@@ -129,7 +129,7 @@ primary key(a,b))
|
||||
partition by list (rand(a))
|
||||
partitions 2
|
||||
(partition x1 values in (1), partition x2 values in (2));
|
||||
ERROR 42000: Constant/Random expression in (sub)partitioning function is not allowed near ')
|
||||
ERROR 42000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed near ')
|
||||
partitions 2
|
||||
(partition x1 values in (1), partition x2 values in (2))' at line 6
|
||||
CREATE TABLE t1 (
|
||||
@@ -244,7 +244,7 @@ c int not null,
|
||||
primary key (a,b))
|
||||
partition by key (a)
|
||||
subpartition by hash (rand(a+b));
|
||||
ERROR 42000: Constant/Random expression in (sub)partitioning function is not allowed near ')' at line 7
|
||||
ERROR 42000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed near ')' at line 7
|
||||
CREATE TABLE t1 (
|
||||
a int not null,
|
||||
b int not null,
|
||||
@@ -341,7 +341,7 @@ partition by range (3+4)
|
||||
partitions 2
|
||||
(partition x1 values less than (4) tablespace ts1,
|
||||
partition x2 values less than (8) tablespace ts2);
|
||||
ERROR HY000: Constant/Random expression in (sub)partitioning function is not allowed
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (
|
||||
a int not null,
|
||||
b int not null,
|
||||
@@ -511,7 +511,7 @@ partition by list (3+4)
|
||||
partitions 2
|
||||
(partition x1 values in (4) tablespace ts1,
|
||||
partition x2 values in (8) tablespace ts2);
|
||||
ERROR HY000: Constant/Random expression in (sub)partitioning function is not allowed
|
||||
ERROR HY000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed
|
||||
CREATE TABLE t1 (
|
||||
a int not null,
|
||||
b int not null,
|
||||
@@ -603,13 +603,13 @@ partition by range (ascii(v))
|
||||
ERROR HY000: This partition function is not allowed
|
||||
create table t1 (a int)
|
||||
partition by hash (rand(a));
|
||||
ERROR 42000: Constant/Random expression in (sub)partitioning function is not allowed near ')' at line 2
|
||||
ERROR 42000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed near ')' at line 2
|
||||
create table t1 (a int)
|
||||
partition by hash(CURTIME() + a);
|
||||
ERROR 42000: Constant/Random expression in (sub)partitioning function is not allowed near ')' at line 2
|
||||
ERROR 42000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed near ')' at line 2
|
||||
create table t1 (a int)
|
||||
partition by hash (NOW()+a);
|
||||
ERROR 42000: Constant/Random expression in (sub)partitioning function is not allowed near ')' at line 2
|
||||
ERROR 42000: Constant, random or timezone-dependent expressions in (sub)partitioning function are not allowed near ')' at line 2
|
||||
create table t1 (a int)
|
||||
partition by hash (extract(hour from convert_tz(a, '+00:00', '+00:00')));
|
||||
ERROR HY000: This partition function is not allowed
|
||||
|
@@ -527,7 +527,7 @@ id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 p0,p4 ALL NULL NULL NULL NULL 910 Using where
|
||||
explain partitions select * from t2 where (a > 100 AND a < 600);
|
||||
id select_type table partitions type possible_keys key key_len ref rows Extra
|
||||
1 SIMPLE t2 p0,p1,p2,p3 ALL NULL NULL NULL NULL 910 Using where
|
||||
1 SIMPLE t2 p0,p1,p2 ALL NULL NULL NULL NULL 910 Using where
|
||||
analyze table t2;
|
||||
Table Op Msg_type Msg_text
|
||||
test.t2 analyze status OK
|
||||
|
Reference in New Issue
Block a user