This fixes the problem in 5.0 in the correct way.
The previous patch (for 4.1) is only valid for 4.1 and is done at the right time
for 4.1.
ndb/src/kernel/main.cpp:
The ndbd angel process keeps the mgm connection open as it retains a reference
to the socket.
this means that when the mgm server is killed, the socket stays in CLOSE_WAIT
(the ndb process will close() it okay in 5.0, as we reused it for a transporter
but this isn't enough as the angel process still has a reference to that socket).
so, by adding in a theConfig->closeConfiguration(); in the angel process, the ndb
process is left with the only reference to the socket - which it can close whenever
it likes (namely when the connection is terminated).
The 4.1 fix is not valid for 5.0. Remove it.
ndb/src/common/mgmcommon/ConfigRetriever.cpp:
This fix is not valid for 5.0 as we use the mgm server connection for more than
just fetching the initial configuration
In 4.1 (it is different in 5.0), we do not use the mgm connection after fetching the
configuration (and if we did, we would have to have calls to check the connection and
reconnect if needed - in case the mgm server had restarted) so we can disconnect after
first use.
This means we won't have connections stuck in CLOSE_WAIT when the mgm server shuts down.
ndb/src/common/mgmcommon/ConfigRetriever.cpp:
Disconnect from management server after configuration is fetched.
Logging to logging@openlogging.org accepted
DbtcMain.cpp, testTimeout.cpp:
Bug #11290 TransactionInactiveTimeout = 0 does not result in infinite timeout
ndb/test/ndbapi/testTimeout.cpp:
Bug #11290 TransactionInactiveTimeout = 0 does not result in infinite timeout
ndb/src/kernel/blocks/dbtc/DbtcMain.cpp:
Bug #11290 TransactionInactiveTimeout = 0 does not result in infinite timeout
BitKeeper/etc/logging_ok:
Logging to logging@openlogging.org accepted
into mysql.com:/home/jonas/src/mysql-5.0-ndb
BitKeeper/etc/logging_ok:
auto-union
configure.in:
Auto merged
libmysqld/Makefile.am:
Auto merged
mysql-test/mysql-test-run.sh:
Auto merged
ndb/test/ndbapi/testBlobs.cpp:
Auto merged
sql/sql_select.cc:
Auto merged
script fixes for solaris
ndb/src/cw/cpcd/main.cpp:
fix usage of load_defaults, as it does have a short option
ndb/test/run-test/make-config.sh:
fix script wrt solaris
ndb/test/run-test/ndb-autotest.sh:
fix script wrt solaris
into mysql.com:/home/jonas/src/mysql-5.0-ndb
ndb/include/ndbapi/Ndb.hpp:
Auto merged
ndb/src/ndbapi/Ndb.cpp:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
ndb/include/ndbapi/Ndb.hpp:
Auto merged
ndb/src/ndbapi/Ndbif.cpp:
Auto merged
ndb/src/ndbapi/Ndbinit.cpp:
Auto merged
ndb/test/ndbapi/testNdbApi.cpp:
Auto merged
ndb/test/run-test/daily-basic-tests.txt:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
mysql-test/r/ndb_subquery.result:
Add testing of new 4006 handling
mysql-test/t/ndb_subquery.test:
Add testing of new 4006 handling
ndb/include/ndbapi/Ndb.hpp:
Check #transactions in startTransaction instead of getNdbCon
ndb/src/ndbapi/Ndb.cpp:
Check #transactions in startTransaction instead of getNdbCon
ndb/src/ndbapi/NdbScanOperation.cpp:
Check #transactions in startTransaction instead of getNdbCon
ndb/src/ndbapi/Ndbif.cpp:
Check #transactions in startTransaction instead of getNdbCon
ndb/src/ndbapi/Ndbinit.cpp:
Check #transactions in startTransaction instead of getNdbCon
ndb/src/ndbapi/Ndblist.cpp:
Check #transactions in startTransaction instead of getNdbCon
ndb/test/ndbapi/testNdbApi.cpp:
Check #transactions in startTransaction instead of getNdbCon
ndb/test/run-test/daily-basic-tests.txt:
Check #transactions in startTransaction instead of getNdbCon
sql/ha_ndbcluster.cc:
Check #transactions in startTransaction instead of getNdbCon
small script fixes
- Don't use hostname -s as it's linux specific
- Don't remove result unless scp worked
ndb/test/run-test/ndb-autotest.sh:
Don't use hostname -s as it's linux specific
Don't remove result unless scp worked
bug#10711
bug#10058
bug#9363
bug#9025
bug#8918
ndb/src/kernel/blocks/ndbfs/Ndbfs.cpp:
Use UintPtr when computing page address to make sure that Uint32 does not overflow
into mysql.com:/home/jonas/src/mysql-5.0
ndb/src/kernel/blocks/backup/Backup.cpp:
Auto merged
ndb/src/kernel/blocks/dbacc/DbaccMain.cpp:
Auto merged
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
Auto merged
ndb/test/ndbapi/testNdbApi.cpp:
Auto merged
ndb/test/run-test/daily-basic-tests.txt:
Auto merged
ndb/tools/restore/Restore.cpp:
Auto merged
ndb/tools/restore/consumer_restore.cpp:
Auto merged
Fix potential inconsistency when running ndb_restore due to faulty parsing
of backup log wrt inserts
ndb/src/kernel/blocks/backup/Backup.cpp:
Make sure that entire stopGCP is in log
ndb/tools/restore/Restore.cpp:
Notice: this will not group and commit the deltas listed below
into a ChangeSet, because there are no ChangeSet comments.
Click [Checkin] again to check in only the commented deltas,
or type Control-l to go back and provide ChangeSet comments.
ndb/tools/restore/Restore.hpp:
Keep track of last gci to next iteration
ndb/tools/restore/consumer_restore.cpp:
Handle insert in log
Only allow certain errors
- Added better error messages when trying to open a table that can't be discovered or unpacked. The most likely cause of this is that it does not have any frm data, probably since it has been created from NdbApi or is a NDB system table.
- Separated functionality that was in ha_create_table_from_engine into two functions. One that checks if the table exists and another one that tries to create the table from the engine.
mysql-test/r/ndb_autodiscover.result:
Add tests for reading from a table that can't be discovered(SYSTAB_0)
Discovery is not performed during create table anymore.
mysql-test/t/ndb_autodiscover.test:
Add tests for reading from a table that can't be discovered(SYSTAB_0)
Discovery is not performed during create table anymore.
ndb/test/ndbapi/create_tab.cpp:
Set connectstring before creating Ndb object.
sql/ha_ndbcluster.cc:
Rename and use the function ndbcluster_table_exists_in_engine.
Correct return valu from ndbcluster_discover
Remove old code "ndb_discover_tables"
sql/ha_ndbcluster.h:
Rename function ndbcluster_table_exists to ndb ndbcluster_table_exists_in_engine
sql/handler.cc:
Update comment of ha_create_table_from_engine
Remove parameter create_if_found from ha_create_table_from_engine, the function ha_table_exists_in_engine is now used toi check if table is found in engine.
Cleanup return codes from ha_create_table_from_engine.
Change name of ha_table_exists to ha_table_exists_in_engine, update comment and returne codes.
sql/handler.h:
Remove paramter create_if_cound from ha_create_table_from_engine
Rename ha_table_exists to ha_table_exists_in_engine
sql/sql_base.cc:
Use the function ha_table_exists_in_engine to detect if table exists in enegine.
If it exists, call function ha_create_table_from_engine to try and create it.
If create of table fails, set correct error message.
sql/sql_table.cc:
Add comments, remove parameter create_if_found to ha_create_table_from_engine.
When dropping a table, try to discover it from engine. If discover fails, use same error message as if the table didn't exists.
Maybe another message should be displayed here, ex: "Table could not be dropped, unpack failed"
When creating a new table, use ha_table_exists_in_engine to check if a table with the given name already exists.
IPCConfig wasn't constructing the connect string properly.
ndb/src/common/mgmcommon/IPCConfig.cpp:
fix construction of connect string from configuration.
the port number was not being added correctly. This would cause the handle to default
to localhost:1186
into mysql.com:/home/jonas/src/mysql-5.0-ndb
BitKeeper/etc/logging_ok:
auto-union
configure.in:
Auto merged
libmysqld/Makefile.am:
Auto merged
mysql-test/mysql-test-run.sh:
Auto merged
ndb/src/ndbapi/DictCache.cpp:
Auto merged
ndb/src/ndbapi/DictCache.hpp:
Auto merged
ndb/src/ndbapi/NdbDictionaryImpl.cpp:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_select.cc:
Auto merged
strings/ctype-big5.c:
Auto merged
strings/ctype-ucs2.c:
Auto merged
incorrect handling of writeTuple with multi op transaction
ndb/src/kernel/blocks/dbacc/DbaccMain.cpp:
1) Pass operation instead of insertIsDone to LQH
2) transform operation correctly when in parallell que
(multi op within same trans)
ndb/src/kernel/blocks/dblqh/DblqhMain.cpp:
Let ACC decide what operation was performed when WRITE
ndb/test/ndbapi/testNdbApi.cpp:
Add testcase for bug 11133
ndb/test/run-test/daily-basic-tests.txt:
Add testcase for bug 11133
into mysql.com:/home/jonas/src/mysql-5.0
configure.in:
Auto merged
libmysqld/Makefile.am:
Auto merged
strings/ctype-big5.c:
Auto merged
strings/ctype-ucs2.c:
Auto merged
BUG#9826 Server crash on schema change ("drop table", "alter table") with NDB
See note on 10948 for detailed explanation.
struct a { void* a; long long b[1]; };
on PPC32 (and 32bit pa risc): 16
on x86: 12
so a malloc(sizeof(void*)+extra_bits) is wrong.
Assuming that the long long is 64 bit aligned as non-aligned 64bit accesses
are rather expensive on ppc.
Thanks to paulus for doing the PPC port of valgrind.
Without which I would no doubt still be trying to find this.
ndb/src/ndbapi/DictCache.cpp:
Fix allocation size for Ndb_local_table_info for architectures such as PPC and PA-RISC (32bit)
where
struct a { void* a; long long b;};
is 64 bit aligned (i.e. sizeof(struct a)==16)
ndb/src/ndbapi/DictCache.hpp:
Add warning about having to be the last member in the structure
Bug #11050 ndb_mgm "show" prints incorrectly after master data node fails
ndb/src/mgmclient/CommandInterpreter.cpp:
Bug #11050 ndb_mgm "show" prints incorrectly after master data node fails