Commit ba4e466e authored by unknown's avatar unknown

Case insensitivrly has been added in charset and collation names.

parent a1aeaecc
...@@ -528,6 +528,10 @@ SET NAMES latin1 COLLATE latin1_bin; ...@@ -528,6 +528,10 @@ SET NAMES latin1 COLLATE latin1_bin;
SHOW VARIABLES LIKE 'client_collation'; SHOW VARIABLES LIKE 'client_collation';
Variable_name Value Variable_name Value
client_collation latin1_bin client_collation latin1_bin
SET NAMES LATIN1 COLLATE Latin1_Bin;
SHOW VARIABLES LIKE 'client_collation';
Variable_name Value
client_collation latin1_bin
SET NAMES 'latin1' COLLATE 'latin1_bin'; SET NAMES 'latin1' COLLATE 'latin1_bin';
SHOW VARIABLES LIKE 'client_collation'; SHOW VARIABLES LIKE 'client_collation';
Variable_name Value Variable_name Value
......
...@@ -135,6 +135,8 @@ SHOW VARIABLES LIKE 'client_collation'; ...@@ -135,6 +135,8 @@ SHOW VARIABLES LIKE 'client_collation';
SELECT charset('a'),collation('a'),coercibility('a'),'a'='A'; SELECT charset('a'),collation('a'),coercibility('a'),'a'='A';
SET NAMES latin1 COLLATE latin1_bin; SET NAMES latin1 COLLATE latin1_bin;
SHOW VARIABLES LIKE 'client_collation'; SHOW VARIABLES LIKE 'client_collation';
SET NAMES LATIN1 COLLATE Latin1_Bin;
SHOW VARIABLES LIKE 'client_collation';
SET NAMES 'latin1' COLLATE 'latin1_bin'; SET NAMES 'latin1' COLLATE 'latin1_bin';
SHOW VARIABLES LIKE 'client_collation'; SHOW VARIABLES LIKE 'client_collation';
SELECT charset('a'),collation('a'),coercibility('a'),'a'='A'; SELECT charset('a'),collation('a'),coercibility('a'),'a'='A';
......
...@@ -479,7 +479,7 @@ uint get_charset_number(const char *charset_name) ...@@ -479,7 +479,7 @@ uint get_charset_number(const char *charset_name)
for (cs= all_charsets; cs < all_charsets+255; ++cs) for (cs= all_charsets; cs < all_charsets+255; ++cs)
{ {
if ( cs[0] && cs[0]->name && !strcmp(cs[0]->name, charset_name)) if ( cs[0] && cs[0]->name && !strcasecmp(cs[0]->name, charset_name))
return cs[0]->number; return cs[0]->number;
} }
return 0; /* this mimics find_type() */ return 0; /* this mimics find_type() */
...@@ -593,7 +593,7 @@ CHARSET_INFO *get_charset_by_csname(const char *cs_name, ...@@ -593,7 +593,7 @@ CHARSET_INFO *get_charset_by_csname(const char *cs_name,
for (css= all_charsets; css < all_charsets+255; ++css) for (css= all_charsets; css < all_charsets+255; ++css)
{ {
if ( css[0] && (css[0]->state & cs_flags) && if ( css[0] && (css[0]->state & cs_flags) &&
css[0]->csname && !strcmp(css[0]->csname, cs_name)) css[0]->csname && !strcasecmp(css[0]->csname, cs_name))
{ {
cs= css[0]->number ? get_internal_charset(css[0]->number,flags) : NULL; cs= css[0]->number ? get_internal_charset(css[0]->number,flags) : NULL;
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment