summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <gshchepa/uchum@host.loc>2008-02-13 19:47:39 +0400
committerunknown <gshchepa/uchum@host.loc>2008-02-13 19:47:39 +0400
commitbe891fc6117a78345b7ca888dc23e02438d69f4e (patch)
tree80fcd59437985be1393600f821af3fe2d2afe4ed /sql
parentd83cd2149b1dde23b14d8878abc14bc9b21b89e3 (diff)
parent7a290b55f7691b2518cb1d83da252e07376954f6 (diff)
downloadmariadb-git-be891fc6117a78345b7ca888dc23e02438d69f4e.tar.gz
Merge host.loc:/home/uchum/work/5.0-opt-gca
into host.loc:/home/uchum/work/5.0-opt
Diffstat (limited to 'sql')
-rw-r--r--sql/item_cmpfunc.cc5
-rw-r--r--sql/sql_acl.cc4
2 files changed, 7 insertions, 2 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index 98bcb256138..17345e76bba 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -2995,7 +2995,10 @@ void in_string::set(uint pos,Item *item)
{
if (res->uses_buffer_owned_by(str))
res->copy();
- *str= *res;
+ if (item->type() == Item::FUNC_ITEM)
+ str->copy(*res);
+ else
+ *str= *res;
}
if (!str->charset())
{
diff --git a/sql/sql_acl.cc b/sql/sql_acl.cc
index 134541368e9..851af35da32 100644
--- a/sql/sql_acl.cc
+++ b/sql/sql_acl.cc
@@ -668,7 +668,9 @@ static ulong get_sort(uint count,...)
{
for (; *str ; str++)
{
- if (*str == wild_many || *str == wild_one || *str == wild_prefix)
+ if (*str == wild_prefix && str[1])
+ str++;
+ else if (*str == wild_many || *str == wild_one)
{
wild_pos= (uint) (str - start) + 1;
break;