>Description: Apparently in 4.0.3 does not like if statements in it's SELECT query... A query that once worked now returns 0 when I use an IF, rather than the proper value
>How-To-Repeat: This is a simple example of how I am able to recreate... CREATE TEMPORARY TABLE temp SELECT IF(LENGTH('test'),'test','test') AS test; SELECT * FROM temp; This will yield 0, where it should be test... Describing the table shows an int(4), so I am guessing it is not figuring out the proper type... my original query I found this in is as follows, H.type is a char(5) field CREATE TEMPORARY TABLE map(primary key(h_order), key (type)) IGNORE SELECT H.type AS a,IF(LENGTH(H.type),H.type,H.type) AS type,H.h_order,H.userid FROM pool_holdings.h_ANTSPOOL_18 AS H LEFT JOIN pool_lookup.lookup AS L ON H.userid = L.secid AND (H.type = '' OR L.type = H.type); >Fix: no known way >Submitter-Id: <submitter ID> >Originator: Web development >Organization: >MySQL support: [none | licence | email support | extended email support ] >Synopsis: >Severity: >Priority: >Category: mysql >Class: >Release: mysql-4.0.3-beta-max (Official MySQL-max binary) >Server: /idcom/mysql/bin/mysqladmin Ver 8.37 Distrib 4.0.3-beta, for sun-solaris2.7 >on sparc Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB This software comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to modify and redistribute it under the GPL license Server version 4.0.3-beta-max Protocol version 10 Connection 127.0.0.1 via TCP/IP TCP port 3307 Uptime: 1 day 39 min 50 sec Threads: 29 Questions: 5800958 Slow queries: 402 Opens: 689 Flush tables: 12 Open tables: 78 Queries per second avg: 65.333 >Environment: System: SunOS gums-sun 5.7 Generic_106541-16 sun4u sparc SUNW,Ultra-Enterprise Architecture: sun4 Some paths: /prod/gnusol/bin/perl /usr/ccs/bin/make /prod/cygnus/gnupro-99r1/H-sparc-sun-solaris2.7/bin/gcc /usr/ucb/cc GCC: Reading specs from /prod/cygnus/gnupro-99r1/H-sparc-sun-solaris2.7/lib/gcc-lib/sparc-sun-solaris2.7/2.9-gnupro-99r1/specs gcc version 2.9-gnupro-99r1 Compilation info: CC='gcc' CFLAGS='-O3 -fno-omit-frame-pointer' CXX='gcc' CXXFLAGS='-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti' LDFLAGS='' LIBC: -rw-r--r-- 1 bin bin 1707752 May 2 2001 /lib/libc.a lrwxrwxrwx 1 root root 11 Dec 13 2001 /lib/libc.so -> ./libc.so.1 -rwxr-xr-x 1 bin bin 1125056 May 2 2001 /lib/libc.so.1 -rw-r--r-- 1 bin bin 1707752 May 2 2001 /usr/lib/libc.a lrwxrwxrwx 1 root root 11 Dec 13 2001 /usr/lib/libc.so -> ./libc.so.1 -rwxr-xr-x 1 bin bin 1125056 May 2 2001 /usr/lib/libc.so.1 Configure command: ./configure --prefix=/usr/local/mysql '--with-comment=Official MySQL-max binary' --with-extra-charsets=complex --with-server-suffix=-max --enable-thread-safe-client --enable-local-infile --enable-assembler --disable-shared --with-berkeley-db --with-raid --with-innodb CC=gcc 'CFLAGS=-O3 -fno-omit-frame-pointer' 'CXXFLAGS=-O3 -fno-omit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti' CXX=gcc --------------------------------------------------------------------- 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