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
cdd8a2a9
Commit
cdd8a2a9
authored
Nov 08, 2003
by
serg@sergbook.mylan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fulltext.test, fulltext.result, ft_nlq_search.c:
a bug in latin1_german2 FT fixed
parent
e7ae6727
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
17 deletions
+33
-17
myisam/ft_nlq_search.c
myisam/ft_nlq_search.c
+3
-1
mysql-test/r/fulltext.result
mysql-test/r/fulltext.result
+21
-12
mysql-test/t/fulltext.test
mysql-test/t/fulltext.test
+9
-4
No files found.
myisam/ft_nlq_search.c
View file @
cdd8a2a9
...
...
@@ -73,6 +73,7 @@ static int walk_and_match(FT_WORD *word, uint32 count, ALL_IN_ONE *aio)
uchar
*
keybuff
=
aio
->
keybuff
;
MI_KEYDEF
*
keyinfo
=
info
->
s
->
keyinfo
+
aio
->
keynr
;
my_off_t
key_root
=
info
->
s
->
state
.
key_root
[
aio
->
keynr
];
uint
extra
=
HA_FT_WLEN
+
info
->
s
->
base
.
rec_reflength
;
#if HA_FT_WTYPE == HA_KEYTYPE_FLOAT
float
tmp_weight
;
#else
...
...
@@ -94,7 +95,8 @@ static int walk_and_match(FT_WORD *word, uint32 count, ALL_IN_ONE *aio)
{
if
(
keylen
&&
mi_compare_text
(
aio
->
charset
,
info
->
lastkey
,
keylen
,
keybuff
,
keylen
,
0
))
mi_compare_text
(
aio
->
charset
,
info
->
lastkey
+
1
,
info
->
lastkey_length
-
extra
,
keybuff
+
1
,
keylen
,
0
))
break
;
subkeys
=
ft_sintXkorr
(
info
->
lastkey
+
keylen
);
...
...
mysql-test/r/fulltext.result
View file @
cdd8a2a9
...
...
@@ -29,8 +29,8 @@ Full-text indexes are called collections
Only MyISAM tables support collections
select * from t1 where MATCH(a,b) AGAINST ("indexes collections" WITH QUERY EXPANSION);
a b
Full-text indexes are called collections
Only MyISAM tables support collections
Full-text indexes are called collections
MySQL has now support for full-text search
explain select * from t1 where MATCH(a,b) AGAINST ("collections");
id select_type table type possible_keys key key_len ref rows Extra
...
...
@@ -294,18 +294,27 @@ INSERT t1 VALUES ('Mit freundlichem Gr
SET NAMES koi8r;
INSERT t1 VALUES (" - "),(", !"),
(" , !"),(" !");
SELECT t, c
harset
(t) FROM t1 WHERE MATCH t AGAINST ('');
t c
harset
(t)
- utf8
SELECT t, c
harset
(t) FROM t1 WHERE MATCH t AGAINST ('*' IN BOOLEAN MODE);
t c
harset
(t)
! utf8
SELECT t, c
ollation
(t) FROM t1 WHERE MATCH t AGAINST ('');
t c
ollation
(t)
- utf8
_general_ci
SELECT t, c
ollation
(t) FROM t1 WHERE MATCH t AGAINST ('*' IN BOOLEAN MODE);
t c
ollation
(t)
! utf8
_general_ci
SELECT * FROM t1 WHERE MATCH t AGAINST ('' IN BOOLEAN MODE);
t
SELECT t, c
harset
(t) FROM t1 WHERE MATCH t AGAINST ('Osnabrck');
t c
harset
(t)
SELECT t, c
ollation
(t) FROM t1 WHERE MATCH t AGAINST ('Osnabrck');
t c
ollation
(t)
SET NAMES latin1;
SELECT t, charset(t) FROM t1 WHERE MATCH t AGAINST ('Osnabrck');
t charset(t)
aus Osnabrck utf8
SELECT t, collation(t) FROM t1 WHERE MATCH t AGAINST ('Osnabrck');
t collation(t)
aus Osnabrck utf8_general_ci
SELECT t, collation(t) FROM t1 WHERE MATCH t AGAINST ('Osnabrueck');
t collation(t)
alter table t1 modify t varchar(200) collate latin1_german2_ci not null;
SELECT t, collation(t) FROM t1 WHERE MATCH t AGAINST ('Osnabrck');
t collation(t)
aus Osnabrck latin1_german2_ci
SELECT t, collation(t) FROM t1 WHERE MATCH t AGAINST ('Osnabrueck');
t collation(t)
aus Osnabrck latin1_german2_ci
DROP TABLE t1;
mysql-test/t/fulltext.test
View file @
cdd8a2a9
...
...
@@ -237,11 +237,16 @@ INSERT t1 VALUES ('Mit freundlichem Gr
SET
NAMES
koi8r
;
INSERT
t1
VALUES
(
" - "
),(
", !"
),
(
" , !"
),(
" !"
);
SELECT
t
,
c
harset
(
t
)
FROM
t1
WHERE
MATCH
t
AGAINST
(
''
);
SELECT
t
,
c
harset
(
t
)
FROM
t1
WHERE
MATCH
t
AGAINST
(
'*'
IN
BOOLEAN
MODE
);
SELECT
t
,
c
ollation
(
t
)
FROM
t1
WHERE
MATCH
t
AGAINST
(
''
);
SELECT
t
,
c
ollation
(
t
)
FROM
t1
WHERE
MATCH
t
AGAINST
(
'*'
IN
BOOLEAN
MODE
);
SELECT
*
FROM
t1
WHERE
MATCH
t
AGAINST
(
''
IN
BOOLEAN
MODE
);
SELECT
t
,
c
harset
(
t
)
FROM
t1
WHERE
MATCH
t
AGAINST
(
'Osnabrck'
);
SELECT
t
,
c
ollation
(
t
)
FROM
t1
WHERE
MATCH
t
AGAINST
(
'Osnabrck'
);
SET
NAMES
latin1
;
SELECT
t
,
charset
(
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'
);
#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
;
SELECT
t
,
collation
(
t
)
FROM
t1
WHERE
MATCH
t
AGAINST
(
'Osnabrck'
);
SELECT
t
,
collation
(
t
)
FROM
t1
WHERE
MATCH
t
AGAINST
(
'Osnabrueck'
);
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