Bug #14977 ERROR 1314 (0A000): LOAD DATA is not allowed in stored procedures
Submitted: 16 Nov 2005 12:16 Modified: 25 Jan 2006 15:40
Reporter: Xavier Pointe
Status: Duplicate
Category:Server: SP Severity:S2 (Serious)
Version:5.0.15/5.0.17 BK OS:Microsoft Windows (win XP/Linux)
Assigned to: Konstantin Osipov Target Version:

[16 Nov 2005 12: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 14:00] Miguel Solorzano
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 15: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 15: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 16:07] Miguel Solorzano
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 16: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 21: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 15: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 12: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 14:43] Konstantin Osipov
We're working on adding support for all commands to stored procedure in a future release.