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
bc5a9111
Commit
bc5a9111
authored
Nov 16, 2004
by
bell@sanja.is.com.ua
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
backport Serg's fix of FT interface (BUG#6523)
parent
27395a2f
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
3 deletions
+21
-3
mysql-test/r/subselect.result
mysql-test/r/subselect.result
+8
-0
mysql-test/t/subselect.test
mysql-test/t/subselect.test
+10
-0
sql/ha_myisam.h
sql/ha_myisam.h
+0
-1
sql/handler.h
sql/handler.h
+1
-0
sql/opt_range.h
sql/opt_range.h
+1
-1
sql/sql_select.cc
sql/sql_select.cc
+1
-1
No files found.
mysql-test/r/subselect.result
View file @
bc5a9111
...
...
@@ -2003,3 +2003,11 @@ a b (select max(b) from t2 where t1.b=t2.a)
2 4 NULL
2 5 NULL
drop table t1, t2;
create table t1 (id int);
create table t2 (id int, body text, fulltext (body));
insert into t1 values(1),(2),(3);
insert into t2 values (1,'test'), (2,'mysql'), (3,'test'), (4,'test');
select count(distinct id) from t1 where id in (select id from t2 where match(body) against ('mysql' in boolean mode));
count(distinct id)
1
drop table t2,t1;
mysql-test/t/subselect.test
View file @
bc5a9111
...
...
@@ -1299,3 +1299,13 @@ insert into t1 values (1,1),(1,2),(1,3),(2,4),(2,5);
insert
into
t2
values
(
1
,
3
),(
2
,
1
);
select
distinct
a
,
b
,
(
select
max
(
b
)
from
t2
where
t1
.
b
=
t2
.
a
)
from
t1
order
by
t1
.
b
;
drop
table
t1
,
t2
;
#
# subqueries with full text search
#
create
table
t1
(
id
int
);
create
table
t2
(
id
int
,
body
text
,
fulltext
(
body
));
insert
into
t1
values
(
1
),(
2
),(
3
);
insert
into
t2
values
(
1
,
'test'
),
(
2
,
'mysql'
),
(
3
,
'test'
),
(
4
,
'test'
);
select
count
(
distinct
id
)
from
t1
where
id
in
(
select
id
from
t2
where
match
(
body
)
against
(
'mysql'
in
boolean
mode
));
drop
table
t2
,
t1
;
sql/ha_myisam.h
View file @
bc5a9111
...
...
@@ -81,7 +81,6 @@ class ha_myisam: public handler
int
index_first
(
byte
*
buf
);
int
index_last
(
byte
*
buf
);
int
index_next_same
(
byte
*
buf
,
const
byte
*
key
,
uint
keylen
);
int
index_end
()
{
ft_handler
=
NULL
;
return
0
;
}
int
ft_init
()
{
if
(
!
ft_handler
)
...
...
sql/handler.h
View file @
bc5a9111
...
...
@@ -372,6 +372,7 @@ public:
virtual
int
read_range_next
();
int
compare_key
(
key_range
*
range
);
virtual
int
ft_init
()
{
return
HA_ERR_WRONG_COMMAND
;
}
void
ft_end
()
{
ft_handler
=
NULL
;
}
virtual
FT_INFO
*
ft_init_ext
(
uint
flags
,
uint
inx
,
const
byte
*
key
,
uint
keylen
)
{
return
NULL
;
}
...
...
sql/opt_range.h
View file @
bc5a9111
...
...
@@ -154,7 +154,7 @@ class FT_SELECT: public QUICK_SELECT {
public:
FT_SELECT
(
THD
*
thd
,
TABLE
*
table
,
uint
key
)
:
QUICK_SELECT
(
thd
,
table
,
key
,
1
)
{
init
();
}
~
FT_SELECT
()
{
file
->
ft_end
();
}
int
init
()
{
return
error
=
file
->
ft_init
();
}
int
get_next
()
{
return
error
=
file
->
ft_read
(
record
);
}
};
...
...
sql/sql_select.cc
View file @
bc5a9111
...
...
@@ -3834,7 +3834,7 @@ JOIN::join_free(bool full)
DBUG_ENTER
(
"JOIN::join_free"
);
full
=
full
||
(
!
select_lex
->
uncacheable
&&
!
thd
->
lex
->
describe
);
!
thd
->
lex
->
describe
);
// do not cleanup too early on EXPLAIN
if
(
table
)
{
...
...
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