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
47b85939
Commit
47b85939
authored
Feb 18, 2005
by
bar@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug #7878 with utf_general_ci, equals (=) has problem with accent insensitivity
Backporting Monty's fix for 5.0 into 4.1.
parent
8b2fc991
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
35 additions
and
2 deletions
+35
-2
include/my_base.h
include/my_base.h
+1
-0
myisam/mi_rnext_same.c
myisam/mi_rnext_same.c
+6
-2
mysql-test/r/ctype_latin1_de.result
mysql-test/r/ctype_latin1_de.result
+12
-0
mysql-test/t/ctype_latin1_de.test
mysql-test/t/ctype_latin1_de.test
+16
-0
No files found.
include/my_base.h
View file @
47b85939
...
...
@@ -340,6 +340,7 @@ enum ha_base_keytype {
#define HA_STATE_BUFF_SAVED 512
/* If current keybuff is info->buff */
#define HA_STATE_ROW_CHANGED 1024
/* To invalide ROW cache */
#define HA_STATE_EXTEND_BLOCK 2048
#define HA_STATE_RNEXT_SAME 4096
/* rnext_same was called */
enum
en_fieldtype
{
FIELD_LAST
=-
1
,
FIELD_NORMAL
,
FIELD_SKIP_ENDSPACE
,
FIELD_SKIP_PRESPACE
,
...
...
myisam/mi_rnext_same.c
View file @
47b85939
...
...
@@ -57,7 +57,11 @@ int mi_rnext_same(MI_INFO *info, byte *buf)
#endif
case
HA_KEY_ALG_BTREE
:
default:
memcpy
(
info
->
lastkey2
,
info
->
lastkey
,
info
->
last_rkey_length
);
if
(
!
(
info
->
update
&
HA_STATE_RNEXT_SAME
))
{
/* First rnext_same; Store old key */
memcpy
(
info
->
lastkey2
,
info
->
lastkey
,
info
->
last_rkey_length
);
}
for
(;;)
{
if
((
error
=
_mi_search_next
(
info
,
keyinfo
,
info
->
lastkey
,
...
...
@@ -81,7 +85,7 @@ int mi_rnext_same(MI_INFO *info, byte *buf)
rw_unlock
(
&
info
->
s
->
key_root_lock
[
inx
]);
/* Don't clear if database-changed */
info
->
update
&=
(
HA_STATE_CHANGED
|
HA_STATE_ROW_CHANGED
);
info
->
update
|=
HA_STATE_NEXT_FOUND
;
info
->
update
|=
HA_STATE_NEXT_FOUND
|
HA_STATE_RNEXT_SAME
;
if
(
error
)
{
...
...
mysql-test/r/ctype_latin1_de.result
View file @
47b85939
...
...
@@ -326,3 +326,15 @@ latin1_german2_ci 6109
latin1_german2_ci 61
latin1_german2_ci 6120
drop table t1;
SET NAMES latin1;
CREATE TABLE t1 (
col1 varchar(255) NOT NULL default ''
) ENGINE=MyISAM DEFAULT CHARSET=latin1 collate latin1_german2_ci;
INSERT INTO t1 VALUES (''),('ss'),('ss');
ALTER TABLE t1 ADD KEY ifword(col1);
SELECT * FROM t1 WHERE col1='' ORDER BY col1, BINARY col1;
col1
ss
ss
DROP TABLE t1;
mysql-test/t/ctype_latin1_de.test
View file @
47b85939
...
...
@@ -116,3 +116,19 @@ SELECT FIELD('ue',s1), FIELD('
DROP
TABLE
t1
;
--
source
include
/
ctype_filesort
.
inc
#
# Bug#7878 with utf8_general_ci, equals (=) has problem with
# accent insensitivity.
# Although originally this problem was found with UTF8 character set,
# '=' behaved wrong for latin1_german2_ci as well.
# Let's check it does not work incorrect anymore.
#
SET
NAMES
latin1
;
CREATE
TABLE
t1
(
col1
varchar
(
255
)
NOT
NULL
default
''
)
ENGINE
=
MyISAM
DEFAULT
CHARSET
=
latin1
collate
latin1_german2_ci
;
INSERT
INTO
t1
VALUES
(
''
),(
'ss'
),(
'ss'
);
ALTER
TABLE
t1
ADD
KEY
ifword
(
col1
);
SELECT
*
FROM
t1
WHERE
col1
=
''
ORDER
BY
col1
,
BINARY
col1
;
DROP
TABLE
t1
;
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