Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

forcing mysql binlog to a single line

2 views
Skip to first unread message

Mark

unread,
Apr 14, 2003, 1:08:41 PM4/14/03
to
Hi, does anyone know of a way to force mysql to log update=
queries as
single line queries even if they are multiline queries? the=
reason is
it would be easier to grep through them to restore a single table=

thanks,
- Mark


--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/mysql?unsub=3Dm...@freebsd.csie.nctu.edu.tw

Jeremy Zawodny

unread,
Apr 17, 2003, 7:39:00 PM4/17/03
to
On Mon, Apr 14, 2003 at 10:10:11AM -0700, Mark wrote:
> Hi, does anyone know of a way to force mysql to log update queries as
> single line queries even if they are multiline queries?

You can't do that, no.

> the reason is it would be easier to grep through them to restore a
> single table

You might consider using a short Perl script, taking advantage of
Perl's flexible input record separator. It doesn't have to be "\n",
that's just the default.

Jeremy
--
Jeremy D. Zawodny | Perl, Web, MySQL, Linux Magazine, Yahoo!
<Jer...@Zawodny.com> | http://jeremy.zawodny.com/

MySQL 4.0.8: up 73 days, processed 2,378,935,555 queries (374/sec. avg)

--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql

To unsubscribe: http://lists.mysql.com/mysql?unsub=my...@freebsd.csie.nctu.edu.tw

Paul DuBois

unread,
Apr 17, 2003, 8:06:55 PM4/17/03
to
At 16:30 -0700 4/17/03, Jeremy Zawodny wrote:
>On Mon, Apr 14, 2003 at 10:10:11AM -0700, Mark wrote:
>> Hi, does anyone know of a way to force mysql to log update queries as
>> single line queries even if they are multiline queries?
>
>You can't do that, no.
>
>> the reason is it would be easier to grep through them to restore a
>> single table
>
>You might consider using a short Perl script, taking advantage of
>Perl's flexible input record separator. It doesn't have to be "\n",
>that's just the default.

The mysql_find_rows script included with MySQL might prove of
some assistance here.

>
>Jeremy
>--
>Jeremy D. Zawodny | Perl, Web, MySQL, Linux Magazine, Yahoo!
><Jer...@Zawodny.com> | http://jeremy.zawodny.com/
>
>MySQL 4.0.8: up 73 days, processed 2,378,935,555 queries (374/sec. avg)


--
Paul DuBois
http://www.kitebird.com/
sql, query

0 new messages