tracker issue : CF-3285881

select a category, or use search below
(searches all categories and all time range)
Title:

cfexecute has a problem using redirect operator <

| View in Tracker

Status/Resolution/Reason: Closed/Withdrawn/NotABug

Reporter/Name(from Bugbase): Eric Sontag / Eric Sontag (Eric Sontag)

Created: 07/11/2012

Components: Language

Versions: 10.0

Failure Type: Enhancement Request

Found In Build/Fixed In Build: Final /

Priority/Frequency: Major / All users will encounter

Locale/System: English / Win All

Vote Count: 0

Problem Description:
If you call cfexecute with the following command line
mysql -u<user> -p<password> -D<database> < dumpfile.sql 
the dumpfile never gets passed to mysql as part of the standard input stream.

Steps to Reproduce:
<cfexecute name="c:\mysql\bin\mysq.exe" arguments="-uuser -ppassword -Ddatabase < c:/pathto/dumpfile.sql" timeout="9999" variable="cmdoutput"></cfexecute>

Actual Result:
cmdoutput retyurns:

mysql.exe Ver 14.3 Distrib 4.1.1-alpha, for Win95/Win98 (i32) Copyright (C) 2002 MySQL AB This software comes with ABSOLUTELY NO WARRANTY. This is free ...
dummy FALSE connect_timeout 0 max_allowed_packet 16777216 net_buffer_length 16384 select_limit 1000 max_join_size 1000000 secure-auth FALSE 

which is essentially the same as if we passed an invalid parameter or mysql --help

Expected Result:
it should return the same output as the when executed at the shell (which is none)

Any Workarounds:
1)  Create a batch file and execute the batch file (cannot get the return codes in the event of error)
2) use external CFX utilites like CFX_ConsoleCommand, CFX_Execute (these are not supported on a x64 architecture)
3) use CFX_Exec (this works on x64 and x32 and it what I intend on using)

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3285881

External Customer Info:
External Company:  
External Customer Name: esontag
External Customer Email:  
External Test Config: My Hardware and Environment details:

Windows 2008 x64 Coldfusion 8 Standard, 8GB RAM.

Mysql versions 4.1, 5.1



This error has been around for years but I figured I'd report it since apparently nobody else has.

Attachments:

Comments:

Two weeks and no comments? acknowledgement from Adobe? Nothing?
Comment by External U.
18730 | July 25, 2012 09:54:43 AM GMT
This is a wrong expected behaviour. Taking input using '<' or redirection using '>' is a 'command shell' feature and not of the executable. If the argument is taken by the executable, it will definitely be passed without any issue. Not a bug.
Comment by Rupesh K.
18731 | July 26, 2012 12:11:10 AM GMT