summaryrefslogtreecommitdiff
path: root/unittest/strings/strings-t.c
diff options
context:
space:
mode:
Diffstat (limited to 'unittest/strings/strings-t.c')
-rw-r--r--unittest/strings/strings-t.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/unittest/strings/strings-t.c b/unittest/strings/strings-t.c
index fb526477234..768f0ba6b65 100644
--- a/unittest/strings/strings-t.c
+++ b/unittest/strings/strings-t.c
@@ -1,4 +1,5 @@
/* Copyright (c) 2010, Oracle and/or its affiliates
+ Copyright (c) 2009, 2020, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -28,8 +29,8 @@ test_like_range_for_charset(CHARSET_INFO *cs, const char *src, size_t src_len)
size_t min_len, max_len, min_well_formed_len, max_well_formed_len;
int error= 0;
- cs->coll->like_range(cs, src, src_len, '\\', '_', '%',
- sizeof(min_str), min_str, max_str, &min_len, &max_len);
+ my_ci_like_range(cs, src, src_len, '\\', '_', '%',
+ sizeof(min_str), min_str, max_str, &min_len, &max_len);
diag("min_len=%d\tmax_len=%d\t%s", (int) min_len, (int) max_len, cs->name);
min_well_formed_len= my_well_formed_length(cs,
min_str, min_str + min_len,
@@ -626,8 +627,8 @@ strcollsp(CHARSET_INFO *cs, const STRNNCOLL_PARAM *param)
for (p= param; p->a; p++)
{
char ahex[64], bhex[64];
- int res= cs->coll->strnncollsp(cs, (uchar *) p->a, p->alen,
- (uchar *) p->b, p->blen);
+ int res= my_ci_strnncollsp(cs, (const uchar *) p->a, p->alen,
+ (const uchar *) p->b, p->blen);
str2hex(ahex, sizeof(ahex), p->a, p->alen);
str2hex(bhex, sizeof(bhex), p->b, p->blen);
diag("%-20s %-10s %-10s %10d %10d%s",
@@ -640,8 +641,8 @@ strcollsp(CHARSET_INFO *cs, const STRNNCOLL_PARAM *param)
else
{
/* Test in reverse order */
- res= cs->coll->strnncollsp(cs, (uchar *) p->b, p->blen,
- (uchar *) p->a, p->alen);
+ res= my_ci_strnncollsp(cs, (const uchar *) p->b, p->blen,
+ (const uchar *) p->a, p->alen);
if (!eqres(res, -p->res))
{
diag("Comparison in reverse order failed. Expected %d, got %d",
@@ -776,9 +777,9 @@ int main()
}
ok(failed == 0, "Testing my_like_range_xxx() functions");
- diag("Testing cs->coll->strnncollsp()");
+ diag("my_ci_strnncollsp()");
failed= test_strcollsp();
- ok(failed == 0, "Testing cs->coll->strnncollsp()");
+ ok(failed == 0, "Testing my_ci_strnncollsp()");
return exit_status();
}