Bug #14977 ERROR 1314 (0A000): LOAD DATA is not allowed in stored procedures
Submitted: 16 Nov 2005 11:16 Modified: 25 Jan 2006 14:40
Reporter: Xavier Pointe Email Updates:
Status: Duplicate Impact on me:
None 
Category:MySQL Server: Stored Routines Severity:S2 (Serious)
Version:5.0.15/5.0.17 BK OS:Windows (win XP/Linux)
Assigned to: Assigned Account CPU Architecture:Any

[16 Nov 2005 11:16] Xavier Pointe
Description:
Since I updgraded from V5.0.4 to 5.0.15, when I call a stored procedure, I get the message :
ERROR 1314 (0A000): LOAD DATA is not allowed in stored procedures

This procedure was working well on the old version. As I could see on forums, this seems to be there from V5.0.7. 

I cannot even show or drop the procedure. I'm stuck.

However, I couldn't find any other bug report on this subject, so I post it.

How to repeat:
I guess it is not even possible to create a procedure with load data command in the lastests versions, but if you raise the procedure with V5.0.4 and call it with v5.0.15, the bug is obvious.
[16 Nov 2005 13:00] MySQL Verification Team
Thank you for taking the time to write to us, but this is not
a bug. Please double-check the documentation available at
http://www.mysql.com/documentation/ and the instructions on
how to report a bug at http://bugs.mysql.com/how-to-report.php

Additional info:

Yes this was not more allowed since version 5.0.7.
[16 Nov 2005 14:20] Xavier Pointe
Well to my mind, if cannot even drop show or modify a procedure that was created previously, it is a bug...
[21 Nov 2005 14:26] Sergei Golubchik
Agree.
DROP should work. SHOW/ALTER - we'll try, if it's possible (not sure what degree of validity is required to SHOW/ALTER a procedure).
[21 Nov 2005 15:07] MySQL Verification Team
For to try reproduce the drop procedure issue, could you please
can say me how you did the upgrade to 5.0.15 from 5.0.14?

Thanks in advance.
[21 Nov 2005 15:56] Xavier Pointe
I did the upgrade from 5.0.04b to 5.0.15. Merely by running the .exe installer. The installer detected the 5.0.04 old version and installed the new version onto.

I assume that the 5.0.4b which allowed to create a stored procedure with 'load data' command was a beta, not release version. So that there is no conflict between two release version, just from beta to release.

Never mind, I removed the 5.0.15 and reinstalled the old 5.0.04b in order to access and modify the stored procedure and get a full compatible code before upgrading again.

Thanks.
[19 Jan 2006 20:31] patricio fuenmayor
hi.
I think that is a limitation to the procedure, because a need automatice process and i can not autimatice load files .

I works with many archives and it is a very fast way to reduce times.
[25 Jan 2006 14:40] Konstantin Osipov
This is a duplicate of Bug#16303 "erroneus stored procedures and functions should be droppable". Setting up the duplicate chain to point at 16303 as its synopsis is more explicit.
[31 May 2006 10:19] Alain Danger
OK. That's great. LOAD DATA INFILE is disabled from procedures in the last version. WHAT IS THE WORKAROUND ? Is it SELECT FROM 'MyFile' ou using another language sending ODBC("LOAD DATA..."). No way to re-enable LOAD DATA into procedures ? Please answer
[31 May 2006 12:43] Konstantin Osipov
We're working on adding support for all commands to stored procedure in a future release.
[19 May 2011 18:47] Gavrilo Princep
It is now 5 (FIVE) years later, and you are "... working on it...". 

It is a simple string substitution, the file name is dropped into the procedure code and the procedure runs. 

Five years.
[19 May 2011 19:02] Gavrilo Princep
Server version: 5.1.56-1 (Debian)
May 2011 (up to date)
[30 Jan 2019 14:02] Harikrishna Guggilla
After 12 yrs also still we are facing the problem with this feature.

Error Code: 1314
LOAD DATA is not allowed in stored procedures

Please answer, Do we have any other for this compatibility.
[30 Jan 2019 14:02] Harikrishna Guggilla
current version which am using is 5.7.17