when calling a SP from C API"
The bug was caused by lack of checks for misuse in mysql_real_query.
A stored procedure always returns at least one result, which is the
status of execution of the procedure itself.
This result, or so-called OK packet, is similar to a result
returned by INSERT/UPDATE/CREATE operations: it contains the overall
status of execution, the number of affected rows and the number of
warnings. The client test program attached to the bug did not read this
result and ivnoked the next query. In turn, libmysql had no check for
such scenario and mysql_real_query was simply trying to send that query
without reading the pending response, thus messing up the communication
protocol.
The fix is to return an error from mysql_real_query when it's called
prior to retrieval of all pending results.
When a wildcard database name is given the mysqlshow, but that wildcard
matches one database *exactly* (it contains the wildcard character), we
list the contents of that database instead of just listing the database
name as matching the wildcard. Probably the most common instance of users
encountering this behavior would be with "mysqlshow information_schema".
"I want to have the current delimiter in the prompt so that I can know at
a glance which is set."
Add a 'l' format specifier that represents the current statement delimiter.
mysqldump did not select the correct database before trying to dump
views from it. this resulted in an empty result set, which in turn
startled mysql-dump into a core-dump. this only happened for views,
not for tables, and was only visible with multiple databases that
weren't by sheer luck in the order mysqldump required, anyway. this
fixes by selecting the correct database before dumping views; it also
catches the empty set-condition if it should occur for other reasons.
mysqldump did not select the correct database before trying to dump
views from it. this resulted in an empty result set, which in turn
startled mysql-dump into a core-dump. this only happened for views,
not for tables, and was only visible with multiple databases that
weren't by sheer luck in the order mysqldump required, anyway. this
fixes by selecting the correct database before dumping views; it also
catches the empty set-condition if it should occur for other reasons.
Old option ordering in the help was confusing to some users. Changed
ordering of deprecated options to be consistent, and added mention to
entry for options with a "--no-option" variant mentioning the
"--disable-option" variant.
do not look for client-specific commands while inside a multi-line comment.
we will allow multi-comments pretty much anywhere within SQL-statements,
but client-specific commands (help, use, print, ...) must be the first token
in the input.
Using \U or \u in a prompt with the mysql command-line client could
crash when connecting to the instance manager, since it does not return
information about the user when asked by the client. This is fixed by
having the client use what it knowns about the user (or giving up and
saying "(unknown)").
- Include prefix files that renames all public functions in yaSSLs
OpenSSL API to ya<function_name>. They will otherwise conflict
with OpenSSL functions if loaded by an application that uses OpenSSL
as well as libmysqlclient with yaSSL support.
(The above problem only occurs with -T -- create a separate file for
each table / view.) This ChangeSet results in correct output of view-
information while omitting the information for the view's stand-in
table. The rationale is that with -T, the user is likely interested
in transferring part of a database, not the db in its entirety (that
would be difficult as replay order is obscure, the files being named
for the table/view they contain rather than getting a sequence number).
'show create' works even on views that are short of a base-table (this
throw a warning though, like you would expect). Unfortunately, this is
not what mysqldump uses; it creates stand-in tables and hence requests
'show fields' on the view which fails with missing base-tables. The
--force option prevents the dump from stopping at this point; furthermore
this patch dumps a comment showing create for the offending view for
better diagnostics. This solution was confirmed by submitter as solving
their/clients' problem. Problem might become non-issue once mysqldump no
longer creates stand-in tables.
The problem happened because "mysql" didn't send mysql_select_db() if
the current active database was specified in USE.
Now it always send mysql_select_db().
Rebuilding of completion hash is skipped in the same db is used
(for performance purposes).
Correct a bug (that I introduced, after using Oracle's database software for
too many years) where the length of the database-sent data is incorrectly
used to infer NULLness.
- Add new function 'ssl_verify_server_cert' which is used if we are
connecting to the server with SSL. It will compare the hostname in
the server's cert against the hostname that we used when connecting
to the server. Will reject the connection if hostname does not match.
- Add new option "OPT_SSL_VERIFY_SERVER_CERT" to be passed to mysql_options
which will turn on checking of servers cert.
- Add new argument "ssl-verify-server-cert" to all mysql* clients which
will activate the above option.
- Generate a new server cert with 1024 bits that has "localhost" as the server name.
Lines with column names consisting of national letters
were wrongly formatted in "mysql --table" results:
mysql> SELECT 'xxx xxx xxx' as 'xxx xxx xxx';
+-------------------+
| xxx xxx xxx |
+-------------------+
| xxx xxx xxx |
+-------------------+
1 row in set (0.00 sec)
It happened because in UTF-8 (and other multibyte charsets)
the number of display cells is not always equal to the number
of bytes of the string.
Data lines (unlike column name lines) were formatted correctly,
because data lines were displayed taking in account number of
display cells. This patch takes in account number of cells when
displaying column names, the same way like displaying data lines does.
Note: The patch is going to be applied to 4.1.
Test case will be added after merge to 5.0,
into "mysql.test", which appeared in 5.0.
mysql.cc:
Adding column name allignment using numcells(),
the same to data alignment, which was implemented earlier.