mariadb/sql
dlenev@mockturtle.local 01bd08b5d7 Fix for bug #25966 "2MB per second endless memory consumption after LOCK
TABLE ... WRITE".

Memory and CPU hogging occured when connection which had to wait for table
lock was serviced by thread which previously serviced connection that was
killed (note that connections can reuse threads if thread cache is enabled).
One possible scenario which exposed this problem was when thread which
provided binlog dump to replication slave was implicitly/automatically
killed when the same slave reconnected and started pulling data through
different thread/connection.
The problem also occured when one killed particular query in connection
(using KILL QUERY) and later this connection had to wait for some table
lock.

This problem was caused by the fact that thread-specific mysys_var::abort
variable, which indicates that waiting operations on mysys layer should
be aborted (this includes waiting for table locks), was set by kill
operation but was never reset back. So this value was "inherited" by the
following statements or even other connections (which reused the same
physical thread). Such discrepancy between this variable and THD::killed
flag broke logic on SQL-layer and caused CPU and memory hogging.

This patch tries to fix this problem by properly resetting this member.

There is no test-case associated with this patch since it is hard to test
for memory/CPU hogging conditions in our test-suite.
2007-03-15 11:51:35 +03:00
..
examples After merge fix 2007-02-03 09:26:11 +01:00
share Bug#24617 Typo in Czech translation 2007-02-22 17:53:41 +01:00
.cvsignore
add_errmsg
client_settings.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
CMakeLists.txt Merge mjorgensen@bk-internal.mysql.com:/home/bk/mysql-5.0-sage 2007-01-11 09:19:32 +01:00
custom_conf.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
derror.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
des_key_file.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
discover.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
field.cc Merge tnurnberg@bk-internal.mysql.com:/home/bk/mysql-5.0-maint 2007-03-03 01:00:30 +01:00
field.h Merge mysql.com:/home/svoj/devel/bk/mysql-5.0 2007-03-13 16:58:52 +04:00
field_conv.cc Bug #22344: InnoDB keys act strange on datetime vs timestamp comparison 2007-02-06 11:08:57 +02:00
filesort.cc Fixed compiler warnings (for linux and win32 and win64) 2007-02-22 16:59:57 +02:00
frm_crypt.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
gen_lex_hash.cc gen_lex_hash.cc: 2007-01-31 00:06:42 +01:00
gstream.cc Many files: 2006-12-23 20:17:15 +01:00
gstream.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
ha_archive.cc Disabled compiler warnings. 2007-03-01 10:52:25 +02:00
ha_archive.h Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2007-01-22 14:04:40 +02:00
ha_berkeley.cc Fixed compiler warnings. 2007-02-28 22:23:35 +02:00
ha_berkeley.h Fixed compiler warnings (for linux and win32 and win64) 2007-02-22 16:59:57 +02:00
ha_blackhole.cc Bug#19717: The blackhole engine is returning an OK flag in 2007-02-14 18:35:59 +02:00
ha_blackhole.h Many files: 2006-12-23 20:17:15 +01:00
ha_federated.cc Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2007-01-22 14:04:40 +02:00
ha_federated.h Many files: 2006-12-23 20:17:15 +01:00
ha_heap.cc Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2007-01-22 14:04:40 +02:00
ha_heap.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
ha_innodb.cc Fixed compiler warnings (for linux and win32 and win64) 2007-02-22 16:59:57 +02:00
ha_innodb.h Applied innodb-5.0-ss1230 snapshot 2007-01-21 17:58:02 -07:00
ha_myisam.cc Merge mysql.com:/home/svoj/devel/mysql/BUG26881/mysql-4.1-engines 2007-03-13 18:11:47 +04:00
ha_myisam.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
ha_myisammrg.cc Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2007-02-21 14:07:08 +02:00
ha_myisammrg.h Merge chilla.local:/home/mydev/mysql-4.1-bug26464 2007-03-06 10:34:14 +01:00
ha_ndbcluster.cc Fixed compiler warnings. 2007-02-28 22:23:35 +02:00
ha_ndbcluster.h NdbScanOperation.hpp, NdbScanOperation.cpp, ha_ndbcluster.cc: 2007-02-07 11:36:34 +01:00
handler.cc another valgrind error fix for 4.1(backport from 5.0) 2007-02-02 17:18:42 +04:00
handler.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
hash_filo.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
hash_filo.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
hostname.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
init.cc Merge mysql.com:/home/ram/work/b19690/b19690.4.1 2007-01-31 10:07:56 +04:00
item.cc Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt 2007-03-10 19:53:59 +03:00
item.h Bug#22331: Wrong WHERE in EXPLAIN EXTENDED when all expressions were optimized 2007-03-10 00:29:02 +03:00
item_buff.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
item_cmpfunc.cc Merge bk@192.168.21.1:mysql-5.0 2007-03-08 21:42:41 +04:00
item_cmpfunc.h Merge bk@192.168.21.1:mysql-5.0 2007-03-08 21:42:41 +04:00
item_create.cc Many files: 2006-12-23 20:17:15 +01:00
item_create.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
item_func.cc Merge bk@192.168.21.1:mysql-5.0 2007-03-08 21:42:41 +04:00
item_func.h Fixed bug#16861: User defined variable can have a wrong value if a tmp table was 2007-01-09 23:24:56 +03:00
item_geofunc.cc Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint 2007-03-05 18:22:35 +04:00
item_geofunc.h Merge mysql.com:/home/ram/work/b26038/b26038.4.1 2007-02-28 12:13:46 +04:00
item_row.cc Many files: 2006-12-23 20:17:15 +01:00
item_row.h Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2007-01-22 14:04:40 +02:00
item_strfunc.cc Merge moonbone.local:/mnt/gentoo64/work/15757-bug-5.0-opt-mysql 2007-03-10 19:57:18 +03:00
item_strfunc.h Bug #26537: item_unhex() was not expected 2007-03-02 12:14:50 +02:00
item_subselect.cc Merge weblab.(none):/home/marcsql/TREE/mysql-5.0-base 2007-03-01 14:06:57 -07:00
item_subselect.h Merge weblab.(none):/home/marcsql/TREE/mysql-5.0-base 2007-03-01 14:06:57 -07:00
item_sum.cc Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2007-02-21 14:07:08 +02:00
item_sum.h Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2007-01-11 09:43:44 -05:00
item_timefunc.cc Fixed compiler warnings (for linux and win32 and win64) 2007-02-22 16:59:57 +02:00
item_timefunc.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
item_uniq.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
item_uniq.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
key.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
lex.h Many files: 2006-12-23 20:17:15 +01:00
lex_symbol.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
lock.cc Bug#8407 (Stored functions/triggers ignore exception handler) 2007-03-05 19:42:07 -07:00
log.cc Merge pilot.blaudden:/home/msvensson/mysql/mysql-5.0 2007-03-01 18:12:56 +01:00
log_event.cc A fix for Bug#26750 "valgrind leak in sp_head" (and post-review 2007-03-07 12:24:46 +03:00
log_event.h Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl 2007-02-28 17:17:06 +04:00
Makefile.am Merge neptunus.(none):/home/msvensson/mysql/bug10777/my50-bug10777 2007-02-15 15:05:25 +01:00
matherr.c my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
message.mc make dist changes for Cmake build 2006-09-01 10:32:12 +02:00
mf_iocache.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
my_decimal.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
my_decimal.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
my_lock.c my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
mysql_priv.h Merge bk@192.168.21.1:mysql-5.0 2007-03-08 21:42:41 +04:00
mysqld.cc Fix for bug #25966 "2MB per second endless memory consumption after LOCK 2007-03-15 11:51:35 +03:00
mysqld.cc.rej Merge a88-113-38-195.elisa-laajakaista.fi:/home/my/bk/mysql-4.0 2007-01-22 03:33:59 +02:00
mysqld_suffix.h Many files: 2006-12-23 20:17:15 +01:00
net_serv.cc Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2007-02-21 14:07:08 +02:00
nt_servc.cc
nt_servc.h
opt_range.cc Fixed bug #26830: a crash for the query with a subselect containing ROLLUP. 2007-03-10 02:47:47 -08:00
opt_range.h Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2007-01-22 14:04:40 +02:00
opt_sum.cc Merge olga.mysql.com:/home/igor/dev-opt/mysql-4.1-opt-bug24987 2007-01-30 13:14:52 -08:00
parse_file.cc Many files: 2006-12-23 20:17:15 +01:00
parse_file.h Many files: 2006-12-23 20:17:15 +01:00
password.c Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2007-01-22 14:04:40 +02:00
procedure.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
procedure.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
protocol.cc Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2007-01-22 14:04:40 +02:00
protocol.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
records.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
repl_failsafe.cc Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2007-02-21 14:07:08 +02:00
repl_failsafe.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
set_var.cc Merge pilot.blaudden:/home/msvensson/mysql/bug21781/my50-bug21781 2007-03-05 11:50:59 +01:00
set_var.h Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2007-02-21 14:07:08 +02:00
slave.cc Removing two more compilation warnings. 2007-03-01 10:40:48 +01:00
slave.h Fix for BUG#24432 2007-02-08 15:53:14 +01:00
sp.cc Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2007-01-22 14:04:40 +02:00
sp.h Many files: 2006-12-23 20:17:15 +01:00
sp_cache.cc Many files: 2006-12-23 20:17:15 +01:00
sp_cache.h Many files: 2006-12-23 20:17:15 +01:00
sp_head.cc Fix for bug #25966 "2MB per second endless memory consumption after LOCK 2007-03-15 11:51:35 +03:00
sp_head.h Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.0-runtime 2007-03-06 11:30:08 -07:00
sp_pcontext.cc Many files: 2006-12-23 20:17:15 +01:00
sp_pcontext.h Many files: 2006-12-23 20:17:15 +01:00
sp_rcontext.cc Many files: 2006-12-23 20:17:15 +01:00
sp_rcontext.h Many files: 2006-12-23 20:17:15 +01:00
spatial.cc Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint 2007-03-05 18:22:35 +04:00
spatial.h Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint 2007-03-05 18:22:35 +04:00
sql_acl.cc Fixed compiler warnings (for linux and win32 and win64) 2007-02-22 16:59:57 +02:00
sql_acl.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_analyse.cc Merge rkalimullin@bk-internal.mysql.com:/home/bk/mysql-5.0-maint 2007-02-06 17:18:43 +04:00
sql_analyse.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_array.h Many files: 2006-12-23 20:17:15 +01:00
sql_base.cc Merge bk@192.168.21.1:mysql-5.0 2007-03-08 21:42:41 +04:00
sql_bitmap.h Many files: 2006-12-23 20:17:15 +01:00
sql_cache.cc Merge moonlight.home:/home/tomash/src/mysql_ab/mysql-5.0 2007-01-25 20:10:40 +03:00
sql_cache.h Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2007-01-22 14:04:40 +02:00
sql_class.cc Merge quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/50 2007-03-07 23:55:25 +01:00
sql_class.h Merge quadxeon.mysql.com:/benchmarks/ext3/TOSAVE/tsmith/bk/50 2007-03-07 23:55:25 +01:00
sql_client.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_crypt.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_crypt.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_cursor.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_cursor.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_db.cc Many files: 2006-12-23 20:17:15 +01:00
sql_delete.cc Merge epotemkin@bk-internal.mysql.com:/home/bk/mysql-5.0-opt 2007-03-02 00:10:25 +03:00
sql_derived.cc Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2007-01-22 14:04:40 +02:00
sql_do.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_error.cc Many files: 2006-12-23 20:17:15 +01:00
sql_error.h Many files: 2006-12-23 20:17:15 +01:00
sql_handler.cc Many files: 2006-12-23 20:17:15 +01:00
sql_help.cc Bug #25831: Deficiencies in INSERT ... SELECT ... field name resolving. 2007-02-19 14:39:37 +02:00
sql_insert.cc Merge bk@192.168.21.1:mysql-5.0 2007-03-08 21:42:41 +04:00
sql_lex.cc Merge bk@192.168.21.1:mysql-5.0 2007-03-08 21:42:41 +04:00
sql_lex.h Merge bk@192.168.21.1:mysql-5.0 2007-03-08 21:42:41 +04:00
sql_list.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_list.h Manual merge. 2007-01-15 13:10:07 +03:00
sql_load.cc Merge bk@192.168.21.1:mysql-5.0 2007-03-08 21:42:41 +04:00
sql_locale.cc Merge mysql.com:/nfsdisk1/lars/bkroot/mysql-5.0-rpl 2007-01-12 12:22:54 +01:00
sql_manager.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_manager.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_map.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_map.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_olap.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_parse.cc Fix for bug #25966 "2MB per second endless memory consumption after LOCK 2007-03-15 11:51:35 +03:00
sql_prepare.cc A fix for Bug#26750 "valgrind leak in sp_head" (and post-review 2007-03-07 12:24:46 +03:00
sql_rename.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_repl.cc Removing two more compilation warnings. 2007-03-01 10:40:48 +01:00
sql_repl.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_select.cc sql_select.cc: 2007-03-08 19:38:21 +03:00
sql_select.h Bug#22331: Wrong WHERE in EXPLAIN EXTENDED when all expressions were optimized 2007-03-07 21:44:58 +03:00
sql_show.cc Fixed compiler warnings (for linux and win32 and win64) 2007-02-22 16:59:57 +02:00
sql_sort.h Many files: 2006-12-23 20:17:15 +01:00
sql_state.c Many files: 2006-12-23 20:17:15 +01:00
sql_string.cc Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2007-01-22 14:04:40 +02:00
sql_string.h Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2007-01-22 14:04:40 +02:00
sql_table.cc Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2007-02-21 14:07:08 +02:00
sql_test.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_trigger.cc A fix for Bug#26750 "valgrind leak in sp_head" (and post-review 2007-03-07 12:24:46 +03:00
sql_trigger.h Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl 2007-02-27 12:46:50 +04:00
sql_udf.cc Merge bk-internal:/home/bk/mysql-5.0-opt 2007-01-03 18:29:39 +02:00
sql_udf.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
sql_union.cc Bug#22331: Wrong WHERE in EXPLAIN EXTENDED when all expressions were optimized 2007-03-10 00:29:02 +03:00
sql_update.cc Merge bk@192.168.21.1:mysql-5.0 2007-03-08 21:42:41 +04:00
sql_view.cc Merge bk-internal.mysql.com:/home/bk/mysql-5.0 2007-02-21 14:07:08 +02:00
sql_view.h Many files: 2006-12-23 20:17:15 +01:00
sql_yacc.yy A fix for Bug#26750 "valgrind leak in sp_head" (and post-review 2007-03-07 12:24:46 +03:00
stacktrace.c Many files: 2006-12-23 20:17:15 +01:00
stacktrace.h Many files: 2006-12-23 20:17:15 +01:00
strfunc.cc Many files: 2006-12-23 20:17:15 +01:00
structs.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
table.cc Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.0-runtime 2007-03-06 11:30:08 -07:00
table.h Merge malff@bk-internal.mysql.com:/home/bk/mysql-5.0-runtime 2007-03-06 11:30:08 -07:00
thr_malloc.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
time.cc my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
tzfile.h Many files: 2006-12-23 20:17:15 +01:00
tztime.cc Merge pilot.blaudden:/home/msvensson/mysql/mysql-5.0 2007-03-01 18:12:56 +01:00
tztime.h Many files: 2006-12-23 20:17:15 +01:00
udf_example.c Many files: 2006-12-23 20:17:15 +01:00
udf_example.def Fixed compiler warnings (for linux and win32 and win64) 2007-02-22 16:59:57 +02:00
uniques.cc Many files: 2006-12-23 20:17:15 +01:00
unireg.cc Fixed compiler warnings (for linux and win32 and win64) 2007-02-22 16:59:57 +02:00
unireg.h my_strtoll10-x86.s: 2006-12-31 01:02:27 +01:00
watchdog_mysqld