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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
a8844cb2
Commit
a8844cb2
authored
Jul 07, 2006
by
bar@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/usr/home/bar/mysql-4.1.b7192
into mysql.com:/usr/home/bar/mysql-5.0-kt
parents
8b57568a
d1c24548
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
2 deletions
+31
-2
sql-common/client.c
sql-common/client.c
+31
-2
No files found.
sql-common/client.c
View file @
a8844cb2
...
...
@@ -1673,11 +1673,18 @@ C_MODE_START
int
mysql_init_character_set
(
MYSQL
*
mysql
)
{
NET
*
net
=
&
mysql
->
net
;
const
char
*
default_collation_name
;
/* Set character set */
if
(
!
mysql
->
options
.
charset_name
&&
!
(
mysql
->
options
.
charset_name
=
if
(
!
mysql
->
options
.
charset_name
)
{
default_collation_name
=
MYSQL_DEFAULT_COLLATION_NAME
;
if
(
!
(
mysql
->
options
.
charset_name
=
my_strdup
(
MYSQL_DEFAULT_CHARSET_NAME
,
MYF
(
MY_WME
))))
return
1
;
}
else
default_collation_name
=
NULL
;
{
const
char
*
save
=
charsets_dir
;
...
...
@@ -1685,6 +1692,28 @@ int mysql_init_character_set(MYSQL *mysql)
charsets_dir
=
mysql
->
options
.
charset_dir
;
mysql
->
charset
=
get_charset_by_csname
(
mysql
->
options
.
charset_name
,
MY_CS_PRIMARY
,
MYF
(
MY_WME
));
if
(
mysql
->
charset
&&
default_collation_name
)
{
CHARSET_INFO
*
collation
;
if
((
collation
=
get_charset_by_name
(
default_collation_name
,
MYF
(
MY_WME
))))
{
if
(
!
my_charset_same
(
mysql
->
charset
,
collation
))
{
my_printf_error
(
ER_UNKNOWN_ERROR
,
"COLLATION %s is not valid for CHARACTER SET %s"
,
MYF
(
0
),
default_collation_name
,
mysql
->
options
.
charset_name
);
mysql
->
charset
=
NULL
;
}
else
{
mysql
->
charset
=
collation
;
}
}
else
mysql
->
charset
=
NULL
;
}
charsets_dir
=
save
;
}
...
...
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