summaryrefslogtreecommitdiff
path: root/sql/item_func.cc
diff options
context:
space:
mode:
authorunknown <gluh@gluh.mysql.r18.ru>2004-09-12 10:41:06 +0400
committerunknown <gluh@gluh.mysql.r18.ru>2004-09-12 10:41:06 +0400
commit4e639af733f2af49ff0afa66788c2cb19603531c (patch)
treeacdce807452a6d635dbf2432431d5458d6650a3b /sql/item_func.cc
parenta2a0a61b2016ddeef6fe410fb1af79199f4ccf84 (diff)
parent9ecf15ed749782df0736dd8d355385b75a15c3c2 (diff)
downloadmariadb-git-4e639af733f2af49ff0afa66788c2cb19603531c.tar.gz
Merge sgluhov@bk-internal.mysql.com:/home/bk/mysql-4.1
into gluh.mysql.r18.ru:/home/gluh/MySQL-BUGS/mysql-4.1 sql/item_func.cc: Auto merged
Diffstat (limited to 'sql/item_func.cc')
-rw-r--r--sql/item_func.cc5
1 files changed, 3 insertions, 2 deletions
diff --git a/sql/item_func.cc b/sql/item_func.cc
index 6952effb48f..0bddeed14d6 100644
--- a/sql/item_func.cc
+++ b/sql/item_func.cc
@@ -1455,10 +1455,11 @@ longlong Item_func_find_in_set::val_int()
{
const char *substr_end= str_end + symbol_len;
bool is_last_item= (substr_end == real_end);
- if (wc == (my_wc_t) separator || is_last_item)
+ bool is_separator= (wc == (my_wc_t) separator);
+ if (is_separator || is_last_item)
{
position++;
- if (is_last_item)
+ if (is_last_item && !is_separator)
str_end= substr_end;
if (!my_strnncoll(cs, (const uchar *) str_begin,
str_end - str_begin,