- increase var part reference from 32 to 64 bits on 64 bit systems
- note current patch does not allow for online upgrade from 32 to 64 bit systems or vice versa
Bug #27381: InnoDB exits when attempting to rename table to non-existant database
Fix Bug#27381 by calling os_file_handle_error_no_exit() instead of
os_file_handle_error().
* Modified Federated memory allocation to use MEM_ROOT
* Modified sql_servers and federated to allocate share connection
parameters to use MEM_ROOT
* Modified Federated to allow tablename in addition to server name
* Implicit flushing of tables using altered/dropped server name
* Added tests to prove new functionality works
Contributors to this patch: Patrick Galbraith, Antony Curtis
innodb-5.1-ss1318
innodb-5.1-ss1330
innodb-5.1-ss1332
innodb-5.1-ss1340
Fixes:
- Bug #21409: Incorrect result returned when in READ-COMMITTED with query_cache ON
At low transaction isolation levels we let each consistent read set
its own snapshot.
- Bug #23666: strange Innodb_row_lock_time_% values in show status; also millisecs wrong
On Windows ut_usectime returns secs and usecs relative to the UNIX
epoch (which is Jan, 1 1970).
- Bug #25494: LATEST DEADLOCK INFORMATION is not always cleared
lock_deadlock_recursive(): When the search depth or length is exceeded,
rewind lock_latest_err_file and display the two transactions at the
point of aborting the search.
- Bug #25927: Foreign key with ON DELETE SET NULL on NOT NULL can crash server
Prevent ALTER TABLE ... MODIFY ... NOT NULL on columns for which
there is a foreign key constraint ON ... SET NULL.
- Bug #26835: Repeatable corruption of utf8-enabled tables inside InnoDB
The bug could be reproduced as follows:
Define a table so that the first column of the clustered index is
a VARCHAR or a UTF-8 CHAR in a collation where sequences of bytes
of differing length are considered equivalent.
Insert and delete a record. Before the delete-marked record is
purged, insert another record whose first column is of different
length but equivalent to the first record. Under certain conditions,
the insertion can be incorrectly performed as update-in-place.
Likewise, an operation that could be done as update-in-place can
unnecessarily be performed as delete and insert, but that would not
cause corruption but merely degraded performance.
Turns out they can be useful in working out what's going wrong.
Index: ndb-work/storage/ndb/test/src/NdbRestarter.cpp
===================================================================
for TransporterRegistry, keep connection to management server alive.
Index: ndb-work/storage/ndb/include/util/InputStream.hpp
===================================================================
Default timout of 30secs for ConfigRetriever
Default timout of 5sec for use by Transporter (ports etc).
And Ndb_cluster_connection::set_timeout() api for setting timeout from
NDBAPI applications. Should be called before connect. e.g.
c.set_timeout(4200);
c.connect();
Index: ndb-work/storage/ndb/include/mgmcommon/ConfigRetriever.hpp
===================================================================
as side effect - turbo accellerator patch for ndb_mgm - sholud make it quicker... so that 4mhz cpu will seem even faster.
Index: ndb-work/storage/ndb/src/mgmclient/CommandInterpreter.cpp
===================================================================
use portable method, getting milliseconds between calls - Linux would
let us do funky stuff by getting the timeout from select(2). Everywhere
else sucks and doesn't let us do that :(
Index: ndb-work/storage/ndb/include/util/InputStream.hpp
===================================================================
Only one timeout value is needed. Also saves 8bytes per NdbMgmHandle :)
Index: ndb-work/storage/ndb/include/mgmapi/mgmapi.h
===================================================================
Also add an ERROR_codes.txt file for mgmd
Index: ndb-work/storage/ndb/src/mgmsrv/ERROR_codes.txt
===================================================================
In ndb_mgm_call, add checks for expired timeout in (Input|Output)Stream.
In case of timeout, we set NdbMgmHandle->last_error and return NULL.
In api calls not using ndb_mgm_call (or using it in conjunction with
own IO), they'll need to check for timeouts manually. Macros are provided
to do this.
Add ndb_mgm_disconnect_quiet(h) to disconnect without checking errors
(so we don't clobber NdbMgmHandle->last_error). This helps us provide
the *consistent* semantic that on timeout we leave the NdbMgmHandle
*disconnected*. We check for this in testMgm.
Change CHECK_REPLY in mgmapi to also check for set error in handle->last_error
This will pick up the ETIMEDOUT errors and return them to client (through
returning correct failure code for API call and setting NdbMgmHandle error).
Applications written to MGMAPI before this patch will behave as before,
and even hopefully check get_last_error and report the error back to the
end user!
Adding the last CHECK_TIMEDOUT_RET and delete in ndb_mgm_call() we
slightly change behaviour of mgmapi. Previously, if disconnect
midway through a reply, where there were only optional parameters left,
we'd get a Properties object from ndb_mgm_call() containing NULLs for
the optional parameters, leading to interesting error messages. This
enables the returning of the *real* message and actually improves the API
without breaking compatibility.
ndb_mgm_start_signallog
ndb_mgm_stop_signallog
ndb_mgm_log_signals
ndb_mgm_set_trace
ndb_mgm_insert_error
ndb_mgm_set_int64_parameter [1]
ndb_mgm_set_string_parameter [1]
ndb_mgm_purge_stale_sessions [2]
- return error code on error during ndb_mgm_call
TODO:
ndb_mgm_report_event [2]
[1] marked for removal, unused.
[2] return codes incorrect in CHECK_HANDLE/CONNECTED. undocumented.
Server side:
in Services (per session) add macro for injecting timeout error
(just waiting 10 seconds before continuing... it does work!)
We inject these errors in a number of critical places - including
the tricky api functions that don't just use ndb_mgm_call but do
their own thing (get_config, get_status and friends)
ATRT:
Expand testMgm to add timout tests for API. Fully automated.
*THEORETICALLY* timing dependent - an ultra-slow network will
cause problems and "fake" failures... I welcome other solutions.
Tests aren't exhaustive, but cover the generics and the tricky bits.
Also test some calling semantics (incl disconnected on error).
It is encouraged to add *more* mgmapi tests, not less :)
InputStream:
Fix where timedout error is set
Index: ndb-work/storage/ndb/src/mgmapi/mgmapi.cpp
===================================================================
Add not so neat set_timeout call to make testMgm work
Index: ndb-work/storage/ndb/include/mgmapi/mgmapi.h
===================================================================
Add error injection either for this connection or for whole server.
Currently nothing for injecting errors into *another* connection... but that's
perhaps getting tricky-dicky for this point in time. Perhaps needed for events
if we don't do anything fancy.
Index: ndb-work/storage/ndb/src/mgmsrv/MgmtSrvr.cpp
===================================================================
Start using the write_timeout we already have in NdbMgmHandle
Index: ndb-work/storage/ndb/src/mgmapi/mgmapi.cpp
===================================================================
Opening certain tables that have different definitions in .MYI and
.frm may result in a server crash.
Compare .MYI and .frm definition when myisam table is opened. In case
definitions are diffirent refuse to open such table.
No test case, since it requires broken table.