summaryrefslogtreecommitdiff
path: root/sql/item.cc
diff options
context:
space:
mode:
authorunknown <knielsen@knielsen-hq.org>2012-03-24 18:21:22 +0100
committerunknown <knielsen@knielsen-hq.org>2012-03-24 18:21:22 +0100
commit335de5db1834d3aeac507f18fcd5143c22150500 (patch)
tree95ac83922a28c81982c9ad89fcaba6c040b5111b /sql/item.cc
parentb34cfe9327f2dcedb6bebfacdc2e757b6285426d (diff)
parentf72e0e686b2f3688fe98685107a293de5012be03 (diff)
downloadmariadb-git-335de5db1834d3aeac507f18fcd5143c22150500.tar.gz
Merge mariadb 5.3->mariadb 5.5
Diffstat (limited to 'sql/item.cc')
-rw-r--r--sql/item.cc25
1 files changed, 14 insertions, 11 deletions
diff --git a/sql/item.cc b/sql/item.cc
index c4bb1a399ab..d5d5aeba970 100644
--- a/sql/item.cc
+++ b/sql/item.cc
@@ -2606,17 +2606,20 @@ void Item_field::fix_after_pullout(st_select_lex *new_parent, Item **ref)
{
if (new_parent == get_depended_from())
depended_from= NULL;
- Name_resolution_context *ctx= new Name_resolution_context();
- ctx->outer_context= NULL; // We don't build a complete name resolver
- ctx->table_list= NULL; // We rely on first_name_resolution_table instead
- ctx->select_lex= new_parent;
- ctx->first_name_resolution_table= context->first_name_resolution_table;
- ctx->last_name_resolution_table= context->last_name_resolution_table;
- ctx->error_processor= context->error_processor;
- ctx->error_processor_data= context->error_processor_data;
- ctx->resolve_in_select_list= context->resolve_in_select_list;
- ctx->security_ctx= context->security_ctx;
- this->context=ctx;
+ if (context)
+ {
+ Name_resolution_context *ctx= new Name_resolution_context();
+ ctx->outer_context= NULL; // We don't build a complete name resolver
+ ctx->table_list= NULL; // We rely on first_name_resolution_table instead
+ ctx->select_lex= new_parent;
+ ctx->first_name_resolution_table= context->first_name_resolution_table;
+ ctx->last_name_resolution_table= context->last_name_resolution_table;
+ ctx->error_processor= context->error_processor;
+ ctx->error_processor_data= context->error_processor_data;
+ ctx->resolve_in_select_list= context->resolve_in_select_list;
+ ctx->security_ctx= context->security_ctx;
+ this->context=ctx;
+ }
}