1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

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.


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.
This commit is contained in:
unknown
2001-03-24 23:33:26 -07:00
parent 4a3f651d6d
commit 20a5872e69
2 changed files with 11 additions and 2 deletions

View File

@@ -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;