upmerge 42513,52214

This commit is contained in:
Bjorn Munch 2010-04-13 13:55:11 +02:00
commit 83e673474b

View File

@ -612,8 +612,11 @@ public:
if ((bytes= fread(buf, 1, sizeof(buf), m_file)) <= 0)
{
fprintf(stderr, "Failed to read from '%s', errno: %d\n",
m_file_name, errno);
// ferror=0 will happen here if no queries executed yet
if (ferror(m_file))
fprintf(stderr,
"Failed to read from '%s', errno: %d, feof:%d, ferror:%d\n",
m_file_name, errno, feof(m_file), ferror(m_file));
DBUG_VOID_RETURN;
}
@ -8393,16 +8396,6 @@ int main(int argc, char **argv)
check_result();
}
}
else
{
/*
No result_file_name specified, the result
has been printed to stdout, exit with error
unless script has called "exit" to indicate success
*/
if (abort_flag == 0)
die("Exit with failure! Call 'exit' in script to return with sucess");
}
}
else
{