~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/multi_thread/multi_thread.cc

  • Committer: David Shrewsbury
  • Date: 2010-08-05 20:33:18 UTC
  • mto: (1689.1.4 build)
  • mto: This revision was merged to the branch mainline in revision 1692.
  • Revision ID: shrewsbury.dave@gmail.com-20100805203318-r5i15i9ibfu4khgy
Fix for bug 532481: fixes OS X crash by support thread_stack option

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
#include "drizzled/pthread_globals.h"
19
19
#include <boost/program_options.hpp>
20
20
#include <drizzled/module/option_map.h>
 
21
#include <drizzled/errmsg_print.h>
21
22
 
22
23
namespace po= boost::program_options;
23
24
using namespace std;
54
55
  if (thread_count >= max_threads)
55
56
    return true;
56
57
 
 
58
  int err= pthread_attr_setstacksize(&attr, getThreadStackSize());
 
59
 
 
60
  if (err != 0)
 
61
  {
 
62
    errmsg_printf(ERRMSG_LVL_ERROR,
 
63
                  _("Unable to set thread stack size to %" PRId64 "\n"),
 
64
                  static_cast<int64_t>(getThreadStackSize()));
 
65
    return true;
 
66
  }
 
67
 
57
68
  thread_count.increment();
58
69
 
59
70
  if (pthread_create(&session->real_id, &attr, session_thread,