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
0ea1dd85
Commit
0ea1dd85
authored
Feb 29, 2004
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug#3011 - multi-byte charset in fulltext
parent
25de454d
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
5 deletions
+9
-5
myisam/ft_nlq_search.c
myisam/ft_nlq_search.c
+5
-5
mysql-test/r/fulltext.result
mysql-test/r/fulltext.result
+3
-0
mysql-test/t/fulltext.test
mysql-test/t/fulltext.test
+1
-0
No files found.
myisam/ft_nlq_search.c
View file @
0ea1dd85
...
@@ -64,8 +64,8 @@ static int FT_SUPERDOC_cmp(void* cmp_arg __attribute__((unused)),
...
@@ -64,8 +64,8 @@ static int FT_SUPERDOC_cmp(void* cmp_arg __attribute__((unused)),
static
int
walk_and_match
(
FT_WORD
*
word
,
uint32
count
,
ALL_IN_ONE
*
aio
)
static
int
walk_and_match
(
FT_WORD
*
word
,
uint32
count
,
ALL_IN_ONE
*
aio
)
{
{
int
subkeys
;
int
subkeys
,
r
;
uint
keylen
,
r
,
doc_cnt
;
uint
keylen
,
doc_cnt
;
FT_SUPERDOC
sdoc
,
*
sptr
;
FT_SUPERDOC
sdoc
,
*
sptr
;
TREE_ELEMENT
*
selem
;
TREE_ELEMENT
*
selem
;
double
gweight
=
1
;
double
gweight
=
1
;
...
@@ -73,7 +73,7 @@ static int walk_and_match(FT_WORD *word, uint32 count, ALL_IN_ONE *aio)
...
@@ -73,7 +73,7 @@ static int walk_and_match(FT_WORD *word, uint32 count, ALL_IN_ONE *aio)
uchar
*
keybuff
=
aio
->
keybuff
;
uchar
*
keybuff
=
aio
->
keybuff
;
MI_KEYDEF
*
keyinfo
=
info
->
s
->
keyinfo
+
aio
->
keynr
;
MI_KEYDEF
*
keyinfo
=
info
->
s
->
keyinfo
+
aio
->
keynr
;
my_off_t
key_root
=
info
->
s
->
state
.
key_root
[
aio
->
keynr
];
my_off_t
key_root
=
info
->
s
->
state
.
key_root
[
aio
->
keynr
];
uint
extra
=
HA_FT_WLEN
+
info
->
s
->
base
.
rec_reflength
+
1
;
uint
extra
=
HA_FT_WLEN
+
info
->
s
->
base
.
rec_reflength
;
#if HA_FT_WTYPE == HA_KEYTYPE_FLOAT
#if HA_FT_WTYPE == HA_KEYTYPE_FLOAT
float
tmp_weight
;
float
tmp_weight
;
#else
#else
...
@@ -96,10 +96,10 @@ static int walk_and_match(FT_WORD *word, uint32 count, ALL_IN_ONE *aio)
...
@@ -96,10 +96,10 @@ static int walk_and_match(FT_WORD *word, uint32 count, ALL_IN_ONE *aio)
if
(
keylen
&&
if
(
keylen
&&
mi_compare_text
(
aio
->
charset
,
info
->
lastkey
+
1
,
mi_compare_text
(
aio
->
charset
,
info
->
lastkey
+
1
,
info
->
lastkey_length
-
extra
,
keybuff
+
1
,
keylen
-
1
,
0
))
info
->
lastkey_length
-
extra
-
1
,
keybuff
+
1
,
keylen
-
1
,
0
))
break
;
break
;
subkeys
=
ft_sintXkorr
(
info
->
lastkey
+
keylen
);
subkeys
=
ft_sintXkorr
(
info
->
lastkey
+
info
->
lastkey_length
-
extra
);
if
(
subkeys
<
0
)
if
(
subkeys
<
0
)
{
{
if
(
doc_cnt
)
if
(
doc_cnt
)
...
...
mysql-test/r/fulltext.result
View file @
0ea1dd85
...
@@ -346,6 +346,9 @@ t collation(t)
...
@@ -346,6 +346,9 @@ t collation(t)
aus Osnabrck utf8_general_ci
aus Osnabrck utf8_general_ci
SELECT t, collation(t) FROM t1 WHERE MATCH t AGAINST ('Osnabrueck');
SELECT t, collation(t) FROM t1 WHERE MATCH t AGAINST ('Osnabrueck');
t collation(t)
t collation(t)
SELECT t, collation(t),MATCH t AGAINST ('Osnabruck') FROM t1 WHERE MATCH t AGAINST ('Osnabruck');
t collation(t) MATCH t AGAINST ('Osnabruck')
aus Osnabrck utf8_general_ci 1.591139793396
alter table t1 modify t varchar(200) collate latin1_german2_ci not null;
alter table t1 modify t varchar(200) collate latin1_german2_ci not null;
SELECT t, collation(t) FROM t1 WHERE MATCH t AGAINST ('Osnabrck');
SELECT t, collation(t) FROM t1 WHERE MATCH t AGAINST ('Osnabrck');
t collation(t)
t collation(t)
...
...
mysql-test/t/fulltext.test
View file @
0ea1dd85
...
@@ -268,6 +268,7 @@ SELECT t, collation(t) FROM t1 WHERE MATCH t AGAINST ('Osnabr
...
@@ -268,6 +268,7 @@ SELECT t, collation(t) FROM t1 WHERE MATCH t AGAINST ('Osnabr
SET
NAMES
latin1
;
SET
NAMES
latin1
;
SELECT
t
,
collation
(
t
)
FROM
t1
WHERE
MATCH
t
AGAINST
(
'Osnabrck'
);
SELECT
t
,
collation
(
t
)
FROM
t1
WHERE
MATCH
t
AGAINST
(
'Osnabrck'
);
SELECT
t
,
collation
(
t
)
FROM
t1
WHERE
MATCH
t
AGAINST
(
'Osnabrueck'
);
SELECT
t
,
collation
(
t
)
FROM
t1
WHERE
MATCH
t
AGAINST
(
'Osnabrueck'
);
SELECT
t
,
collation
(
t
),
MATCH
t
AGAINST
(
'Osnabruck'
)
FROM
t1
WHERE
MATCH
t
AGAINST
(
'Osnabruck'
);
#alter table t1 modify t text character set latin1 collate latin1_german2_ci not null;
#alter table t1 modify t text character set latin1 collate latin1_german2_ci not null;
alter
table
t1
modify
t
varchar
(
200
)
collate
latin1_german2_ci
not
null
;
alter
table
t1
modify
t
varchar
(
200
)
collate
latin1_german2_ci
not
null
;
SELECT
t
,
collation
(
t
)
FROM
t1
WHERE
MATCH
t
AGAINST
(
'Osnabrck'
);
SELECT
t
,
collation
(
t
)
FROM
t1
WHERE
MATCH
t
AGAINST
(
'Osnabrck'
);
...
...
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