Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 389532 Details for
Bug 529574
dev-db/mysql - INTO OUTFILE should support writing to named pipes
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
mysql select ... into fifo
mysql_select-into-fifo.diff (text/plain), 1.77 KB, created by
Hanno Zysik (geki)
on 2014-11-16 20:05:18 UTC
(
hide
)
Description:
mysql select ... into fifo
Filename:
MIME Type:
Creator:
Hanno Zysik (geki)
Created:
2014-11-16 20:05:18 UTC
Size:
1.77 KB
patch
obsolete
>--- sql/sql_class.cc.orig 2014-11-16 08:44:45.417221421 +0100 >+++ sql/sql_class.cc 2014-11-16 09:06:49.933288618 +0100 >@@ -2618,7 +2618,9 @@ > IO_CACHE *cache) > { > File file; >+ MY_STAT stat; > uint option= MY_UNPACK_FILENAME | MY_RELATIVE_PATH; >+ int file_created= 0; > > #ifdef DONT_ALLOW_FULL_LOAD_DATA_PATHS > option|= MY_REPLACE_DIR; // Force use of db directory >@@ -2640,25 +2642,38 @@ > return -1; > } > >- if (!access(path, F_OK)) >+ /* Check if file is a named pipe */ >+ if (my_stat(path, &stat, MYF(0)) && MY_S_ISFIFO(stat.st_mode)) >+ { >+ if ((file= mysql_file_open(key_select_to_file, >+ path, O_WRONLY, MYF(MY_WME))) < 0) >+ return file; >+ } >+ else if (!access(path, F_OK)) > { > my_error(ER_FILE_EXISTS_ERROR, MYF(0), exchange->file_name); > return -1; > } >- /* Create the file world readable */ >- if ((file= mysql_file_create(key_select_to_file, >- path, 0666, O_WRONLY|O_EXCL, MYF(MY_WME))) < 0) >- return file; >+ else >+ { >+ /* Create the file world readable */ >+ if ((file= mysql_file_create(key_select_to_file, >+ path, 0666, O_WRONLY|O_EXCL, MYF(MY_WME))) < 0) >+ return file; > #ifdef HAVE_FCHMOD >- (void) fchmod(file, 0666); // Because of umask() >+ (void) fchmod(file, 0666); // Because of umask() > #else >- (void) chmod(path, 0666); >+ (void) chmod(path, 0666); > #endif >+ file_created= 1; >+ } >+ > if (init_io_cache(cache, file, 0L, WRITE_CACHE, 0L, 1, MYF(MY_WME))) > { > mysql_file_close(file, MYF(0)); > /* Delete file on error, it was just created */ >- mysql_file_delete(key_select_to_file, path, MYF(0)); >+ if (file_created) >+ mysql_file_delete(key_select_to_file, path, MYF(0)); > return -1; > } > return file;
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 529574
: 389532