diff options
| author | Sergei Golubchik <serg@mariadb.org> | 2015-10-08 22:54:24 +0200 |
|---|---|---|
| committer | Sergei Golubchik <serg@mariadb.org> | 2015-10-08 22:54:24 +0200 |
| commit | 82e9f6d948132b71abd57d8413f97f0cc2208d82 (patch) | |
| tree | 3ab146f819af46d42d93be133cea16b66ff5df7f /sql/partition_info.cc | |
| parent | c8d511293aae155210089b6de4143d11569af18d (diff) | |
| parent | b9768521bdeb1a8069c7b871f4536792b65fd79b (diff) | |
| download | mariadb-git-82e9f6d948132b71abd57d8413f97f0cc2208d82.tar.gz | |
Merge remote-tracking branch 'mysql/5.5' into 5.5
Diffstat (limited to 'sql/partition_info.cc')
| -rw-r--r-- | sql/partition_info.cc | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/sql/partition_info.cc b/sql/partition_info.cc index 1bfa8864cb9..d8b901701cb 100644 --- a/sql/partition_info.cc +++ b/sql/partition_info.cc @@ -1,4 +1,5 @@ -/* Copyright (c) 2006, 2013, Oracle and/or its affiliates. +/* Copyright (c) 2006, 2015, Oracle and/or its affiliates. + Copyright (c) 2010, 2015, MariaDB This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -1109,15 +1110,22 @@ bool partition_info::check_partition_info(THD *thd, handlerton **eng_type, { int err= 0; + /* Check for partition expression. */ if (!list_of_part_fields) { DBUG_ASSERT(part_expr); err= part_expr->walk(&Item::check_partition_func_processor, 0, NULL); - if (!err && is_sub_partitioned() && !list_of_subpart_fields) - err= subpart_expr->walk(&Item::check_partition_func_processor, 0, - NULL); } + + /* Check for sub partition expression. */ + if (!err && is_sub_partitioned() && !list_of_subpart_fields) + { + DBUG_ASSERT(subpart_expr); + err= subpart_expr->walk(&Item::check_partition_func_processor, 0, + NULL); + } + if (err) { my_error(ER_PARTITION_FUNCTION_IS_NOT_ALLOWED, MYF(0)); |
