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
2204effd
Commit
2204effd
authored
Jul 12, 2005
by
bar@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql.com:/usr/home/bar/mysql-4.1
into mysql.com:/usr/home/bar/mysql-5.0
parents
6955f0e7
1042a275
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
42 additions
and
14 deletions
+42
-14
mysql-test/r/ctype_utf8.result
mysql-test/r/ctype_utf8.result
+11
-0
mysql-test/t/ctype_utf8.test
mysql-test/t/ctype_utf8.test
+10
-0
sql/field_conv.cc
sql/field_conv.cc
+20
-13
vio/viossl.c
vio/viossl.c
+1
-1
No files found.
mysql-test/r/ctype_utf8.result
View file @
2204effd
...
...
@@ -939,6 +939,17 @@ content msisdn
ERR Имри.Афимим.Аеимимримдмримрмрирор имримримримр имридм ирбднримрфмририримрфмфмим.Ад.Д имдимримрад.Адимримримрмдиримримримр м.Дадимфшьмримд им.Адимимрн имадми 1234567890
11 g 1234567890
DROP TABLE t1,t2;
create table t1 (a char(20) character set utf8);
insert into t1 values ('123456'),('андрей');
alter table t1 modify a char(2) character set utf8;
Warnings:
Warning 1265 Data truncated for column 'a' at row 1
Warning 1265 Data truncated for column 'a' at row 2
select char_length(a), length(a), a from t1 order by a;
char_length(a) length(a) a
2 2 12
2 4 ан
drop table t1;
CREATE TABLE t1 (
a varchar(255) NOT NULL default '',
KEY a (a)
...
...
mysql-test/t/ctype_utf8.test
View file @
2204effd
...
...
@@ -789,6 +789,16 @@ SELECT content, t2.msisdn FROM t1, t2 WHERE t1.msisdn = '1234567890';
DROP
TABLE
t1
,
t2
;
#
# Bug#11591: CHAR column with utf8 does not work properly
# (more chars than expected)
#
create
table
t1
(
a
char
(
20
)
character
set
utf8
);
insert
into
t1
values
(
'123456'
),(
'андрей'
);
alter
table
t1
modify
a
char
(
2
)
character
set
utf8
;
select
char_length
(
a
),
length
(
a
),
a
from
t1
order
by
a
;
drop
table
t1
;
#
# Bug#9557 MyISAM utf8 table crash
#
...
...
sql/field_conv.cc
View file @
2204effd
...
...
@@ -324,21 +324,28 @@ static void do_field_real(Copy_field *copy)
static
void
do_cut_string
(
Copy_field
*
copy
)
{
// Shorter string field
memcpy
(
copy
->
to_ptr
,
copy
->
from_ptr
,
copy
->
to_length
);
/* Check if we loosed any important characters */
char
*
ptr
,
*
end
;
for
(
ptr
=
copy
->
from_ptr
+
copy
->
to_length
,
end
=
copy
->
from_ptr
+
copy
->
from_length
;
ptr
!=
end
;
ptr
++
)
{
if
(
!
my_isspace
(
system_charset_info
,
*
ptr
))
// QQ: ucs incompatible
int
well_formed_error
;
CHARSET_INFO
*
cs
=
copy
->
from_field
->
charset
();
const
char
*
from_end
=
copy
->
from_ptr
+
copy
->
from_length
;
uint
copy_length
=
cs
->
cset
->
well_formed_len
(
cs
,
copy
->
from_ptr
,
from_end
,
copy
->
to_length
/
cs
->
mbmaxlen
,
&
well_formed_error
);
if
(
copy
->
to_length
<
copy_length
)
copy_length
=
copy
->
to_length
;
memcpy
(
copy
->
to_ptr
,
copy
->
from_ptr
,
copy_length
);
/* Check if we lost any important characters */
if
(
well_formed_error
||
cs
->
cset
->
scan
(
cs
,
copy
->
from_ptr
+
copy_length
,
from_end
,
MY_SEQ_SPACES
)
<
(
copy
->
from_length
-
copy_length
))
{
copy
->
to_field
->
set_warning
(
MYSQL_ERROR
::
WARN_LEVEL_WARN
,
WARN_DATA_TRUNCATED
,
1
);
break
;
}
}
if
(
copy_length
<
copy
->
to_length
)
cs
->
cset
->
fill
(
cs
,
copy
->
to_ptr
+
copy_length
,
copy
->
to_length
-
copy_length
,
' '
);
}
...
...
vio/viossl.c
View file @
2204effd
...
...
@@ -316,7 +316,7 @@ int sslaccept(struct st_VioSSLAcceptorFd* ptr, Vio* vio, long timeout)
vio_blocking
(
vio
,
net_blocking
,
&
unused
);
DBUG_RETURN
(
1
);
}
#ifndef DBU
F
_OFF
#ifndef DBU
G
_OFF
DBUG_PRINT
(
"info"
,(
"SSL_get_cipher_name() = '%s'"
,
SSL_get_cipher_name
((
SSL
*
)
vio
->
ssl_arg
)));
client_cert
=
SSL_get_peer_certificate
((
SSL
*
)
vio
->
ssl_arg
);
...
...
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