[EMAIL PROTECTED] writes:
> >Description:
> *** against BK as of set 1.1144 ***
>
> It appears that putting SQL_BUFFER_RESULT and SQL_CALC_FOUND_ROWS
> in the same SELECT statement is a really bad idea!
>
> SELECT FOUND_ROWS() after SELECT SQL_BUFFER_RESULT SQL_CALC_FOUND_ROWS
> either returns a huge number (too big) or zero.
>
> Removing SQL_BUFFER_RESULT makes FOUND_ROWS() return the correct answer.
> >How-To-Repeat:
> mysql> SELECT SQL_BUFFER_RESULT SQL_CALC_FOUND_ROWS * FROM Downloads WHERE (match
> (Name) against ('+fokker' in boolean mode) or match (Description) against
> ('+fokker' in boolean mode)) ORDER BY Name LIMIT 0, 10;
>
> <normal, correct output>
>
Hi!
Thank you for your bug report.
Here comes a temporary patch that fixes that problem. Final patch
will come in 4.0.2 :
===== sql/sql_select.cc 1.154 vs edited =====
*** /tmp/sql_select.cc-1.154-19781 Fri Mar 1 18:58:05 2002
--- edited/sql/sql_select.cc Tue Mar 5 13:45:29 2002
***************
*** 187,193 ****
TABLE *tmp_table;
int error, tmp_error;
bool need_tmp,hidden_group_fields;
! bool simple_order,simple_group,no_order, skip_sort_order;
Item::cond_result cond_value;
SQL_SELECT *select;
DYNAMIC_ARRAY keyuse;
--- 187,193 ----
TABLE *tmp_table;
int error, tmp_error;
bool need_tmp,hidden_group_fields;
! bool simple_order,simple_group,no_order, skip_sort_order,
buffer_result;
Item::cond_result cond_value;
SQL_SELECT *select;
DYNAMIC_ARRAY keyuse;
***************
*** 201,206 ****
--- 201,207 ----
/* 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,553 ****
need_tmp= (join.const_tables != join.tables &&
((select_distinct || !simple_order || !simple_group) ||
! (group && order) ||
! test(select_options & OPTION_BUFFER_RESULT)));
// No cache for MATCH
make_join_readinfo(&join,
--- 547,553 ----
need_tmp= (join.const_tables != join.tables &&
((select_distinct || !simple_order || !simple_group) ||
! (group && order) || buffer_result));
// No cache for MATCH
make_join_readinfo(&join,
--
Regards,
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Mr. Sinisa Milivojevic <[EMAIL PROTECTED]>
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Fulltime Developer
/_/ /_/\_, /___/\___\_\___/ Larnaca, Cyprus
<___/ www.mysql.com
---------------------------------------------------------------------
Before posting, please check:
http://www.mysql.com/manual.php (the manual)
http://lists.mysql.com/ (the list archive)
To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php