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
2f93e7cf
Commit
2f93e7cf
authored
Apr 23, 2014
by
Alexander Barkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-6146 Can't mix (latin1_swedish_ci,NUMERIC) and (utf8_unicode_ci,IMPLICIT) for MATCH
parent
31c82360
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
85 additions
and
2 deletions
+85
-2
mysql-test/r/fulltext.result
mysql-test/r/fulltext.result
+45
-0
mysql-test/t/fulltext.test
mysql-test/t/fulltext.test
+39
-0
sql/item_func.cc
sql/item_func.cc
+1
-2
No files found.
mysql-test/r/fulltext.result
View file @
2f93e7cf
...
...
@@ -699,3 +699,48 @@ EXECUTE stmt;
DEALLOCATE PREPARE stmt;
DROP TABLE t1;
End of 5.1 tests
#
# Start of 5.5 tests
#
#
# MDEV-6146 Can't mix (latin1_swedish_ci,NUMERIC) and (utf8_unicode_ci,IMPLICIT) for MATCH
#
SET NAMES utf8;
CREATE TABLE t1
(
txt text COLLATE utf8_unicode_ci NOT NULL,
uid int(11) NOT NULL,
id2 int(11) NOT NULL,
KEY uid (uid),
KEY id2 (id2)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT INTO t1 VALUES ('txt1',1234,5678);
SELECT * FROM t1 WHERE MATCH (id2, uid, txt) AGAINST ('txt1' IN BOOLEAN MODE);
txt uid id2
txt1 1234 5678
SELECT * FROM t1 WHERE MATCH (id2, uid, txt) AGAINST ('1234' IN BOOLEAN MODE);
txt uid id2
txt1 1234 5678
SELECT * FROM t1 WHERE MATCH (id2, uid, txt) AGAINST ('5678' IN BOOLEAN MODE);
txt uid id2
txt1 1234 5678
DROP TABLE t1;
CREATE TABLE t1 (
txt1 text COLLATE utf8_unicode_ci NOT NULL,
txt2 text COLLATE latin1_swedish_ci NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
INSERT INTO t1 VALUES ('nnn1 x1 y1 ööö1','mmm1 ùùù1');
INSERT INTO t1 VALUES ('nnn2 x2 y2 ööö2','mmm2 ùùù2');
INSERT INTO t1 VALUES ('nnn3 x3 y3 ööö3','mmm3 ùùù3');
INSERT INTO t1 VALUES ('nnn4 x4 y4 ööö4','mmm4 ùùù4');
INSERT INTO t1 VALUES ('nnn5 x5 y5 ööö5','mmm5 ');
SELECT * FROM t1 WHERE MATCH (txt1,txt2) AGAINST ('ööö1' IN BOOLEAN MODE);
txt1 txt2
nnn1 x1 y1 ööö1 mmm1 ùùù1
SELECT * FROM t1 WHERE MATCH (txt1,txt2) AGAINST ('ùùù2' IN BOOLEAN MODE);
txt1 txt2
nnn2 x2 y2 ööö2 mmm2 ùùù2
DROP TABLE t1;
#
# End of 5.5 tests
#
mysql-test/t/fulltext.test
View file @
2f93e7cf
...
...
@@ -646,3 +646,42 @@ DEALLOCATE PREPARE stmt;
DROP
TABLE
t1
;
--
echo
End
of
5.1
tests
--
echo
#
--
echo
# Start of 5.5 tests
--
echo
#
--
echo
#
--
echo
# MDEV-6146 Can't mix (latin1_swedish_ci,NUMERIC) and (utf8_unicode_ci,IMPLICIT) for MATCH
--
echo
#
SET
NAMES
utf8
;
CREATE
TABLE
t1
(
txt
text
COLLATE
utf8_unicode_ci
NOT
NULL
,
uid
int
(
11
)
NOT
NULL
,
id2
int
(
11
)
NOT
NULL
,
KEY
uid
(
uid
),
KEY
id2
(
id2
)
)
ENGINE
=
MyISAM
DEFAULT
CHARSET
=
utf8
COLLATE
=
utf8_unicode_ci
;
INSERT
INTO
t1
VALUES
(
'txt1'
,
1234
,
5678
);
SELECT
*
FROM
t1
WHERE
MATCH
(
id2
,
uid
,
txt
)
AGAINST
(
'txt1'
IN
BOOLEAN
MODE
);
SELECT
*
FROM
t1
WHERE
MATCH
(
id2
,
uid
,
txt
)
AGAINST
(
'1234'
IN
BOOLEAN
MODE
);
SELECT
*
FROM
t1
WHERE
MATCH
(
id2
,
uid
,
txt
)
AGAINST
(
'5678'
IN
BOOLEAN
MODE
);
DROP
TABLE
t1
;
CREATE
TABLE
t1
(
txt1
text
COLLATE
utf8_unicode_ci
NOT
NULL
,
txt2
text
COLLATE
latin1_swedish_ci
NOT
NULL
)
ENGINE
=
MyISAM
DEFAULT
CHARSET
=
utf8
COLLATE
=
utf8_unicode_ci
;
INSERT
INTO
t1
VALUES
(
'nnn1 x1 y1 ööö1'
,
'mmm1 ùùù1'
);
INSERT
INTO
t1
VALUES
(
'nnn2 x2 y2 ööö2'
,
'mmm2 ùùù2'
);
INSERT
INTO
t1
VALUES
(
'nnn3 x3 y3 ööö3'
,
'mmm3 ùùù3'
);
INSERT
INTO
t1
VALUES
(
'nnn4 x4 y4 ööö4'
,
'mmm4 ùùù4'
);
INSERT
INTO
t1
VALUES
(
'nnn5 x5 y5 ööö5'
,
'mmm5 '
);
SELECT
*
FROM
t1
WHERE
MATCH
(
txt1
,
txt2
)
AGAINST
(
'ööö1'
IN
BOOLEAN
MODE
);
SELECT
*
FROM
t1
WHERE
MATCH
(
txt1
,
txt2
)
AGAINST
(
'ùùù2'
IN
BOOLEAN
MODE
);
DROP
TABLE
t1
;
--
echo
#
--
echo
# End of 5.5 tests
--
echo
#
sql/item_func.cc
View file @
2f93e7cf
...
...
@@ -6295,8 +6295,7 @@ bool Item_func_match::fix_fields(THD *thd, Item **ref)
return
1
;
}
table
->
fulltext_searched
=
1
;
return
agg_item_collations_for_comparison
(
cmp_collation
,
func_name
(),
args
+
1
,
arg_count
-
1
,
0
);
return
agg_arg_charsets_for_comparison
(
cmp_collation
,
args
+
1
,
arg_count
-
1
);
}
bool
Item_func_match
::
fix_index
()
...
...
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