Skip to content

Instantly share code, notes, and snippets.

@theory
Created October 25, 2010 20:11
Show Gist options
  • Save theory/645643 to your computer and use it in GitHub Desktop.
Save theory/645643 to your computer and use it in GitHub Desktop.
How to suppress query output?
I'm a developer who's currently enjoying unit testing mysql stored procedures using mytap.
However, I realized that when I run select queries in my testfile in order to check if some values
are in the right place, I also get the output of these queries which interferes with the test output.
I was hoping that there would be kind of an exec() function to run my queries.
I'm basically doing stuff like SELECT @email:=email FROM ..... and then use the @email within the
tap.eq() function
Any ideas?
Thank you so much!
@edipretoro
Copy link

Hi,

With the mysql client, you can choose a pager to display the result of your queries. So maybe there's a way to use a « /dev/null pager ».

Hope this help,

Emmanuel Di Pretoro

@edipretoro
Copy link

Hi again,

I've checked the manual after sending my answer (bad habità, and the pager option only works in interactive mode.

Sorry for the wrong information.

Emmanuel Di Pretoro

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment