MySQL 4.1: SELECT query returns wrong results, if usign IFNULL() and LEFT JOIN and InnoDB and ORDER

MySQL 4.1: SELECT query returns wrong results, if usign IFNULL() and LEFT JOIN and InnoDB and ORDER

am 24.11.2002 00:11:40 von gbichot

Description:
MySQL 4.1: SELECT query returns wrong results, if usign IFNULL() and LEFT JOIN and InnoDB and
ORDER BY.
Hope I'm not bothering you with some already-fixed bug.
3.23.47 has the same bug.

How-To-Repeat:
create table t(a int, b int) type=innodb;
insert into t values(10,null);
select t1.b, ifnull(t1.b,"this is null") from t t1 left join t t2 on t1.b=t2.a;
select t1.b, ifnull(t1.b,"this is null") from t t1 left join t t2 on t1.b=t2.a order by 1;
#the last query gives wrong results in the second column.
#Right results if t is MyISAM.
#I could not find a simpler test case.

Fix:
?

Originator: Guilhem Bichot
Synopsis: MySQL 4.1: SELECT query returns wrong results, if usign IFNULL() and LEFT JOIN and
InnoDB and ORDER BY.
Release: mysql-4.1.0-alpha (Source distribution) from bitkeeper tree pulled 11-19
Server version 4.1.0-alpha-debug-log
System: Linux localhost.localdomain 2.4.18-6mdk #1 Fri Mar 15 02:59:08 CET 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/i586-mandrake-linux-gnu/2.96/specs
gcc version 2.96 20000731 (Mandrake Linux 8.2 2.96-0.76mdk)
Compilation info: CC='gcc' CFLAGS='-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W
-Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Wunused -mcpu=pentiumpro
-DUNIV_MUST_NOT_INLINE -DEXTRA_DEBUG -DFORCE_INIT_OF_VARS -DSAFEMALLOC -DPEDANTIC_SAFEMALLOC
-DSAFE_MUTEX -O1' CXX='gcc' CXXFLAGS='-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W
-Wchar-subscripts -Wformat -Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual
-Wsign-promo -Wreorder -Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors
-fno-exceptions -fno-rtti -mcpu=pentiumpro -DUNIV_MUST_NOT_INLINE -DEXTRA_DEBUG
-DFORCE_INIT_OF_VARS -DSAFEMALLOC -DPEDANTIC_SAFEMALLOC -DSAFE_MUTEX -O1' LDFLAGS=''
LIBC:
lrwxrwxrwx 1 root root 13 Oct 4 22:32 /lib/libc.so.6 -> libc-2.2.4.so
-rwxr-xr-x 1 root root 1275300 Mar 7 2002 /lib/libc-2.2.4.so
-rw-r--r-- 1 root root 27274138 Mar 7 2002 /usr/lib/libc.a
-rw-r--r-- 1 root root 178 Mar 7 2002 /usr/lib/libc.so
Configure command: ./configure --prefix=/usr/local/mysql --enable-assembler
--with-extra-charsets=complex --enable-thread-safe-client --with-debug --enable-local-infile
'CFLAGS=-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat
-Wparentheses -Wsign-compare -Wwrite-strings -Wunused -mcpu=pentiumpro -DUNIV_MUST_NOT_INLINE
-DEXTRA_DEBUG -DFORCE_INIT_OF_VARS -DSAFEMALLOC -DPEDANTIC_SAFEMALLOC -DSAFE_MUTEX -O1'
'CXXFLAGS=-Wimplicit -Wreturn-type -Wswitch -Wtrigraphs -Wcomment -W -Wchar-subscripts -Wformat
-Wparentheses -Wsign-compare -Wwrite-strings -Woverloaded-virtual -Wsign-promo -Wreorder
-Wctor-dtor-privacy -Wnon-virtual-dtor -felide-constructors -fno-exceptions -fno-rtti
-mcpu=pentiumpro -DUNIV_MUST_NOT_INLINE -DEXTRA_DEBUG -DFORCE_INIT_OF_VARS -DSAFEMALLOC
-DPEDANTIC_SAFEMALLOC -DSAFE_MUTEX -O1' CXX=gcc



___________________________________________________________
Do You Yahoo!? -- Une adresse @yahoo.fr gratuite et en français !
Yahoo! Mail : http://fr.mail.yahoo.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 bugs-thread13091@lists.mysql.com
To unsubscribe, e-mail