Below is the list of changes that have just been committed into a local
5.0 repository of kgeorge. When kgeorge does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2006-10-24 15:42:57+03:00, gkodinov@rakia.(none) +5 -0
Merge gkodinov@stripped:/home/bk/mysql-5.0-opt
into rakia.(none):/home/kgeorge/mysql/autopush/B21809-5.0-opt
MERGE: 1.2258.78.1
sql/item.cc@stripped, 2006-10-24 15:42:52+03:00, gkodinov@rakia.(none) +0 -0
Auto merged
MERGE: 1.235.1.1
sql/item_func.cc@stripped, 2006-10-24 15:42:52+03:00, gkodinov@rakia.(none) +0 -0
Auto merged
MERGE: 1.304.2.1
sql/item_func.h@stripped, 2006-10-24 15:42:52+03:00, gkodinov@rakia.(none) +0 -0
Auto merged
MERGE: 1.153.2.1
sql/sql_lex.cc@stripped, 2006-10-24 15:42:52+03:00, gkodinov@rakia.(none) +0 -0
Auto merged
MERGE: 1.201.1.1
sql/sql_lex.h@stripped, 2006-10-24 15:42:52+03:00, gkodinov@rakia.(none) +0 -0
Auto merged
MERGE: 1.228.1.1
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: gkodinov
# Host: rakia.(none)
# Root: /home/kgeorge/mysql/autopush/B21809-5.0-opt/RESYNC
--- 1.236/sql/item.cc 2006-10-24 15:43:03 +03:00
+++ 1.237/sql/item.cc 2006-10-24 15:43:03 +03:00
@@ -1148,6 +1148,28 @@ void Item_name_const::print(String *str)
/*
+ need a special class to adjust printing : references to aggregate functions
+ must not be printed as refs because the aggregate functions that are added to
+ the front of select list are not printed as well.
+*/
+class Item_aggregate_ref : public Item_ref
+{
+public:
+ Item_aggregate_ref(Name_resolution_context *context_arg, Item **item,
+ const char *table_name_arg, const char *field_name_arg)
+ :Item_ref(context_arg, item, table_name_arg, field_name_arg) {}
+
+ void print (String *str)
+ {
+ if (ref)
+ (*ref)->print(str);
+ else
+ Item_ident::print(str);
+ }
+};
+
+
+/*
Move SUM items out from item tree and replace with reference
SYNOPSIS
@@ -1200,8 +1222,8 @@ void Item::split_sum_func2(THD *thd, Ite
Item *new_item, *real_itm= real_item();
ref_pointer_array[el]= real_itm;
- if (!(new_item= new Item_ref(&thd->lex->current_select->context,
- ref_pointer_array + el, 0, name)))
+ if (!(new_item= new Item_aggregate_ref(&thd->lex->current_select->context,
+ ref_pointer_array + el, 0, name)))
return; // fatal_error is set
fields.push_front(real_itm);
thd->change_item_tree(ref, new_item);
--- 1.308/sql/item_func.cc 2006-10-24 15:43:03 +03:00
+++ 1.309/sql/item_func.cc 2006-10-24 15:43:03 +03:00
@@ -2869,6 +2869,20 @@ void Item_udf_func::cleanup()
}
+void Item_udf_func::print(String *str)
+{
+ str->append(func_name());
+ str->append('(');
+ for (uint i=0 ; i < arg_count ; i++)
+ {
+ if (i != 0)
+ str->append(',');
+ args[i]->print_item_w_name(str);
+ }
+ str->append(')');
+}
+
+
double Item_func_udf_float::val_real()
{
DBUG_ASSERT(fixed == 1);
--- 1.155/sql/item_func.h 2006-10-24 15:43:03 +03:00
+++ 1.156/sql/item_func.h 2006-10-24 15:43:03 +03:00
@@ -952,6 +952,7 @@ public:
Item_result result_type () const { return udf.result_type(); }
table_map not_null_tables() const { return 0; }
bool is_expensive() { return 1; }
+ void print(String *str);
};
--- 1.202/sql/sql_lex.cc 2006-10-24 15:43:03 +03:00
+++ 1.203/sql/sql_lex.cc 2006-10-24 15:43:03 +03:00
@@ -163,6 +163,7 @@ void lex_start(THD *thd, uchar *buf,uint
lex->select_lex.ftfunc_list= &lex->select_lex.ftfunc_list_alloc;
lex->select_lex.group_list.empty();
lex->select_lex.order_list.empty();
+ lex->select_lex.udf_list.empty();
lex->current_select= &lex->select_lex;
lex->yacc_yyss=lex->yacc_yyvs=0;
lex->ignore_space=test(thd->variables.sql_mode & MODE_IGNORE_SPACE);
@@ -1166,6 +1167,7 @@ void st_select_lex::init_select()
braces= 0;
when_list.empty();
expr_list.empty();
+ udf_list.empty();
interval_list.empty();
use_index.empty();
ftfunc_list_alloc.empty();
--- 1.229/sql/sql_lex.h 2006-10-24 15:43:03 +03:00
+++ 1.230/sql/sql_lex.h 2006-10-24 15:43:03 +03:00
@@ -581,6 +581,8 @@ public:
/* exclude this select from check of unique_table() */
bool exclude_from_table_unique_test;
+ List<udf_func> udf_list; /* udf function calls stack */
+
void init_query();
void init_select();
st_select_lex_unit* master_unit();
| Thread |
|---|
| • bk commit into 5.0 tree (gkodinov:1.2290) | kgeorge | 24 Oct |