2009-09-16 14:03:18 +02:00
'\" t
2009-05-25 11:59:47 +02:00
. \"
2019-03-28 12:12:28 +01:00
.TH "\FBMYSQL_FIND_ROWS\F" "1" "28 March 2019" "MariaDB 10\&.4" "MariaDB Database System"
2009-09-16 14:03:18 +02:00
. \" -----------------------------------------------------------------
. \" * set default formatting
. \" -----------------------------------------------------------------
2009-05-25 11:59:47 +02:00
. \" disable hyphenation
.nh
. \" disable justification (adjust text to left margin only)
.ad l
2009-09-16 14:03:18 +02:00
. \" -----------------------------------------------------------------
. \" * MAIN CONTENT STARTS HERE *
. \" -----------------------------------------------------------------
. \" mysql_find_rows
2009-05-25 11:59:47 +02:00
.SH "NAME"
mysql_find_rows \- extract SQL statements from files
.SH "SYNOPSIS"
2009-09-16 14:03:18 +02:00
.HP \w '\fBmysql_find_rows\ [\fR\fB\fIoptions\fR\fR\fB]\ [\fR\fB\fIfile_name\fR\fR\fB\ \& .\&.\&.]\fR\ 'u
\fB mysql_find_rows [\fR \fB \fI options\fR \fR \fB ] [\fR \fB \fI file_name\fR \fR \fB \& .\& .\& .]\fR
2009-05-25 11:59:47 +02:00
.SH "DESCRIPTION"
.PP
\fB mysql_find_rows\fR
reads files containing SQL statements and extracts statements that match a given regular expression or that contain
USE \fI db_name\fR
or
SET
2009-09-16 14:03:18 +02:00
statements\& . The utility was written for use with update log files (as used prior to MySQL 5\& .0) and as such expects statements to be terminated with semicolon (;) characters\& . It may be useful with other files that contain SQL statements as long as statements are terminated with semicolons\& .
2009-05-25 11:59:47 +02:00
.PP
Invoke
\fB mysql_find_rows\fR
like this:
.sp
2009-09-16 14:03:18 +02:00
.if n \{ \
.RS 4
. \}
2009-05-25 11:59:47 +02:00
.nf
2009-09-16 14:03:18 +02:00
shell> \fB mysql_find_rows [\fR \fB \fI options\fR \fR \fB ] [\fR \fB \fI file_name\fR \fR \fB \& .\& .\& .]\fR
2009-05-25 11:59:47 +02:00
.fi
2009-09-16 14:03:18 +02:00
.if n \{ \
2009-05-25 11:59:47 +02:00
.RE
2009-09-16 14:03:18 +02:00
. \}
2009-05-25 11:59:47 +02:00
.PP
Each
\fI file_name\fR
2009-09-16 14:03:18 +02:00
argument should be the name of file containing SQL statements\& . If no file names are given,
2009-05-25 11:59:47 +02:00
\fB mysql_find_rows\fR
2009-09-16 14:03:18 +02:00
reads the standard input\& .
2009-05-25 11:59:47 +02:00
.PP
Examples:
.sp
2009-09-16 14:03:18 +02:00
.if n \{ \
.RS 4
. \}
2009-05-25 11:59:47 +02:00
.nf
2009-09-16 14:03:18 +02:00
mysql_find_rows \- \- regexp=problem_table \- \- rows=20 < update\& .log
mysql_find_rows \- \- regexp=problem_table update\- log\& .1 update\- log\& .2
2009-05-25 11:59:47 +02:00
.fi
2009-09-16 14:03:18 +02:00
.if n \{ \
2009-05-25 11:59:47 +02:00
.RE
2009-09-16 14:03:18 +02:00
. \}
2009-05-25 11:59:47 +02:00
.PP
\fB mysql_find_rows\fR
supports the following options:
2009-09-16 14:03:18 +02:00
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysql_find_rows: help option
. \" help option: mysql_find_rows
2009-05-25 11:59:47 +02:00
\fB \- \- help\fR ,
\fB \- \- Information\fR
.sp
2009-09-16 14:03:18 +02:00
Display a help message and exit\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysql_find_rows: regexp option
. \" regexp option: mysql_find_rows
2009-05-25 11:59:47 +02:00
\fB \- \- regexp=\fR \fB \fI pattern\fR \fR
.sp
2009-09-16 14:03:18 +02:00
Display queries that match the pattern\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysql_find_rows: rows option
. \" rows option: mysql_find_rows
2009-05-25 11:59:47 +02:00
\fB \- \- rows=\fR \fB \fI N\fR \fR
.sp
Quit after displaying
\fI N\fR
2009-09-16 14:03:18 +02:00
queries\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysql_find_rows: skip-use-db option
. \" skip-use-db option: mysql_find_rows
2009-05-25 11:59:47 +02:00
\fB \- \- skip\- use\- db\fR
.sp
Do not include
USE \fI db_name\fR
2009-09-16 14:03:18 +02:00
statements in the output\& .
.RE
.sp
.RS 4
.ie n \{ \
\h '-04'\(bu \h '+03'\c
. \}
.el \{ \
.sp -1
.IP \(bu 2 .3
. \}
. \" mysql_find_rows: start_row option
. \" start_row option: mysql_find_rows
2009-05-25 11:59:47 +02:00
\fB \- \- start_row=\fR \fB \fI N\fR \fR
.sp
2009-09-16 14:03:18 +02:00
Start output from this row\& .
.RE
2009-05-25 11:59:47 +02:00
.SH "COPYRIGHT"
2009-09-16 14:03:18 +02:00
.br
2009-05-25 11:59:47 +02:00
.PP
2015-09-09 14:32:52 +02:00
Copyright 2007-2008 MySQL AB, 2008-2010 Sun Microsystems, Inc., 2010-2015 MariaDB Foundation
2009-05-25 11:59:47 +02:00
.PP
This documentation is free software; you can redistribute it and/or modify it only under the terms of the GNU General Public License as published by the Free Software Foundation; version 2 of the License.
.PP
This documentation is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
.PP
2019-05-11 20:29:06 +02:00
You should have received a copy of the GNU General Public License along with the program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335 USA or see http://www.gnu.org/licenses/.
2009-09-16 14:03:18 +02:00
.sp
2009-05-25 11:59:47 +02:00
.SH "SEE ALSO"
2015-09-09 14:32:52 +02:00
For more information, please refer to the MariaDB Knowledge Base, available online at https://mariadb.com/kb/
2009-05-25 11:59:47 +02:00
.SH AUTHOR
2015-09-09 14:32:52 +02:00
MariaDB Foundation (http://www.mariadb.org/).