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
f425af49
Commit
f425af49
authored
Feb 04, 2004
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Client character set is now not set from the server value.
parent
fc7a75b0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
38 deletions
+30
-38
mysql-test/r/ctype_latin1_de.result
mysql-test/r/ctype_latin1_de.result
+2
-0
mysql-test/t/ctype_latin1_de.test
mysql-test/t/ctype_latin1_de.test
+3
-0
sql-common/client.c
sql-common/client.c
+25
-38
No files found.
mysql-test/r/ctype_latin1_de.result
View file @
f425af49
set names latin1;
set @@collation_connection=latin1_german2_ci;
select @@collation_connection;
@@collation_connection
latin1_german2_ci
...
...
mysql-test/t/ctype_latin1_de.test
View file @
f425af49
...
...
@@ -2,6 +2,9 @@
# Test latin_de character set
#
set
names
latin1
;
set
@@
collation_connection
=
latin1_german2_ci
;
select
@@
collation_connection
;
--
disable_warnings
...
...
sql-common/client.c
View file @
f425af49
...
...
@@ -1429,14 +1429,13 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
const
char
*
passwd
,
const
char
*
db
,
uint
port
,
const
char
*
unix_socket
,
ulong
client_flag
)
{
char
buff
[
NAME_LEN
+
USERNAME_LENGTH
+
100
]
,
charset_name_buff
[
16
]
;
char
*
end
,
*
host_info
,
*
charset_name
;
char
buff
[
NAME_LEN
+
USERNAME_LENGTH
+
100
];
char
*
end
,
*
host_info
;
my_socket
sock
;
in_addr_t
ip_addr
;
struct
sockaddr_in
sock_addr
;
ulong
pkt_length
;
NET
*
net
=
&
mysql
->
net
;
uint
charset_number
;
#ifdef MYSQL_SERVER
thr_alarm_t
alarmed
;
ALARM
alarm_buff
;
...
...
@@ -1762,10 +1761,8 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
goto
error
;
}
charset_number
=
mysql
->
server_language
;
/* Set character set */
if
(
(
charset_name
=
mysql
->
options
.
charset_name
)
)
if
(
mysql
->
options
.
charset_name
)
{
const
char
*
save
=
charsets_dir
;
if
(
mysql
->
options
.
charset_dir
)
...
...
@@ -1773,44 +1770,34 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
mysql
->
charset
=
get_charset_by_csname
(
mysql
->
options
.
charset_name
,
MY_CS_PRIMARY
,
MYF
(
MY_WME
));
charset_number
=
mysql
->
charset
?
mysql
->
charset
->
number
:
0
;
charsets_dir
=
save
;
}
else
if
(
mysql
->
server_language
)
{
charset_name
=
charset_name_buff
;
/* Save name in case of errors */
int10_to_str
(
mysql
->
server_language
,
charset_name
,
10
);
if
(
!
(
mysql
->
charset
=
get_charset
((
uint8
)
mysql
->
server_language
,
MYF
(
0
))))
mysql
->
charset
=
default_charset_info
;
/* shouldn't be fatal */
}
else
{
mysql
->
charset
=
default_charset_info
;
charset_number
=
mysql
->
charset
->
number
;
}
if
(
!
mysql
->
charset
)
{
net
->
last_errno
=
CR_CANT_READ_CHARSET
;
strmov
(
net
->
sqlstate
,
unknown_sqlstate
);
if
(
mysql
->
options
.
charset_dir
)
my_snprintf
(
net
->
last_error
,
sizeof
(
net
->
last_error
)
-
1
,
ER
(
net
->
last_errno
),
charset_name
?
charset_name
:
"unknown"
,
mysql
->
options
.
charset_dir
);
else
if
(
!
mysql
->
charset
)
{
char
cs_dir_name
[
FN_REFLEN
];
get_charsets_dir
(
cs_dir_name
);
my_snprintf
(
net
->
last_error
,
sizeof
(
net
->
last_error
)
-
1
,
net
->
last_errno
=
CR_CANT_READ_CHARSET
;
strmov
(
net
->
sqlstate
,
unknown_sqlstate
);
if
(
mysql
->
options
.
charset_dir
)
my_snprintf
(
net
->
last_error
,
sizeof
(
net
->
last_error
)
-
1
,
ER
(
net
->
last_errno
),
mysql
->
options
.
charset_name
,
mysql
->
options
.
charset_dir
);
else
{
char
cs_dir_name
[
FN_REFLEN
];
get_charsets_dir
(
cs_dir_name
);
my_snprintf
(
net
->
last_error
,
sizeof
(
net
->
last_error
)
-
1
,
ER
(
net
->
last_errno
),
charset_name
?
charset_name
:
"unknown"
,
mysql
->
options
.
charset_name
,
cs_dir_name
);
}
goto
error
;
}
goto
error
;
}
else
{
mysql
->
charset
=
default_charset_info
;
}
/* Save connection information */
if
(
!
my_multi_malloc
(
MYF
(
0
),
...
...
@@ -1870,7 +1857,7 @@ CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
/* 4.1 server and 4.1 client has a 32 byte option flag */
int4store
(
buff
,
client_flag
);
int4store
(
buff
+
4
,
net
->
max_packet_size
);
buff
[
8
]
=
(
char
)
charset_
number
;
buff
[
8
]
=
(
char
)
mysql
->
charset
->
number
;
bzero
(
buff
+
9
,
32
-
9
);
end
=
buff
+
32
;
}
...
...
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