~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/optimizer/quick_ror_intersect_select.cc

  • Committer: Lee Bieber
  • Date: 2011-02-17 04:07:38 UTC
  • mfrom: (2170.4.5 optimiser-work)
  • Revision ID: kalebral@gmail.com-20110217040738-mp2e43zcc9il2sw2
Merge Stewart fix some conversions from String to std::string in EXPLAIN codepath

Show diffs side-by-side

added added

removed removed

Lines of Context:
246
246
}
247
247
 
248
248
 
249
 
void optimizer::QuickRorIntersectSelect::add_info_string(String *str)
 
249
void optimizer::QuickRorIntersectSelect::add_info_string(string *str)
250
250
{
251
251
  bool first= true;
252
 
  str->append(STRING_WITH_LEN("intersect("));
 
252
  str->append("intersect(");
253
253
  for (vector<optimizer::QuickRangeSelect *>::iterator it= quick_selects.begin();
254
254
       it != quick_selects.end();
255
255
       ++it)
256
256
  {
257
257
    KeyInfo *key_info= head->key_info + (*it)->index;
258
258
    if (! first)
259
 
      str->append(',');
 
259
      str->append(",");
260
260
    else
261
261
      first= false;
262
262
    str->append(key_info->name);
264
264
  if (cpk_quick)
265
265
  {
266
266
    KeyInfo *key_info= head->key_info + cpk_quick->index;
267
 
    str->append(',');
 
267
    str->append(",");
268
268
    str->append(key_info->name);
269
269
  }
270
 
  str->append(')');
 
270
  str->append(")");
271
271
}
272
272
 
273
273
 
274
 
void optimizer::QuickRorIntersectSelect::add_keys_and_lengths(String *key_names,
275
 
                                                              String *used_lengths)
 
274
void optimizer::QuickRorIntersectSelect::add_keys_and_lengths(string *key_names,
 
275
                                                              string *used_lengths)
276
276
{
277
277
  char buf[64];
278
278
  uint32_t length;
288
288
    }
289
289
    else
290
290
    {
291
 
      key_names->append(',');
292
 
      used_lengths->append(',');
 
291
      key_names->append(",");
 
292
      used_lengths->append(",");
293
293
    }
294
294
    key_names->append(key_info->name);
295
295
    length= internal::int64_t2str((*it)->max_used_key_length, buf, 10) - buf;
299
299
  if (cpk_quick)
300
300
  {
301
301
    KeyInfo *key_info= head->key_info + cpk_quick->index;
302
 
    key_names->append(',');
 
302
    key_names->append(",");
303
303
    key_names->append(key_info->name);
304
304
    length= internal::int64_t2str(cpk_quick->max_used_key_length, buf, 10) - buf;
305
 
    used_lengths->append(',');
 
305
    used_lengths->append(",");
306
306
    used_lengths->append(buf, length);
307
307
  }
308
308
}