>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>


mysql> SELECT FOUND_ROWS();
+--------------+
| FOUND_ROWS() |
+--------------+
|            0 | <-- wrong
+--------------+

=====

mysql> SELECT 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>


mysql> SELECT FOUND_ROWS();
+--------------+
| FOUND_ROWS() |
+--------------+
|          137 | <-- right
+--------------+

>Fix:
        Remove SQL_BUFFER_RESULT when SQL_CALC_FOUND_ROWS is needed, but this is
        a bug. (Not sure about coding fix, sorry.)

>Submitter-Id:  <submitter ID>
>Originator:    Matt Johnson
>Organization:  AVSIM Online <http://www.avsim.com>
>MySQL support: none
>Synopsis:      SQL_BUFFER_RESULT and SQL_CALC_FOUND_ROWS in same SELECT -> bad 
>FOUND_ROWS()
>Severity:      serious
>Priority:      medium
>Category:      mysql
>Class:         sw-bug
>Release:       mysql-4.0.2-alpha (Source distribution)

>Environment:
System: Linux new-ftp 2.4.17 #1 SMP Mon Jan 21 08:36:59 EST 2002 i686 unknown
Architecture: i686

Some paths:  /usr/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc
GCC: Reading specs from /usr/lib/gcc-lib/i386-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.1 2.96-98)
Compilation info: CC='gcc'  CFLAGS=''  CXX='c++'  CXXFLAGS=''  LDFLAGS=''
LIBC: 
lrwxrwxrwx    1 root     root           13 Jan 21 09:26 /lib/libc.so.6 -> libc-2.2.4.so
-rwxr-xr-x    1 root     root      5723311 Dec  8 09:04 /lib/libc-2.2.4.so
-rw-r--r--    1 root     root     27314296 Dec  8 09:02 /usr/lib/libc.a
-rw-r--r--    1 root     root          178 Dec  8 09:02 /usr/lib/libc.so
Configure command: ./configure  --prefix=/usr/local/mysql-20020302 
--enable-thread-safe-client --enable-assembler 
--with-unix-socket-path=/var/lib/mysql/mysql.sock --with-mysqld-user=mysql 
--without-debug --with-charset=latin1 --with-extra-charsets=none --without-innodb


---------------------------------------------------------------------
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

Reply via email to