1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

Fix bug when repairing compressed MyISAM files

LOCATE() is now case sensitive


BUILD/compile-alpha-cxx:
  Don't build manager because it fails with linker error on Linux Alpha
Docs/manual.texi:
  Changelog
myisam/mi_check.c:
  Fix bug when repairing compressed MyISAM files
myisam/mi_open.c:
  Fix bug when repairing compressed MyISAM files
myisam/mi_packrec.c:
  Fix bug when repairing compressed MyISAM files
myisam/myisamchk.c:
  Fix bug when repairing compressed MyISAM files
myisam/myisamdef.h:
  Fix bug when repairing compressed MyISAM files
mysql-test/r/func_group.result:
  Fix result for new RND function
mysql-test/r/func_math.result:
  Fix result for new RND function
mysql-test/r/func_str.result:
  test of new locate()
mysql-test/t/func_str.test:
  test of new locate()
sql/item_func.cc:
  LOCATE() is now case sensitive
sql/sql_string.cc:
  LOCATE() is now case sensitive
sql/sql_string.h:
  LOCATE() is now case sensitive
This commit is contained in:
unknown
2001-11-22 13:50:50 +02:00
parent 5975e23649
commit d576cd65d0
14 changed files with 125 additions and 55 deletions

View File

@ -362,6 +362,37 @@ skipp:
return -1;
}
/*
Search after a string without regarding to case
This needs to be replaced when we have character sets per string
*/
int String::strstr_case(const String &s,uint32 offset)
{
if (s.length()+offset <= str_length)
{
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 *end=Ptr+str_length-s.length()+1;
const char *search_end=s.ptr()+s.length();
skipp:
while (str != end)
{
if (my_sort_order[*str++] == my_sort_order[*search])
{
register char *i,*j;
i=(char*) str; j=(char*) search+1;
while (j != search_end)
if (my_sort_order[*i++] != my_sort_order[*j++]) goto skipp;
return (int) (str-Ptr) -1;
}
}
}
return -1;
}
/*
** Search string from end. Offset is offset to the end of string