GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - patrickallaert/MySQL-Proxy-scripts-for-devs: MySQL-Proxy scripts for devs

BranchesTags
Open more actions menu

Latest commit

 

History

21 Commits
21 Commits

Folders and files

NameName
Last commit message
Last commit date
COPYING
COPYING
 
 
README.md
README.md
 
 
debug-blind.lua
debug-blind.lua
 
 
debug.lua
debug.lua
 
 
log_all_queries.lua
log_all_queries.lua
 
 
slow.lua
slow.lua
 
 

Repository files navigation

MySQL Proxy scripts for devs

This is a repository of useful MySQL Proxy scripts targetting mainly developers in quest of debugging.

Requirements

MySQL Proxy >= 0.8 (May work with earlier version, untested)

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, "" is displayed using red in reverse video.

If you want to force "SQL_NO_CACHE" in your SELECT statements you can set the use_sql_no_cache variable to 1.

debug-blind.lua

Same as debug.lua, but without shell colors.

log_all_queries.lua

Same as debug.lua, but logs to a file (/var/log/mysql-proxy/querydebug.log) and with different fields.

slow.lua

Simulates a server being slow because of huge traffic.

The sleep command accepting a float as argument is required to make this script works out of the box.

The slowdowns can be configured to make all requests longer by a factor or by a fixed amount of time (or both).

By default, requests are made twice slower with an additional overhead of 0.1s.

About

MySQL-Proxy scripts for devs

Resources

Readme
GPL-3.0 license
Activity

Stars

40 stars

Watchers

2 watching

Forks

9 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.