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
e30fc1ac
Commit
e30fc1ac
authored
Nov 20, 2001
by
serg@serg.mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tests added
parent
dd09b4e9
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
54 additions
and
41 deletions
+54
-41
mysql-test/r/fulltext_distinct.result
mysql-test/r/fulltext_distinct.result
+13
-11
mysql-test/r/fulltext_left_join.result
mysql-test/r/fulltext_left_join.result
+7
-0
mysql-test/t/fulltext_distinct.test
mysql-test/t/fulltext_distinct.test
+32
-30
mysql-test/t/fulltext_left_join.test
mysql-test/t/fulltext_left_join.test
+2
-0
No files found.
mysql-test/r/fulltext_distinct.result
View file @
e30fc1ac
DROP TABLE IF EXISTS t1;
DROP TABLE IF EXISTS t1
, t2
;
CREATE TABLE t1 (
CREATE TABLE t1 (
id mediumint unsigned NOT NULL auto_increment,
id mediumint unsigned NOT NULL auto_increment,
tag char(6) NOT NULL default '',
tag char(6) NOT NULL default '',
...
@@ -8,7 +8,6 @@ KEY kt(tag),
...
@@ -8,7 +8,6 @@ KEY kt(tag),
KEY kv(value(15)),
KEY kv(value(15)),
FULLTEXT KEY kvf(value)
FULLTEXT KEY kvf(value)
) TYPE=MyISAM;
) TYPE=MyISAM;
DROP TABLE IF EXISTS t2;
CREATE TABLE t2 (
CREATE TABLE t2 (
id_t2 mediumint unsigned NOT NULL default '0',
id_t2 mediumint unsigned NOT NULL default '0',
id_t1 mediumint unsigned NOT NULL default '0',
id_t1 mediumint unsigned NOT NULL default '0',
...
@@ -17,25 +16,28 @@ PRIMARY KEY (id_t2,id_t1,field_number),
...
@@ -17,25 +16,28 @@ PRIMARY KEY (id_t2,id_t1,field_number),
KEY id_t1(id_t1)
KEY id_t1(id_t1)
) TYPE=MyISAM;
) TYPE=MyISAM;
INSERT INTO t1 (tag,value) VALUES ('foo123','bar111');
INSERT INTO t1 (tag,value) VALUES ('foo123','bar111');
INSERT INTO t2 VALUES (2231626,64280,0);
INSERT INTO t1 (tag,value) VALUES ('foo123','bar222');
INSERT INTO t1 (tag,value) VALUES ('foo123','bar222');
INSERT INTO t1 (tag,value) VALUES ('bar345','baz333 ar');
INSERT INTO t2 VALUES (2231626,64280,0);
INSERT INTO t2 VALUES (2231626,64281,0);
INSERT INTO t2 VALUES (2231626,64281,0);
insert into t1 (tag,value) values ('bar345','baz333 ar');
INSERT INTO t2 VALUES (12346, 3, 1);
insert into t2 values (12346, 3, 1);
SELECT * FROM t1;
select * from t1;
id tag value
id tag value
1 foo123 bar111
1 foo123 bar111
2 foo123 bar222
2 foo123 bar222
3 bar345 baz333 ar
3 bar345 baz333 ar
select * from
t2;
SELECT * FROM
t2;
id_t2 id_t1 field_number
id_t2 id_t1 field_number
12346 3 1
12346 3 1
2231626 64280 0
2231626 64280 0
2231626 64281 0
2231626 64281 0
SELECT DISTINCT t2.id_t2
SELECT DISTINCT t2.id_t2 FROM t2, t1
FROM t2, t1
WHERE MATCH (t1.value) AGAINST ('baz333') AND t1.id = t2.id_t1;
WHERE MATCH (t1.value) AGAINST ('baz333')
id_t2
12346
SELECT DISTINCT t2.id_t2 FROM t2, t1
WHERE MATCH (t1.value) AGAINST ('baz333' IN BOOLEAN MODE)
AND t1.id = t2.id_t1;
AND t1.id = t2.id_t1;
id_t2
id_t2
12346
12346
DROP TABLE t1,t2;
DROP TABLE t1,
t2;
mysql-test/r/fulltext_left_join.result
View file @
e30fc1ac
...
@@ -22,4 +22,11 @@ match(t1.texte,t1.sujet,t1.motsclefs) against('droit')
...
@@ -22,4 +22,11 @@ match(t1.texte,t1.sujet,t1.motsclefs) against('droit')
0
0
0.67003107070923
0.67003107070923
0
0
select match(t1.texte,t1.sujet,t1.motsclefs) against('droit' IN BOOLEAN MODE)
from t1 left join t2 on t2.id=t1.id;
match(t1.texte,t1.sujet,t1.motsclefs) against('droit' IN BOOLEAN MODE)
0
0
1
0
drop table t1, t2;
drop table t1, t2;
mysql-test/t/fulltext_distinct.test
View file @
e30fc1ac
...
@@ -3,8 +3,8 @@
...
@@ -3,8 +3,8 @@
# bug reported by Tibor Simko <tibor.simko@cern.ch>
# bug reported by Tibor Simko <tibor.simko@cern.ch>
#
#
DROP
TABLE
IF
EXISTS
t1
;
DROP
TABLE
IF
EXISTS
t1
,
t2
;
CREATE
TABLE
t1
(
CREATE
TABLE
t1
(
id
mediumint
unsigned
NOT
NULL
auto_increment
,
id
mediumint
unsigned
NOT
NULL
auto_increment
,
tag
char
(
6
)
NOT
NULL
default
''
,
tag
char
(
6
)
NOT
NULL
default
''
,
value
text
NOT
NULL
default
''
,
value
text
NOT
NULL
default
''
,
...
@@ -12,28 +12,30 @@
...
@@ -12,28 +12,30 @@
KEY
kt
(
tag
),
KEY
kt
(
tag
),
KEY
kv
(
value
(
15
)),
KEY
kv
(
value
(
15
)),
FULLTEXT
KEY
kvf
(
value
)
FULLTEXT
KEY
kvf
(
value
)
)
TYPE
=
MyISAM
;
)
TYPE
=
MyISAM
;
DROP
TABLE
IF
EXISTS
t2
;
CREATE
TABLE
t2
(
CREATE
TABLE
t2
(
id_t2
mediumint
unsigned
NOT
NULL
default
'0'
,
id_t2
mediumint
unsigned
NOT
NULL
default
'0'
,
id_t1
mediumint
unsigned
NOT
NULL
default
'0'
,
id_t1
mediumint
unsigned
NOT
NULL
default
'0'
,
field_number
tinyint
unsigned
NOT
NULL
default
'0'
,
field_number
tinyint
unsigned
NOT
NULL
default
'0'
,
PRIMARY
KEY
(
id_t2
,
id_t1
,
field_number
),
PRIMARY
KEY
(
id_t2
,
id_t1
,
field_number
),
KEY
id_t1
(
id_t1
)
KEY
id_t1
(
id_t1
)
)
TYPE
=
MyISAM
;
)
TYPE
=
MyISAM
;
INSERT
INTO
t1
(
tag
,
value
)
VALUES
(
'foo123'
,
'bar111'
);
INSERT
INTO
t1
(
tag
,
value
)
VALUES
(
'foo123'
,
'bar111'
);
INSERT
INTO
t2
VALUES
(
2231626
,
64280
,
0
);
INSERT
INTO
t1
(
tag
,
value
)
VALUES
(
'foo123'
,
'bar222'
);
INSERT
INTO
t1
(
tag
,
value
)
VALUES
(
'foo123'
,
'bar222'
);
INSERT
INTO
t1
(
tag
,
value
)
VALUES
(
'bar345'
,
'baz333 ar'
);
INSERT
INTO
t2
VALUES
(
2231626
,
64281
,
0
);
insert
into
t1
(
tag
,
value
)
values
(
'bar345'
,
'baz333 ar'
);
insert
into
t2
values
(
12346
,
3
,
1
);
select
*
from
t1
;
select
*
from
t2
;
INSERT
INTO
t2
VALUES
(
2231626
,
64280
,
0
);
INSERT
INTO
t2
VALUES
(
2231626
,
64281
,
0
);
INSERT
INTO
t2
VALUES
(
12346
,
3
,
1
);
SELECT
DISTINCT
t2
.
id_t2
SELECT
*
FROM
t1
;
SELECT
*
FROM
t2
;
FROM
t2
,
t1
WHERE
MATCH
(
t1
.
value
)
AGAINST
(
'baz333'
)
AND
t1
.
id
=
t2
.
id_t1
;
DROP
TABLE
t1
,
t2
;
SELECT
DISTINCT
t2
.
id_t2
FROM
t2
,
t1
WHERE
MATCH
(
t1
.
value
)
AGAINST
(
'baz333'
)
AND
t1
.
id
=
t2
.
id_t1
;
SELECT
DISTINCT
t2
.
id_t2
FROM
t2
,
t1
WHERE
MATCH
(
t1
.
value
)
AGAINST
(
'baz333'
IN
BOOLEAN
MODE
)
AND
t1
.
id
=
t2
.
id_t1
;
DROP
TABLE
t1
,
t2
;
mysql-test/t/fulltext_left_join.test
View file @
e30fc1ac
...
@@ -22,6 +22,8 @@ INSERT INTO t2 VALUES('456', 'lui');
...
@@ -22,6 +22,8 @@ INSERT INTO t2 VALUES('456', 'lui');
select
match
(
t1
.
texte
,
t1
.
sujet
,
t1
.
motsclefs
)
against
(
'droit'
)
select
match
(
t1
.
texte
,
t1
.
sujet
,
t1
.
motsclefs
)
against
(
'droit'
)
from
t1
left
join
t2
on
t2
.
id
=
t1
.
id
;
from
t1
left
join
t2
on
t2
.
id
=
t1
.
id
;
select
match
(
t1
.
texte
,
t1
.
sujet
,
t1
.
motsclefs
)
against
(
'droit'
IN
BOOLEAN
MODE
)
from
t1
left
join
t2
on
t2
.
id
=
t1
.
id
;
drop
table
t1
,
t2
;
drop
table
t1
,
t2
;
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