In the wrong context, almost anything can be funny, and MySQL’s error codes are no exception. A few weeks ago, things got a little loopy at VividCortex headquarters as we discovered some definitions that could be taken more than one way.
How It Began
It started with
ER_M_BIGGER_THAN_D, which doesn’t sound like an error at all. Anyone who knows alphabetical order knows that M is bigger than D! Of course, the error is really about an attempt to define a decimal or float column wrongly.
ER_TOO_BIG_SCALE, about which I tweeted “MongoDB doesn’t have this error, as far as I know, but MySQL does.”
MongoDB doesn't have this error, as far as I know, but MySQL does. ER_TOO_BIG_SCALE http://t.co/GkzvH3k8RR— Baron Schwartz (@xaprb) November 21, 2014
Which reminded us of Big Data, of course.
Doge Error Codes
We have an inexplicable fixation for the Doge meme at VividCortex. Our chatbot even has a
/doge me command. If you’re not familiar with the meme, it’s basically pictures and variations of pictures of a dog, with Comic Sans font representing his internal dialogue expressing his feelings of amazement at his superiority. His grammar is oddly stilted, with awkward use of superlatives like “such,” “many,” and “very.”
Of course, there are some Doge error codes, which we sprinkled in our chat channel with Doge emoticons.
We decided, however, that
ER_CANNOT_USER is “the dogest of them all.” User isn’t a verb, but Doge likes to verb words. It weirds language.
Other Fun Errors
Here’s a sprinkling of some other fun error definitions:
ER_NORMAL_SHUTDOWN- wait, is that an error?
ER_ALTER_INFO- its doppelganger is
ER_TABLE_CANT_HANDLE_BLOB- unless the table is named STEVE_MCQUEEN
Take a look through the definitions and see if you can find any more of your own!
Ready For Connections
ER_STARTUP. VividCortex is a startup, so this one seems especially appropriate. It’s not what it seems, though. This is the familiar ready-for-business message in the server’s log:
Error: 1408 SQLSTATE: HY000 (ER_STARTUP) Message: %s: ready for connections. Version: '%s' socket: '%s' port: %d %s
At VividCortex we’re ready for business, too. If you’d like to monitor MySQL queries and performance the easy way, sign up for a free trial today.
But Seriously, Folks
This all came about for two reasons. First, we added an opensource package of error code definitions for Go. No more comparisons to magic numbers or strings when you get an error from the server. For more on using MySQL with Go, watch the recording of our recent webinar on that topic.
Second, as you may know, VividCortex captures production query traffic from the network, and reveals hidden details such as queries that return warnings or errors to clients. We’re in the process of making the user interface expose those errors and messages more nicely. Of course, we need a list of those, which you can find in the
errmsg.sys file in the server distribution. (Trivia fact: aside from this file, the mysqld binary is self-contained and can be run without other dependencies.)
Now, go forth and err no more!