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
30e89acd
Commit
30e89acd
authored
Oct 18, 2017
by
Marko Mäkelä
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Import, adapt and extend a test from Oracle
parent
98174795
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
0 deletions
+45
-0
mysql-test/suite/innodb_fts/r/fulltext.result
mysql-test/suite/innodb_fts/r/fulltext.result
+20
-0
mysql-test/suite/innodb_fts/t/fulltext.test
mysql-test/suite/innodb_fts/t/fulltext.test
+25
-0
No files found.
mysql-test/suite/innodb_fts/r/fulltext.result
View file @
30e89acd
...
...
@@ -636,6 +636,26 @@ EXECUTE stmt;
DEALLOCATE PREPARE stmt;
DROP TABLE t1;
End of 5.1 tests
CREATE TABLE z(a INTEGER) engine=innodb;
CREATE TABLE q(b TEXT CHARSET latin1, fulltext(b)) engine=innodb;
EXPLAIN SELECT 1 FROM q WHERE (SELECT MATCH(b) AGAINST ('*') FROM z);
ERROR 42000: syntax error, unexpected $end, expecting FTS_TERM or FTS_NUMB or '*'
SELECT 1 FROM q WHERE (SELECT MATCH(b) AGAINST ('*') FROM z);
ERROR 42000: syntax error, unexpected $end, expecting FTS_TERM or FTS_NUMB or '*'
EXPLAIN SELECT MATCH(b) AGAINST ('*') FROM z;
ERROR 42S22: Unknown column 'b' in 'field list'
SELECT MATCH(b) AGAINST ('*') FROM z;
ERROR 42S22: Unknown column 'b' in 'field list'
EXPLAIN SELECT MATCH(a) AGAINST ('*') FROM z;
ERROR HY000: Can't find FULLTEXT index matching the column list
SELECT MATCH(a) AGAINST ('*') FROM z;
ERROR HY000: Can't find FULLTEXT index matching the column list
EXPLAIN SELECT MATCH(b) AGAINST ('*') FROM q;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE q ALL NULL NULL NULL NULL 1
SELECT MATCH(b) AGAINST ('*') FROM q;
ERROR 42000: syntax error, unexpected $end, expecting FTS_TERM or FTS_NUMB or '*'
DROP TABLE z, q;
create table t (
FTS_DOC_ID BIGINT UNSIGNED PRIMARY KEY, t TEXT, FULLTEXT KEY (t)
) ENGINE=InnoDB;
...
...
mysql-test/suite/innodb_fts/t/fulltext.test
View file @
30e89acd
...
...
@@ -676,6 +676,31 @@ DROP TABLE t1;
--
echo
End
of
5.1
tests
# This is an adapted and extended version of an Oracle test for
# Bug#21140111: Explain ... match against: Assertion failed: ret ...
# No bug was repeatable for MariaDB.
CREATE
TABLE
z
(
a
INTEGER
)
engine
=
innodb
;
CREATE
TABLE
q
(
b
TEXT
CHARSET
latin1
,
fulltext
(
b
))
engine
=
innodb
;
--
error
ER_PARSE_ERROR
EXPLAIN
SELECT
1
FROM
q
WHERE
(
SELECT
MATCH
(
b
)
AGAINST
(
'*'
)
FROM
z
);
--
error
ER_PARSE_ERROR
SELECT
1
FROM
q
WHERE
(
SELECT
MATCH
(
b
)
AGAINST
(
'*'
)
FROM
z
);
--
error
ER_BAD_FIELD_ERROR
EXPLAIN
SELECT
MATCH
(
b
)
AGAINST
(
'*'
)
FROM
z
;
--
error
ER_BAD_FIELD_ERROR
SELECT
MATCH
(
b
)
AGAINST
(
'*'
)
FROM
z
;
--
error
ER_FT_MATCHING_KEY_NOT_FOUND
EXPLAIN
SELECT
MATCH
(
a
)
AGAINST
(
'*'
)
FROM
z
;
--
error
ER_FT_MATCHING_KEY_NOT_FOUND
SELECT
MATCH
(
a
)
AGAINST
(
'*'
)
FROM
z
;
EXPLAIN
SELECT
MATCH
(
b
)
AGAINST
(
'*'
)
FROM
q
;
--
error
ER_PARSE_ERROR
SELECT
MATCH
(
b
)
AGAINST
(
'*'
)
FROM
q
;
DROP
TABLE
z
,
q
;
create
table
t
(
FTS_DOC_ID
BIGINT
UNSIGNED
PRIMARY
KEY
,
t
TEXT
,
FULLTEXT
KEY
(
t
)
)
ENGINE
=
InnoDB
;
...
...
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