Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
794d476
commit 81209f4
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
MySQL Proxy scripts for devs | ||
============================ | ||
|
||
This is a repository of useful [MySQL Proxy][mysql-proxy] scripts targetting | ||
mainly developers in quest of debugging. | ||
|
||
Requirements | ||
------------ | ||
|
||
[MySQL Proxy][mysql-proxy] | ||
|
||
Running | ||
------- | ||
|
||
mysql-proxy --proxy-lua-script=/absolute/path/to/the/script.lua | ||
|
||
Scripts | ||
------- | ||
|
||
### debug.lua | ||
|
||
Prints every SQL command received while cleaning obsolete spaces. Every | ||
command appears on one line with the following additional information: | ||
* an optional informative message about the query, | ||
* the number of rows returned or affected by the query, | ||
* the amout of time (in ms) it took to run the query. | ||
|
||
Additionally, colors are used to provide direct information on the queries: | ||
* yellow: when not using a good index (no\_good\_index\_used flag), | ||
* yellow + bold: when not using an index at all, | ||
* red: when an error occured, | ||
* pink: for queries affecting records. | ||
|
||
Colors are also used to denote slow queries: time displayed in red instead of | ||
green. When a query returns no rows nor affect records, "<NONE>" is displayed | ||
using red in reverse video. | ||
|
||
[mysql-proxy]: http://forge.mysql.com/wiki/MySQL_Proxy |