~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to server/drizzled.cc

  • Committer: Brian Aker
  • Date: 2008-07-11 00:33:12 UTC
  • mfrom: (51.1.83 remove-dbug)
  • Revision ID: brian@tangent.org-20080711003312-f4sf5n2z3obor1u8
Comming Jay's merge

Show diffs side-by-side

added added

removed removed

Lines of Context:
478
478
 
479
479
bool mysqld_embedded=0;
480
480
 
481
 
#ifndef DBUG_OFF
482
 
static const char* default_dbug_option;
483
 
#endif
484
 
 
485
481
scheduler_functions thread_scheduler;
486
482
 
487
483
/**
1748
1744
      if (!abort_loop)
1749
1745
      {
1750
1746
        bool not_used;
1751
 
        mysql_print_status();           // Print some debug info
1752
1747
        reload_cache((THD*) 0,
1753
1748
                     (REFRESH_LOG | REFRESH_TABLES | REFRESH_FAST |
1754
1749
                      REFRESH_GRANT |
1832
1827
      thd->lex->current_select == 0 if lex structure is not inited
1833
1828
      (not query command (COM_QUERY))
1834
1829
    */
1835
 
    if (thd->lex->current_select &&
1836
 
        thd->lex->current_select->no_error && !thd->is_fatal_error)
1837
 
    {
1838
 
      /* DBUG_WAS_HERE */
1839
 
    }
1840
 
    else
 
1830
    if (! (thd->lex->current_select &&
 
1831
        thd->lex->current_select->no_error && !thd->is_fatal_error))
1841
1832
    {
1842
1833
      if (! thd->main_da.is_error())            // Return only first message
1843
1834
      {
2066
2057
  if (add_status_vars(status_vars))
2067
2058
    return 1; // an error was already reported
2068
2059
 
2069
 
#ifndef DBUG_OFF
2070
 
  /*
2071
 
    We have few debug-only commands in com_status_vars, only visible in debug
2072
 
    builds. for simplicity we enable the assert only in debug builds
2073
 
 
2074
 
    There are 7 Com_ variables which don't have corresponding SQLCOM_ values:
2075
 
    (TODO strictly speaking they shouldn't be here, should not have Com_ prefix
2076
 
    that is. Perhaps Stmt_ ? Comstmt_ ? Prepstmt_ ?)
2077
 
 
2078
 
      Com_admin_commands       => com_other
2079
 
      Com_stmt_close           => com_stmt_close
2080
 
      Com_stmt_execute         => com_stmt_execute
2081
 
      Com_stmt_fetch           => com_stmt_fetch
2082
 
      Com_stmt_prepare         => com_stmt_prepare
2083
 
      Com_stmt_reset           => com_stmt_reset
2084
 
      Com_stmt_send_long_data  => com_stmt_send_long_data
2085
 
 
2086
 
    With this correction the number of Com_ variables (number of elements in
2087
 
    the array, excluding the last element - terminator) must match the number
2088
 
    of SQLCOM_ constants.
2089
 
  */
2090
 
  compile_time_assert(sizeof(com_status_vars)/sizeof(com_status_vars[0]) - 1 ==
2091
 
                     SQLCOM_END + 7);
2092
 
#endif
2093
 
 
2094
2060
  load_defaults(conf_file_name, groups, &argc, &argv);
2095
2061
  defaults_argv=argv;
2096
2062
  defaults_argc=argc;
3057
3023
  OPT_REPLICATE_IGNORE_DB,     OPT_LOG_SLAVE_UPDATES,
3058
3024
  OPT_BINLOG_DO_DB,            OPT_BINLOG_IGNORE_DB,
3059
3025
  OPT_BINLOG_FORMAT,
3060
 
#ifndef DBUG_OFF
3061
 
  OPT_BINLOG_SHOW_XID,
3062
 
#endif
3063
3026
  OPT_BINLOG_ROWS_EVENT_MAX_SIZE, 
3064
3027
  OPT_WANT_CORE,
3065
3028
  OPT_MEMLOCK,                 OPT_MYISAM_RECOVER,
3272
3235
   NO_ARG, 0, 0, 0, 0, 0, 0},
3273
3236
  {"datadir", 'h', "Path to the database root.", (uchar**) &mysql_data_home,
3274
3237
   (uchar**) &mysql_data_home, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
3275
 
#ifndef DBUG_OFF
3276
 
  {"debug", '#', "Debug log.", (uchar**) &default_dbug_option,
3277
 
   (uchar**) &default_dbug_option, 0, GET_STR, OPT_ARG, 0, 0, 0, 0, 0, 0},
3278
 
#endif
3279
3238
  {"default-character-set", 'C', "Set the default character set (deprecated option, use --character-set-server instead).",
3280
3239
   (uchar**) &default_character_set_name, (uchar**) &default_character_set_name,
3281
3240
   0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0 },
4444
4403
  global_system_variables.myisam_stats_method= MI_STATS_METHOD_NULLS_NOT_EQUAL;
4445
4404
 
4446
4405
  /* Variables that depends on compile options */
4447
 
#ifndef DBUG_OFF
4448
 
  default_dbug_option=IF_WIN("d:t:i:O,\\mysqld.trace",
4449
 
                             "d:t:i:o,/tmp/mysqld.trace");
4450
 
#endif
4451
4406
  opt_error_log= IF_WIN(1,0);
4452
4407
#ifdef HAVE_BROKEN_REALPATH
4453
4408
  have_symlink=SHOW_OPTION_NO;
4484
4439
{
4485
4440
  switch(optid) {
4486
4441
  case '#':
4487
 
#ifndef DBUG_OFF
4488
 
    DBUG_SET_INITIAL(argument ? argument : default_dbug_option);
4489
 
#endif
4490
4442
    opt_endinfo=1;                              /* unireg: memory allocation */
4491
4443
    break;
4492
4444
  case 'a':
4973
4925
{
4974
4926
  char *end= strxmov(server_version, MYSQL_SERVER_VERSION,
4975
4927
                     MYSQL_SERVER_SUFFIX_STR, NullS);
4976
 
#ifndef DBUG_OFF
4977
 
  if (!strstr(MYSQL_SERVER_SUFFIX_STR, "-debug"))
4978
 
    end= strmov(end, "-debug");
4979
 
#endif
4980
4928
  if (opt_log || opt_slow_log || opt_bin_log)
4981
4929
    strmov(end, "-log");                        // This may slow down system
4982
4930
}