Too many cursors (more than 1024) could lead to memory corruption.
This affects both, stored routines and C API cursors, and the
threshold is per-server, not per-connection. Similarly, the
corruption could happen when the server was under heavy load
(executing more than 1024 simultaneous complex queries), and this is
the reason why this bug is fixed in 4.1, which doesn't support
cursors.
The corruption was caused by a bug in the temporary tables code, when
an attempt to create a table could lead to a write beyond allocated
space. Note, that only internal tables were affected (the tables
created internally by the server to resolve the query), not tables
created with CREATE TEMPORARY TABLE. Another pre-condition for the
bug is TRUE value of --temp-pool startup option, which, however, is a
default.
The cause of a bug was that random memory was overwritten in
bitmap_set_next() due to out-of-bound memory access.
mysys/my_bitmap.c:
Local 'bitmap_size' is measured in bytes, no need to multiply it by 8.
sql/sql_select.cc:
Clear the temp_pool_slot bit only if we have set it previously.
Fixed data corruption bug in query cache.
Made queries be dependent of the database in use.
Docs/manual.texi:
Update binary log reference
client/mysql.cc:
Removed warning
include/thr_alarm.h:
Cleanup of alarm macros.
libmysql/libmysql.c:
Portabiliy fix
libmysql/net.c:
Cleanup of alarm macros.
mysql-test/t/rpl_get_lock.test:
Fixed results after merge.
mysys/my_bitmap.c:
Removed warning.
sql/log_event.cc:
Use thd->db_length
sql/mini_client.cc:
Cleanup of alarm macros.
sql/net_serv.cc:
Cleanup of alarm macros.
sql/sql_acl.cc:
Use thd->db_length
sql/sql_cache.cc:
Store used database together with the query.
sql/sql_class.cc:
Use thd->db_length
sql/sql_class.h:
Use thd->db_length
sql/sql_db.cc:
Use thd->db_length
sql/sql_parse.cc:
Use thd->db_length
sql/sql_udf.cc:
Use thd->db_length
extra/resolve_stack_dump.c:
Auto merged
include/my_bitmap.h:
Auto merged
innobase/buf/buf0buf.c:
Auto merged
innobase/dict/dict0crea.c:
Auto merged
mysql-test/t/rpl_get_lock.test:
Auto merged
Docs/manual.texi:
fixed bad merge
include/my_bitmap.h:
fixed comment format
mysql-test/r/rpl_get_lock.result:
make the test results predicable
mysql-test/t/rpl_get_lock.test:
predicatable test results
mysys/my_bitmap.c:
do not init/destroy mutex if bitmap is not declared thread safe
sql/slave.cc:
clean-up suggested by Monty to make init_slave_skip_errors() more compact
added extra/mysql_install.c - will work on it in 4.0, but it does not hurt
to have it sit in 3.23 tree for now since it will eventually be backported
to 3.23 anyway
Docs/manual.texi:
documented slave-skip-errors
updated change history
extra/resolve_stack_dump.c:
fixed wrong help message
include/my_bitmap.h:
bitmap code updates
mysql-test/r/rpl_get_lock.result:
test for a possible bug in release_lock() replication
mysql-test/t/rpl_get_lock.test:
test for possible bug in release_lock replication
mysys/my_bitmap.c:
bitmap code updates/clean-up
sql/mysqld.cc:
slave-skip-errors
sql/slave.cc:
slave-skip-errors
sql/slave.h:
slave skip errors
include/my_global.h:
Remove dbug_assert() (One should use DBUG_ASSERT() instead)
mysql-test/mysql-test-run.sh:
Fixed that xterm works on Solaris 2.8.
Fixed printing of errors
mysql-test/r/isam.result:
Removed MyISAM test from ISAM test
mysql-test/t/isam.test:
Removed MyISAM test from ISAM test
mysys/my_alloc.c:
Removed warnings
mysys/my_bitmap.c:
Use DBUG_ASSERT
mysys/my_pthread.c:
Use DBUG_ASSERT
mysys/my_seek.c:
More DBUG
sql/ha_berkeley.cc:
Use DBUG_ASSERT
sql/ha_innobase.cc:
Use DBUG_ASSERT
sql/log.cc:
Use DBUG_ASSERT
sql/opt_range.cc:
Use DBUG_ASSERT
sql/sql_base.cc:
Use DBUG_ASSERT
sql/sql_handler.cc:
Use DBUG_ASSERT
sql/sql_load.cc:
Cleanup
sql/sql_parse.cc:
Use DBUG_ASSERT
sql/sql_repl.cc:
Cleanup
sql/sql_select.cc:
Use DBUG_ASSERT
tools/mysqlmanager.c:
Cleanup
Fixed crash in SELECT DISTINCT SUM(...)
Fix return value of mysortncmp() for innobase
Fix join_crash bug
Docs/manual.texi:
Changelog
include/my_pthread.h:
Added defines for fast mutex in glibc 2.2
mysql-test/t/join_crash.test:
Changed table names to t1,t2...
mysys/my_bitmap.c:
Use fast mutex
mysys/my_open.c:
Use fast mutex
mysys/my_pthread.c:
Use fast mutex
mysys/my_thr_init.c:
Use fast mutex
mysys/my_winthread.c:
Use fast mutex
mysys/thr_mutex.c:
Use new mutexattr with error checking
sql/ha_innobase.cc:
Fix return value of mysortncmp() for innobase
sql/sql_select.cc:
Fix join_crash bug
BitKeeper/etc/logging_ok:
Logging to logging@openlogging.org accepted
Changed BITMAP to MY_BITMAP to avoid type conflict on windows
configure.in:
Force sockets to be blocking on HPUX 11.0
include/my_bitmap.h:
Changed BITMAP to MY_BITMAP to avoid type conflict on windows
mysys/my_bitmap.c:
Changed BITMAP to MY_BITMAP to avoid type conflict on windows
mysys/my_init.c:
Removed LOCK_bitmap
sql/mysql_priv.h:
Changed BITMAP to MY_BITMAP to avoid type conflict on windows
sql/mysqld.cc:
Changed BITMAP to MY_BITMAP to avoid type conflict on windows
sql/violite.c:
Force sockets to be blocking on HPUX 11.0
Patches for Armstrong
Removed warnings when using REPAIR TABLE .. EXTENDED
Docs/manual.texi:
Changelog
configure.in:
Added missing -lsocket library on SCO
include/global.h:
Patch for Armstrong
include/my_bitmap.h:
Changed bitmap interface to avoid problem with missing LOCK_bitmap symbol
include/myisampack.h:
Portability fix for Armstrong
mysql-test/t/select.test:
Changed to work with 'mysql test < select.tst'
mysys/my_bitmap.c:
Changed bitmap interface to avoid problem with missing LOCK_bitmap symbol
mysys/my_init.c:
Removed LOCK_bitmap
sql/field.cc:
Patch for Armstrong
sql/filesort.cc:
Patch for Armstrong
sql/ha_myisam.cc:
Removed warnings when using REPAIR TABLE .. EXTENDED
sql/mysql_priv.h:
Use new bitmap interface
sql/mysqld.cc:
Use new bitmap interface
sql/sql_select.cc:
Use new bitmap interface
Allow delete of crashed MyISAM tables
Fixed bug when BLOB was first part of key
Fixed bug when using result from CASE in GROUP BY
Fixed core-dump bug in monthname()
Optimized calling of check_db_name()
Docs/manual.texi:
Added more information about myisamchk
client/mysqladmin.c:
Added error message for CREATE database and fixed possible overflow bug
include/myisam.h:
New myisamchk option --sort-recover
libmysql/libmysql.c:
Removed commented code
Don't define getpwuid (breaks on SCO 3.2)
myisam/mi_check.c:
Fixed (new) bug when using --recover --optimize
myisam/mi_delete_table.c:
Allow delete of crashed tables
myisam/mi_key.c:
Fixed bug when BLOB was first part of key
myisam/myisamchk.c:
New myisamchk option --sort-recover
mysql-test/r/case.result:
New test cases to check for reported bugs
mysql-test/r/func_time.result:
New test cases to check for reported bugs
mysql-test/r/type_blob.result:
New test cases to check for reported bugs
mysql-test/r/type_datetime.result:
New test cases to check for reported bugs
mysql-test/t/case.test:
New test cases to check for reported bugs
mysql-test/t/func_time.test:
New test cases to check for reported bugs
mysql-test/t/type_blob.test:
New test cases to check for reported bugs
mysql-test/t/type_datetime.test:
New test cases to check for reported bugs
mysys/my_bitmap.c:
Optimize
sql-bench/limits/ms-sql.cfg:
Updated limits
sql/item_cmpfunc.cc:
Fixed bug when using result from CASE in GROUP BY
sql/item_cmpfunc.h:
Fixed bug when using result from CASE in GROUP BY
sql/item_timefunc.cc:
Fixed core-dump bug in monthname()
sql/sql_db.cc:
Optimized calling of check_db_name()
sql/sql_parse.cc:
Optimized calling of check_db_name()
sql/table.cc:
Fixed typo
created to use a small set of filenames, to try and avoid problems
in the Linux kernel.
mysys/Makefile.am:
Added my_bitmap.c
mysys/my_init.c:
my_bitmap code added
mysys/mysys_priv.h:
my_bitmap
sql/mysql_priv.h:
temp pool stuff.
sql/mysqld.cc:
--temp-pool option added
sql/sql_select.cc:
temp pool stuff
sql/table.h:
temp pool