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
697a91ec
Commit
697a91ec
authored
Apr 12, 2002
by
Sinisa@sinisa.nasamreza.org
Browse files
Options
Browse Files
Download
Plain Diff
Merge sinisa@work.mysql.com:/home/bk/mysql-4.0
into sinisa.nasamreza.org:/mnt/hdc/Sinisa/mysql-4.0
parents
3cd7ed08
d61b4b6d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
sql/sql_union.cc
sql/sql_union.cc
+6
-3
No files found.
sql/sql_union.cc
View file @
697a91ec
...
@@ -33,7 +33,7 @@ int mysql_union(THD *thd, LEX *lex,select_result *result)
...
@@ -33,7 +33,7 @@ int mysql_union(THD *thd, LEX *lex,select_result *result)
TABLE
*
table
;
TABLE
*
table
;
int
describe
=
(
lex
->
select_lex
.
options
&
SELECT_DESCRIBE
)
?
1
:
0
;
int
describe
=
(
lex
->
select_lex
.
options
&
SELECT_DESCRIBE
)
?
1
:
0
;
int
res
;
int
res
;
bool
f
r
=
false
;
bool
f
ound_rows_for_union
=
false
;
TABLE_LIST
result_table_list
;
TABLE_LIST
result_table_list
;
TABLE_LIST
*
first_table
=
(
TABLE_LIST
*
)
lex
->
select_lex
.
table_list
.
first
;
TABLE_LIST
*
first_table
=
(
TABLE_LIST
*
)
lex
->
select_lex
.
table_list
.
first
;
TMP_TABLE_PARAM
tmp_table_param
;
TMP_TABLE_PARAM
tmp_table_param
;
...
@@ -61,7 +61,10 @@ int mysql_union(THD *thd, LEX *lex,select_result *result)
...
@@ -61,7 +61,10 @@ int mysql_union(THD *thd, LEX *lex,select_result *result)
*/
*/
lex_sl
=
sl
;
lex_sl
=
sl
;
order
=
(
ORDER
*
)
lex_sl
->
order_list
.
first
;
order
=
(
ORDER
*
)
lex_sl
->
order_list
.
first
;
fr
=
lex
->
select_lex
.
options
&
OPTION_FOUND_ROWS
&&
!
describe
&&
sl
->
select_limit
&&
sl
->
select_limit
!=
HA_POS_ERROR
;
found_rows_for_union
=
lex
->
select_lex
.
options
&
OPTION_FOUND_ROWS
&&
!
describe
&&
sl
->
select_limit
;
if
(
found_rows_for_union
)
lex
->
select_lex
.
options
^=
OPTION_FOUND_ROWS
;
// This is done to eliminate unnecessary slowing down of the first query
if
(
!
order
||
!
describe
)
if
(
!
order
||
!
describe
)
last_sl
->
next
=
0
;
// Remove this extra element
last_sl
->
next
=
0
;
// Remove this extra element
}
}
...
@@ -200,7 +203,7 @@ int mysql_union(THD *thd, LEX *lex,select_result *result)
...
@@ -200,7 +203,7 @@ int mysql_union(THD *thd, LEX *lex,select_result *result)
item_list
,
NULL
,
(
describe
)
?
0
:
order
,
item_list
,
NULL
,
(
describe
)
?
0
:
order
,
(
ORDER
*
)
NULL
,
NULL
,
(
ORDER
*
)
NULL
,
(
ORDER
*
)
NULL
,
NULL
,
(
ORDER
*
)
NULL
,
thd
->
options
,
result
);
thd
->
options
,
result
);
if
(
f
r
&&
!
res
)
if
(
f
ound_rows_for_union
&&
!
res
)
thd
->
limit_found_rows
=
(
ulonglong
)
table
->
file
->
records
;
thd
->
limit_found_rows
=
(
ulonglong
)
table
->
file
->
records
;
}
}
}
}
...
...
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