Below is the list of changes that have just been committed into a local
5.0 repository of evgen. When evgen 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
1.1937 05/06/11 06:45:16 evgen@stripped +2 -0
Fix bug #11111 "fetch from view returns wrong data"
Wrong method for creating temporary field was choosen, which results in
sending int field with int header but lonlong data.
Test case is absent because it requires C program to test bug.
sql/item.h
1.136 05/06/11 06:43:27 evgen@stripped +3 -0
Fix bug #11111 "fetch from view returns wrong data"
sql/sql_select.cc
1.331 05/06/11 06:42:57 evgen@stripped +13 -1
Fix bug #11111 "fetch from view returns wrong data"
# 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: evgen
# Host: moonbone.local
# Root: /work/mysql-5.0-bug-11111
--- 1.135/sql/item.h 2005-06-07 14:13:53 +04:00
+++ 1.136/sql/item.h 2005-06-11 06:43:27 +04:00
@@ -1357,6 +1357,9 @@
{ return (*ref)->walk(processor, arg); }
void print(String *str);
void cleanup();
+ inline bool is_field_ref() {
+ return ( ref && *ref && (*ref)->type() == Item::FIELD_ITEM );
+ }
};
--- 1.330/sql/sql_select.cc 2005-06-07 14:13:55 +04:00
+++ 1.331/sql/sql_select.cc 2005-06-11 06:42:57 +04:00
@@ -7964,6 +7964,19 @@
modify_item ? (Item_field*) item : NULL,
convert_blob_length);
}
+ case Item::REF_ITEM:
+ if ( ((Item_ref*)item)->is_field_ref() )
+ {
+ Item_field *field= (Item_field*) *((Item_ref*)item)->ref;
+ Field *new_field= create_tmp_field_from_field(thd,
+ (*from_field= field->field),
+ item->name, table,
+ NULL,
+ convert_blob_length);
+ if (modify_item)
+ item->set_result_field(new_field);
+ return new_field;
+ }
case Item::FUNC_ITEM:
case Item::COND_ITEM:
case Item::FIELD_AVG_ITEM:
@@ -7975,7 +7988,6 @@
case Item::REAL_ITEM:
case Item::DECIMAL_ITEM:
case Item::STRING_ITEM:
- case Item::REF_ITEM:
case Item::NULL_ITEM:
case Item::VARBIN_ITEM:
return create_tmp_field_from_item(thd, item, table, copy_func, modify_item,
| Thread |
|---|
| • bk commit into 5.0 tree (evgen:1.1937) BUG#11111 | eugene | 11 Jun |