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.
Fixed bug in SELECT ... ORDER BY ... LIMIT
Fixed bug in ALTER TABLE and RENAME TABLE with --lower-case-table-names
Fixed hang when using --with-openssl
Fixed that GRANT ... REQUIRE options are not forgot when doing new GRANT
Changed fn_ext to point at first '.' after directory.
FLUSH LOGS removed numerical extension for all future update logs.
Fixed the mysqld --help reports right values for --datadir and --bind-address
--log-binary=a.b.c now properly strips of .b.c
Fix that one can DROP UDF functions that was not loaded at startup
Made AND optional in REQUIRE
Added REQUIRE NONE
Fixed bugs in my last changeset that made MySQL hard to compile.
Added mutex around some data that could cause table cache corruptions when using OPTIMIZE TABLE / REPAIR TABLE or automatic repair of MyISAM tables.
Added mutex around some data in the slave start/stop code that could cause THD linked list corruptions
Extended my_chsize() to allow one to specify a filler character.
Extend vio_blocking to return the old state (This made some usage of this function much simpler)
Added testing for some functions that they caller have got the required mutexes before calling the function.
Use setrlimit() to ensure that we can write core file if one specifies --core-file.
Added --slave-compressed-protocol
Made 2 the minimum length for ft_min_word_len
Added variables foreign_key_checks & unique_checks.
Less logging from replication code (if not started with --log-warnings)
Changed that SHOW INNODB STATUS requre the SUPER privilege
More DBUG statements and a lot of new code comments
(All commit emails since 4.0.1 checked)
This had to be done now, before the 4.1 tree changes to much, to make it easy to propagate bug fixes to the 4.1 tree.
mysqlmanager from using GNU getopt to use my_getopt.
Changed some files that just included old getopt.h to include
my_getopt.h now.
Fixed a bug in my_print_help() in my_getopt.c.
Made better documentation for option -G in mysql client.
This wrapper noew will include all the necessary, system specific files,
which makes all normal source files much easier to write and maintain.
Portability fixes.
Fixed error number handling bug in mysqltest.
Fixed that error number from insert delayed is reported correctly.
merged new vio code with old violite code.