~posulliv/drizzle/optimizer-style-cleanup

« back to all changes in this revision

Viewing changes to drizzled/set_var.cc

  • Committer: Padraig O'Sullivan
  • Date: 2010-04-17 01:38:47 UTC
  • mfrom: (1237.9.238 bad-staging)
  • Revision ID: osullivan.padraig@gmail.com-20100417013847-ibjioqsfbmf5yg4g
Merge trunk.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
  - If the variable is thread specific, add it to 'system_variables' struct.
30
30
    If not, add it to mysqld.cc and an declaration in 'mysql_priv.h'
31
31
  - If the variable should be changed from the command line, add a definition
32
 
    of it in the my_option structure list in mysqld.cc
 
32
    of it in the option structure list in mysqld.cc
33
33
  - Don't forget to initialize new fields in global_system_variables and
34
34
    max_system_variables!
35
35
 
44
44
*/
45
45
 
46
46
#include "config.h"
47
 
#include "drizzled/my_getopt.h"
 
47
#include "drizzled/option.h"
48
48
#include <drizzled/error.h>
49
49
#include <drizzled/gettext.h>
50
50
#include <drizzled/tztime.h>
80
80
extern plugin::StorageEngine *myisam_engine;
81
81
extern bool timed_mutexes;
82
82
 
83
 
extern struct my_option my_long_options[];
 
83
extern struct option my_long_options[];
84
84
extern const CHARSET_INFO *character_set_filesystem;
85
85
extern size_t my_thread_stack_size;
86
86
 
430
430
}
431
431
 
432
432
uint64_t fix_unsigned(Session *session, uint64_t num,
433
 
                              const struct my_option *option_limits)
 
433
                              const struct option *option_limits)
434
434
{
435
435
  bool fixed= false;
436
436
  uint64_t out= getopt_ull_limit_value(num, option_limits, &fixed);
441
441
 
442
442
 
443
443
static size_t fix_size_t(Session *session, size_t num,
444
 
                           const struct my_option *option_limits)
 
444
                           const struct option *option_limits)
445
445
{
446
446
  bool fixed= false;
447
447
  size_t out= (size_t)getopt_ull_limit_value(num, option_limits, &fixed);
1381
1381
      session->options&= ~(uint64_t) (OPTION_BEGIN);
1382
1382
      session->server_status|= SERVER_STATUS_AUTOCOMMIT;
1383
1383
      TransactionServices &transaction_services= TransactionServices::singleton();
1384
 
      if (transaction_services.ha_commit_trans(session, true))
 
1384
      if (transaction_services.commitTransaction(session, true))
1385
1385
        return 1;
1386
1386
    }
1387
1387
    else
1455
1455
    ptr         pointer to option structure
1456
1456
*/
1457
1457
 
1458
 
static struct my_option *find_option(struct my_option *opt, const char *name)
 
1458
static struct option *find_option(struct option *opt, const char *name)
1459
1459
{
1460
1460
  uint32_t length=strlen(name);
1461
1461
  for (; opt->name; opt++)
1488
1488
*/
1489
1489
 
1490
1490
 
1491
 
int mysql_add_sys_var_chain(sys_var *first, struct my_option *long_options)
 
1491
int mysql_add_sys_var_chain(sys_var *first, struct option *long_options)
1492
1492
{
1493
1493
  sys_var *var;
1494
1494
  /* A write lock should be held on LOCK_system_variables_hash */