>Description:
        I'm using Mysql 4.0.10-gamma with query caching:

                set-variable = query_cache_limit=10M
                set-variable = query_cache_size=10M
                set-variable = query_cache_startup_type=1

        The Command:

                Select * 
                    INTO OUTFILE "YourFileName"
                    FIELDS TERMINATED BY ',' ENCLOSED BY '"'
                    From AnyTable;


        Note: rm -f YourFilename is executed before the Select.

        The first execution of the command writes the expected
        data to YourFileName. 

        Any subsequent executions do not. This is because of query caching.


        If the SELECT Statement is changed to:

                Select * SQL_NO_CACHE 
                    INTO OUTFILE "YourFileName"
                    FIELDS TERMINATED BY ',' ENCLOSED BY '"'
                    From AnyTable;

        or:
                Select * From AnyTable;

        Subsequent Calls Work Fine.
        
>How-To-Repeat:
        Execute the same command more than once.
>Fix:
        Use SQL_NO_CACHE as temporary fix.... Shouldn't have to..

>Submitter-Id:  <submitter ID>
>Originator:    Nick Pasich
>Organization:
  WebSite: http://www.users.cts.com/sd/n/npasich
                         _      _     
   _ __  _ __   __ _ ___(_) ___| |__  
  | '_ \| '_ \ / _` / __| |/ __| '_ \  
  | | | | |_) | (_| \__ \ | (__| | | |
  |_| |_| .__/ \__,_|___/_|\___|_| |_|@sd.cts.com
        |_|                           
>
>MySQL support: email support
>Synopsis:      Problems Using SELECT INTO OUTFILE      
>Severity:      non-critical
>Priority:      medium
>Category:      mysql
>Class:         sw-bug
>Release:       mysql-4.0.10-gamma (Source distribution)
>Server: /usr/local/MYSQL/bin/mysqladmin  Ver 8.40 Distrib 4.0.10-gamma, for pc-linux 
>on i686
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.10-gamma-log
Protocol version        10
Connection              Localhost via UNIX socket
UNIX socket             /usr/local/MYSQL/mysql.sock
Uptime:                 24 days 3 hours 4 min 47 sec

Threads: 1  Questions: 72731  Slow queries: 1213  Opens: 6681  Flush tables: 605  Open 
tables: 6  Queries per second avg: 0.035
>C compiler:    2.95.3
>C++ compiler:  2.95.3
>Environment:
        
System: Linux NICK 2.4.20-pre10-ac2 #2 Sun Oct 13 12:48:34 PDT 2002 i586 unknown
Architecture: i586

Some paths:  /usr/local/bin/perl /usr/bin/make /usr/bin/gmake /usr/bin/gcc /usr/bin/cc
GCC: Reading specs from 
/usr/local/GCC/gcc-2.95.3/lib/gcc-lib/i586-pc-linux-gnulibc1/2.95.3/specs
gcc version 2.95.3 20010315 (release)
Compilation info: CC='gcc'  CFLAGS='-O3 -march=i586'  CXX='gcc'  CXXFLAGS='-O3 
-march=i586 -felide-constructors -fno-exceptions -fno-rtti'  LDFLAGS=''  ASFLAGS=''
LIBC: 
lrwxrwxrwx    1 root     root           13 Oct 12 06:52 /lib/libc.so.4 -> libc.so.4.7.6
-rwxr-xr-x    1 root     root       623620 Feb 26  1996 /lib/libc.so.4.5.26
-rwxr-xr-x    1 bin      bin        634880 Aug 13  1996 /lib/libc.so.4.7.5
-rwxr-xr-x    1 root     wheel      634880 Apr 29  1996 /lib/libc.so.4.7.6
lrwxrwxrwx    1 root     root           14 Oct 12 06:52 /lib/libc.so.5 -> 
libc.so.5.4.46
-rwxr-xr-x    1 bin      bin        562683 Aug 12  1996 /lib/libc.so.5.0.9
-rwxr-xr-x    1 bin      bin        558615 Apr 12  1997 /lib/libc.so.5.2.18
-rwxr-xr-x    1 bin      bin       1816182 Dec  6  1996 /lib/libc.so.5.4.17
-rwxr-xr-x    1 bin      bin       1760718 Aug 13  1996 /lib/libc.so.5.4.2
-rwxr-xr-x    1 bin      bin       1861963 Apr 15  1997 /lib/libc.so.5.4.23
-rwxr-xr-x    1 bin      bin       1868689 May 30  1997 /lib/libc.so.5.4.33
-rwxr-xr-x    1 bin      bin       1760174 Aug 18  1996 /lib/libc.so.5.4.4
-rwxr-xr-x    1 bin      bin       1874736 Feb  1  1998 /lib/libc.so.5.4.44
-rwxr-xr-x    1 bin      bin       1427975 Jun 20  1998 /lib/libc.so.5.4.46
-rw-r--r--    1 bin      bin       1131866 Jun 20  1998 /usr/lib/libc.a
lrwxrwxrwx    1 bin      bin            19 Sep 26 08:18 /usr/lib/libc.so -> 
/lib/libc.so.5.4.46
Configure command: ./configure '--enable-shared' '--enable-assembler' 
'--without-debug' '--prefix=/usr/local/MYSQL' '--localstatedir=/usr/local/MYSQL/DB' 
'--with-unix-socket-path=/usr/local/MYSQL/mysql.sock' '--with-extra-charsets=none' 
'--without-innodb' 'CFLAGS=-O3 -march=i586' 'CXXFLAGS=-O3 -march=i586 
-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

Reply via email to