This is not fatal but we don't recommend you to delete tables you are
using in not @code{auto_commit} mode.
@cindex tutorial
@cindex tutorial
@cindex terminal monitor, defined
@cindex terminal monitor, defined
@cindex monitor, terminal
@cindex monitor, terminal
...
@@ -22402,7 +22459,7 @@ This query illustrates several things about @code{mysql}:
...
@@ -22402,7 +22459,7 @@ This query illustrates several things about @code{mysql}:
@itemize @bullet
@itemize @bullet
@item
@item
A command normally consists of an SQL statement followed by a semicolon.
A command normally consists of a SQL statement followed by a semicolon.
(There are some exceptions where a semicolon is not needed. @code{QUIT},
(There are some exceptions where a semicolon is not needed. @code{QUIT},
mentioned earlier, is one of them. We'll get to others later.)
mentioned earlier, is one of them. We'll get to others later.)
...
@@ -23942,7 +23999,7 @@ mysql> SELECT * FROM pet WHERE name REGEXP "[wW]";
...
@@ -23942,7 +23999,7 @@ mysql> SELECT * FROM pet WHERE name REGEXP "[wW]";
Because a regular expression pattern matches if it occurs anywhere in the
Because a regular expression pattern matches if it occurs anywhere in the
value, it is not necessary in the previous query to put a wild card on either
value, it is not necessary in the previous query to put a wild card on either
side of the pattern to get it to match the entire value like it would be if
side of the pattern to get it to match the entire value like it would be if
you used an SQL pattern.
you used a SQL pattern.
To find names containing exactly five characters, use @samp{^} and @samp{$}
To find names containing exactly five characters, use @samp{^} and @samp{$}
to match the beginning and end of the name, and five instances of @samp{.}
to match the beginning and end of the name, and five instances of @samp{.}
...
@@ -24669,7 +24726,7 @@ default character set in use to the client. The client will switch to
...
@@ -24669,7 +24726,7 @@ default character set in use to the client. The client will switch to
use this character set for this connection.
use this character set for this connection.
One should use @code{mysql_real_escape_string()} when escaping strings
One should use @code{mysql_real_escape_string()} when escaping strings
for an SQL query. @code{mysql_real_escape_string()} is identical to the
for a SQL query. @code{mysql_real_escape_string()} is identical to the
old @code{mysql_escape_string()} function, except that it takes the MYSQL
old @code{mysql_escape_string()} function, except that it takes the MYSQL
connection handle as the first parameter.
connection handle as the first parameter.
...
@@ -27508,7 +27565,7 @@ results. We would have used PHP or mod_perl instead but they were
...
@@ -27508,7 +27565,7 @@ results. We would have used PHP or mod_perl instead but they were
not available at that time.
not available at that time.
For graphical data we wrote a simple tool in @code{C} that can produce
For graphical data we wrote a simple tool in @code{C} that can produce
GIFs based on the result of an SQL query (with some processing of the
GIFs based on the result of a SQL query (with some processing of the
result). This is also dynamically executed from the Perl script that
result). This is also dynamically executed from the Perl script that
parses the @code{HTML} files.
parses the @code{HTML} files.
...
@@ -27868,7 +27925,7 @@ If you have problems due to insufficient memory in the client, use the
...
@@ -27868,7 +27925,7 @@ If you have problems due to insufficient memory in the client, use the
retrieve the result set.
retrieve the result set.
Using @code{mysql} is very easy; Just start it as follows
Using @code{mysql} is very easy; Just start it as follows
@code{mysql database} or @code{mysql --user=user_name --password=your_password database}. Type an SQL statement, end it with @samp{;}, @samp{\g} or @samp{\G}
@code{mysql database} or @code{mysql --user=user_name --password=your_password database}. Type a SQL statement, end it with @samp{;}, @samp{\g} or @samp{\G}
and press return/enter.
and press return/enter.
@cindex command line options
@cindex command line options
...
@@ -27913,7 +27970,7 @@ Print the output of a query (rows) vertically. Without this option you
...
@@ -27913,7 +27970,7 @@ Print the output of a query (rows) vertically. Without this option you
can also force this output by ending your statements with @code{\G}.
can also force this output by ending your statements with @code{\G}.
@cindex force option
@cindex force option
@item -f, --force
@item -f, --force
Continue even if we get an SQL error.
Continue even if we get a SQL error.
@cindex no-named-commands option
@cindex no-named-commands option
@item -g, --no-named-commands
@item -g, --no-named-commands
Named commands are disabled. Use \* form only, or use named commands
Named commands are disabled. Use \* form only, or use named commands
...
@@ -28015,7 +28072,7 @@ ego (\G) Send command to mysql server; Display result vertically
...
@@ -28015,7 +28072,7 @@ ego (\G) Send command to mysql server; Display result vertically
print (\p) Print current command
print (\p) Print current command
quit (\q) Quit mysql
quit (\q) Quit mysql
rehash (\#) Rebuild completion hash
rehash (\#) Rebuild completion hash
source (\.) Execute an SQL script file. Takes a file name as an argument
source (\.) Execute a SQL script file. Takes a file name as an argument
status (\s) Get status information from the server
status (\s) Get status information from the server
use (\u) Use another database. Takes database name as argument
use (\u) Use another database. Takes database name as argument
@end example
@end example
...
@@ -28216,7 +28273,7 @@ meaning as the corresponding clauses for @code{LOAD DATA INFILE}.
...
@@ -28216,7 +28273,7 @@ meaning as the corresponding clauses for @code{LOAD DATA INFILE}.
@item -F, --flush-logs
@item -F, --flush-logs
Flush log file in the @strong{MySQL} server before starting the dump.
Flush log file in the @strong{MySQL} server before starting the dump.
@item -f, --force,
@item -f, --force,
Continue even if we get an SQL error during a table dump.
Continue even if we get a SQL error during a table dump.
@item -h, --host=..
@item -h, --host=..
Dump data from the @strong{MySQL} server on the named host. The default host
Dump data from the @strong{MySQL} server on the named host. The default host
is @code{localhost}.
is @code{localhost}.
...
@@ -30038,7 +30095,7 @@ functions. Consult this file to see how UDF calling conventions work.
...
@@ -30038,7 +30095,7 @@ functions. Consult this file to see how UDF calling conventions work.
For each function that you want to use in SQL statements, you should define
For each function that you want to use in SQL statements, you should define
corresponding C (or C++) functions. In the discussion below, the name
corresponding C (or C++) functions. In the discussion below, the name
``xxx'' is used for an example function name. To distinquish between SQL and
``xxx'' is used for an example function name. To distinquish between SQL and
C/C++ usage, @code{XXX()} (uppercase) indicates an SQL function call, and
C/C++ usage, @code{XXX()} (uppercase) indicates a SQL function call, and
@code{xxx()} (lowercase) indicates a C/C++ function call.
@code{xxx()} (lowercase) indicates a C/C++ function call.
The C/C++ functions that you write to implement the inferface for
The C/C++ functions that you write to implement the inferface for
...
@@ -30082,7 +30139,7 @@ The deinitialization function for @code{xxx()}. It should deallocate any
...
@@ -30082,7 +30139,7 @@ The deinitialization function for @code{xxx()}. It should deallocate any
memory allocated by the initialization function.
memory allocated by the initialization function.
@end table
@end table
When an SQL statement invokes @code{XXX()}, @strong{MySQL} calls the
When a SQL statement invokes @code{XXX()}, @strong{MySQL} calls the
initialization function @code{xxx_init()} to let it perform any required
initialization function @code{xxx_init()} to let it perform any required
setup, such as argument checking or memory allocation. If @code{xxx_init()}
setup, such as argument checking or memory allocation. If @code{xxx_init()}
returns an error, the SQL statement is aborted with an error message and the
returns an error, the SQL statement is aborted with an error message and the
...
@@ -32659,7 +32716,7 @@ backup. To get a consistent backup, do a @code{LOCK TABLES} on the
...
@@ -32659,7 +32716,7 @@ backup. To get a consistent backup, do a @code{LOCK TABLES} on the
relevant tables. @xref{LOCK TABLES, , @code{LOCK TABLES}}. You only need a
relevant tables. @xref{LOCK TABLES, , @code{LOCK TABLES}}. You only need a
read lock; this allows other threads to continue to query the tables while
read lock; this allows other threads to continue to query the tables while
you are making a copy of the files in the database directory. If you want to
you are making a copy of the files in the database directory. If you want to
make an SQL level backup of a table, you can use @code{SELECT INTO OUTFILE}.
make a SQL level backup of a table, you can use @code{SELECT INTO OUTFILE}.
Another way to backup a database is to use the @code{mysqldump} program:
Another way to backup a database is to use the @code{mysqldump} program:
@xref{mysqldump}.
@xref{mysqldump}.
...
@@ -33231,11 +33288,11 @@ Returns the error number for the most recently invoked @strong{MySQL} function.
...
@@ -33231,11 +33288,11 @@ Returns the error number for the most recently invoked @strong{MySQL} function.
Returns the error message for the most recently invoked @strong{MySQL} function.
Returns the error message for the most recently invoked @strong{MySQL} function.
@item @strong{mysql_real_escape_string()} @tab
@item @strong{mysql_real_escape_string()} @tab
Escapes special characters in a string for use in an SQL statement taking
Escapes special characters in a string for use in a SQL statement taking
into account the current charset of the connection.
into account the current charset of the connection.
@item @strong{mysql_escape_string()} @tab
@item @strong{mysql_escape_string()} @tab
Escapes special characters in a string for use in an SQL statement.
Escapes special characters in a string for use in a SQL statement.
@item @strong{mysql_fetch_field()} @tab
@item @strong{mysql_fetch_field()} @tab
Returns the type of the next table field.
Returns the type of the next table field.
...
@@ -33316,13 +33373,13 @@ Checks whether or not the connection to the server is working, reconnecting
...
@@ -33316,13 +33373,13 @@ Checks whether or not the connection to the server is working, reconnecting
as necessary.
as necessary.
@item @strong{mysql_query()} @tab
@item @strong{mysql_query()} @tab
Executes an SQL query specified as a null-terminated string.
Executes a SQL query specified as a null-terminated string.
@item @strong{mysql_real_connect()} @tab
@item @strong{mysql_real_connect()} @tab
Connects to a @strong{MySQL} server.
Connects to a @strong{MySQL} server.
@item @strong{mysql_real_query()} @tab
@item @strong{mysql_real_query()} @tab
Executes an SQL query specified as a counted string.
Executes a SQL query specified as a counted string.
@item @strong{mysql_reload()} @tab
@item @strong{mysql_reload()} @tab
Tells the server to reload the grant tables.
Tells the server to reload the grant tables.
...
@@ -33743,7 +33800,7 @@ None.
...
@@ -33743,7 +33800,7 @@ None.
Creates the database named by the @code{db} parameter.
Creates the database named by the @code{db} parameter.
This function is deprecated. It is preferable to use @code{mysql_query()}
This function is deprecated. It is preferable to use @code{mysql_query()}
to issue an SQL @code{CREATE DATABASE} statement instead.
to issue a SQL @code{CREATE DATABASE} statement instead.
@item @code{CLIENT_COMPRESS} @tab Use compression protocol.
@item @code{CLIENT_FOUND_ROWS} @tab Return the number of found (matched) rows, not the number of affected rows.
@item @code{CLIENT_FOUND_ROWS} @tab Return the number of found (matched) rows, not the number of affected rows.
@item @code{CLIENT_IGNORE_SPACE} $tab Allow spaces after function names. Makes all functions names reserved words.
@item @code{CLIENT_INTERACTIVE} @tab Allow @code{interactive_timeout} seconds (instead of @code{wait_timeout} seconds) of inactivity before closing the connection.
@item @code{CLIENT_NO_SCHEMA} @tab Don't allow the @code{db_name.tbl_name.col_name} syntax. This is for ODBC; It causes the parser to generate an error if you use that syntax, which is useful for trapping bugs in some ODBC programs.
@item @code{CLIENT_NO_SCHEMA} @tab Don't allow the @code{db_name.tbl_name.col_name} syntax. This is for ODBC; It causes the parser to generate an error if you use that syntax, which is useful for trapping bugs in some ODBC programs.
@item @code{CLIENT_COMPRESS} @tab Use compression protocol.
@item @code{CLIENT_ODBC} @tab The client is an ODBC client. This changes
@item @code{CLIENT_ODBC} @tab The client is an ODBC client. This changes
@code{mysqld} to be more ODBC-friendly.
@item @code{CLIENT_SSL} @tab Use SSL (encrypted protocol).
@end multitable
@end multitable
@end itemize
@end itemize
...
@@ -35137,7 +35198,7 @@ try reconnecting to the server before giving up.
...
@@ -35137,7 +35198,7 @@ try reconnecting to the server before giving up.
Encodes the string in @code{from} to an escaped SQL string, taking into
Encodes the string in @code{from} to an escaped SQL string, taking into
account the current charset of the connection, that can be sent to the
account the current charset of the connection, that can be sent to the
server in an SQL statement, places the result in @code{to}, and adds a
server in a SQL statement, places the result in @code{to}, and adds a
terminating null byte. Characters encoded are @code{NUL} (ASCII 0),
terminating null byte. Characters encoded are @code{NUL} (ASCII 0),
@samp{\n}, @samp{\r}, @samp{\}, @samp{'}, @samp{"} and Control-Z
@samp{\n}, @samp{\r}, @samp{\}, @samp{'}, @samp{"} and Control-Z
(@pxref{Literals}).
(@pxref{Literals}).
...
@@ -35236,7 +35297,7 @@ Asks the @strong{MySQL} server to reload the grant tables. The
...
@@ -35236,7 +35297,7 @@ Asks the @strong{MySQL} server to reload the grant tables. The
connected user must have the @strong{reload} privilege.
connected user must have the @strong{reload} privilege.
This function is deprecated. It is preferable to use @code{mysql_query()}
This function is deprecated. It is preferable to use @code{mysql_query()}
to issue an SQL @code{FLUSH PRIVILEGES} statement instead.
to issue a SQL @code{FLUSH PRIVILEGES} statement instead.
@subsubheading Return values
@subsubheading Return values
...
@@ -35806,9 +35867,9 @@ Installation instructions for @strong{MySQL} Perl support are given in
...
@@ -35806,9 +35867,9 @@ Installation instructions for @strong{MySQL} Perl support are given in
@multitable @columnfractions .3 .7
@multitable @columnfractions .3 .7
@item @code{connect} @tab Establishes a connection to a database server.
@item @code{connect} @tab Establishes a connection to a database server.
@item @code{disconnect} @tab Disconnects from the database server.
@item @code{disconnect} @tab Disconnects from the database server.
@item @code{prepare} @tab Prepares an SQL statement for execution.
@item @code{prepare} @tab Prepares a SQL statement for execution.