Added support for key_block_size to MyISAM.
Simplify interface to 'new Key' to make it easier to add new key options.
mysqld option --new is used to define where key options are printed.
(In 5.3 we should move all key options to after key part definition to avoid problem with reserved names)
Fixed some compiler warnings and a memory leak in ssl
- 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.
- Use yassl_includes and yassl_libs instead of openssl_includes and openssl_libs
to avoid that mysql_config returns that libyassl and libtaocrypt are needed for linking.
Added an extra parameter to all calls to timeout().
1 means we want to set the write timeout
0 means we wnat to set the read timeout
viossl.c:
Add which parameter to ssl timeout routine
vio_priv.h:
Added which parameter to vio_ignore_timeout and vio_ssl_timeout
violite.h:
Add which parameter to vio_timeout sigs
net_serv.cc:
Use proper which code in call to vio_timeout to set the proper timeout
viosocket.c:
Set the appropriate timeout in vio_timeout
The patch implements the idea suggested by Olaf van der Spek in
thread "Client: many small reads?" (internals@lists.mysql.com).
Now small reads performed by the client library are buffered.
The buffering gives up to 2 times speedup when retrieving
one-column tables.
it's crucial to disable Nagle algorithm on client for no-reply commands
(like mysql_stmt_free) to always work fast.
Nagle algorithm instructs the sender to buffer (store) data if any
unacknowledged data is outstanding and the size of to-send data is less than
the network segment. It was exactly the case with COM_STMT_CLOSE after
COM_STMT_PREPARE, so the client was waiting for Nagle timer to expire or
for ACK from the server, while the server was holding up ACK because of
delayed acknowledgement algorithm.
The tricky part is that we have been already disabling Nagle
algorithm (by setting TCP_NODELAY)
almost everywhere except Windows (and maybe Netware).
It is the reason why the bug was repeatable only with Windows client.
Add support for VARCHAR with 1 or 2 length bytes
Enable VARCHAR packing in MyISAM files (previous patch didn't pack data properly)
Give error if we got problems in temporary tables during a SELECT
Don't use new table generated by ALTER TABLE if index generation fails
Fixed wrong call by range_end() (Could cause an ASSERT in debug mode)
(continue)
added event_conn_closed
replaced WaitForSingleObject on WaitForMultipleObjects
inserted a check in vio_close()
added SetEvent() for event_conn_closed
Signed auto_increment keys for HASH tables (like for MyISAM tables in 4.0)
nitialize system_charset_info() early. Fixes core dump when starting windows service
Call pthread_mutex_destroy() on not used mutex.
Changed comments in .h and .c files from // -> /* */
Added detection of mutex on which one didn't call pthread_mutex_destroy()
Fixed bug in create_tmp_field() which causes a memory overrun in queries that uses "ORDER BY constant_expression"
Added optimisation for ORDER BY NULL
His explanation:
The socket on which MySQL listens for new connections on a blocking
socket most of the time but is set to non-blocking during the
accept() of the new connection. Due to a bug in the kernel, the new
socket returned by accept() is a blocking socket but returns the
O_NONBLOCK flag when queried via fcntl(F_GETFL). That is, the file
descriptor and the underlying socket don't agree on the blocking
mode.
Since MySQL determines via fcntl(F_GETFL) that the socket is
non-blocking, it expects the first read() in my_real_read to not
block, so it doesn't enable the timeout alarm. However, the read
does block, and thus there's no timeout alarm. The thread kill
(which relies on rescheduling the timeout alarm) also does not work
as a consequence.
The bug shows itself if you build MySQL with LinuxThreads support
(needed for SMP on FreeBSD). Issuing a KILL command in MySQL won't be
"noticed" by the "killed" thread until it runs another query--that
makes KILL pretty useless. And the wait_timeout doesn't work either.