Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
 

Go Back   XSL - XML - RSS Forums > Programming and XML > Ruby on Rails and XML

Tags:



Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 09-05-2008, 03:18 PM
Junkone
 
Posts: n/a

Default ruby based mysql sniffer



therei sone in perl. i am looking for a equavalent in ruby. i just
want to trace the sql statements being executed by mysql as i cannot
debug my client app to find out what sql it is sending out to the
database.
http://iank.org/querysniffer/
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 09-05-2008, 05:36 PM
Joost Diepenmaat
 
Posts: n/a

Default Re: ruby based mysql sniffer

Junkone <junkone1@gmail.com> writes:

> therei sone in perl. i am looking for a equavalent in ruby. i just
> want to trace the sql statements being executed by mysql as i cannot
> debug my client app to find out what sql it is sending out to the
> database.


1. why don't you just turn on logging in mysql and check out the query
log?

2. since you can't debug the client app (whatever that means) does it
matter what language the sniffer is written in?

ho pet hishelps

--
Joost Diepenmaat | blog: http://joost.zeekat.nl/ | work: http://zeekat.nl/
Reply With Quote
  #3 (permalink)  
Old 09-05-2008, 08:03 PM
Phlip
 
Posts: n/a

Default Re: ruby based mysql sniffer

Junkone wrote:

> therei sone in perl. i am looking for a equavalent in ruby. i just
> want to trace the sql statements being executed by mysql as i cannot
> debug my client app to find out what sql it is sending out to the
> database.


If you use ActiveRecord, try assert_latest{}. It returns an array of arrays
containing all SELECT statements emitted during its block, including their
EXPLAIN results.

But if you need something lower level, doesn't MySQL itself have a query logging
option?

--
Phlip
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



Contact Us -|- XSL - XML - RSS Forums -|- Archive -|- Top -|-Rules/Disclaimer-|-Help/Support -|-Advertise
© Camley Interactive (camley.info) 2008 - all logos and images are copywrite their respective owners.
Proud member of the Camley Interactive Network
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.
All times are GMT. The time now is 10:07 PM.
Style Developed by Epic Designz