Idea of the fix is for master to send FD event with `created' as 0
to reconnecting slave (upon slave_net_timeout, no master crash) to avoid destroying temp tables.
In a case of a connect by slave to the master after its crash temp tables have been already
cleaned up so that slave can not keep `orphan' temp tables.
mysql-test/r/rpl_temporary.result:
results
mysql-test/t/rpl_temporary.test:
wait-free addon to check temp tables are ok after slave reconnect.
sql/sql_repl.cc:
Storing zero for assigning to `created' of FD event on the reconnecting slave.
mysql-test/include/get_binlog_dump_thread_id.inc:
mysqltest's preudo-macro to calculate $id master dump thread id
fix mem leak (not during running of transactions, but a few bytes when shutting down)
ndb/src/ndbapi/NdbLinHash.hpp:
Make sure that getNext(0) actually finds first element
Also added comments, and fixing some coding style (mostly in comments too).
There are no functional changes, so no tests or documentation needed.
(This was originally part of a bugfix, but it was decided to not include this
in that patch; instead it's done separately.)
sql/sp_head.cc:
Renaming sp_pcontext members and methods; less cryptic and more consistent.
sql/sp_head.h:
Renaming sp_pcontext members and methods; less cryptic and more consistent.
sql/sp_pcontext.cc:
Renaming sp_pcontext members and methods; less cryptic and more consistent.
Also added comments, and fixing some coding style (mostly in comments too).
sql/sp_pcontext.h:
Renaming sp_pcontext members and methods; less cryptic and more consistent.
Also added comments, and fixing some coding style (mostly in comments too).
sql/sp_rcontext.cc:
Renaming sp_pcontext members and methods; less cryptic and more consistent.
sql/sp_rcontext.h:
Renaming sp_pcontext members and methods; less cryptic and more consistent.
sql/sql_yacc.yy:
Renaming sp_pcontext members and methods; less cryptic and more consistent.
After FLUSH STATUS max_used_connections was reset to 0, and haven't
been updated while cached threads were reused, until the moment a new
thread was created.
The first suggested fix from original bug report was implemented:
a) On flushing the status, set max_used_connections to
threads_connected, not to 0.
b) Check if it is necessary to increment max_used_connections when
taking a thread from the cache as well as when creating new threads
mysql-test/r/status.result:
Add result for bug#15933.
mysql-test/t/status.test:
Add test case for bug#15933.
Fixed typo.
sql/mysql_priv.h:
Add declaration of refresh_status(), which is now external.
sql/mysqld.cc:
Remove start_cached_thread() (code moved directly into create_new_thread()).
Add comment for create_new_thread ().
In create_new_thread() update max_used_connections when creating new thread
and when reusing the cached one.
Move refresh_status() from sql/sql_parse.cc here, on refresh set
max_used_connections to the current number of connections.
sql/sql_parse.cc:
refresh_status() moved to sql/mysqld.cc.
mysql-test/lib/mtr_process.pl:
Change from "mtr_error()" to "mtr_warning()" on some problems,
because "error" makes the whole suite abort which then makes "Do-compile" terminate,
so none of the following steps (including other etst suites) will be done.
mysql-test/mysql-test-run.sh:
Manual merge from 4.0 (which was a 5.1 backport):
"--with-ndbcluster" is already present,
"--with-ndbcluster-only" is really usable here.
mysql-test/r/func_time.result:
expected test results for bug #18100 added
mysql-test/t/func_time.test:
test case for bug #18100 added
sql/item_timefunc.cc:
wrong formula for EXTRACT QUARTER, now uses the same calculus as the QUARTER()
function
The problem was due to the fact that with --lower-case-table-names set to 1
the function find_field_in_group did not convert the prefix 'HU' in
HU.PROJ.CITY into lower case when looking for it in the group list. Yet the
names in the group list were extended by the database name in lower case.
mysql-test/r/having.result:
Added a test case for bug #15917.
mysql-test/t/having.test:
Added a test case for bug #15917.
sql/item.cc:
Fixed bug #15917: unexpected complain for a NIST test case.
The problem was due to the fact that with --lower-case-table-names set to 1
the function find_field_in_group did not convert the prefix 'HU' in
HU.PROJ.CITY into lower case when looking for it in the group list. Yet the
names in the group list were extended by the database name in lower case.
The needed conversion was added to the code of find_field_in_group.
mysql-test/mysql-test-run.sh:
Make "mysql-test-run.sh" accept (and ignore) the options "--with-ndbcluster"
and "--with-ndbcluster-only".
This is necessary because newer build tools will issue them, and the test
script should tolerate that.
Backport from 5.1 (Tomas Ulin, 2006-01-17)
1) make sure that check_multi_node_shutdown does not proceed (in stop case)
2) Fix printout
ndb/src/kernel/blocks/qmgr/Qmgr.hpp:
make sure that check_multi_node_shutdown does not proceed (in stop case)
ndb/src/kernel/blocks/qmgr/QmgrMain.cpp:
make sure that check_multi_node_shutdown does not proceed (in stop case)
ndb/src/kernel/SimBlockList.cpp:
NEW_BLOCK allocates the elements with new, we should free them with delete
but only if we're not building with VM_TRACE
counter".
When TRUNCATE TABLE was called within an stored procedure the
auto_increment counter was not reset to 0 even if straight
TRUNCATE for this table did this.
This fix makes TRUNCATE in stored procedures to be handled exactly
in the same way as straight TRUNCATE. We achieve this by rolling
back the fix for bug 8850, which is no longer needed since stored
procedures don't require prelocked mode anymore (and TRUNCATE is
not allowed in stored functions or triggers).
mysql-test/r/sp.result:
Test case for BUG#14945.
mysql-test/t/sp.test:
Test case for BUG#14945.
sql/sql_delete.cc:
Handle TRUNCATE in stored procedures exactly in the same way as straight
TRUNCATE (i.e. without falling back to DELETE if possible). We achieve
this by rolling back the fix for bug 8850, which is no longer relevant
since stored procedures don't require prelocked mode anymore
(and TRUNCATE is not allowed in stored functions or triggers).
sql/sql_parse.cc:
Handle TRUNCATE in stored procedures exactly in the same way as straight
TRUNCATE (i.e. without falling back to DELETE if possible). We achieve
this by rolling back the fix for bug 8850, which is no longer relevant
since stored procedures don't require prelocked mode anymore
(and TRUNCATE is not allowed in stored functions or triggers).
add two new start options that will decrease likelyhood of bug#18612
push cntr-sp2 logic down into qmgr-sp1 to decrease likelyhood of bug#18612
ndb/include/kernel/signaldata/CmRegSignalData.hpp:
Expand CmRegReq with lots of stuff
ndb/include/mgmapi/ndb_logevent.h:
Add Start report during sp1
ndb/src/common/debugger/EventLogger.cpp:
Add Start report during sp1
ndb/src/kernel/blocks/dbdih/DbdihInit.cpp:
Init cntrref
ndb/src/kernel/blocks/dbdih/DbdihMain.cpp:
Fix small bugs related to partial initial start
ndb/src/kernel/blocks/ndbcntr/NdbcntrMain.cpp:
Remove timeouts as they are handled in QMGR nowadays
ndb/src/kernel/blocks/qmgr/Qmgr.hpp:
Push cntr sp2 logic down to QMGR to prevent the forming of multiple QMGR cluster
that will lead to start problems (crashes...)
ndb/src/kernel/blocks/qmgr/QmgrInit.cpp:
Push cntr sp2 logic down to QMGR to prevent the forming of multiple QMGR cluster
that will lead to start problems (crashes...)
ndb/src/kernel/blocks/qmgr/QmgrMain.cpp:
Push cntr sp2 logic down to QMGR to prevent the forming of multiple QMGR cluster
that will lead to start problems (crashes...)
ndb/src/kernel/vm/Configuration.cpp:
Add new flags
--initial-start
--nowait-nodes
as it is now required by mysql_set_character_set()
libmysql/libmysql.c:
Removing mysql_get_server_version()
sql-common/client.c:
Adding mysql_get_server_version()
Bug#18830 incompatibility new libraries with old server
Additional 5.0 fix:
applying the same patch to client.c.
sql-common/client.c:
Bug#18830 incompatibility new libraries with old server
Additional 5.0 fix:
applying the same patch to client.c.