At 10:09 AM +0307 7/8/01, Tonu Samuel wrote:
>Use the utility "perror" to get meaning of OS low level errors.

I have taken a look at the perror utility for viewing the text for 
MySQL error codes and decided I wanted to see all the MySQL error 
messages so I created a simple PERL script:

#!/usr/bin/perl
$inc = 1;
$err ='';
do {
         $err = system "(/usr/local/bin/perror -v $inc;)";
         print "$err.\r";
         $inc++;
} while ($err ne '')

I am not a PERL coder at all, this is one of my first attempts. Can 
anyone suggest a good way to stop printing out the list, when there 
are no more errors to report on? The output is as follows

Error code  86:  Bad CPU type in executable
Error code  87:  Shared library version mismatch
Error code  88:  Malformed Mach-o file
Error code  89:  Unknown error: 89
Error code  90:  Unknown error: 90

and then keeps repeating but I get some odd results with two lines 
for error 120, 121, 123 and so on:

Error code 119:  Unknown error: 119
Error code 120:  Unknown error: 120
120 = Didn't find key on read or update
Error code 121:  Unknown error: 121
121 = Duplicate key on write or update
Error code 122:  Unknown error: 122
Error code 123:  Unknown error: 123
123 = Someone has changed the row since it was read; Update with is recoverable
Error code 124:  Unknown error: 124
124 = Wrong index given to function
Error code 125:  Unknown error: 125
Error code 126:  Unknown error: 126
126 = Index file is crashed / Wrong file format
Error code 127:  Unknown error: 127
127 = Record-file is crashed
Error code 128:  Unknown error: 128
Error code 129:  Unknown error: 129
Error code 130:  Unknown error: 130
Error code 131:  Unknown error: 131
131 = Command not supported by database
Error code 132:  Unknown error: 132

I realize it is simpler if I know how may there are:

#!/usr/bin/perl
for ($inc = 1; $inc< 90; $inc++) {
    system "(/usr/local/bin/perror -v $inc;)";
}

--
Michael
__
||| Michael Collins       |||
||| Kuwago Web Services   |||      mailto:[EMAIL PROTECTED]
||| Seattle, WA, USA      |||      http://www.lassodev.com

---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to