summaryrefslogtreecommitdiff
path: root/sql/sql_list.h
diff options
context:
space:
mode:
authorsasha@mysql.sashanet.com <>2001-03-24 23:33:26 -0700
committersasha@mysql.sashanet.com <>2001-03-24 23:33:26 -0700
commitc57b8bde25e95c5e835124eba70d257b5d6d34fb (patch)
treed85f91a3b5bdca0bf45adfb75c78a83a596ae534 /sql/sql_list.h
parent5487d7a8c01a5ccce90a63a359562cff1bd95b78 (diff)
downloadmariadb-git-c57b8bde25e95c5e835124eba70d257b5d6d34fb.tar.gz
sql/mysqld.cc
fixed concurrency bug with a very quickly disconnecting client - the client could disconnect and delete thd before pthread_create could write to &thd->real_id sql/sql_list.h while tracking down the bug, made new/delete go through my_malloc/my_free for ilink - did not help, but this is better anyway - cleaner exit with a message in out of memory codition at least.
Diffstat (limited to 'sql/sql_list.h')
-rw-r--r--sql/sql_list.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/sql/sql_list.h b/sql/sql_list.h
index 965d1ff9308..b86250f70b6 100644
--- a/sql/sql_list.h
+++ b/sql/sql_list.h
@@ -225,6 +225,15 @@ public:
struct ilink {
struct ilink **prev,*next;
+ static void *operator new(size_t size)
+ {
+ return (void*)my_malloc((uint)size, MYF(MY_WME | MY_FAE));
+ }
+ static void operator delete(void* ptr_arg, size_t size)
+ {
+ my_free((gptr)ptr_arg, MYF(MY_WME|MY_ALLOW_ZERO_PTR));
+ }
+
inline ilink()
{
prev=0; next=0;