Bug #531 add a list of error numbers
Submitted: 29 May 2003 3:07 Modified: 19 Feb 2004 16:01
Reporter: Ralf Hauser
Status: Closed
Category:Server: Docs Severity:S2 (Serious)
Version:any OS:Any (any)
Assigned to: Bugs System Target Version:
Triage: D4 (Minor)

[29 May 2003 3:07] Ralf Hauser
Description:
when trying to -e "source script.sql", I get "ERROR 1064"
Trying to search the mysql.com site unfortunately doesn't yield a useful result.

How to repeat:
The underlying cause for this is not relevant to this suggestion since it applies to any
error that could occur here

Suggested fix:
Provide a listing of all error numbers that
- contains a short and meaningful error text beyond the 
<<ERROR #### at line XY in file: 'script.sql': You have an error in your SQL syntax. 
Check the manual that corresponds to your MySQL server version for the right syntax to
use near '' at line Z>> that doesn't help much.
- a description about the most likely causes for this error
- links to detailed descriptions how to prevent the most common causes
- a "last resort" link into the bug database

Having this would really speed up the development and save a lot of people a lot of
time!! Many thanks in advance!
[29 May 2003 3:27] Ralf Hauser
http://lists.mysql.com/list.php?1:mss:85336:200109:jpfmopnilfiimklcggii asks for this too
[13 Feb 2004 10:08] Philip Olson
This bug report is partially resolved here (all error codes are listed, but without
descriptions):

  * http://www.mysql.com/doc/en/Error-returns.html

In the very least that page should include text from errmsg.sys.  Error-returns.html
eludes to this file but many people don't have access to it.

Error messages should be listed within that page OR more likely live within its own page
(with the two heavily linked).  Whether that be perror.html or a new page like
Error-messages.html I don't know.  Also, Error-returns.html should link to perror.html
regardless of how this bug report is resolved.

perror.html ends with this text: "Note that the error messages are mostly system
dependent!", which is fine, but since the codes are listed why not also list the messages
too?  I'm sure people would be okay with this note/warning alongside messages from the
"most common system".

Initially this bug report asked for a lot but I think adding the descriptions would be
enough, and interlinking to perror.html.  About the only error that "deserves" an
explanation are syntax errors (this question comes up a lot, people want to know why they
are getting a syntax error) but of course syntax is  just syntax, I guess the error
message for that could end with "LEARN SQL!!" :)

--
Note: Strange this bug report lacks a "status", it's just blank.  Could someone fix that?
:)
--
[19 Feb 2004 11:57] Paul DuBois
I am un-assigning this from the docs team after
discussing the issue with the other team members.
Here's why:

A deeper problem that lies deeper than listing the
errors in the manual is that the error-reporting
function that is supposed to be served by perror does
not work in many cases. There are a lot of errors for
which it reports "unknown error".  So:

- If perror cannot tell what an error means, docs cannot,
either.

- When the error reporting mechanism used by perror
works properly, docs can use the same source of
information used by perror to improve the documentation.
(Of course, if perror worked better, documentation of
the error codes would be less needed, but that's another
matter.)
[19 Feb 2004 16:01] Sergei Golubchik
perror is a different issue. It will fixed of course.
Meanwhile after discussing the issue with Arjen, I'm adding a list of error numbers and
appropriate messages to the manual
[29 Oct 2004 3:54] Cyber identity
Hi,

I have what i think is a bug.

http://www.phpbb.com/phpBB/viewtopic.php?p=1296227

My enviroment is 

Windows 2000 server
IIS 5
PHP 4.9
Latest Mysql

It has amajor problem connecting to the mysql database and i have followed many install
advice.

IF you have any questions please mail me.

Thanks

Cyber