~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/info_schema/info_schema_columns.cc

  • Committer: Padraig O'Sullivan
  • Date: 2009-06-29 16:05:47 UTC
  • mto: This revision was merged to the branch mainline in revision 1081.
  • Revision ID: osullivan.padraig@gmail.com-20090629160547-0c2ktadq91vx6id0
Extracted the PLUGINS table into the I_S plugin.

Show diffs side-by-side

added added

removed removed

Lines of Context:
400
400
  return false;
401
401
}
402
402
 
 
403
bool createPluginsColumns(vector<const ColumnInfo *>& cols)
 
404
{
 
405
  const ColumnInfo *name= new(std::nothrow) ColumnInfo("PLUGIN_NAME",
 
406
                                                       NAME_CHAR_LEN,
 
407
                                                       DRIZZLE_TYPE_VARCHAR,
 
408
                                                       0,
 
409
                                                       0,
 
410
                                                       "Name",
 
411
                                                       SKIP_OPEN_TABLE);
 
412
  if (name == NULL)
 
413
  {
 
414
    return true;
 
415
  }
 
416
 
 
417
  const ColumnInfo *ver= new(std::nothrow) ColumnInfo("PLUGIN_VERSION",
 
418
                                                      20,
 
419
                                                      DRIZZLE_TYPE_VARCHAR,
 
420
                                                      0,
 
421
                                                      0,
 
422
                                                      "",
 
423
                                                      SKIP_OPEN_TABLE);
 
424
  if (ver == NULL)
 
425
  {
 
426
    return true;
 
427
  }
 
428
 
 
429
  const ColumnInfo *stat= new(std::nothrow) ColumnInfo("PLUGIN_STATUS",
 
430
                                                       10,
 
431
                                                       DRIZZLE_TYPE_VARCHAR,
 
432
                                                       0,
 
433
                                                       0,
 
434
                                                       "Status",
 
435
                                                       SKIP_OPEN_TABLE);
 
436
  if (stat == NULL)
 
437
  {
 
438
    return true;
 
439
  }
 
440
 
 
441
  const ColumnInfo *aut= new(std::nothrow) ColumnInfo("PLUGIN_AUTHOR",
 
442
                                                      NAME_CHAR_LEN,
 
443
                                                      DRIZZLE_TYPE_VARCHAR,
 
444
                                                      0,
 
445
                                                      1,
 
446
                                                      "",
 
447
                                                      SKIP_OPEN_TABLE);
 
448
  if (aut == NULL)
 
449
  {
 
450
    return true;
 
451
  }
 
452
 
 
453
  const ColumnInfo *descrip= new(std::nothrow) ColumnInfo("PLUGIN_DESCRIPTION",
 
454
                                                          65535,
 
455
                                                          DRIZZLE_TYPE_VARCHAR,
 
456
                                                          0,
 
457
                                                          1,
 
458
                                                          "",
 
459
                                                          SKIP_OPEN_TABLE);
 
460
  if (descrip == NULL)
 
461
  {
 
462
    return true;
 
463
  }
 
464
 
 
465
  const ColumnInfo *lic= new(std::nothrow) ColumnInfo("PLUGIN_LICENSE",
 
466
                                                      80,
 
467
                                                      DRIZZLE_TYPE_VARCHAR,
 
468
                                                      0,
 
469
                                                      1,
 
470
                                                      "License",
 
471
                                                      SKIP_OPEN_TABLE);
 
472
  if (lic == NULL)
 
473
  {
 
474
    return true;
 
475
  }
 
476
 
 
477
  cols.push_back(name);
 
478
  cols.push_back(ver);
 
479
  cols.push_back(stat);
 
480
  cols.push_back(aut);
 
481
  cols.push_back(descrip);
 
482
  cols.push_back(lic);
 
483
 
 
484
  return false;
 
485
}
403
486
 
404
487
bool createProcessListColumns(vector<const ColumnInfo *>& cols)
405
488
{