Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
0f7c02f5
Commit
0f7c02f5
authored
Mar 25, 2003
by
bar@bar.mysql.r18.ru
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SHOW CHARACTER SET now can display comments
Low case letters are used in charset names
parent
a55138fd
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
54 additions
and
6 deletions
+54
-6
mysys/charset.c
mysys/charset.c
+7
-1
sql/share/charsets/Index.xml
sql/share/charsets/Index.xml
+35
-2
sql/share/charsets/macce.xml
sql/share/charsets/macce.xml
+1
-1
sql/share/charsets/macroman.xml
sql/share/charsets/macroman.xml
+1
-1
sql/sql_show.cc
sql/sql_show.cc
+2
-0
strings/ctype.c
strings/ctype.c
+8
-1
No files found.
mysys/charset.c
View file @
0f7c02f5
...
@@ -271,6 +271,9 @@ static void simple_cs_copy_data(CHARSET_INFO *to, CHARSET_INFO *from)
...
@@ -271,6 +271,9 @@ static void simple_cs_copy_data(CHARSET_INFO *to, CHARSET_INFO *from)
if
(
from
->
name
)
if
(
from
->
name
)
to
->
name
=
my_once_strdup
(
from
->
name
,
MYF
(
MY_WME
));
to
->
name
=
my_once_strdup
(
from
->
name
,
MYF
(
MY_WME
));
if
(
from
->
comment
)
to
->
comment
=
my_once_strdup
(
from
->
comment
,
MYF
(
MY_WME
));
if
(
from
->
ctype
)
if
(
from
->
ctype
)
{
{
to
->
ctype
=
(
uchar
*
)
my_once_memdup
((
char
*
)
from
->
ctype
,
to
->
ctype
=
(
uchar
*
)
my_once_memdup
((
char
*
)
from
->
ctype
,
...
@@ -339,7 +342,10 @@ static int add_collation(CHARSET_INFO *cs)
...
@@ -339,7 +342,10 @@ static int add_collation(CHARSET_INFO *cs)
}
}
else
else
{
{
all_charsets
[
cs
->
number
]
->
state
|=
cs
->
state
;
CHARSET_INFO
*
dst
=
all_charsets
[
cs
->
number
];
dst
->
state
|=
cs
->
state
;
if
(
cs
->
comment
)
dst
->
comment
=
my_once_strdup
(
cs
->
comment
,
MYF
(
MY_WME
));
}
}
cs
->
number
=
0
;
cs
->
number
=
0
;
cs
->
primary_number
=
0
;
cs
->
primary_number
=
0
;
...
...
sql/share/charsets/Index.xml
View file @
0f7c02f5
...
@@ -11,6 +11,7 @@ To make maintaining easier please:
...
@@ -11,6 +11,7 @@ To make maintaining easier please:
<charset
name=
"big5"
>
<charset
name=
"big5"
>
<family>
Traditional Chinese
</family>
<family>
Traditional Chinese
</family>
<description>
Big5 Traditional Chinese
</description>
<alias>
big-5
</alias>
<alias>
big-5
</alias>
<alias>
bigfive
</alias>
<alias>
bigfive
</alias>
<alias>
big-five
</alias>
<alias>
big-five
</alias>
...
@@ -24,6 +25,7 @@ To make maintaining easier please:
...
@@ -24,6 +25,7 @@ To make maintaining easier please:
<charset
name=
"latin2"
>
<charset
name=
"latin2"
>
<family>
Central European
</family>
<family>
Central European
</family>
<description>
ISO 8859-2 Central European
</description>
<alias>
csisolatin2
</alias>
<alias>
csisolatin2
</alias>
<alias>
iso-8859-2
</alias>
<alias>
iso-8859-2
</alias>
<alias>
iso-ir-101
</alias>
<alias>
iso-ir-101
</alias>
...
@@ -47,6 +49,7 @@ To make maintaining easier please:
...
@@ -47,6 +49,7 @@ To make maintaining easier please:
<charset
name=
"dec8"
>
<charset
name=
"dec8"
>
<family>
Western
</family>
<family>
Western
</family>
<description>
DEC West European
</description>
<collation
name=
"dec_bin"
id=
"69"
order=
"Binary"
flag=
"binary"
/>
<collation
name=
"dec_bin"
id=
"69"
order=
"Binary"
flag=
"binary"
/>
<collation
name=
"dec8"
id=
"3"
flag=
"primary"
>
<collation
name=
"dec8"
id=
"3"
flag=
"primary"
>
<order>
Dutch
</order>
<order>
Dutch
</order>
...
@@ -62,6 +65,7 @@ To make maintaining easier please:
...
@@ -62,6 +65,7 @@ To make maintaining easier please:
<charset
name=
"pclatin1"
>
<charset
name=
"pclatin1"
>
<family>
Western
</family>
<family>
Western
</family>
<description>
DOS West European
</description>
<alias>
850
</alias>
<alias>
850
</alias>
<alias>
cp850
</alias>
<alias>
cp850
</alias>
<alias>
cspc850multilingual
</alias>
<alias>
cspc850multilingual
</alias>
...
@@ -81,6 +85,7 @@ To make maintaining easier please:
...
@@ -81,6 +85,7 @@ To make maintaining easier please:
<charset
name=
"latin1"
>
<charset
name=
"latin1"
>
<family>
Western
</family>
<family>
Western
</family>
<description>
ISO 8859-1 West European
</description>
<alias>
csisolatin1
</alias>
<alias>
csisolatin1
</alias>
<alias>
iso-8859-1
</alias>
<alias>
iso-8859-1
</alias>
<alias>
iso-ir-100
</alias>
<alias>
iso-ir-100
</alias>
...
@@ -117,6 +122,7 @@ To make maintaining easier please:
...
@@ -117,6 +122,7 @@ To make maintaining easier please:
<charset
name=
"hp8"
>
<charset
name=
"hp8"
>
<family>
Western
</family>
<family>
Western
</family>
<description>
HP West European
</description>
<alias>
hproman8
</alias>
<alias>
hproman8
</alias>
<collation
name=
"hp8_bin"
id=
"72"
order=
"Binary"
flag=
"binary"
/>
<collation
name=
"hp8_bin"
id=
"72"
order=
"Binary"
flag=
"binary"
/>
<collation
name=
"hp8"
id=
"6"
flag=
"primary"
>
<collation
name=
"hp8"
id=
"6"
flag=
"primary"
>
...
@@ -133,6 +139,7 @@ To make maintaining easier please:
...
@@ -133,6 +139,7 @@ To make maintaining easier please:
<charset
name=
"koi8r"
>
<charset
name=
"koi8r"
>
<family>
Cyrillic
</family>
<family>
Cyrillic
</family>
<description>
KOI8-R Relcom Russian
</description>
<alias>
koi8-r
</alias>
<alias>
koi8-r
</alias>
<alias>
cskoi8r
</alias>
<alias>
cskoi8r
</alias>
<collation
name=
"koi8r"
id=
"7"
order=
"Russian"
flag=
"primary"
/>
<collation
name=
"koi8r"
id=
"7"
order=
"Russian"
flag=
"primary"
/>
...
@@ -141,6 +148,7 @@ To make maintaining easier please:
...
@@ -141,6 +148,7 @@ To make maintaining easier please:
<charset
name=
"swe7"
>
<charset
name=
"swe7"
>
<family>
Western
</family>
<family>
Western
</family>
<description>
7bit Swedish
</description>
<alias>
iso-646-se
</alias>
<alias>
iso-646-se
</alias>
<collation
name=
"swe7"
id=
"10"
order=
"Swedish"
flag=
"primary"
/>
<collation
name=
"swe7"
id=
"10"
order=
"Swedish"
flag=
"primary"
/>
<collation
name=
"swe7_bin"
id=
"82"
order=
"Binary"
flag=
"binary"
/>
<collation
name=
"swe7_bin"
id=
"82"
order=
"Binary"
flag=
"binary"
/>
...
@@ -148,6 +156,7 @@ To make maintaining easier please:
...
@@ -148,6 +156,7 @@ To make maintaining easier please:
<charset
name=
"ascii"
>
<charset
name=
"ascii"
>
<family>
Western
</family>
<family>
Western
</family>
<description>
US ASCII
</description>
<alias>
us
</alias>
<alias>
us
</alias>
<alias>
us-ascii
</alias>
<alias>
us-ascii
</alias>
<alias>
csascii
</alias>
<alias>
csascii
</alias>
...
@@ -159,12 +168,14 @@ To make maintaining easier please:
...
@@ -159,12 +168,14 @@ To make maintaining easier please:
<charset
name=
"ujis"
>
<charset
name=
"ujis"
>
<family>
Japanese
</family>
<family>
Japanese
</family>
<description>
EUC-JP Japanese
</description>
<alias>
euc-jp
</alias>
<alias>
euc-jp
</alias>
<collation
name=
"ujis"
id=
"12"
order=
"Japanese"
flag=
"primary"
/>
<collation
name=
"ujis"
id=
"12"
order=
"Japanese"
flag=
"primary"
/>
</charset>
</charset>
<charset
name=
"sjis"
>
<charset
name=
"sjis"
>
<family>
Japanese
</family>
<family>
Japanese
</family>
<description>
Shift-JIS Japanese
</description>
<alias>
s-jis
</alias>
<alias>
s-jis
</alias>
<alias>
shift-jis
</alias>
<alias>
shift-jis
</alias>
<alias>
x-sjis
</alias>
<alias>
x-sjis
</alias>
...
@@ -173,6 +184,7 @@ To make maintaining easier please:
...
@@ -173,6 +184,7 @@ To make maintaining easier please:
<charset
name=
"cp1251"
>
<charset
name=
"cp1251"
>
<family>
Cyrillic
</family>
<family>
Cyrillic
</family>
<description>
Windows Cyrillic
</description>
<alias>
windows-1251
</alias>
<alias>
windows-1251
</alias>
<alias>
ms-cyr
</alias>
<alias>
ms-cyr
</alias>
<alias>
ms-cyrillic
</alias>
<alias>
ms-cyrillic
</alias>
...
@@ -209,6 +221,7 @@ To make maintaining easier please:
...
@@ -209,6 +221,7 @@ To make maintaining easier please:
<charset
name=
"hebrew"
>
<charset
name=
"hebrew"
>
<family>
Hebrew
</family>
<family>
Hebrew
</family>
<description>
ISO 8859-8 Hebrew
</description>
<alias>
csisolatinhebrew
</alias>
<alias>
csisolatinhebrew
</alias>
<alias>
iso-8859-8
</alias>
<alias>
iso-8859-8
</alias>
<alias>
iso-ir-138
</alias>
<alias>
iso-ir-138
</alias>
...
@@ -218,6 +231,7 @@ To make maintaining easier please:
...
@@ -218,6 +231,7 @@ To make maintaining easier please:
<charset
name=
"tis620"
>
<charset
name=
"tis620"
>
<family>
Thai
</family>
<family>
Thai
</family>
<description>
TIS620 Thai
</description>
<alias>
tis-620
</alias>
<alias>
tis-620
</alias>
<collation
name=
"tis620"
id=
"18"
order=
"Thai"
>
<collation
name=
"tis620"
id=
"18"
order=
"Thai"
>
<flag>
primary
</flag>
<flag>
primary
</flag>
...
@@ -227,6 +241,7 @@ To make maintaining easier please:
...
@@ -227,6 +241,7 @@ To make maintaining easier please:
<charset
name=
"euckr"
>
<charset
name=
"euckr"
>
<family>
Korean
</family>
<family>
Korean
</family>
<description>
EUC-KR Korean
</description>
<alias>
euc_kr
</alias>
<alias>
euc_kr
</alias>
<alias>
euc-kr
</alias>
<alias>
euc-kr
</alias>
<collation
name=
"euckr"
id=
"19"
order=
"Korean"
>
<collation
name=
"euckr"
id=
"19"
order=
"Korean"
>
...
@@ -237,6 +252,7 @@ To make maintaining easier please:
...
@@ -237,6 +252,7 @@ To make maintaining easier please:
<charset
name=
"latin7"
>
<charset
name=
"latin7"
>
<family>
Baltic
</family>
<family>
Baltic
</family>
<description>
ISO 8859-13 Baltic
</description>
<alias>
BalticRim
</alias>
<alias>
BalticRim
</alias>
<alias>
iso-8859-13
</alias>
<alias>
iso-8859-13
</alias>
<alias>
l7
</alias>
<alias>
l7
</alias>
...
@@ -257,6 +273,7 @@ To make maintaining easier please:
...
@@ -257,6 +273,7 @@ To make maintaining easier please:
<charset
name=
"koi8u"
>
<charset
name=
"koi8u"
>
<family>
Cyrillic
</family>
<family>
Cyrillic
</family>
<description>
KOI8-U Ukrainian
</description>
<alias>
koi8-u
</alias>
<alias>
koi8-u
</alias>
<collation
name=
"koi8u"
id=
"22"
order=
"Ukranian"
flag=
"primary"
/>
<collation
name=
"koi8u"
id=
"22"
order=
"Ukranian"
flag=
"primary"
/>
<collation
name=
"koi8u_bin"
id=
"75"
order=
"Binary"
flag=
"binary"
/>
<collation
name=
"koi8u_bin"
id=
"75"
order=
"Binary"
flag=
"binary"
/>
...
@@ -264,6 +281,7 @@ To make maintaining easier please:
...
@@ -264,6 +281,7 @@ To make maintaining easier please:
<charset
name=
"gb2312"
>
<charset
name=
"gb2312"
>
<family>
Simplified Chinese
</family>
<family>
Simplified Chinese
</family>
<description>
GB2312 Simplified Chinese
</description>
<alias>
chinese
</alias>
<alias>
chinese
</alias>
<alias>
iso-ir-58
</alias>
<alias>
iso-ir-58
</alias>
<collation
name=
"gb2312"
id=
"24"
order=
"Chinese"
>
<collation
name=
"gb2312"
id=
"24"
order=
"Chinese"
>
...
@@ -274,6 +292,7 @@ To make maintaining easier please:
...
@@ -274,6 +292,7 @@ To make maintaining easier please:
<charset
name=
"greek"
>
<charset
name=
"greek"
>
<family>
Greek
</family>
<family>
Greek
</family>
<description>
ISO 8859-7 Greek
</description>
<alias>
csisolatingreek
</alias>
<alias>
csisolatingreek
</alias>
<alias>
ecma-118
</alias>
<alias>
ecma-118
</alias>
<alias>
greek8
</alias>
<alias>
greek8
</alias>
...
@@ -285,6 +304,7 @@ To make maintaining easier please:
...
@@ -285,6 +304,7 @@ To make maintaining easier please:
<charset
name=
"cp1250"
>
<charset
name=
"cp1250"
>
<family>
Central European
</family>
<family>
Central European
</family>
<description>
Windows Central European
</description>
<alias>
ms-ce
</alias>
<alias>
ms-ce
</alias>
<alias>
windows-1250
</alias>
<alias>
windows-1250
</alias>
<collation
name=
"cp1250"
id=
"26"
flag=
"primary"
>
<collation
name=
"cp1250"
id=
"26"
flag=
"primary"
>
...
@@ -302,6 +322,7 @@ To make maintaining easier please:
...
@@ -302,6 +322,7 @@ To make maintaining easier please:
<charset
name=
"gbk"
>
<charset
name=
"gbk"
>
<family>
East Asian
</family>
<family>
East Asian
</family>
<description>
GBK Simplified Chinese
</description>
<alias>
cp936
</alias>
<alias>
cp936
</alias>
<collation
name=
"gbk"
id=
"28"
order=
"Chinese"
>
<collation
name=
"gbk"
id=
"28"
order=
"Chinese"
>
<flag>
primary
</flag>
<flag>
primary
</flag>
...
@@ -311,6 +332,7 @@ To make maintaining easier please:
...
@@ -311,6 +332,7 @@ To make maintaining easier please:
<charset
name=
"cp1257"
>
<charset
name=
"cp1257"
>
<family>
Baltic
</family>
<family>
Baltic
</family>
<description>
Windows Baltic
</description>
<alias>
WinBaltRim
</alias>
<alias>
WinBaltRim
</alias>
<alias>
windows-1257
</alias>
<alias>
windows-1257
</alias>
<collation
name=
"cp1257"
id=
"29"
order=
"Depreciated"
/>
<collation
name=
"cp1257"
id=
"29"
order=
"Depreciated"
/>
...
@@ -331,6 +353,7 @@ To make maintaining easier please:
...
@@ -331,6 +353,7 @@ To make maintaining easier please:
<charset
name=
"latin5"
>
<charset
name=
"latin5"
>
<family>
South Asian
</family>
<family>
South Asian
</family>
<description>
ISO 8859-9 Turkish
</description>
<alias>
csisolatin5
</alias>
<alias>
csisolatin5
</alias>
<alias>
iso-8859-9
</alias>
<alias>
iso-8859-9
</alias>
<alias>
iso-ir-148
</alias>
<alias>
iso-ir-148
</alias>
...
@@ -343,6 +366,7 @@ To make maintaining easier please:
...
@@ -343,6 +366,7 @@ To make maintaining easier please:
<charset
name=
"armscii8"
>
<charset
name=
"armscii8"
>
<family>
South Asian
</family>
<family>
South Asian
</family>
<description>
ARMSCII-8 Armenian
</description>
<alias>
armscii-8
</alias>
<alias>
armscii-8
</alias>
<collation
name=
"armscii8"
id=
"32"
order=
"Armenian"
flag=
"primary"
/>
<collation
name=
"armscii8"
id=
"32"
order=
"Armenian"
flag=
"primary"
/>
<collation
name=
"armscii_bin"
id=
"64"
order=
"Binary"
flag=
"binary"
/>
<collation
name=
"armscii_bin"
id=
"64"
order=
"Binary"
flag=
"binary"
/>
...
@@ -350,17 +374,20 @@ To make maintaining easier please:
...
@@ -350,17 +374,20 @@ To make maintaining easier please:
<charset
name=
"utf8"
>
<charset
name=
"utf8"
>
<family>
Unicode
</family>
<family>
Unicode
</family>
<description>
UTF-8 Unicode
</description>
<alias>
utf-8
</alias>
<alias>
utf-8
</alias>
<collation
name=
"utf8"
id=
"33"
flag=
"primary"
/>
<collation
name=
"utf8"
id=
"33"
flag=
"primary"
/>
</charset>
</charset>
<charset
name=
"ucs2"
>
<charset
name=
"ucs2"
>
<family>
Unicode
</family>
<family>
Unicode
</family>
<description>
UCS-2 Unicode
</description>
<collation
name=
"ucs2"
id=
"35"
flag=
"primary"
/>
<collation
name=
"ucs2"
id=
"35"
flag=
"primary"
/>
</charset>
</charset>
<charset
name=
"cp866"
>
<charset
name=
"cp866"
>
<family>
Cyrillic
</family>
<family>
Cyrillic
</family>
<description>
DOS Russian
</description>
<alias>
866
</alias>
<alias>
866
</alias>
<alias>
csibm866
</alias>
<alias>
csibm866
</alias>
<alias>
ibm866
</alias>
<alias>
ibm866
</alias>
...
@@ -371,12 +398,14 @@ To make maintaining easier please:
...
@@ -371,12 +398,14 @@ To make maintaining easier please:
<charset
name=
"keybcs2"
>
<charset
name=
"keybcs2"
>
<family>
Central European
</family>
<family>
Central European
</family>
<description>
DOS Kamenicky Czech-Slovak
</description>
<collation
name=
"keybcs2"
id=
"37"
order=
"Czech"
flag=
"primary"
/>
<collation
name=
"keybcs2"
id=
"37"
order=
"Czech"
flag=
"primary"
/>
<collation
name=
"keybcs2_bin"
id=
"73"
order=
"Binary"
flag=
"binary"
/>
<collation
name=
"keybcs2_bin"
id=
"73"
order=
"Binary"
flag=
"binary"
/>
</charset>
</charset>
<charset
name=
"
MacCE
"
>
<charset
name=
"
macce
"
>
<family>
Central European
</family>
<family>
Central European
</family>
<description>
Mac Central European
</description>
<alias>
MacCentralEurope
</alias>
<alias>
MacCentralEurope
</alias>
<collation
name=
"macce"
id=
"38"
flag=
"primary"
>
<collation
name=
"macce"
id=
"38"
flag=
"primary"
>
<order>
Hungarian
</order>
<order>
Hungarian
</order>
...
@@ -417,8 +446,9 @@ To make maintaining easier please:
...
@@ -417,8 +446,9 @@ To make maintaining easier please:
</collation>
</collation>
</charset>
</charset>
<charset
name=
"
MacR
oman"
>
<charset
name=
"
macr
oman"
>
<family>
Western
</family>
<family>
Western
</family>
<description>
Mac West European
</description>
<alias>
Mac
</alias>
<alias>
Mac
</alias>
<alias>
Macintosh
</alias>
<alias>
Macintosh
</alias>
<alias>
csmacintosh
</alias>
<alias>
csmacintosh
</alias>
...
@@ -467,6 +497,7 @@ To make maintaining easier please:
...
@@ -467,6 +497,7 @@ To make maintaining easier please:
<charset
name=
"pclatin2"
>
<charset
name=
"pclatin2"
>
<family>
Central European
</family>
<family>
Central European
</family>
<description>
DOS Central European
</description>
<alias>
852
</alias>
<alias>
852
</alias>
<alias>
cp852
</alias>
<alias>
cp852
</alias>
<alias>
ibm852
</alias>
<alias>
ibm852
</alias>
...
@@ -484,6 +515,7 @@ To make maintaining easier please:
...
@@ -484,6 +515,7 @@ To make maintaining easier please:
<charset
name=
"cp1256"
>
<charset
name=
"cp1256"
>
<family>
Arabic
</family>
<family>
Arabic
</family>
<description>
Windows Arabic
</description>
<alias>
ms-arab
</alias>
<alias>
ms-arab
</alias>
<alias>
windows-1256
</alias>
<alias>
windows-1256
</alias>
<collation
name=
"cp1256_bin"
id=
"67"
order=
"Binary"
flag=
"binary"
/>
<collation
name=
"cp1256_bin"
id=
"67"
order=
"Binary"
flag=
"binary"
/>
...
@@ -496,6 +528,7 @@ To make maintaining easier please:
...
@@ -496,6 +528,7 @@ To make maintaining easier please:
</charset>
</charset>
<charset
name=
"binary"
>
<charset
name=
"binary"
>
<description>
Binary pseudo charset
</description>
<collation
name=
"binary"
id=
"63"
order=
"Binary"
>
<collation
name=
"binary"
id=
"63"
order=
"Binary"
>
<flag>
primary
</flag>
<flag>
primary
</flag>
<flag>
compiled
</flag>
<flag>
compiled
</flag>
...
...
sql/share/charsets/
MacCE
.xml
→
sql/share/charsets/
macce
.xml
View file @
0f7c02f5
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<charsets>
<charsets>
<charset
name=
"
MacCE
"
>
<charset
name=
"
macce
"
>
<ctype>
<ctype>
<map>
<map>
...
...
sql/share/charsets/
MacR
oman.xml
→
sql/share/charsets/
macr
oman.xml
View file @
0f7c02f5
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<charsets>
<charsets>
<charset
name=
"
MacR
oman"
>
<charset
name=
"
macr
oman"
>
<ctype>
<ctype>
<map>
<map>
...
...
sql/sql_show.cc
View file @
0f7c02f5
...
@@ -1474,6 +1474,7 @@ static bool write_charset(Protocol *protocol, CHARSET_INFO *cs)
...
@@ -1474,6 +1474,7 @@ static bool write_charset(Protocol *protocol, CHARSET_INFO *cs)
{
{
protocol
->
prepare_for_resend
();
protocol
->
prepare_for_resend
();
protocol
->
store
(
cs
->
csname
,
system_charset_info
);
protocol
->
store
(
cs
->
csname
,
system_charset_info
);
protocol
->
store
(
cs
->
comment
?
cs
->
comment
:
""
,
system_charset_info
);
protocol
->
store
(
cs
->
name
,
system_charset_info
);
protocol
->
store
(
cs
->
name
,
system_charset_info
);
protocol
->
store_short
((
longlong
)
cs
->
mbmaxlen
);
protocol
->
store_short
((
longlong
)
cs
->
mbmaxlen
);
return
protocol
->
write
();
return
protocol
->
write
();
...
@@ -1491,6 +1492,7 @@ int mysqld_show_charsets(THD *thd, const char *wild)
...
@@ -1491,6 +1492,7 @@ int mysqld_show_charsets(THD *thd, const char *wild)
DBUG_ENTER
(
"mysqld_show_charsets"
);
DBUG_ENTER
(
"mysqld_show_charsets"
);
field_list
.
push_back
(
new
Item_empty_string
(
"Charset"
,
30
));
field_list
.
push_back
(
new
Item_empty_string
(
"Charset"
,
30
));
field_list
.
push_back
(
new
Item_empty_string
(
"Description"
,
60
));
field_list
.
push_back
(
new
Item_empty_string
(
"Default collation"
,
60
));
field_list
.
push_back
(
new
Item_empty_string
(
"Default collation"
,
60
));
field_list
.
push_back
(
new
Item_return_int
(
"Maxlen"
,
3
,
FIELD_TYPE_SHORT
));
field_list
.
push_back
(
new
Item_return_int
(
"Maxlen"
,
3
,
FIELD_TYPE_SHORT
));
...
...
strings/ctype.c
View file @
0f7c02f5
...
@@ -54,6 +54,7 @@ struct my_cs_file_section_st
...
@@ -54,6 +54,7 @@ struct my_cs_file_section_st
#define _CS_CTYPEMAP 14
#define _CS_CTYPEMAP 14
#define _CS_PRIMARY_ID 15
#define _CS_PRIMARY_ID 15
#define _CS_BINARY_ID 16
#define _CS_BINARY_ID 16
#define _CS_CSDESCRIPT 17
static
struct
my_cs_file_section_st
sec
[]
=
static
struct
my_cs_file_section_st
sec
[]
=
{
{
...
@@ -62,12 +63,12 @@ static struct my_cs_file_section_st sec[] =
...
@@ -62,12 +63,12 @@ static struct my_cs_file_section_st sec[] =
{
_CS_MISC
,
"xml.encoding"
},
{
_CS_MISC
,
"xml.encoding"
},
{
_CS_MISC
,
"charsets"
},
{
_CS_MISC
,
"charsets"
},
{
_CS_MISC
,
"charsets.max-id"
},
{
_CS_MISC
,
"charsets.max-id"
},
{
_CS_MISC
,
"charsets.description"
},
{
_CS_CHARSET
,
"charsets.charset"
},
{
_CS_CHARSET
,
"charsets.charset"
},
{
_CS_PRIMARY_ID
,
"charsets.charset.primary-id"
},
{
_CS_PRIMARY_ID
,
"charsets.charset.primary-id"
},
{
_CS_BINARY_ID
,
"charsets.charset.binary-id"
},
{
_CS_BINARY_ID
,
"charsets.charset.binary-id"
},
{
_CS_CSNAME
,
"charsets.charset.name"
},
{
_CS_CSNAME
,
"charsets.charset.name"
},
{
_CS_FAMILY
,
"charsets.charset.family"
},
{
_CS_FAMILY
,
"charsets.charset.family"
},
{
_CS_CSDESCRIPT
,
"charsets.charset.description"
},
{
_CS_MISC
,
"charsets.charset.alias"
},
{
_CS_MISC
,
"charsets.charset.alias"
},
{
_CS_MISC
,
"charsets.charset.ctype"
},
{
_CS_MISC
,
"charsets.charset.ctype"
},
{
_CS_CTYPEMAP
,
"charsets.charset.ctype.map"
},
{
_CS_CTYPEMAP
,
"charsets.charset.ctype.map"
},
...
@@ -97,6 +98,8 @@ static struct my_cs_file_section_st * cs_file_sec(const char *attr, uint len)
...
@@ -97,6 +98,8 @@ static struct my_cs_file_section_st * cs_file_sec(const char *attr, uint len)
return
NULL
;
return
NULL
;
}
}
#define MY_CS_CSDESCR_SIZE 64
typedef
struct
my_cs_file_info
typedef
struct
my_cs_file_info
{
{
char
csname
[
MY_CS_NAME_SIZE
];
char
csname
[
MY_CS_NAME_SIZE
];
...
@@ -106,6 +109,7 @@ typedef struct my_cs_file_info
...
@@ -106,6 +109,7 @@ typedef struct my_cs_file_info
uchar
to_upper
[
MY_CS_TO_UPPER_TABLE_SIZE
];
uchar
to_upper
[
MY_CS_TO_UPPER_TABLE_SIZE
];
uchar
sort_order
[
MY_CS_SORT_ORDER_TABLE_SIZE
];
uchar
sort_order
[
MY_CS_SORT_ORDER_TABLE_SIZE
];
uint16
tab_to_uni
[
MY_CS_TO_UNI_TABLE_SIZE
];
uint16
tab_to_uni
[
MY_CS_TO_UNI_TABLE_SIZE
];
char
comment
[
MY_CS_CSDESCR_SIZE
];
CHARSET_INFO
cs
;
CHARSET_INFO
cs
;
int
(
*
add_collation
)(
CHARSET_INFO
*
cs
);
int
(
*
add_collation
)(
CHARSET_INFO
*
cs
);
}
MY_CHARSET_LOADER
;
}
MY_CHARSET_LOADER
;
...
@@ -208,6 +212,9 @@ static int cs_value(MY_XML_PARSER *st,const char *attr, uint len)
...
@@ -208,6 +212,9 @@ static int cs_value(MY_XML_PARSER *st,const char *attr, uint len)
case
_CS_CSNAME
:
case
_CS_CSNAME
:
i
->
cs
.
csname
=
mstr
(
i
->
csname
,
attr
,
len
,
MY_CS_NAME_SIZE
-
1
);
i
->
cs
.
csname
=
mstr
(
i
->
csname
,
attr
,
len
,
MY_CS_NAME_SIZE
-
1
);
break
;
break
;
case
_CS_CSDESCRIPT
:
i
->
cs
.
comment
=
mstr
(
i
->
comment
,
attr
,
len
,
MY_CS_CSDESCR_SIZE
-
1
);
break
;
case
_CS_FLAG
:
case
_CS_FLAG
:
if
(
!
strncmp
(
"primary"
,
attr
,
len
))
if
(
!
strncmp
(
"primary"
,
attr
,
len
))
i
->
cs
.
state
|=
MY_CS_PRIMARY
;
i
->
cs
.
state
|=
MY_CS_PRIMARY
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment