~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/session.cc

  • Committer: pawel
  • Date: 2010-03-29 20:16:08 UTC
  • mto: This revision was merged to the branch mainline in revision 1428.
  • Revision ID: pawel@paw-20100329201608-ndqnc736k47uvy3s
changed function-like defines into functions in some files

Show diffs side-by-side

added added

removed removed

Lines of Context:
383
383
 
384
384
Session::~Session()
385
385
{
386
 
  Session_CHECK_SENTRY(this);
 
386
  this->checkSentry();
387
387
  add_to_status(&global_status_var, &status_var);
388
388
 
389
389
  if (client->isConnected())
470
470
 
471
471
void Session::awake(Session::killed_state state_to_set)
472
472
{
473
 
  Session_CHECK_SENTRY(this);
 
473
  this->checkSentry();
474
474
  safe_mutex_assert_owner(&LOCK_delete);
475
475
 
476
476
  killed= state_to_set;
1142
1142
  return 0;
1143
1143
}
1144
1144
 
1145
 
 
1146
 
#define NEED_ESCAPING(x) ((int) (unsigned char) (x) == escape_char    || \
1147
 
                          (enclosed ? (int) (unsigned char) (x) == field_sep_char      \
1148
 
                                    : (int) (unsigned char) (x) == field_term_char) || \
1149
 
                          (int) (unsigned char) (x) == line_sep_char  || \
1150
 
                          !(x))
1151
 
 
1152
1145
bool select_export::send_data(List<Item> &items)
1153
1146
{
1154
1147
  char buff[MAX_FIELD_WIDTH],null_buff[2],space[MAX_FIELD_WIDTH];
1265
1258
            assert before the loop makes that sure.
1266
1259
          */
1267
1260
 
1268
 
          if ((NEED_ESCAPING(*pos) ||
 
1261
          if ((needs_escaping(*pos, enclosed) ||
1269
1262
               (check_second_byte &&
1270
1263
                my_mbcharlen(character_set_client, (unsigned char) *pos) == 2 &&
1271
1264
                pos + 1 < end &&
1272
 
                NEED_ESCAPING(pos[1]))) &&
 
1265
                needs_escaping(pos[1], enclosed))) &&
1273
1266
              /*
1274
1267
                Don't escape field_term_char by doubling - doubling is only
1275
1268
                valid for ENCLOSED BY characters: