~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/show.cc

Removed protocol field flags.

Show diffs side-by-side

added added

removed removed

Lines of Context:
261
261
                                               max(buffer.length(),(uint32_t)1024)));
262
262
  }
263
263
 
264
 
  if (protocol->sendFields(&field_list,
265
 
                           Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF))
266
 
  {
 
264
  if (protocol->sendFields(&field_list))
267
265
    return true;
268
 
  }
269
266
  protocol->prepareForResend();
270
267
  {
271
268
    if (table_list->schema_table)
361
358
  field_list.push_back(new Item_empty_string("Database",NAME_CHAR_LEN));
362
359
  field_list.push_back(new Item_empty_string("Create Database",1024));
363
360
 
364
 
  if (protocol->sendFields(&field_list,
365
 
                           Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF))
 
361
  if (protocol->sendFields(&field_list))
366
362
    return true;
367
363
 
368
364
  protocol->prepareForResend();
376
372
}
377
373
 
378
374
 
379
 
 
380
 
/****************************************************************************
381
 
  Return only fields for API mysql_list_fields
382
 
  Use "show table wildcard" in mysql instead of this
383
 
****************************************************************************/
384
 
 
385
 
void
386
 
mysqld_list_fields(Session *session, TableList *table_list, const char *wild)
387
 
{
388
 
  Table *table;
389
 
 
390
 
  if (session->open_normal_and_derived_tables(table_list, 0))
391
 
    return;
392
 
  table= table_list->table;
393
 
 
394
 
  List<Item> field_list;
395
 
 
396
 
  Field **ptr,*field;
397
 
  for (ptr=table->field ; (field= *ptr); ptr++)
398
 
  {
399
 
    if (!wild || !wild[0] ||
400
 
        !wild_case_compare(system_charset_info, field->field_name,wild))
401
 
    {
402
 
      field_list.push_back(new Item_field(field));
403
 
    }
404
 
  }
405
 
  table->restoreRecordAsDefault();              // Get empty record
406
 
  table->use_all_columns();
407
 
  if (session->protocol->sendFields(&field_list, Protocol::SEND_DEFAULTS))
408
 
    return;
409
 
  session->my_eof();
410
 
}
411
 
 
412
 
 
413
375
/*
414
376
  Get the quote character for displaying an identifier.
415
377
 
898
860
  field->maybe_null= true;
899
861
  field_list.push_back(field=new Item_empty_string("Info", PROCESS_LIST_WIDTH));
900
862
  field->maybe_null= true;
901
 
  if (protocol->sendFields(&field_list,
902
 
                           Protocol::SEND_NUM_ROWS | Protocol::SEND_EOF))
 
863
  if (protocol->sendFields(&field_list))
903
864
    return;
904
865
 
905
866
  pthread_mutex_lock(&LOCK_thread_count); // For unlink from list