From a172e5ad2a9bcc56d2a28b0da09aa155a0c0dfb2 Mon Sep 17 00:00:00 2001 From: "bar@bar.mysql.r18.ru" <> Date: Sat, 4 Jan 2003 14:12:20 +0400 Subject: Some changes to separate charset and collation terms --- strings/ctype-bin.c | 1 + 1 file changed, 1 insertion(+) (limited to 'strings/ctype-bin.c') diff --git a/strings/ctype-bin.c b/strings/ctype-bin.c index 7848862a0db..377e50f3dab 100644 --- a/strings/ctype-bin.c +++ b/strings/ctype-bin.c @@ -260,6 +260,7 @@ static CHARSET_INFO my_charset_bin_st = { 63, /* number */ MY_CS_COMPILED|MY_CS_BINSORT,/* state */ + "binary", /* cs name */ "binary", /* name */ "", /* comment */ ctype_bin, /* ctype */ -- cgit v1.2.1 From 40c61f57638ca856a80cca5fbe3a3c212edfb80a Mon Sep 17 00:00:00 2001 From: "bar@bar.mysql.r18.ru" <> Date: Sun, 5 Jan 2003 16:44:39 +0400 Subject: Many files: PRIMARY flag for built-in charsets --- strings/ctype-bin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'strings/ctype-bin.c') diff --git a/strings/ctype-bin.c b/strings/ctype-bin.c index 377e50f3dab..0d7729721ad 100644 --- a/strings/ctype-bin.c +++ b/strings/ctype-bin.c @@ -259,7 +259,7 @@ static int my_wildcmp_bin(CHARSET_INFO *cs, static CHARSET_INFO my_charset_bin_st = { 63, /* number */ - MY_CS_COMPILED|MY_CS_BINSORT,/* state */ + MY_CS_COMPILED|MY_CS_BINSORT|MY_CS_PRIMARY,/* state */ "binary", /* cs name */ "binary", /* name */ "", /* comment */ -- cgit v1.2.1 From 09eac4793bb627bc7cf6db13ca285200bc39be8e Mon Sep 17 00:00:00 2001 From: "bar@bar.mysql.r18.ru" <> Date: Tue, 14 Jan 2003 18:28:50 +0400 Subject: bin chatset now handles strnncoll itself so we don't have to check if charset is binary anymore --- strings/ctype-bin.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'strings/ctype-bin.c') diff --git a/strings/ctype-bin.c b/strings/ctype-bin.c index 0d7729721ad..e20afff1470 100644 --- a/strings/ctype-bin.c +++ b/strings/ctype-bin.c @@ -47,8 +47,8 @@ static int my_strnncoll_binary(CHARSET_INFO * cs __attribute__((unused)), const uchar *s, uint slen, const uchar *t, uint tlen) { - int len = ( slen > tlen ) ? tlen : slen; - return memcmp(s,t,len); + int cmp= memcmp(s,t,min(slen,tlen)); + return cmp ? cmp : (int) (slen - tlen); } static void my_caseup_str_bin(CHARSET_INFO *cs __attribute__((unused)), -- cgit v1.2.1