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
68bc1c28
Commit
68bc1c28
authored
Aug 19, 2004
by
serg@serg.mylan
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal.mysql.com:/home/bk/mysql-4.1/
into serg.mylan:/usr/home/serg/Abk/mysql-4.1
parents
22a65bcf
a29c9d37
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
32 additions
and
5 deletions
+32
-5
mysql-test/r/subselect.result
mysql-test/r/subselect.result
+13
-0
mysql-test/t/subselect.test
mysql-test/t/subselect.test
+13
-0
sql/Makefile.am
sql/Makefile.am
+0
-1
sql/sql_select.cc
sql/sql_select.cc
+6
-4
No files found.
mysql-test/r/subselect.result
View file @
68bc1c28
...
@@ -1899,3 +1899,16 @@ select t000.a, count(*) `C` FROM t1 t000 GROUP BY t000.a HAVING count(*) > ALL (
...
@@ -1899,3 +1899,16 @@ select t000.a, count(*) `C` FROM t1 t000 GROUP BY t000.a HAVING count(*) > ALL (
a C
a C
1 1
1 1
drop table t1,t2;
drop table t1,t2;
create table t1 (a int not null auto_increment primary key, b varchar(40), fulltext(b));
insert into t1 (b) values ('ball'),('ball games'), ('games'), ('foo'), ('foobar'), ('Serg'), ('Sergei'),('Georg'), ('Patrik'),('Hakan');
create table t2 (a int);
insert into t2 values (1),(3),(2),(7);
select a,b from t1 where match(b) against ('Ball') > 0;
a b
1 ball
2 ball games
select a from t2 where a in (select a from t1 where match(b) against ('Ball') > 0);
a
1
2
drop table t1,t2;
mysql-test/t/subselect.test
View file @
68bc1c28
...
@@ -1222,3 +1222,16 @@ CREATE TABLE `t2` ( `b` int(11) default NULL, `a` int(11) default NULL) ENGINE=M
...
@@ -1222,3 +1222,16 @@ CREATE TABLE `t2` ( `b` int(11) default NULL, `a` int(11) default NULL) ENGINE=M
insert
into
t2
values
(
1
,
2
);
insert
into
t2
values
(
1
,
2
);
select
t000
.
a
,
count
(
*
)
`C`
FROM
t1
t000
GROUP
BY
t000
.
a
HAVING
count
(
*
)
>
ALL
(
SELECT
count
(
*
)
FROM
t2
t001
WHERE
t001
.
a
=
1
);
select
t000
.
a
,
count
(
*
)
`C`
FROM
t1
t000
GROUP
BY
t000
.
a
HAVING
count
(
*
)
>
ALL
(
SELECT
count
(
*
)
FROM
t2
t001
WHERE
t001
.
a
=
1
);
drop
table
t1
,
t2
;
drop
table
t1
,
t2
;
#
# BUG#4769 - fulltext in subselect
#
create
table
t1
(
a
int
not
null
auto_increment
primary
key
,
b
varchar
(
40
),
fulltext
(
b
));
insert
into
t1
(
b
)
values
(
'ball'
),(
'ball games'
),
(
'games'
),
(
'foo'
),
(
'foobar'
),
(
'Serg'
),
(
'Sergei'
),(
'Georg'
),
(
'Patrik'
),(
'Hakan'
);
create
table
t2
(
a
int
);
insert
into
t2
values
(
1
),(
3
),(
2
),(
7
);
select
a
,
b
from
t1
where
match
(
b
)
against
(
'Ball'
)
>
0
;
select
a
from
t2
where
a
in
(
select
a
from
t1
where
match
(
b
)
against
(
'Ball'
)
>
0
);
drop
table
t1
,
t2
;
sql/Makefile.am
View file @
68bc1c28
...
@@ -45,7 +45,6 @@ mysqld_LDADD = @MYSQLD_EXTRA_LDFLAGS@ \
...
@@ -45,7 +45,6 @@ mysqld_LDADD = @MYSQLD_EXTRA_LDFLAGS@ \
@innodb_system_libs@
\
@innodb_system_libs@
\
@ndbcluster_libs@ @ndbcluster_system_libs@
\
@ndbcluster_libs@ @ndbcluster_system_libs@
\
$(LDADD)
$(CXXLDFLAGS)
$(WRAPLIBS)
@LIBDL@ @openssl_libs@
$(LDADD)
$(CXXLDFLAGS)
$(WRAPLIBS)
@LIBDL@ @openssl_libs@
mysqld_DEPENDENCIES
=
@ndbcluster_libs@ @ndbcluster_system_libs@
noinst_HEADERS
=
item.h item_func.h item_sum.h item_cmpfunc.h
\
noinst_HEADERS
=
item.h item_func.h item_sum.h item_cmpfunc.h
\
item_strfunc.h item_timefunc.h item_uniq.h
\
item_strfunc.h item_timefunc.h item_uniq.h
\
item_create.h item_subselect.h item_row.h
\
item_create.h item_subselect.h item_row.h
\
...
...
sql/sql_select.cc
View file @
68bc1c28
...
@@ -729,6 +729,10 @@ JOIN::optimize()
...
@@ -729,6 +729,10 @@ JOIN::optimize()
(
select_lex
->
ftfunc_list
->
elements
?
(
select_lex
->
ftfunc_list
->
elements
?
SELECT_NO_JOIN_CACHE
:
0
));
SELECT_NO_JOIN_CACHE
:
0
));
/* Perform FULLTEXT search before all regular searches */
if
(
!
(
select_options
&
SELECT_DESCRIBE
))
init_ftfuncs
(
thd
,
select_lex
,
test
(
order
));
/*
/*
is this simple IN subquery?
is this simple IN subquery?
*/
*/
...
@@ -784,7 +788,7 @@ JOIN::optimize()
...
@@ -784,7 +788,7 @@ JOIN::optimize()
join_tab
->
info
=
"Using index; Using where"
;
join_tab
->
info
=
"Using index; Using where"
;
else
else
join_tab
->
info
=
"Using index"
;
join_tab
->
info
=
"Using index"
;
DBUG_RETURN
(
unit
->
item
->
DBUG_RETURN
(
unit
->
item
->
change_engine
(
new
subselect_indexsubquery_engine
(
thd
,
change_engine
(
new
subselect_indexsubquery_engine
(
thd
,
join_tab
,
join_tab
,
...
@@ -849,8 +853,6 @@ JOIN::optimize()
...
@@ -849,8 +853,6 @@ JOIN::optimize()
}
}
having
=
0
;
having
=
0
;
/* Perform FULLTEXT search before all regular searches */
init_ftfuncs
(
thd
,
select_lex
,
test
(
order
));
/* Create a tmp table if distinct or if the sort is too complicated */
/* Create a tmp table if distinct or if the sort is too complicated */
if
(
need_tmp
)
if
(
need_tmp
)
{
{
...
@@ -858,7 +860,7 @@ JOIN::optimize()
...
@@ -858,7 +860,7 @@ JOIN::optimize()
thd
->
proc_info
=
"Creating tmp table"
;
thd
->
proc_info
=
"Creating tmp table"
;
init_items_ref_array
();
init_items_ref_array
();
tmp_table_param
.
hidden_field_count
=
(
all_fields
.
elements
-
tmp_table_param
.
hidden_field_count
=
(
all_fields
.
elements
-
fields_list
.
elements
);
fields_list
.
elements
);
if
(
!
(
exec_tmp_table1
=
if
(
!
(
exec_tmp_table1
=
...
...
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