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
06f60f6d
Commit
06f60f6d
authored
Jan 18, 2005
by
jimw@mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal:/home/bk/mysql-4.1
into mysql.com:/home/jimw/my/mysql-4.1-clean
parents
1ffa2a3d
08639a88
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
4 deletions
+27
-4
mysql-test/r/union.result
mysql-test/r/union.result
+16
-0
mysql-test/t/union.test
mysql-test/t/union.test
+4
-0
sql/sql_union.cc
sql/sql_union.cc
+7
-4
No files found.
mysql-test/r/union.result
View file @
06f60f6d
...
@@ -872,6 +872,22 @@ count(*)
...
@@ -872,6 +872,22 @@ count(*)
show status like 'Slow_queries';
show status like 'Slow_queries';
Variable_name Value
Variable_name Value
Slow_queries 3
Slow_queries 3
flush status;
select a from t1 where b not in (1,2,3) union select a from t1 where b not in (4,5,6);
a
4
5
3
6
7
8
9
10
1
2
show status like 'Slow_queries';
Variable_name Value
Slow_queries 1
drop table t1;
drop table t1;
create table t1 ( RID int(11) not null default '0', IID int(11) not null default '0', nada varchar(50) not null,NAME varchar(50) not null,PHONE varchar(50) not null) engine=MyISAM;
create table t1 ( RID int(11) not null default '0', IID int(11) not null default '0', nada varchar(50) not null,NAME varchar(50) not null,PHONE varchar(50) not null) engine=MyISAM;
insert into t1 ( RID,IID,nada,NAME,PHONE) values (1, 1, 'main', 'a', '111'), (2, 1, 'main', 'b', '222'), (3, 1, 'main', 'c', '333'), (4, 1, 'main', 'd', '444'), (5, 1, 'main', 'e', '555'), (6, 2, 'main', 'c', '333'), (7, 2, 'main', 'd', '454'), (8, 2, 'main', 'e', '555'), (9, 2, 'main', 'f', '666'), (10, 2, 'main', 'g', '777');
insert into t1 ( RID,IID,nada,NAME,PHONE) values (1, 1, 'main', 'a', '111'), (2, 1, 'main', 'b', '222'), (3, 1, 'main', 'c', '333'), (4, 1, 'main', 'd', '444'), (5, 1, 'main', 'e', '555'), (6, 2, 'main', 'c', '333'), (7, 2, 'main', 'd', '454'), (8, 2, 'main', 'e', '555'), (9, 2, 'main', 'f', '666'), (10, 2, 'main', 'g', '777');
...
...
mysql-test/t/union.test
View file @
06f60f6d
...
@@ -481,6 +481,10 @@ select count(*) from t1 where b=13 union select count(*) from t1 where a=7;
...
@@ -481,6 +481,10 @@ select count(*) from t1 where b=13 union select count(*) from t1 where a=7;
show
status
like
'Slow_queries'
;
show
status
like
'Slow_queries'
;
select
count
(
*
)
from
t1
where
a
=
7
union
select
count
(
*
)
from
t1
where
b
=
13
;
select
count
(
*
)
from
t1
where
a
=
7
union
select
count
(
*
)
from
t1
where
b
=
13
;
show
status
like
'Slow_queries'
;
show
status
like
'Slow_queries'
;
# additional test for examined rows
flush
status
;
select
a
from
t1
where
b
not
in
(
1
,
2
,
3
)
union
select
a
from
t1
where
b
not
in
(
4
,
5
,
6
);
show
status
like
'Slow_queries'
;
drop
table
t1
;
drop
table
t1
;
#
#
...
...
sql/sql_union.cc
View file @
06f60f6d
...
@@ -466,11 +466,14 @@ int st_select_lex_unit::exec()
...
@@ -466,11 +466,14 @@ int st_select_lex_unit::exec()
}
}
res
=
sl
->
join
->
error
;
res
=
sl
->
join
->
error
;
offset_limit_cnt
=
sl
->
offset_limit
;
offset_limit_cnt
=
sl
->
offset_limit
;
if
(
!
res
&&
union_result
->
flush
()
)
if
(
!
res
)
{
{
examined_rows
+=
thd
->
examined_row_count
;
examined_rows
+=
thd
->
examined_row_count
;
thd
->
lex
->
current_select
=
lex_select_save
;
if
(
union_result
->
flush
())
DBUG_RETURN
(
1
);
{
thd
->
lex
->
current_select
=
lex_select_save
;
DBUG_RETURN
(
1
);
}
}
}
}
}
if
(
res
)
if
(
res
)
...
...
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