Nathan Powell | 12 Jun 20:33

Interrupt mysql output without exiting the mysql shell

I am probably going to do a bad job of explaining what I mean here, if
so I apologize in advance.

When using the mysql shell from the command line, I will sometimes do a
select that gets a ton of results...

  mysql> SELECT * FROM nathans_ideas WHERE type = 'not right';

And the output will scroll by and by.  So I want to kill it with C-c
(Control+c) however if you do that, it actually exits the Mysql Shell.

I would have thought this was a property of Gnu-Readline and it would
just grab the C-c and kill the current query.  Alas, that is not so.  Is
there a way to do what I want without exiting the Mysql Shell?

--

-- 
nathan
nathan_at_nathanpowell_dot_org

Another flaw in the human character is that everybody wants to build
and nobody wants to do maintenance.
		 ~ Kurt Vonnegut
------------------------------------

Lon Farenwald | 12 Jun 20:40

Re: Interrupt mysql output without exiting the mysql shell

Why would you want to do that?

Yer dumb.

On Thu, Jun 12, 2008 at 2:35 PM, Nathan Powell <nathan@...> wrote:
> I am probably going to do a bad job of explaining what I mean here, if
> so I apologize in advance.
>
> When using the mysql shell from the command line, I will sometimes do a
> select that gets a ton of results...
>
>  mysql> SELECT * FROM nathans_ideas WHERE type = 'not right';
>
> And the output will scroll by and by.  So I want to kill it with C-c
> (Control+c) however if you do that, it actually exits the Mysql Shell.
>
> I would have thought this was a property of Gnu-Readline and it would
> just grab the C-c and kill the current query.  Alas, that is not so.  Is
> there a way to do what I want without exiting the Mysql Shell?
>
> --
> nathan
> nathan_at_nathanpowell_dot_org
>
> Another flaw in the human character is that everybody wants to build
> and nobody wants to do maintenance.
>                 ~ Kurt Vonnegut
> ------------------------------------
>
>
(Continue reading)

Christian Pearce | 12 Jun 21:05

Re: Interrupt mysql output without exiting the mysql shell

mysql> \P less
PAGER set to 'less'



On Thu, Jun 12, 2008 at 2:35 PM, Nathan Powell <nathan-O3Vx3Hc2CDOnOwvzH/7vEg@public.gmane.org> wrote:
I am probably going to do a bad job of explaining what I mean here, if
so I apologize in advance.

When using the mysql shell from the command line, I will sometimes do a
select that gets a ton of results...

 mysql> SELECT * FROM nathans_ideas WHERE type = 'not right';

And the output will scroll by and by.  So I want to kill it with C-c
(Control+c) however if you do that, it actually exits the Mysql Shell.

I would have thought this was a property of Gnu-Readline and it would
just grab the C-c and kill the current query.  Alas, that is not so.  Is
there a way to do what I want without exiting the Mysql Shell?

--
nathan
nathan_at_nathanpowell_dot_org

Another flaw in the human character is that everybody wants to build
and nobody wants to do maintenance.
                ~ Kurt Vonnegut
------------------------------------




_______________________________________________
CPLUG mailing list
To unsubscribe send a mail to cplug+unsubscribe-n/VI1dMKjLJeoWH0uzbU5w@public.gmane.org
Archives: http://dir.gmane.org/gmane.org.user-groups.linux.cplug.general




--
Christian
Nathan Powell | 12 Jun 21:14

Re: Interrupt mysql output without exiting the mysql shell

On Thu, Jun 12, 2008 at 03:05:45PM -0400, Christian Pearce wrote:
> mysql> \P less
> PAGER set to 'less'

That's nice.  I didn't know that. 

Off list a few people have said "Why don't you just limit the query".
And I do when I think of it, this is more for the times when I don't
think of it.

I should have said that.

--

-- 
nathan
nathan_at_nathanpowell_dot_org

To give anything less than your best is to sacrifice the gift.
		 ~ Steve Prefontaine
------------------------------------


Gmane