1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

Merge 10.2 into 10.3

This commit is contained in:
Marko Mäkelä
2018-04-24 20:59:57 +03:00
101 changed files with 705 additions and 257 deletions

View File

@ -667,8 +667,8 @@ int String::strstr(const String &s,uint32 offset)
if (!s.length())
return ((int) offset); // Empty string is always found
register const char *str = Ptr+offset;
register const char *search=s.ptr();
const char *str = Ptr+offset;
const char *search=s.ptr();
const char *end=Ptr+str_length-s.length()+1;
const char *search_end=s.ptr()+s.length();
skip:
@ -676,7 +676,7 @@ skip:
{
if (*str++ == *search)
{
register char *i,*j;
char *i,*j;
i=(char*) str; j=(char*) search+1;
while (j != search_end)
if (*i++ != *j++) goto skip;
@ -697,8 +697,8 @@ int String::strrstr(const String &s,uint32 offset)
{
if (!s.length())
return offset; // Empty string is always found
register const char *str = Ptr+offset-1;
register const char *search=s.ptr()+s.length()-1;
const char *str = Ptr+offset-1;
const char *search=s.ptr()+s.length()-1;
const char *end=Ptr+s.length()-2;
const char *search_end=s.ptr()-1;
@ -707,7 +707,7 @@ skip:
{
if (*str-- == *search)
{
register char *i,*j;
char *i,*j;
i=(char*) str; j=(char*) search-1;
while (j != search_end)
if (*i-- != *j--) goto skip;