469,601 Members | 2,272 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,601 developers. It's quick & easy.

Error 11 (can't unlock file) in different places for sp vs script

m
Hi,
I'm running MySQL (5.0.18-nt) on WinXP with latest patches.

I've some SQL code that generates an 'ERROR 11' in two different places
depending on how the code is submitted.
At the moment I'de like to find out what is causing the error, so I
haven't included the code, which is quite lengthy.

I'm not a MySQL (or anyother db) expert, but I've turned on isam
logging and run the myisamlog utility which didn't seem to be the right
tool...?

I'd like to know how I can find out what is causing this error. Any
suggestions appreciated.

If submitted via:
mysql -u root -e "SOURCE "./../SQL/code.sql";"

the error occurs in the _third_ 'part' of the script (line 131 referred
to is between an insert and a select statement). the error message is:

ERROR 11 (HY000) at line 131 in file: 'D:\MySQL\SQL\code.sql': Can't
unlock file (Errcode: 11)

If submitted via:
mysql -u root -e "CALL `taq`.`sp_code`();"

the error occurs in the _first_ 'part' of the script. the error
message is:

ERROR 11 (HY000) at line 1: Can't unlock file (Errcode: 11)

Feb 16 '06 #1
3 2244
"m" <mv****@gmail.com> wrote in message
news:11*********************@g44g2000cwa.googlegro ups.com...
I'd like to know how I can find out what is causing this error. Any
suggestions appreciated.

ERROR 11 (HY000) at line 131 in file: 'D:\MySQL\SQL\code.sql': Can't
unlock file (Errcode: 11)


Well, since you don't describe the database schema, activity on the server,
or the statements that are executing when you get this error, there's not
much to go on here...

My usual first step in diagnosing an error I haven't seen before is a Google
search for search terms containing the error. Sometimes I can get clues
from past discussions about the same symptoms. For example, search Google
for:

mysql "can't unlock file" "error 11"

This search reveals a number of pages with MySQL bug reports and past MySQL
list traffic on this topic, mostly the resolution is that the user was
running myisamchk while MySQL service is running.

Regards,
Bill K.
Feb 16 '06 #2
m
Hi Bill,
Thanks for your response. I had done as you suggest and had ruled out
the 'server running explanation.
I get this error from the mysql server (rather than myisamchk) and in
two different ways from the same code depending on whether it is run
via a stored procedure or as a script.

Good to know there was some other 'obvious' tool/technique I had over
looked.
Cheers
Mark

Feb 17 '06 #3
m
I have a two SQL files that contain example scripts that should
generate the behavior I refer to. One script contains some data and is
160K, the other about 300bytes.
If anyone is interested in receiving these let me know and I'll email
them.

The show warnings indicates the Errcode 11: is not all that is going
wrong:

The SHOW WARNINGS; statement produces the following:
+---------+------+---------------------------------------------------------------+
| Level | Code | Message
|
+---------+------+---------------------------------------------------------------+
| Error | 11 | Can't unlock file (Errcode: 11)
|
| Error | 1105 | Unknown error
|
| Warning | 1196 | Some non-transactional changed tables couldn't
be rolled back|
+---------+------+---------------------------------------------------------------+

Regards
Mark

Feb 17 '06 #4

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by Wayno | last post: by
9 posts views Thread by JTrigger | last post: by
8 posts views Thread by jcrouse | last post: by
4 posts views Thread by Kiyomi | last post: by
39 posts views Thread by eruanion | last post: by
reply views Thread by suresh191 | last post: by
4 posts views Thread by guiromero | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.