~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/internal/thread_var.h

[patch 112/129] Merge patch for revision 1925 from InnoDB SVN:
revno: 1925
revision-id: svn-v4:16c675df-0fcb-4bc9-8058-dcc011a37293:branches/zip:6169
parent: svn-v4:16c675df-0fcb-4bc9-8058-dcc011a37293:branches/zip:6163
committer: calvin
timestamp: Thu 2009-11-12 12:40:43 +0000
message:
  branches/zip: add test case for bug#46676
  
  This crash is reproducible with InnoDB plugin 1.0.4 + MySQL 5.1.37.
  But no longer reproducible after MySQL 5.1.38 (with plugin 1.0.5).
  Add test case to catch future regression.
added:
  mysql-test/innodb_bug46676.result 6169@16c675df-0fcb-4bc9-8058-dcc011a37293:branches%2Fzip%2Fmysql-test%2Finnodb_bug46676.result
  mysql-test/innodb_bug46676.test 6169@16c675df-0fcb-4bc9-8058-dcc011a37293:branches%2Fzip%2Fmysql-test%2Finnodb_bug46676.test
diff:
=== added file 'mysql-test/innodb_bug46676.result'

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
#include <pthread.h>
22
22
#include <boost/thread/recursive_mutex.hpp>
23
23
#include <boost/thread/mutex.hpp>
24
 
#include <boost/thread/shared_mutex.hpp>
25
24
#include <boost/thread/condition_variable.hpp>
26
25
 
27
26
namespace drizzled
29
28
namespace internal
30
29
{
31
30
 
 
31
static pthread_t wrapper_pthread_self()
 
32
{
 
33
  return pthread_self();
 
34
}
 
35
 
32
36
struct st_my_thread_var
33
37
{
34
 
  boost::condition_variable_any suspend;
 
38
  boost::condition_variable suspend;
35
39
  boost::mutex mutex;
36
40
  boost::mutex * volatile current_mutex;
37
 
  boost::condition_variable_any * volatile current_cond;
 
41
  boost::condition_variable * volatile current_cond;
 
42
  pthread_t pthread_self;
38
43
  uint64_t id;
39
44
  int volatile abort;
 
45
  struct st_my_thread_var *next,**prev;
40
46
  void *opt_info;
41
47
 
42
48
  st_my_thread_var() :
44
50
    current_cond(0),
45
51
    id(0),
46
52
    abort(false),
 
53
    next(0),
 
54
    prev(0),
47
55
    opt_info(0)
48
56
  { 
 
57
    pthread_self= wrapper_pthread_self();
49
58
  }
50
59
 
51
60
  ~st_my_thread_var()