~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/set_var.cc

  • Committer: Monty Taylor
  • Date: 2010-02-04 08:14:46 UTC
  • mfrom: (1277.2.1 build) (1280.2.1 build)
  • mto: This revision was merged to the branch mainline in revision 1283.
  • Revision ID: mordred@inaugust.com-20100204081446-ldh9m486va30uap6
Put everything in drizzled into drizzled namespace.
Put internal stuff into drizzled::internal namespace.
Removed some cruft.
Now every symbol that is shipped in a header is in the drizzled namespace
and everything in the server that's not shipped is labeled internal. woot. 
Removed a lot of the extra extern "C" stuff that was in there. Less ugliness for
internal callbacks now for Sun Studio.

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
#include <algorithm>
69
69
 
70
70
using namespace std;
71
 
using namespace drizzled;
 
71
 
 
72
namespace drizzled
 
73
{
 
74
 
 
75
namespace internal
 
76
{
 
77
extern bool timed_mutexes;
 
78
}
72
79
 
73
80
extern plugin::StorageEngine *myisam_engine;
74
81
extern bool timed_mutexes;
215
222
                                             check_tx_isolation);
216
223
static sys_var_session_uint64_t sys_tmp_table_size(&vars, "tmp_table_size",
217
224
                                           &SV::tmp_table_size);
218
 
static sys_var_bool_ptr  sys_timed_mutexes(&vars, "timed_mutexes", &timed_mutexes);
219
 
static sys_var_const_str  sys_version(&vars, "version", drizzled::version().c_str());
 
225
static sys_var_bool_ptr  sys_timed_mutexes(&vars, "timed_mutexes", &internal::timed_mutexes);
 
226
static sys_var_const_str  sys_version(&vars, "version", version().c_str());
220
227
 
221
228
static sys_var_const_str        sys_version_comment(&vars, "version_comment",
222
229
                                            COMPILATION_COMMENT);
382
389
  if (val < 0 || val > 2)
383
390
  {
384
391
    char buf[64];
385
 
    my_error(ER_WRONG_VALUE_FOR_VAR, MYF(0), var->var->getName().c_str(), llstr(val, buf));
 
392
    my_error(ER_WRONG_VALUE_FOR_VAR, MYF(0), var->var->getName().c_str(), internal::llstr(val, buf));
386
393
    return 1;
387
394
  }
388
395
  return 0;
410
417
    char buf[22];
411
418
 
412
419
    if (unsignd)
413
 
      ullstr((uint64_t) val, buf);
 
420
      internal::ullstr((uint64_t) val, buf);
414
421
    else
415
 
      llstr(val, buf);
 
422
      internal::llstr(val, buf);
416
423
 
417
424
    push_warning_printf(session, DRIZZLE_ERROR::WARN_LEVEL_ERROR,
418
425
                        ER_TRUNCATED_WRONG_VALUE,
852
859
    uint64_t tmp=var->value->val_int();
853
860
    if (tmp >= enum_names->count)
854
861
    {
855
 
      llstr(tmp,buff);
 
862
      internal::llstr(tmp,buff);
856
863
      value=buff;                               // Wrong value is here
857
864
      goto err;
858
865
    }
1065
1072
    if (!(tmp=get_charset((int) var->value->val_int())))
1066
1073
    {
1067
1074
      char buf[20];
1068
 
      int10_to_str((int) var->value->val_int(), buf, -10);
 
1075
      internal::int10_to_str((int) var->value->val_int(), buf, -10);
1069
1076
      my_error(ER_UNKNOWN_COLLATION, MYF(0), buf);
1070
1077
      return 1;
1071
1078
    }
1240
1247
    if (!(locale_match= my_locale_by_number((uint32_t) var->value->val_int())))
1241
1248
    {
1242
1249
      char buf[20];
1243
 
      int10_to_str((int) var->value->val_int(), buf, -10);
 
1250
      internal::int10_to_str((int) var->value->val_int(), buf, -10);
1244
1251
      my_printf_error(ER_UNKNOWN_ERROR, "Unknown locale: '%s'", MYF(0), buf);
1245
1252
      return 1;
1246
1253
    }
1923
1930
  }
1924
1931
  return 0;
1925
1932
}
 
1933
 
 
1934
} /* namespace drizzled */