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
6daa27b1
Commit
6daa27b1
authored
Jan 24, 2008
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge stella.local:/home2/mydev/mysql-5.0-amain
into stella.local:/home2/mydev/mysql-5.0-axmrg
parents
f80b593d
8f7c42de
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
1 deletion
+33
-1
myisam/mi_open.c
myisam/mi_open.c
+10
-1
mysql-test/r/ctype_ucs2_def.result
mysql-test/r/ctype_ucs2_def.result
+10
-0
mysql-test/t/ctype_ucs2_def.test
mysql-test/t/ctype_ucs2_def.test
+13
-0
No files found.
myisam/mi_open.c
View file @
6daa27b1
...
@@ -791,8 +791,17 @@ static void setup_key_functions(register MI_KEYDEF *keyinfo)
...
@@ -791,8 +791,17 @@ static void setup_key_functions(register MI_KEYDEF *keyinfo)
keyinfo
->
get_key
=
_mi_get_pack_key
;
keyinfo
->
get_key
=
_mi_get_pack_key
;
if
(
keyinfo
->
seg
[
0
].
flag
&
HA_PACK_KEY
)
if
(
keyinfo
->
seg
[
0
].
flag
&
HA_PACK_KEY
)
{
/* Prefix compression */
{
/* Prefix compression */
/*
_mi_prefix_search() compares end-space against ASCII blank (' ').
It cannot be used for character sets, that do not encode the
blank character like ASCII does. UCS2 is an example. All
character sets with a fixed width > 1 or a mimimum width > 1
cannot represent blank like ASCII does. In these cases we have
to use _mi_seq_search() for the search.
*/
if
(
!
keyinfo
->
seg
->
charset
||
use_strnxfrm
(
keyinfo
->
seg
->
charset
)
||
if
(
!
keyinfo
->
seg
->
charset
||
use_strnxfrm
(
keyinfo
->
seg
->
charset
)
||
(
keyinfo
->
seg
->
flag
&
HA_NULL_PART
))
(
keyinfo
->
seg
->
flag
&
HA_NULL_PART
)
||
(
keyinfo
->
seg
->
charset
->
mbminlen
>
1
))
keyinfo
->
bin_search
=
_mi_seq_search
;
keyinfo
->
bin_search
=
_mi_seq_search
;
else
else
keyinfo
->
bin_search
=
_mi_prefix_search
;
keyinfo
->
bin_search
=
_mi_prefix_search
;
...
...
mysql-test/r/ctype_ucs2_def.result
View file @
6daa27b1
...
@@ -21,4 +21,14 @@ INSERT INTO t1 VALUES('A', 'A'), ('B', 'B'), ('C', 'C');
...
@@ -21,4 +21,14 @@ INSERT INTO t1 VALUES('A', 'A'), ('B', 'B'), ('C', 'C');
INSERT INTO t1 VALUES('A ', 'A ');
INSERT INTO t1 VALUES('A ', 'A ');
ERROR 23000: Duplicate entry '' for key 1
ERROR 23000: Duplicate entry '' for key 1
DROP TABLE t1;
DROP TABLE t1;
CREATE TABLE t1 (
c1 CHAR(255) CHARACTER SET UCS2 COLLATE UCS2_BIN NOT NULL,
KEY(c1)
) ENGINE=MyISAM;
INSERT INTO t1 VALUES ('marshall\'s');
INSERT INTO t1 VALUES ('marsh');
CHECK TABLE t1 EXTENDED;
Table Op Msg_type Msg_text
test.t1 check status OK
DROP TABLE t1;
End of 5.0 tests
End of 5.0 tests
mysql-test/t/ctype_ucs2_def.test
View file @
6daa27b1
...
@@ -39,4 +39,17 @@ INSERT INTO t1 VALUES('A', 'A'), ('B', 'B'), ('C', 'C');
...
@@ -39,4 +39,17 @@ INSERT INTO t1 VALUES('A', 'A'), ('B', 'B'), ('C', 'C');
INSERT
INTO
t1
VALUES
(
'A '
,
'A '
);
INSERT
INTO
t1
VALUES
(
'A '
,
'A '
);
DROP
TABLE
t1
;
DROP
TABLE
t1
;
#
# Bug#32705 - myisam corruption: Key in wrong position
# at page 1024 with ucs2_bin
#
CREATE
TABLE
t1
(
c1
CHAR
(
255
)
CHARACTER
SET
UCS2
COLLATE
UCS2_BIN
NOT
NULL
,
KEY
(
c1
)
)
ENGINE
=
MyISAM
;
INSERT
INTO
t1
VALUES
(
'marshall\'s'
);
INSERT
INTO
t1
VALUES
(
'marsh'
);
CHECK
TABLE
t1
EXTENDED
;
DROP
TABLE
t1
;
--
echo
End
of
5.0
tests
--
echo
End
of
5.0
tests
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