~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/session.cc

  • Committer: Brian Aker
  • Date: 2010-10-23 01:39:56 UTC
  • mfrom: (1864.3.22 catalogs)
  • Revision ID: brian@tangent.org-20101023013956-mq0xgbtpzpgwx80z
Merge in a bunch of goto removals (just random).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1134
1134
  if (unit->offset_limit_cnt)
1135
1135
  {                                             // using limit offset,count
1136
1136
    unit->offset_limit_cnt--;
1137
 
    return(0);
 
1137
    return false;
1138
1138
  }
1139
1139
  row_count++;
1140
1140
  Item *item;
1143
1143
 
1144
1144
  if (my_b_write(cache,(unsigned char*) exchange->line_start->ptr(),
1145
1145
                 exchange->line_start->length()))
1146
 
    goto err;
 
1146
    return true;
 
1147
 
1147
1148
  while ((item=li++))
1148
1149
  {
1149
1150
    Item_result result_type=item->result_type();
1154
1155
    {
1155
1156
      if (my_b_write(cache,(unsigned char*) exchange->enclosed->ptr(),
1156
1157
                     exchange->enclosed->length()))
1157
 
        goto err;
 
1158
        return true;
1158
1159
    }
1159
1160
    if (!res)
1160
1161
    {                                           // NULL
1165
1166
          null_buff[0]=escape_char;
1166
1167
          null_buff[1]='N';
1167
1168
          if (my_b_write(cache,(unsigned char*) null_buff,2))
1168
 
            goto err;
 
1169
            return true;
1169
1170
        }
1170
1171
        else if (my_b_write(cache,(unsigned char*) "NULL",4))
1171
 
          goto err;
 
1172
          return true;
1172
1173
      }
1173
1174
      else
1174
1175
      {
1259
1260
            tmp_buff[1]= *pos ? *pos : '0';
1260
1261
            if (my_b_write(cache,(unsigned char*) start,(uint32_t) (pos-start)) ||
1261
1262
                my_b_write(cache,(unsigned char*) tmp_buff,2))
1262
 
              goto err;
 
1263
              return true;
1263
1264
            start=pos+1;
1264
1265
          }
1265
1266
        }
1266
1267
        if (my_b_write(cache,(unsigned char*) start,(uint32_t) (pos-start)))
1267
 
          goto err;
 
1268
          return true;
1268
1269
      }
1269
1270
      else if (my_b_write(cache,(unsigned char*) res->ptr(),used_length))
1270
 
        goto err;
 
1271
        return true;
1271
1272
    }
1272
1273
    if (fixed_row_size)
1273
1274
    {                                           // Fill with space
1283
1284
        for (; length > sizeof(space) ; length-=sizeof(space))
1284
1285
        {
1285
1286
          if (my_b_write(cache,(unsigned char*) space,sizeof(space)))
1286
 
            goto err;
 
1287
            return true;
1287
1288
        }
1288
1289
        if (my_b_write(cache,(unsigned char*) space,length))
1289
 
          goto err;
 
1290
          return true;
1290
1291
      }
1291
1292
    }
1292
1293
    if (res && enclosed)
1293
1294
    {
1294
1295
      if (my_b_write(cache, (unsigned char*) exchange->enclosed->ptr(),
1295
1296
                     exchange->enclosed->length()))
1296
 
        goto err;
 
1297
        return true;
1297
1298
    }
1298
1299
    if (--items_left)
1299
1300
    {
1300
1301
      if (my_b_write(cache, (unsigned char*) exchange->field_term->ptr(),
1301
1302
                     field_term_length))
1302
 
        goto err;
 
1303
        return true;
1303
1304
    }
1304
1305
  }
1305
1306
  if (my_b_write(cache,(unsigned char*) exchange->line_term->ptr(),
1306
1307
                 exchange->line_term->length()))
1307
 
    goto err;
1308
 
  return(0);
1309
 
err:
1310
 
  return(1);
 
1308
  {
 
1309
    return true;
 
1310
  }
 
1311
 
 
1312
  return false;
1311
1313
}
1312
1314
 
1313
1315