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
1086e7c5
Commit
1086e7c5
authored
Mar 05, 2002
by
Sinisa@sinisa.nasamreza.org
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
several bug fixes and tests
parent
68fc8f14
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
3 deletions
+13
-3
mysql-test/mysql-test-run.sh
mysql-test/mysql-test-run.sh
+2
-0
mysql-test/r/select_found.result
mysql-test/r/select_found.result
+6
-0
mysql-test/t/select_found.test
mysql-test/t/select_found.test
+2
-0
sql/sql_select.cc
sql/sql_select.cc
+3
-3
No files found.
mysql-test/mysql-test-run.sh
View file @
1086e7c5
...
@@ -730,6 +730,7 @@ start_master()
...
@@ -730,6 +730,7 @@ start_master()
--server-id=1
\
--server-id=1
\
--basedir=
$MY_BASEDIR
\
--basedir=
$MY_BASEDIR
\
--port=
$MASTER_MYPORT
\
--port=
$MASTER_MYPORT
\
--local-infile
\
--exit-info=256
\
--exit-info=256
\
--core
\
--core
\
--datadir=
$MASTER_MYDDIR
\
--datadir=
$MASTER_MYDDIR
\
...
@@ -749,6 +750,7 @@ start_master()
...
@@ -749,6 +750,7 @@ start_master()
--server-id=1 --rpl-recovery-rank=1
\
--server-id=1 --rpl-recovery-rank=1
\
--basedir=
$MY_BASEDIR
--init-rpl-role=master
\
--basedir=
$MY_BASEDIR
--init-rpl-role=master
\
--port=
$MASTER_MYPORT
\
--port=
$MASTER_MYPORT
\
--local-infile
\
--datadir=
$MASTER_MYDDIR
\
--datadir=
$MASTER_MYDDIR
\
--pid-file=
$MASTER_MYPID
\
--pid-file=
$MASTER_MYPID
\
--socket=
$MASTER_MYSOCK
\
--socket=
$MASTER_MYSOCK
\
...
...
mysql-test/r/select_found.result
View file @
1086e7c5
...
@@ -20,6 +20,12 @@ a b
...
@@ -20,6 +20,12 @@ a b
select found_rows();
select found_rows();
FOUND_ROWS()
FOUND_ROWS()
8
8
select SQL_BUFFER_RESULT SQL_CALC_FOUND_ROWS * from t1 limit 1;
a b
1 2
select found_rows();
FOUND_ROWS()
8
select SQL_CALC_FOUND_ROWS * from t1 order by b desc limit 1;
select SQL_CALC_FOUND_ROWS * from t1 order by b desc limit 1;
a b
a b
8 9
8 9
...
...
mysql-test/t/select_found.test
View file @
1086e7c5
...
@@ -9,6 +9,8 @@ select SQL_CALC_FOUND_ROWS * from t1;
...
@@ -9,6 +9,8 @@ select SQL_CALC_FOUND_ROWS * from t1;
select
found_rows
();
select
found_rows
();
select
SQL_CALC_FOUND_ROWS
*
from
t1
limit
1
;
select
SQL_CALC_FOUND_ROWS
*
from
t1
limit
1
;
select
found_rows
();
select
found_rows
();
select
SQL_BUFFER_RESULT
SQL_CALC_FOUND_ROWS
*
from
t1
limit
1
;
select
found_rows
();
select
SQL_CALC_FOUND_ROWS
*
from
t1
order
by
b
desc
limit
1
;
select
SQL_CALC_FOUND_ROWS
*
from
t1
order
by
b
desc
limit
1
;
select
found_rows
();
select
found_rows
();
select
SQL_CALC_FOUND_ROWS
distinct
b
from
t1
limit
1
;
select
SQL_CALC_FOUND_ROWS
distinct
b
from
t1
limit
1
;
...
...
sql/sql_select.cc
View file @
1086e7c5
...
@@ -187,7 +187,7 @@ mysql_select(THD *thd,TABLE_LIST *tables,List<Item> &fields,COND *conds,
...
@@ -187,7 +187,7 @@ mysql_select(THD *thd,TABLE_LIST *tables,List<Item> &fields,COND *conds,
TABLE
*
tmp_table
;
TABLE
*
tmp_table
;
int
error
,
tmp_error
;
int
error
,
tmp_error
;
bool
need_tmp
,
hidden_group_fields
;
bool
need_tmp
,
hidden_group_fields
;
bool
simple_order
,
simple_group
,
no_order
,
skip_sort_order
;
bool
simple_order
,
simple_group
,
no_order
,
skip_sort_order
,
buffer_result
;
Item
::
cond_result
cond_value
;
Item
::
cond_result
cond_value
;
SQL_SELECT
*
select
;
SQL_SELECT
*
select
;
DYNAMIC_ARRAY
keyuse
;
DYNAMIC_ARRAY
keyuse
;
...
@@ -201,6 +201,7 @@ mysql_select(THD *thd,TABLE_LIST *tables,List<Item> &fields,COND *conds,
...
@@ -201,6 +201,7 @@ mysql_select(THD *thd,TABLE_LIST *tables,List<Item> &fields,COND *conds,
/* Check that all tables, fields, conds and order are ok */
/* Check that all tables, fields, conds and order are ok */
select_distinct
=
test
(
select_options
&
SELECT_DISTINCT
);
select_distinct
=
test
(
select_options
&
SELECT_DISTINCT
);
buffer_result
=
test
(
select_options
&
OPTION_BUFFER_RESULT
)
&&
!
test
(
select_options
&
OPTION_FOUND_ROWS
);
tmp_table
=
0
;
tmp_table
=
0
;
select
=
0
;
select
=
0
;
no_order
=
skip_sort_order
=
0
;
no_order
=
skip_sort_order
=
0
;
...
@@ -546,8 +547,7 @@ mysql_select(THD *thd,TABLE_LIST *tables,List<Item> &fields,COND *conds,
...
@@ -546,8 +547,7 @@ mysql_select(THD *thd,TABLE_LIST *tables,List<Item> &fields,COND *conds,
need_tmp
=
(
join
.
const_tables
!=
join
.
tables
&&
need_tmp
=
(
join
.
const_tables
!=
join
.
tables
&&
((
select_distinct
||
!
simple_order
||
!
simple_group
)
||
((
select_distinct
||
!
simple_order
||
!
simple_group
)
||
(
group
&&
order
)
||
(
group
&&
order
)
||
buffer_result
));
test
(
select_options
&
OPTION_BUFFER_RESULT
)));
// No cache for MATCH
// No cache for MATCH
make_join_readinfo
(
&
join
,
make_join_readinfo
(
&
join
,
...
...
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