diff options
author | unknown <sanja@askmonty.org> | 2010-02-01 08:14:12 +0200 |
---|---|---|
committer | unknown <sanja@askmonty.org> | 2010-02-01 08:14:12 +0200 |
commit | e5099a2c85468d01d084b1071f724bc20766271d (patch) | |
tree | 50e180dfcaa058cefb382d2ab931592cddbd007d /sql/item_xmlfunc.cc | |
parent | f83113df07d6ef8e8a6d1db8f6dc3bb90fb0652a (diff) | |
parent | e9bce6c9d4bde35306b845e22e9b5ada69c4512f (diff) | |
download | mariadb-git-e5099a2c85468d01d084b1071f724bc20766271d.tar.gz |
merge 5.1->5.2
Diffstat (limited to 'sql/item_xmlfunc.cc')
-rw-r--r-- | sql/item_xmlfunc.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sql/item_xmlfunc.cc b/sql/item_xmlfunc.cc index 15165a9c435..537965b60cc 100644 --- a/sql/item_xmlfunc.cc +++ b/sql/item_xmlfunc.cc @@ -950,14 +950,16 @@ static Item *create_comparator(MY_XPATH *xpath, in a loop through all of the nodes in the node set. */ - Item *fake= new Item_string("", 0, xpath->cs); + Item_string *fake= new Item_string("", 0, xpath->cs); + /* Don't cache fake because its value will be changed during comparison.*/ + fake->set_used_tables(RAND_TABLE_BIT); Item_nodeset_func *nodeset; Item *scalar, *comp; if (a->type() == Item::XPATH_NODESET) { nodeset= (Item_nodeset_func*) a; scalar= b; - comp= eq_func(oper, fake, scalar); + comp= eq_func(oper, (Item*)fake, scalar); } else { |