summaryrefslogtreecommitdiff
path: root/sql/sql_select.cc
diff options
context:
space:
mode:
authorunknown <Sinisa@sinisa.nasamreza.org>2002-03-05 14:22:32 +0200
committerunknown <Sinisa@sinisa.nasamreza.org>2002-03-05 14:22:32 +0200
commita02a98c4016bfeb663ee70d96d9612f030d30717 (patch)
treeb26ba6e3074e4d3e0e56a980e9feb0ee34a45885 /sql/sql_select.cc
parentd737186f303e1503ff08b9a22f4c0394c3f1fad2 (diff)
downloadmariadb-git-a02a98c4016bfeb663ee70d96d9612f030d30717.tar.gz
several bug fixes and tests
mysql-test/mysql-test-run.sh: Fix for LOAD DATA LOCAL ... mysql-test/r/select_found.result: Added result for a new test of combo of options for FOUND_ROWS and BUFFER_RESULT mysql-test/t/select_found.test: Added test for combo of options for BUFFER_RESULT and FOUND_ROWS sql/sql_select.cc: Added fix for combo of options for BUFFER_RESULT and FOUND_ROWS
Diffstat (limited to 'sql/sql_select.cc')
-rw-r--r--sql/sql_select.cc6
1 files changed, 3 insertions, 3 deletions
diff --git a/sql/sql_select.cc b/sql/sql_select.cc
index 2808212f039..284f6304e07 100644
--- a/sql/sql_select.cc
+++ b/sql/sql_select.cc
@@ -187,7 +187,7 @@ mysql_select(THD *thd,TABLE_LIST *tables,List<Item> &fields,COND *conds,
TABLE *tmp_table;
int error, tmp_error;
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;
SQL_SELECT *select;
DYNAMIC_ARRAY keyuse;
@@ -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 */
select_distinct=test(select_options & SELECT_DISTINCT);
+ buffer_result=test(select_options & OPTION_BUFFER_RESULT) && !test(select_options & OPTION_FOUND_ROWS);
tmp_table=0;
select=0;
no_order=skip_sort_order=0;
@@ -546,8 +547,7 @@ mysql_select(THD *thd,TABLE_LIST *tables,List<Item> &fields,COND *conds,
need_tmp= (join.const_tables != join.tables &&
((select_distinct || !simple_order || !simple_group) ||
- (group && order) ||
- test(select_options & OPTION_BUFFER_RESULT)));
+ (group && order) || buffer_result));
// No cache for MATCH
make_join_readinfo(&join,