Skip to content

Commit 81209f4

Browse files
Added: readme file
1 parent 794d476 commit 81209f4

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

README.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
MySQL Proxy scripts for devs
2+
============================
3+
4+
This is a repository of useful [MySQL Proxy][mysql-proxy] scripts targetting
5+
mainly developers in quest of debugging.
6+
7+
Requirements
8+
------------
9+
10+
[MySQL Proxy][mysql-proxy]
11+
12+
Running
13+
-------
14+
15+
mysql-proxy --proxy-lua-script=/absolute/path/to/the/script.lua
16+
17+
Scripts
18+
-------
19+
20+
### debug.lua
21+
22+
Prints every SQL command received while cleaning obsolete spaces. Every
23+
command appears on one line with the following additional information:
24+
* an optional informative message about the query,
25+
* the number of rows returned or affected by the query,
26+
* the amout of time (in ms) it took to run the query.
27+
28+
Additionally, colors are used to provide direct information on the queries:
29+
* yellow: when not using a good index (no\_good\_index\_used flag),
30+
* yellow + bold: when not using an index at all,
31+
* red: when an error occured,
32+
* pink: for queries affecting records.
33+
34+
Colors are also used to denote slow queries: time displayed in red instead of
35+
green. When a query returns no rows nor affect records, "<NONE>" is displayed
36+
using red in reverse video.
37+
38+
[mysql-proxy]: http://forge.mysql.com/wiki/MySQL_Proxy

0 commit comments

Comments
 (0)