Skip to content

Commit

Permalink
Added: readme file
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickallaert committed Nov 11, 2011
1 parent 794d476 commit 81209f4
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions README.md
@@ -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

0 comments on commit 81209f4

Please sign in to comment.