summaryrefslogtreecommitdiff
path: root/sql/item_row.cc
diff options
context:
space:
mode:
authorunknown <sanja@askmonty.org>2013-01-25 16:56:57 +0200
committerunknown <sanja@askmonty.org>2013-01-25 16:56:57 +0200
commit298008dc4fbf4c5cc98d86115218bf89611ff7ea (patch)
tree8d75064261148ea25f099d26e4ac65e5f1848b63 /sql/item_row.cc
parentde10e214115ecc89087386ecad8bddee2a1e1608 (diff)
downloadmariadb-git-298008dc4fbf4c5cc98d86115218bf89611ff7ea.tar.gz
The problem was that expression with field after transformation (on the first execution)
reached by fix_fields() (via reference) before row which it belongs to (on the second execution) and fix_field for row did not follow usual protocol for Items with argument (first check that the item fixed then call fix_fields). Item_row::fix_field fixed.
Diffstat (limited to 'sql/item_row.cc')
-rw-r--r--sql/item_row.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/item_row.cc b/sql/item_row.cc
index 72bae6f0900..d9d3e359338 100644
--- a/sql/item_row.cc
+++ b/sql/item_row.cc
@@ -68,7 +68,8 @@ bool Item_row::fix_fields(THD *thd, Item **ref)
Item **arg, **arg_end;
for (arg= items, arg_end= items+arg_count; arg != arg_end ; arg++)
{
- if ((*arg)->fix_fields(thd, arg))
+ if (!(*arg)->fixed &&
+ (*arg)->fix_fields(thd, arg))
return TRUE;
// we can't assign 'item' before, because fix_fields() can change arg
Item *item= *arg;