Commit aa3a93d6 authored by unknown's avatar unknown
Browse files

Merge bk-internal:/home/bk/mysql-5.1-new-maint

into  neptunus.(none):/home/msvensson/mysql/mysql-5.1-new-maint


mysql-test/mysql-test-run.pl:
  Auto merged
mysql-test/r/im_daemon_life_cycle.result:
  Auto merged
mysql-test/t/im_daemon_life_cycle.imtest:
  Auto merged
vio/viosslfactories.c:
  Auto merged
parents e7cd1824 75d86b93
Loading
Loading
Loading
Loading
+459 −241

File changed.

Preview size limit exceeded, changes collapsed.

+755 −0

File changed.

Preview size limit exceeded, changes collapsed.

+189 −0

File changed.

Preview size limit exceeded, changes collapsed.

+13 −7
Original line number Diff line number Diff line
@@ -2330,21 +2330,27 @@ longlong Item_func_locate::val_int()
    return 0; /* purecov: inspected */
  }
  null_value=0;
  uint start=0;
  uint start0=0;
  /* must be longlong to avoid truncation */
  longlong start=  0; 
  longlong start0= 0;
  my_match_t match;

  if (arg_count == 3)
  {
    start0= start =(uint) args[2]->val_int()-1;
    start0= start= args[2]->val_int() - 1;

    if ((start < 0) || (start > a->length()))
      return 0;

    /* start is now sufficiently valid to pass to charpos function */
    start= a->charpos(start);

    if (start > a->length() || start+b->length() > a->length())
    if (start + b->length() > a->length())
      return 0;
  }

  if (!b->length())				// Found empty string at start
    return (longlong) (start+1);
    return start + 1;
  
  if (!cmp_collation.collation->coll->instr(cmp_collation.collation,
                                            a->ptr()+start, a->length()-start,
+139 −48

File changed.

Preview size limit exceeded, changes collapsed.