summaryrefslogtreecommitdiff
path: root/sql/item_strfunc.h
diff options
context:
space:
mode:
authorunknown <gkodinov/kgeorge@macbook.gmz>2006-07-25 18:42:49 +0300
committerunknown <gkodinov/kgeorge@macbook.gmz>2006-07-25 18:42:49 +0300
commit1b3cdb6085c944e1c371779d4d4b6473ebcd116d (patch)
tree53a892a7220b9a860eccf699b7f47e576276c1d6 /sql/item_strfunc.h
parentbc6fd749b70a138e4c0b9fa2066eb30167a9fc8e (diff)
downloadmariadb-git-1b3cdb6085c944e1c371779d4d4b6473ebcd116d.tar.gz
Bug #21086: server crashes when VIEW defined with a SELECT with COLLATE clause is called
When executing INSERT over a view with calculated columns it was assuming all elements of the fields collection are actually Item_field instances. This may not be true when inserting into a view and that view has columns that are such expressions that allow updating (like setting a collation for example). Corrected to access field information through the filed_for_view_update() function and retrieve correctly the field info even for "update-friendly" non-Item_field items. mysql-test/r/view.result: Bug #21086: server crashes when VIEW defined with a SELECT with COLLATE clause is called - test suite mysql-test/t/view.test: Bug #21086: server crashes when VIEW defined with a SELECT with COLLATE clause is called - test suite sql/item_strfunc.h: Bug #21086: server crashes when VIEW defined with a SELECT with COLLATE clause is called - obvious typo fixed sql/sql_base.cc: Bug #21086: server crashes when VIEW defined with a SELECT with COLLATE clause is called - must access field information through the filed_for_view_update() function to retrieve correctly the field info even for "update-friendly" non-Item_field items.
Diffstat (limited to 'sql/item_strfunc.h')
-rw-r--r--sql/item_strfunc.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h
index a72182abcf7..488dc20b063 100644
--- a/sql/item_strfunc.h
+++ b/sql/item_strfunc.h
@@ -728,7 +728,7 @@ public:
void fix_length_and_dec();
bool eq(const Item *item, bool binary_cmp) const;
const char *func_name() const { return "collate"; }
- enum Functype func_type() const { return COLLATE_FUNC; }
+ enum Functype functype() const { return COLLATE_FUNC; }
void print(String *str);
Item_field *filed_for_view_update()
{