~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/info_schema/info_schema_columns.cc

Merged in plugin-slot-reorg patches.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
 
35
35
using namespace std;
36
36
 
37
 
bool createCharSetColumns(vector<const ColumnInfo *>& cols)
 
37
bool createCharSetColumns(vector<const drizzled::plugin::ColumnInfo *>& cols)
38
38
{
39
39
  /*
40
40
   * Create each column for the CHARACTER_SET table.
41
41
   */
42
 
  const ColumnInfo *name_col= new(std::nothrow) ColumnInfo("CHARACTER_SET_NAME",
 
42
  const drizzled::plugin::ColumnInfo *name_col= new(std::nothrow) drizzled::plugin::ColumnInfo("CHARACTER_SET_NAME",
43
43
                                                           64,
44
44
                                                           DRIZZLE_TYPE_VARCHAR,
45
45
                                                           0,
51
51
    return true;
52
52
  }
53
53
 
54
 
  const ColumnInfo *collate_col= new(std::nothrow) ColumnInfo("DEFAULT_COLLATE_NAME",
 
54
  const drizzled::plugin::ColumnInfo *collate_col= new(std::nothrow) drizzled::plugin::ColumnInfo("DEFAULT_COLLATE_NAME",
55
55
                                                              64,
56
56
                                                              DRIZZLE_TYPE_VARCHAR,
57
57
                                                              0,
63
63
    return true;
64
64
  }
65
65
 
66
 
  const ColumnInfo *descrip_col= new(std::nothrow) ColumnInfo("DESCRIPTION",
 
66
  const drizzled::plugin::ColumnInfo *descrip_col= new(std::nothrow) drizzled::plugin::ColumnInfo("DESCRIPTION",
67
67
                                                              60,
68
68
                                                              DRIZZLE_TYPE_VARCHAR,
69
69
                                                              0,
75
75
    return true;
76
76
  }
77
77
 
78
 
  const ColumnInfo *len_col= new(std::nothrow) ColumnInfo("MAXLEN",
 
78
  const drizzled::plugin::ColumnInfo *len_col= new(std::nothrow) drizzled::plugin::ColumnInfo("MAXLEN",
79
79
                                                          3,
80
80
                                                          DRIZZLE_TYPE_LONGLONG,
81
81
                                                          0,
98
98
  return false;
99
99
}
100
100
 
101
 
bool createCollationColumns(vector<const ColumnInfo *>& cols)
 
101
bool createCollationColumns(vector<const drizzled::plugin::ColumnInfo *>& cols)
102
102
{
103
103
  /*
104
104
   * Create each column for the COLLATION table.
105
105
   */
106
 
  const ColumnInfo *name_col= new(std::nothrow) ColumnInfo("COLLATION_NAME",
 
106
  const drizzled::plugin::ColumnInfo *name_col= new(std::nothrow) drizzled::plugin::ColumnInfo("COLLATION_NAME",
107
107
                                                           64,
108
108
                                                           DRIZZLE_TYPE_VARCHAR,
109
109
                                                           0,
115
115
    return true;
116
116
  }
117
117
 
118
 
  const ColumnInfo *char_set_col= new(std::nothrow) ColumnInfo("CHARACTER_SET_NAME",
 
118
  const drizzled::plugin::ColumnInfo *char_set_col= new(std::nothrow) drizzled::plugin::ColumnInfo("CHARACTER_SET_NAME",
119
119
                                                               64,
120
120
                                                               DRIZZLE_TYPE_VARCHAR,
121
121
                                                               0,
127
127
    return true;
128
128
  }
129
129
 
130
 
  const ColumnInfo *descrip_col= new(std::nothrow) ColumnInfo("DESCRIPTION",
 
130
  const drizzled::plugin::ColumnInfo *descrip_col= new(std::nothrow) drizzled::plugin::ColumnInfo("DESCRIPTION",
131
131
                                                              60,
132
132
                                                              DRIZZLE_TYPE_VARCHAR,
133
133
                                                              0,
139
139
    return true;
140
140
  }
141
141
 
142
 
  const ColumnInfo *id_col= new(std::nothrow) ColumnInfo("ID",
 
142
  const drizzled::plugin::ColumnInfo *id_col= new(std::nothrow) drizzled::plugin::ColumnInfo("ID",
143
143
                                                         MY_INT32_NUM_DECIMAL_DIGITS,
144
144
                                                         DRIZZLE_TYPE_LONGLONG,
145
145
                                                         0,
151
151
    return true;
152
152
  }
153
153
 
154
 
  const ColumnInfo *default_col= new(std::nothrow) ColumnInfo("IS_DEFAULT",
 
154
  const drizzled::plugin::ColumnInfo *default_col= new(std::nothrow) drizzled::plugin::ColumnInfo("IS_DEFAULT",
155
155
                                                              3,
156
156
                                                              DRIZZLE_TYPE_VARCHAR,
157
157
                                                              0,
163
163
    return true;
164
164
  }
165
165
 
166
 
  const ColumnInfo *compiled_col= new(std::nothrow) ColumnInfo("IS_COMPILED",
 
166
  const drizzled::plugin::ColumnInfo *compiled_col= new(std::nothrow) drizzled::plugin::ColumnInfo("IS_COMPILED",
167
167
                                                               3,
168
168
                                                               DRIZZLE_TYPE_VARCHAR,
169
169
                                                               0,
175
175
    return true;
176
176
  }
177
177
 
178
 
  const ColumnInfo *sortlen_col= new(std::nothrow) ColumnInfo("SORTLEN",
 
178
  const drizzled::plugin::ColumnInfo *sortlen_col= new(std::nothrow) drizzled::plugin::ColumnInfo("SORTLEN",
179
179
                                                              3,
180
180
                                                              DRIZZLE_TYPE_LONGLONG,
181
181
                                                              0,
201
201
  return false;
202
202
}
203
203
 
204
 
bool createCollCharSetColumns(vector<const ColumnInfo *>& cols)
 
204
bool createCollCharSetColumns(vector<const drizzled::plugin::ColumnInfo *>& cols)
205
205
{
206
206
  /*
207
207
   * Create each column for the table.
208
208
   */
209
 
  const ColumnInfo *name_col= new(std::nothrow) ColumnInfo("COLLATION_NAME",
 
209
  const drizzled::plugin::ColumnInfo *name_col= new(std::nothrow) drizzled::plugin::ColumnInfo("COLLATION_NAME",
210
210
                                                           64,
211
211
                                                           DRIZZLE_TYPE_VARCHAR,
212
212
                                                           0,
218
218
    return true;
219
219
  }
220
220
 
221
 
  const ColumnInfo *char_set_col= new(std::nothrow) ColumnInfo("CHARACTER_SET_NAME",
 
221
  const drizzled::plugin::ColumnInfo *char_set_col= new(std::nothrow) drizzled::plugin::ColumnInfo("CHARACTER_SET_NAME",
222
222
                                                               64,
223
223
                                                               DRIZZLE_TYPE_VARCHAR,
224
224
                                                               0,
239
239
  return false;
240
240
}
241
241
 
242
 
bool createColColumns(vector<const ColumnInfo *>& cols)
 
242
bool createColColumns(vector<const drizzled::plugin::ColumnInfo *>& cols)
243
243
{
244
244
  /*
245
245
   * Create each column for the COLUMNS table.
246
246
   */
247
 
  const ColumnInfo *tab_cat= new(std::nothrow) ColumnInfo("TABLE_CATALOG",
 
247
  const drizzled::plugin::ColumnInfo *tab_cat= new(std::nothrow) drizzled::plugin::ColumnInfo("TABLE_CATALOG",
248
248
                                                          FN_REFLEN,
249
249
                                                          DRIZZLE_TYPE_VARCHAR,
250
250
                                                          0,
256
256
    return true;
257
257
  }
258
258
 
259
 
  const ColumnInfo *tab_sch= new(std::nothrow) ColumnInfo("TABLE_SCHEMA",
 
259
  const drizzled::plugin::ColumnInfo *tab_sch= new(std::nothrow) drizzled::plugin::ColumnInfo("TABLE_SCHEMA",
260
260
                                                          NAME_CHAR_LEN,
261
261
                                                          DRIZZLE_TYPE_VARCHAR,
262
262
                                                          0,
268
268
    return true;
269
269
  }
270
270
 
271
 
  const ColumnInfo *tab_name= new(std::nothrow) ColumnInfo("TABLE_NAME",
 
271
  const drizzled::plugin::ColumnInfo *tab_name= new(std::nothrow) drizzled::plugin::ColumnInfo("TABLE_NAME",
272
272
                                                           NAME_CHAR_LEN,
273
273
                                                           DRIZZLE_TYPE_VARCHAR,
274
274
                                                           0,
280
280
    return true;
281
281
  }
282
282
 
283
 
  const ColumnInfo *col_name= new(std::nothrow) ColumnInfo("COLUMN_NAME",
 
283
  const drizzled::plugin::ColumnInfo *col_name= new(std::nothrow) drizzled::plugin::ColumnInfo("COLUMN_NAME",
284
284
                                                           NAME_CHAR_LEN,
285
285
                                                           DRIZZLE_TYPE_VARCHAR,
286
286
                                                           0,
292
292
    return true;
293
293
  }
294
294
 
295
 
  const ColumnInfo *ord_pos= new(std::nothrow) ColumnInfo("ORDINAL_POSITION",
 
295
  const drizzled::plugin::ColumnInfo *ord_pos= new(std::nothrow) drizzled::plugin::ColumnInfo("ORDINAL_POSITION",
296
296
                                                          MY_INT64_NUM_DECIMAL_DIGITS,
297
297
                                                          DRIZZLE_TYPE_LONGLONG,
298
298
                                                          0,
304
304
    return true;
305
305
  }
306
306
 
307
 
  const ColumnInfo *col_def= new(std::nothrow) ColumnInfo("COLUMN_DEFAULT",
 
307
  const drizzled::plugin::ColumnInfo *col_def= new(std::nothrow) drizzled::plugin::ColumnInfo("COLUMN_DEFAULT",
308
308
                                                          MAX_FIELD_VARCHARLENGTH,
309
309
                                                          DRIZZLE_TYPE_VARCHAR,
310
310
                                                          0,
316
316
    return true;
317
317
  }
318
318
 
319
 
  const ColumnInfo *is_nullable= new(std::nothrow) ColumnInfo("IS_NULLABLE",
 
319
  const drizzled::plugin::ColumnInfo *is_nullable= new(std::nothrow) drizzled::plugin::ColumnInfo("IS_NULLABLE",
320
320
                                                              3,
321
321
                                                              DRIZZLE_TYPE_VARCHAR,
322
322
                                                              0,
328
328
    return true;
329
329
  }
330
330
 
331
 
  const ColumnInfo *data_type= new(std::nothrow) ColumnInfo("DATA_TYPE",
 
331
  const drizzled::plugin::ColumnInfo *data_type= new(std::nothrow) drizzled::plugin::ColumnInfo("DATA_TYPE",
332
332
                                                            NAME_CHAR_LEN,
333
333
                                                            DRIZZLE_TYPE_VARCHAR,
334
334
                                                            0,
340
340
    return true;
341
341
  }
342
342
 
343
 
  const ColumnInfo *max_len= new(std::nothrow) ColumnInfo("CHARACTER_MAXIMUM_LENGTH",
 
343
  const drizzled::plugin::ColumnInfo *max_len= new(std::nothrow) drizzled::plugin::ColumnInfo("CHARACTER_MAXIMUM_LENGTH",
344
344
                                                          MY_INT64_NUM_DECIMAL_DIGITS,
345
345
                                                          DRIZZLE_TYPE_LONGLONG,
346
346
                                                          0,
352
352
    return true;
353
353
  }
354
354
 
355
 
  const ColumnInfo *octet_len= new(std::nothrow) ColumnInfo("CHARACTER_OCTET_LENGTH",
 
355
  const drizzled::plugin::ColumnInfo *octet_len= new(std::nothrow) drizzled::plugin::ColumnInfo("CHARACTER_OCTET_LENGTH",
356
356
                                                            MY_INT64_NUM_DECIMAL_DIGITS,
357
357
                                                            DRIZZLE_TYPE_LONGLONG,
358
358
                                                            0,
364
364
    return true;
365
365
  }
366
366
 
367
 
  const ColumnInfo *num_prec= new(std::nothrow) ColumnInfo("NUMERIC_PRECISION",
 
367
  const drizzled::plugin::ColumnInfo *num_prec= new(std::nothrow) drizzled::plugin::ColumnInfo("NUMERIC_PRECISION",
368
368
                                                           MY_INT64_NUM_DECIMAL_DIGITS,
369
369
                                                           DRIZZLE_TYPE_LONGLONG,
370
370
                                                           0,
376
376
    return true;
377
377
  }
378
378
 
379
 
  const ColumnInfo *num_scale= new(std::nothrow) ColumnInfo("NUMERIC_SCALE",
 
379
  const drizzled::plugin::ColumnInfo *num_scale= new(std::nothrow) drizzled::plugin::ColumnInfo("NUMERIC_SCALE",
380
380
                                                            MY_INT64_NUM_DECIMAL_DIGITS,
381
381
                                                            DRIZZLE_TYPE_LONGLONG,
382
382
                                                            0,
388
388
    return true;
389
389
  }
390
390
 
391
 
  const ColumnInfo *char_set_name= new(std::nothrow) ColumnInfo("CHARACTER_SET_NAME",
 
391
  const drizzled::plugin::ColumnInfo *char_set_name= new(std::nothrow) drizzled::plugin::ColumnInfo("CHARACTER_SET_NAME",
392
392
                                                                64,
393
393
                                                                DRIZZLE_TYPE_VARCHAR,
394
394
                                                                0,
400
400
    return true;
401
401
  }
402
402
 
403
 
  const ColumnInfo *coll_name= new(std::nothrow) ColumnInfo("COLLATION_NAME",
 
403
  const drizzled::plugin::ColumnInfo *coll_name= new(std::nothrow) drizzled::plugin::ColumnInfo("COLLATION_NAME",
404
404
                                                            64,
405
405
                                                            DRIZZLE_TYPE_VARCHAR,
406
406
                                                            0,
412
412
    return true;
413
413
  }
414
414
 
415
 
  const ColumnInfo *col_type= new(std::nothrow) ColumnInfo("COLUMN_TYPE",
 
415
  const drizzled::plugin::ColumnInfo *col_type= new(std::nothrow) drizzled::plugin::ColumnInfo("COLUMN_TYPE",
416
416
                                                           65535,
417
417
                                                           DRIZZLE_TYPE_VARCHAR,
418
418
                                                           0,
424
424
    return true;
425
425
  }
426
426
 
427
 
  const ColumnInfo *col_key= new(std::nothrow) ColumnInfo("COLUMN_KEY",
 
427
  const drizzled::plugin::ColumnInfo *col_key= new(std::nothrow) drizzled::plugin::ColumnInfo("COLUMN_KEY",
428
428
                                                          3,
429
429
                                                          DRIZZLE_TYPE_VARCHAR,
430
430
                                                          0,
436
436
    return true;
437
437
  }
438
438
 
439
 
  const ColumnInfo *extra= new(std::nothrow) ColumnInfo("EXTRA",
 
439
  const drizzled::plugin::ColumnInfo *extra= new(std::nothrow) drizzled::plugin::ColumnInfo("EXTRA",
440
440
                                                        27,
441
441
                                                        DRIZZLE_TYPE_VARCHAR,
442
442
                                                        0,
448
448
    return true;
449
449
  }
450
450
 
451
 
  const ColumnInfo *priv= new(std::nothrow) ColumnInfo("PRIVILEGES",
 
451
  const drizzled::plugin::ColumnInfo *priv= new(std::nothrow) drizzled::plugin::ColumnInfo("PRIVILEGES",
452
452
                                                       80,
453
453
                                                       DRIZZLE_TYPE_VARCHAR,
454
454
                                                       0,
460
460
    return true;
461
461
  }
462
462
 
463
 
  const ColumnInfo *col_comment= new(std::nothrow) ColumnInfo("COLUMN_COMMENT",
 
463
  const drizzled::plugin::ColumnInfo *col_comment= new(std::nothrow) drizzled::plugin::ColumnInfo("COLUMN_COMMENT",
464
464
                                                              COLUMN_COMMENT_MAXLEN,
465
465
                                                              DRIZZLE_TYPE_VARCHAR,
466
466
                                                              0,
472
472
    return true;
473
473
  }
474
474
 
475
 
  const ColumnInfo *storage= new(std::nothrow) ColumnInfo("STORAGE",
 
475
  const drizzled::plugin::ColumnInfo *storage= new(std::nothrow) drizzled::plugin::ColumnInfo("STORAGE",
476
476
                                                          8,
477
477
                                                          DRIZZLE_TYPE_VARCHAR,
478
478
                                                          0,
484
484
    return true;
485
485
  }
486
486
 
487
 
  const ColumnInfo *format= new(std::nothrow) ColumnInfo("FORMAT",
 
487
  const drizzled::plugin::ColumnInfo *format= new(std::nothrow) drizzled::plugin::ColumnInfo("FORMAT",
488
488
                                                         8,
489
489
                                                         DRIZZLE_TYPE_VARCHAR,
490
490
                                                         0,
524
524
  return false;
525
525
}
526
526
 
527
 
bool createKeyColUsageColumns(vector<const ColumnInfo *>& cols)
 
527
bool createKeyColUsageColumns(vector<const drizzled::plugin::ColumnInfo *>& cols)
528
528
{
529
 
  const ColumnInfo *cat= new(std::nothrow) ColumnInfo("CONSTRAINT_CATALOG",
 
529
  const drizzled::plugin::ColumnInfo *cat= new(std::nothrow) drizzled::plugin::ColumnInfo("CONSTRAINT_CATALOG",
530
530
                                                      FN_REFLEN,
531
531
                                                      DRIZZLE_TYPE_VARCHAR,
532
532
                                                      0,
538
538
    return true;
539
539
  }
540
540
 
541
 
  const ColumnInfo *sch= new(std::nothrow) ColumnInfo("CONSTRAINT_SCHEMA",
 
541
  const drizzled::plugin::ColumnInfo *sch= new(std::nothrow) drizzled::plugin::ColumnInfo("CONSTRAINT_SCHEMA",
542
542
                                                      NAME_CHAR_LEN,
543
543
                                                      DRIZZLE_TYPE_VARCHAR,
544
544
                                                      0,
550
550
    return true;
551
551
  }
552
552
 
553
 
  const ColumnInfo *name= new(std::nothrow) ColumnInfo("CONSTRAINT_NAME",
 
553
  const drizzled::plugin::ColumnInfo *name= new(std::nothrow) drizzled::plugin::ColumnInfo("CONSTRAINT_NAME",
554
554
                                                       NAME_CHAR_LEN,
555
555
                                                       DRIZZLE_TYPE_VARCHAR,
556
556
                                                       0,
562
562
    return true;
563
563
  }
564
564
 
565
 
  const ColumnInfo *tab_cat= new(std::nothrow) ColumnInfo("TABLE_CATALOG",
 
565
  const drizzled::plugin::ColumnInfo *tab_cat= new(std::nothrow) drizzled::plugin::ColumnInfo("TABLE_CATALOG",
566
566
                                                          FN_REFLEN,
567
567
                                                          DRIZZLE_TYPE_VARCHAR,
568
568
                                                          0,
574
574
    return true;
575
575
  }
576
576
 
577
 
  const ColumnInfo *tab_sch= new(std::nothrow) ColumnInfo("TABLE_SCHEMA",
 
577
  const drizzled::plugin::ColumnInfo *tab_sch= new(std::nothrow) drizzled::plugin::ColumnInfo("TABLE_SCHEMA",
578
578
                                                          NAME_CHAR_LEN,
579
579
                                                          DRIZZLE_TYPE_VARCHAR,
580
580
                                                          0,
586
586
    return true;
587
587
  }
588
588
 
589
 
  const ColumnInfo *tab_name= new(std::nothrow) ColumnInfo("TABLE_NAME",
 
589
  const drizzled::plugin::ColumnInfo *tab_name= new(std::nothrow) drizzled::plugin::ColumnInfo("TABLE_NAME",
590
590
                                                           NAME_CHAR_LEN,
591
591
                                                           DRIZZLE_TYPE_VARCHAR,
592
592
                                                           0,
598
598
    return true;
599
599
  }
600
600
 
601
 
  const ColumnInfo *col_name= new(std::nothrow) ColumnInfo("COLUMN_NAME",
 
601
  const drizzled::plugin::ColumnInfo *col_name= new(std::nothrow) drizzled::plugin::ColumnInfo("COLUMN_NAME",
602
602
                                                           NAME_CHAR_LEN,
603
603
                                                           DRIZZLE_TYPE_VARCHAR,
604
604
                                                           0,
609
609
  {
610
610
    return true;
611
611
  }
612
 
  const ColumnInfo *ord_pos= new(std::nothrow) ColumnInfo("ORDINAL_POSITION",
 
612
  const drizzled::plugin::ColumnInfo *ord_pos= new(std::nothrow) drizzled::plugin::ColumnInfo("ORDINAL_POSITION",
613
613
                                                          10,
614
614
                                                          DRIZZLE_TYPE_LONGLONG,
615
615
                                                          0,
621
621
    return true;
622
622
  }
623
623
 
624
 
  const ColumnInfo *pos_in_uniq= new(std::nothrow) ColumnInfo("POSITION_IN_UNIQUE_CONSTRAINT",
 
624
  const drizzled::plugin::ColumnInfo *pos_in_uniq= new(std::nothrow) drizzled::plugin::ColumnInfo("POSITION_IN_UNIQUE_CONSTRAINT",
625
625
                                                              10,
626
626
                                                              DRIZZLE_TYPE_LONGLONG,
627
627
                                                              0,
633
633
    return true;
634
634
  }
635
635
 
636
 
  const ColumnInfo *ref_tab_sch= new(std::nothrow) ColumnInfo("REFERENCED_TABLE_SCHEMA",
 
636
  const drizzled::plugin::ColumnInfo *ref_tab_sch= new(std::nothrow) drizzled::plugin::ColumnInfo("REFERENCED_TABLE_SCHEMA",
637
637
                                                              NAME_CHAR_LEN,
638
638
                                                              DRIZZLE_TYPE_VARCHAR,
639
639
                                                              0,
645
645
    return true;
646
646
  }
647
647
 
648
 
  const ColumnInfo *ref_tab_name= new(std::nothrow) ColumnInfo("REFERENCED_TABLE_NAME",
 
648
  const drizzled::plugin::ColumnInfo *ref_tab_name= new(std::nothrow) drizzled::plugin::ColumnInfo("REFERENCED_TABLE_NAME",
649
649
                                                               NAME_CHAR_LEN,
650
650
                                                               DRIZZLE_TYPE_VARCHAR,
651
651
                                                               0,
657
657
    return true;
658
658
  }
659
659
 
660
 
  const ColumnInfo *ref_col_name= new(std::nothrow) ColumnInfo("REFERENCED_COLUMN_NAME",
 
660
  const drizzled::plugin::ColumnInfo *ref_col_name= new(std::nothrow) drizzled::plugin::ColumnInfo("REFERENCED_COLUMN_NAME",
661
661
                                                               NAME_CHAR_LEN,
662
662
                                                               DRIZZLE_TYPE_VARCHAR,
663
663
                                                               0,
685
685
  return false;
686
686
}
687
687
 
688
 
bool createOpenTabColumns(vector<const ColumnInfo *>& cols)
 
688
bool createOpenTabColumns(vector<const drizzled::plugin::ColumnInfo *>& cols)
689
689
{
690
 
  const ColumnInfo *db= new(std::nothrow) ColumnInfo("Database",
 
690
  const drizzled::plugin::ColumnInfo *db= new(std::nothrow) drizzled::plugin::ColumnInfo("Database",
691
691
                                                     NAME_CHAR_LEN,
692
692
                                                     DRIZZLE_TYPE_VARCHAR,
693
693
                                                     0,
699
699
    return true;
700
700
  }
701
701
 
702
 
  const ColumnInfo *tab= new(std::nothrow) ColumnInfo("Table",
 
702
  const drizzled::plugin::ColumnInfo *tab= new(std::nothrow) drizzled::plugin::ColumnInfo("Table",
703
703
                                                      NAME_CHAR_LEN,
704
704
                                                      DRIZZLE_TYPE_VARCHAR,
705
705
                                                      0,
711
711
    return true;
712
712
  }
713
713
 
714
 
  const ColumnInfo *in_use= new(std::nothrow) ColumnInfo("In_use",
 
714
  const drizzled::plugin::ColumnInfo *in_use= new(std::nothrow) drizzled::plugin::ColumnInfo("In_use",
715
715
                                                         1,
716
716
                                                         DRIZZLE_TYPE_LONGLONG,
717
717
                                                         0,
723
723
    return true;
724
724
  }
725
725
 
726
 
  const ColumnInfo *name_locked= new(std::nothrow) ColumnInfo("Name_locked",
 
726
  const drizzled::plugin::ColumnInfo *name_locked= new(std::nothrow) drizzled::plugin::ColumnInfo("Name_locked",
727
727
                                                              4,
728
728
                                                              DRIZZLE_TYPE_LONGLONG,
729
729
                                                              0,
743
743
  return false;
744
744
}
745
745
 
746
 
bool createPluginsColumns(vector<const ColumnInfo *>& cols)
 
746
bool createPluginsColumns(vector<const drizzled::plugin::ColumnInfo *>& cols)
747
747
{
748
 
  const ColumnInfo *name= new(std::nothrow) ColumnInfo("PLUGIN_NAME",
 
748
  const drizzled::plugin::ColumnInfo *name= new(std::nothrow) drizzled::plugin::ColumnInfo("PLUGIN_NAME",
749
749
                                                       NAME_CHAR_LEN,
750
750
                                                       DRIZZLE_TYPE_VARCHAR,
751
751
                                                       0,
757
757
    return true;
758
758
  }
759
759
 
760
 
  const ColumnInfo *ver= new(std::nothrow) ColumnInfo("PLUGIN_VERSION",
 
760
  const drizzled::plugin::ColumnInfo *ver= new(std::nothrow) drizzled::plugin::ColumnInfo("PLUGIN_VERSION",
761
761
                                                      20,
762
762
                                                      DRIZZLE_TYPE_VARCHAR,
763
763
                                                      0,
769
769
    return true;
770
770
  }
771
771
 
772
 
  const ColumnInfo *stat= new(std::nothrow) ColumnInfo("PLUGIN_STATUS",
 
772
  const drizzled::plugin::ColumnInfo *stat= new(std::nothrow) drizzled::plugin::ColumnInfo("PLUGIN_STATUS",
773
773
                                                       10,
774
774
                                                       DRIZZLE_TYPE_VARCHAR,
775
775
                                                       0,
781
781
    return true;
782
782
  }
783
783
 
784
 
  const ColumnInfo *aut= new(std::nothrow) ColumnInfo("PLUGIN_AUTHOR",
 
784
  const drizzled::plugin::ColumnInfo *aut= new(std::nothrow) drizzled::plugin::ColumnInfo("PLUGIN_AUTHOR",
785
785
                                                      NAME_CHAR_LEN,
786
786
                                                      DRIZZLE_TYPE_VARCHAR,
787
787
                                                      0,
793
793
    return true;
794
794
  }
795
795
 
796
 
  const ColumnInfo *descrip= new(std::nothrow) ColumnInfo("PLUGIN_DESCRIPTION",
 
796
  const drizzled::plugin::ColumnInfo *descrip= new(std::nothrow) drizzled::plugin::ColumnInfo("PLUGIN_DESCRIPTION",
797
797
                                                          65535,
798
798
                                                          DRIZZLE_TYPE_VARCHAR,
799
799
                                                          0,
805
805
    return true;
806
806
  }
807
807
 
808
 
  const ColumnInfo *lic= new(std::nothrow) ColumnInfo("PLUGIN_LICENSE",
 
808
  const drizzled::plugin::ColumnInfo *lic= new(std::nothrow) drizzled::plugin::ColumnInfo("PLUGIN_LICENSE",
809
809
                                                      80,
810
810
                                                      DRIZZLE_TYPE_VARCHAR,
811
811
                                                      0,
827
827
  return false;
828
828
}
829
829
 
830
 
bool createProcessListColumns(vector<const ColumnInfo *>& cols)
 
830
bool createProcessListColumns(vector<const drizzled::plugin::ColumnInfo *>& cols)
831
831
{
832
832
  /*
833
833
   * Create each column for the PROCESSLIST table.
834
834
   */
835
 
  const ColumnInfo *id_col= new(std::nothrow) ColumnInfo("ID", 
 
835
  const drizzled::plugin::ColumnInfo *id_col= new(std::nothrow) drizzled::plugin::ColumnInfo("ID", 
836
836
                                                         4,
837
837
                                                         DRIZZLE_TYPE_LONGLONG,
838
838
                                                         0,
844
844
    return true;
845
845
  }
846
846
 
847
 
  const ColumnInfo *user_col= new(std::nothrow) ColumnInfo("USER",
 
847
  const drizzled::plugin::ColumnInfo *user_col= new(std::nothrow) drizzled::plugin::ColumnInfo("USER",
848
848
                                                           16,
849
849
                                                           DRIZZLE_TYPE_VARCHAR,
850
850
                                                           0,
856
856
    return true;
857
857
  }
858
858
 
859
 
  const ColumnInfo *host_col= new(std::nothrow) ColumnInfo("HOST",
 
859
  const drizzled::plugin::ColumnInfo *host_col= new(std::nothrow) drizzled::plugin::ColumnInfo("HOST",
860
860
                                                           LIST_PROCESS_HOST_LEN,
861
861
                                                           DRIZZLE_TYPE_VARCHAR,
862
862
                                                           0,
868
868
    return true;
869
869
  }
870
870
 
871
 
  const ColumnInfo *db_col= new(std::nothrow) ColumnInfo("DB",
 
871
  const drizzled::plugin::ColumnInfo *db_col= new(std::nothrow) drizzled::plugin::ColumnInfo("DB",
872
872
                                                         NAME_CHAR_LEN,
873
873
                                                         DRIZZLE_TYPE_VARCHAR,
874
874
                                                         0,
880
880
    return true;
881
881
  }
882
882
 
883
 
  const ColumnInfo *command_col= new(std::nothrow) ColumnInfo("COMMAND",
 
883
  const drizzled::plugin::ColumnInfo *command_col= new(std::nothrow) drizzled::plugin::ColumnInfo("COMMAND",
884
884
                                                              16,
885
885
                                                              DRIZZLE_TYPE_VARCHAR,
886
886
                                                              0,
892
892
    return true;
893
893
  }
894
894
 
895
 
  const ColumnInfo *time_col= new(std::nothrow) ColumnInfo("TIME",
 
895
  const drizzled::plugin::ColumnInfo *time_col= new(std::nothrow) drizzled::plugin::ColumnInfo("TIME",
896
896
                                                           7,
897
897
                                                           DRIZZLE_TYPE_LONGLONG,
898
898
                                                           0,
904
904
    return true;
905
905
  }
906
906
 
907
 
  const ColumnInfo *state_col= new(std::nothrow) ColumnInfo("STATE",
 
907
  const drizzled::plugin::ColumnInfo *state_col= new(std::nothrow) drizzled::plugin::ColumnInfo("STATE",
908
908
                                                            64,
909
909
                                                            DRIZZLE_TYPE_VARCHAR,
910
910
                                                            0,
916
916
    return true;
917
917
  }
918
918
 
919
 
  const ColumnInfo *info_col= new(std::nothrow) ColumnInfo("INFO",
 
919
  const drizzled::plugin::ColumnInfo *info_col= new(std::nothrow) drizzled::plugin::ColumnInfo("INFO",
920
920
                                                           PROCESS_LIST_INFO_WIDTH,
921
921
                                                           DRIZZLE_TYPE_VARCHAR,
922
922
                                                           0,
943
943
  return false;
944
944
}
945
945
 
946
 
bool createRefConstraintColumns(vector<const ColumnInfo *>& cols)
 
946
bool createRefConstraintColumns(vector<const drizzled::plugin::ColumnInfo *>& cols)
947
947
{
948
948
  /*
949
949
   * Create the columns for the table.
950
950
   */
951
 
  const ColumnInfo *cat= new(std::nothrow) ColumnInfo("CONSTRAINT_CATALOG",
 
951
  const drizzled::plugin::ColumnInfo *cat= new(std::nothrow) drizzled::plugin::ColumnInfo("CONSTRAINT_CATALOG",
952
952
                                                      FN_REFLEN,
953
953
                                                      DRIZZLE_TYPE_VARCHAR,
954
954
                                                      0,
961
961
    return true;
962
962
  }
963
963
 
964
 
  const ColumnInfo *sch= new(std::nothrow) ColumnInfo("CONSTRAINT_SCHEMA",
 
964
  const drizzled::plugin::ColumnInfo *sch= new(std::nothrow) drizzled::plugin::ColumnInfo("CONSTRAINT_SCHEMA",
965
965
                                                      NAME_CHAR_LEN,
966
966
                                                      DRIZZLE_TYPE_VARCHAR,
967
967
                                                      0,
973
973
    return true;
974
974
  }
975
975
 
976
 
  const ColumnInfo *name= new(std::nothrow) ColumnInfo("CONSTRAINT_NAME",
 
976
  const drizzled::plugin::ColumnInfo *name= new(std::nothrow) drizzled::plugin::ColumnInfo("CONSTRAINT_NAME",
977
977
                                                       NAME_CHAR_LEN,
978
978
                                                       DRIZZLE_TYPE_VARCHAR,
979
979
                                                       0,
985
985
    return true;
986
986
  }
987
987
 
988
 
  const ColumnInfo *uniq_cat= new(std::nothrow) ColumnInfo("UNIQUE_CONSTRAINT_CATALOG",
 
988
  const drizzled::plugin::ColumnInfo *uniq_cat= new(std::nothrow) drizzled::plugin::ColumnInfo("UNIQUE_CONSTRAINT_CATALOG",
989
989
                                                           FN_REFLEN,
990
990
                                                           DRIZZLE_TYPE_VARCHAR,
991
991
                                                           0,
997
997
    return true;
998
998
  }
999
999
 
1000
 
  const ColumnInfo *uniq_sch= new(std::nothrow) ColumnInfo("UNIQUE_CONSTRAINT_SCHEMA",
 
1000
  const drizzled::plugin::ColumnInfo *uniq_sch= new(std::nothrow) drizzled::plugin::ColumnInfo("UNIQUE_CONSTRAINT_SCHEMA",
1001
1001
                                                           NAME_CHAR_LEN,
1002
1002
                                                           DRIZZLE_TYPE_VARCHAR,
1003
1003
                                                           0,
1009
1009
    return true;
1010
1010
  }
1011
1011
 
1012
 
  const ColumnInfo *uniq_name= new(std::nothrow) ColumnInfo("UNIQUE_CONSTRAINT_NAME",
 
1012
  const drizzled::plugin::ColumnInfo *uniq_name= new(std::nothrow) drizzled::plugin::ColumnInfo("UNIQUE_CONSTRAINT_NAME",
1013
1013
                                                            NAME_CHAR_LEN,
1014
1014
                                                            DRIZZLE_TYPE_VARCHAR,
1015
1015
                                                            0,
1021
1021
    return true;
1022
1022
  }
1023
1023
 
1024
 
  const ColumnInfo *match= new(std::nothrow) ColumnInfo("MATCH_OPTION",
 
1024
  const drizzled::plugin::ColumnInfo *match= new(std::nothrow) drizzled::plugin::ColumnInfo("MATCH_OPTION",
1025
1025
                                                        NAME_CHAR_LEN,
1026
1026
                                                        DRIZZLE_TYPE_VARCHAR,
1027
1027
                                                        0,
1033
1033
    return true;
1034
1034
  }
1035
1035
 
1036
 
  const ColumnInfo *update= new(std::nothrow) ColumnInfo("UPDATE_RULE",
 
1036
  const drizzled::plugin::ColumnInfo *update= new(std::nothrow) drizzled::plugin::ColumnInfo("UPDATE_RULE",
1037
1037
                                                         NAME_CHAR_LEN,
1038
1038
                                                         DRIZZLE_TYPE_VARCHAR,
1039
1039
                                                         0,
1045
1045
    return true;
1046
1046
  }
1047
1047
 
1048
 
  const ColumnInfo *del_rule= new(std::nothrow) ColumnInfo("DELETE_RULE",
 
1048
  const drizzled::plugin::ColumnInfo *del_rule= new(std::nothrow) drizzled::plugin::ColumnInfo("DELETE_RULE",
1049
1049
                                                           NAME_CHAR_LEN,
1050
1050
                                                           DRIZZLE_TYPE_VARCHAR,
1051
1051
                                                           0,
1057
1057
    return true;
1058
1058
  }
1059
1059
 
1060
 
  const ColumnInfo *tab_name= new(std::nothrow) ColumnInfo("TABLE_NAME",
 
1060
  const drizzled::plugin::ColumnInfo *tab_name= new(std::nothrow) drizzled::plugin::ColumnInfo("TABLE_NAME",
1061
1061
                                                           NAME_CHAR_LEN,
1062
1062
                                                           DRIZZLE_TYPE_VARCHAR,
1063
1063
                                                           0,
1069
1069
    return true;
1070
1070
  }
1071
1071
 
1072
 
  const ColumnInfo *ref_name= new(std::nothrow) ColumnInfo("REFERENCED_TABLE_NAME",
 
1072
  const drizzled::plugin::ColumnInfo *ref_name= new(std::nothrow) drizzled::plugin::ColumnInfo("REFERENCED_TABLE_NAME",
1073
1073
                                                           NAME_CHAR_LEN,
1074
1074
                                                           DRIZZLE_TYPE_VARCHAR,
1075
1075
                                                           0,
1099
1099
  return false;
1100
1100
}
1101
1101
 
1102
 
bool createSchemataColumns(vector<const ColumnInfo *>& cols)
 
1102
bool createSchemataColumns(vector<const drizzled::plugin::ColumnInfo *>& cols)
1103
1103
{
1104
 
  const ColumnInfo *cat_name= new(std::nothrow) ColumnInfo("CATALOG_NAME",
 
1104
  const drizzled::plugin::ColumnInfo *cat_name= new(std::nothrow) drizzled::plugin::ColumnInfo("CATALOG_NAME",
1105
1105
                                                           FN_REFLEN,
1106
1106
                                                           DRIZZLE_TYPE_VARCHAR,
1107
1107
                                                           0, 
1113
1113
    return true;
1114
1114
  }
1115
1115
 
1116
 
  const ColumnInfo *sch_name= new(std::nothrow) ColumnInfo("SCHEMA_NAME",
 
1116
  const drizzled::plugin::ColumnInfo *sch_name= new(std::nothrow) drizzled::plugin::ColumnInfo("SCHEMA_NAME",
1117
1117
                                                           NAME_CHAR_LEN,
1118
1118
                                                           DRIZZLE_TYPE_VARCHAR,
1119
1119
                                                           0, 
1125
1125
    return true;
1126
1126
  }
1127
1127
 
1128
 
  const ColumnInfo *cs_name= new(std::nothrow) ColumnInfo("DEFAULT_CHARACTER_SET_NAME",
 
1128
  const drizzled::plugin::ColumnInfo *cs_name= new(std::nothrow) drizzled::plugin::ColumnInfo("DEFAULT_CHARACTER_SET_NAME",
1129
1129
                                                          64, 
1130
1130
                                                          DRIZZLE_TYPE_VARCHAR, 
1131
1131
                                                          0, 
1137
1137
    return true;
1138
1138
  }
1139
1139
 
1140
 
  const ColumnInfo *coll_name= new(std::nothrow) ColumnInfo("DEFAULT_COLLATION_NAME",
 
1140
  const drizzled::plugin::ColumnInfo *coll_name= new(std::nothrow) drizzled::plugin::ColumnInfo("DEFAULT_COLLATION_NAME",
1141
1141
                                                            64, 
1142
1142
                                                            DRIZZLE_TYPE_VARCHAR, 
1143
1143
                                                            0, 
1149
1149
    return true;
1150
1150
  }
1151
1151
 
1152
 
  const ColumnInfo *sql_path= new(std::nothrow) ColumnInfo("SQL_PATH",
 
1152
  const drizzled::plugin::ColumnInfo *sql_path= new(std::nothrow) drizzled::plugin::ColumnInfo("SQL_PATH",
1153
1153
                                                           FN_REFLEN,
1154
1154
                                                           DRIZZLE_TYPE_VARCHAR,
1155
1155
                                                           0, 
1170
1170
  return false;
1171
1171
}
1172
1172
 
1173
 
bool createStatsColumns(vector<const ColumnInfo *>& cols)
 
1173
bool createStatsColumns(vector<const drizzled::plugin::ColumnInfo *>& cols)
1174
1174
{
1175
 
  const ColumnInfo *cat= new(std::nothrow) ColumnInfo("TABLE_CATALOG",
 
1175
  const drizzled::plugin::ColumnInfo *cat= new(std::nothrow) drizzled::plugin::ColumnInfo("TABLE_CATALOG",
1176
1176
                                                      FN_REFLEN,
1177
1177
                                                      DRIZZLE_TYPE_VARCHAR,
1178
1178
                                                      0,
1184
1184
    return true;
1185
1185
  }
1186
1186
 
1187
 
  const ColumnInfo *sch= new(std::nothrow) ColumnInfo("TABLE_SCHEMA",
 
1187
  const drizzled::plugin::ColumnInfo *sch= new(std::nothrow) drizzled::plugin::ColumnInfo("TABLE_SCHEMA",
1188
1188
                                                      NAME_CHAR_LEN,
1189
1189
                                                      DRIZZLE_TYPE_VARCHAR,
1190
1190
                                                      0,
1196
1196
    return true;
1197
1197
  }
1198
1198
  
1199
 
  const ColumnInfo *name= new(std::nothrow) ColumnInfo("TABLE_NAME",
 
1199
  const drizzled::plugin::ColumnInfo *name= new(std::nothrow) drizzled::plugin::ColumnInfo("TABLE_NAME",
1200
1200
                                                       NAME_CHAR_LEN,
1201
1201
                                                       DRIZZLE_TYPE_VARCHAR,
1202
1202
                                                       0,
1208
1208
    return true;
1209
1209
  }
1210
1210
 
1211
 
  const ColumnInfo *uniq= new(std::nothrow) ColumnInfo("NON_UNIQUE",
 
1211
  const drizzled::plugin::ColumnInfo *uniq= new(std::nothrow) drizzled::plugin::ColumnInfo("NON_UNIQUE",
1212
1212
                                                       1,
1213
1213
                                                       DRIZZLE_TYPE_LONGLONG,
1214
1214
                                                       0,
1220
1220
    return true;
1221
1221
  }
1222
1222
 
1223
 
  const ColumnInfo *idx_sch= new(std::nothrow) ColumnInfo("INDEX_SCHEMA",
 
1223
  const drizzled::plugin::ColumnInfo *idx_sch= new(std::nothrow) drizzled::plugin::ColumnInfo("INDEX_SCHEMA",
1224
1224
                                                          NAME_CHAR_LEN,
1225
1225
                                                          DRIZZLE_TYPE_VARCHAR,
1226
1226
                                                          0,
1232
1232
    return true;
1233
1233
  }
1234
1234
 
1235
 
  const ColumnInfo *idx_name= new(std::nothrow) ColumnInfo("INDEX_NAME",
 
1235
  const drizzled::plugin::ColumnInfo *idx_name= new(std::nothrow) drizzled::plugin::ColumnInfo("INDEX_NAME",
1236
1236
                                                           NAME_CHAR_LEN,
1237
1237
                                                           DRIZZLE_TYPE_VARCHAR,
1238
1238
                                                           0,
1244
1244
    return true;
1245
1245
  }
1246
1246
 
1247
 
  const ColumnInfo *seq_in_idx= new(std::nothrow) ColumnInfo("SEQ_IN_INDEX",
 
1247
  const drizzled::plugin::ColumnInfo *seq_in_idx= new(std::nothrow) drizzled::plugin::ColumnInfo("SEQ_IN_INDEX",
1248
1248
                                                             2,
1249
1249
                                                             DRIZZLE_TYPE_LONGLONG,
1250
1250
                                                             0,
1256
1256
    return true;
1257
1257
  }
1258
1258
 
1259
 
  const ColumnInfo *col_name= new(std::nothrow) ColumnInfo("COLUMN_NAME",
 
1259
  const drizzled::plugin::ColumnInfo *col_name= new(std::nothrow) drizzled::plugin::ColumnInfo("COLUMN_NAME",
1260
1260
                                                           NAME_CHAR_LEN,
1261
1261
                                                           DRIZZLE_TYPE_VARCHAR,
1262
1262
                                                           0,
1268
1268
    return true;
1269
1269
  }
1270
1270
 
1271
 
  const ColumnInfo *coll= new(std::nothrow) ColumnInfo("COLLATION",
 
1271
  const drizzled::plugin::ColumnInfo *coll= new(std::nothrow) drizzled::plugin::ColumnInfo("COLLATION",
1272
1272
                                                       1,
1273
1273
                                                       DRIZZLE_TYPE_VARCHAR,
1274
1274
                                                       0,
1280
1280
    return true;
1281
1281
  }
1282
1282
 
1283
 
  const ColumnInfo *card= new(std::nothrow) ColumnInfo("CARDINALITY",
 
1283
  const drizzled::plugin::ColumnInfo *card= new(std::nothrow) drizzled::plugin::ColumnInfo("CARDINALITY",
1284
1284
                                                       MY_INT64_NUM_DECIMAL_DIGITS,
1285
1285
                                                       DRIZZLE_TYPE_LONGLONG,
1286
1286
                                                       0,
1292
1292
    return true;
1293
1293
  }
1294
1294
 
1295
 
  const ColumnInfo *sub_part= new(std::nothrow) ColumnInfo("SUB_PART",
 
1295
  const drizzled::plugin::ColumnInfo *sub_part= new(std::nothrow) drizzled::plugin::ColumnInfo("SUB_PART",
1296
1296
                                                           3,
1297
1297
                                                           DRIZZLE_TYPE_LONGLONG,
1298
1298
                                                           0,
1304
1304
    return true;
1305
1305
  }
1306
1306
 
1307
 
  const ColumnInfo *packed= new(std::nothrow) ColumnInfo("PACKED",
 
1307
  const drizzled::plugin::ColumnInfo *packed= new(std::nothrow) drizzled::plugin::ColumnInfo("PACKED",
1308
1308
                                                         10,
1309
1309
                                                         DRIZZLE_TYPE_VARCHAR,
1310
1310
                                                         0,
1316
1316
    return true;
1317
1317
  }
1318
1318
 
1319
 
  const ColumnInfo *nullable= new(std::nothrow) ColumnInfo("NULLABLE",
 
1319
  const drizzled::plugin::ColumnInfo *nullable= new(std::nothrow) drizzled::plugin::ColumnInfo("NULLABLE",
1320
1320
                                                           3,
1321
1321
                                                           DRIZZLE_TYPE_VARCHAR,
1322
1322
                                                           0,
1328
1328
    return true;
1329
1329
  }
1330
1330
 
1331
 
  const ColumnInfo *idx_type= new(std::nothrow) ColumnInfo("INDEX_TYPE",
 
1331
  const drizzled::plugin::ColumnInfo *idx_type= new(std::nothrow) drizzled::plugin::ColumnInfo("INDEX_TYPE",
1332
1332
                                                           16,
1333
1333
                                                           DRIZZLE_TYPE_VARCHAR,
1334
1334
                                                           0,
1340
1340
    return true;
1341
1341
  }
1342
1342
 
1343
 
  const ColumnInfo *comment= new(std::nothrow) ColumnInfo("COMMENT",
 
1343
  const drizzled::plugin::ColumnInfo *comment= new(std::nothrow) drizzled::plugin::ColumnInfo("COMMENT",
1344
1344
                                                          16,
1345
1345
                                                          DRIZZLE_TYPE_VARCHAR,
1346
1346
                                                          0,
1352
1352
    return true;
1353
1353
  }
1354
1354
 
1355
 
  const ColumnInfo *idx_comment= new(std::nothrow) ColumnInfo("INDEX_COMMENT",
 
1355
  const drizzled::plugin::ColumnInfo *idx_comment= new(std::nothrow) drizzled::plugin::ColumnInfo("INDEX_COMMENT",
1356
1356
                                                              INDEX_COMMENT_MAXLEN,
1357
1357
                                                              DRIZZLE_TYPE_VARCHAR,
1358
1358
                                                              0,
1384
1384
  return false;
1385
1385
}
1386
1386
 
1387
 
bool createStatusColumns(vector<const ColumnInfo *>& cols)
 
1387
bool createStatusColumns(vector<const drizzled::plugin::ColumnInfo *>& cols)
1388
1388
{
1389
 
  const ColumnInfo *name= new(std::nothrow) ColumnInfo("VARIABLE_NAME",
 
1389
  const drizzled::plugin::ColumnInfo *name= new(std::nothrow) drizzled::plugin::ColumnInfo("VARIABLE_NAME",
1390
1390
                                                       64,
1391
1391
                                                       DRIZZLE_TYPE_VARCHAR,
1392
1392
                                                       0,
1398
1398
    return true;
1399
1399
  }
1400
1400
 
1401
 
  const ColumnInfo *value= new(std::nothrow) ColumnInfo("VARIABLE_VALUE",
 
1401
  const drizzled::plugin::ColumnInfo *value= new(std::nothrow) drizzled::plugin::ColumnInfo("VARIABLE_VALUE",
1402
1402
                                                        16300,
1403
1403
                                                        DRIZZLE_TYPE_VARCHAR,
1404
1404
                                                        0,
1416
1416
  return false;
1417
1417
}
1418
1418
 
1419
 
bool createTabConstraintsColumns(vector<const ColumnInfo *>& cols)
 
1419
bool createTabConstraintsColumns(vector<const drizzled::plugin::ColumnInfo *>& cols)
1420
1420
{
1421
 
  const ColumnInfo *cat= new(std::nothrow) ColumnInfo("CONSTRAINT_CATALOG",
 
1421
  const drizzled::plugin::ColumnInfo *cat= new(std::nothrow) drizzled::plugin::ColumnInfo("CONSTRAINT_CATALOG",
1422
1422
                                                      FN_REFLEN,
1423
1423
                                                      DRIZZLE_TYPE_VARCHAR,
1424
1424
                                                      0,
1430
1430
    return true;
1431
1431
  }
1432
1432
 
1433
 
  const ColumnInfo *sch= new(std::nothrow) ColumnInfo("CONSTRAINT_SCHEMA",
 
1433
  const drizzled::plugin::ColumnInfo *sch= new(std::nothrow) drizzled::plugin::ColumnInfo("CONSTRAINT_SCHEMA",
1434
1434
                                                      NAME_CHAR_LEN,
1435
1435
                                                      DRIZZLE_TYPE_VARCHAR,
1436
1436
                                                      0,
1442
1442
    return true;
1443
1443
  }
1444
1444
 
1445
 
  const ColumnInfo *name= new(std::nothrow) ColumnInfo("CONSTRAINT_NAME",
 
1445
  const drizzled::plugin::ColumnInfo *name= new(std::nothrow) drizzled::plugin::ColumnInfo("CONSTRAINT_NAME",
1446
1446
                                                       NAME_CHAR_LEN,
1447
1447
                                                       DRIZZLE_TYPE_VARCHAR,
1448
1448
                                                       0,
1454
1454
    return true;
1455
1455
  }
1456
1456
 
1457
 
  const ColumnInfo *tab_sch= new(std::nothrow) ColumnInfo("TABLE_SCHEMA",
 
1457
  const drizzled::plugin::ColumnInfo *tab_sch= new(std::nothrow) drizzled::plugin::ColumnInfo("TABLE_SCHEMA",
1458
1458
                                                          NAME_CHAR_LEN,
1459
1459
                                                          DRIZZLE_TYPE_VARCHAR,
1460
1460
                                                          0,
1466
1466
    return true;
1467
1467
  }
1468
1468
 
1469
 
  const ColumnInfo *tab_name= new(std::nothrow) ColumnInfo("TABLE_NAME",
 
1469
  const drizzled::plugin::ColumnInfo *tab_name= new(std::nothrow) drizzled::plugin::ColumnInfo("TABLE_NAME",
1470
1470
                                                           NAME_CHAR_LEN,
1471
1471
                                                           DRIZZLE_TYPE_VARCHAR,
1472
1472
                                                           0,
1478
1478
    return true;
1479
1479
  }
1480
1480
 
1481
 
  const ColumnInfo *type= new(std::nothrow) ColumnInfo("CONSTRAINT_TYPE",
 
1481
  const drizzled::plugin::ColumnInfo *type= new(std::nothrow) drizzled::plugin::ColumnInfo("CONSTRAINT_TYPE",
1482
1482
                                                       NAME_CHAR_LEN,
1483
1483
                                                       DRIZZLE_TYPE_VARCHAR,
1484
1484
                                                       0,
1500
1500
  return false;
1501
1501
}
1502
1502
 
1503
 
bool createTablesColumns(vector<const ColumnInfo *>& cols)
 
1503
bool createTablesColumns(vector<const drizzled::plugin::ColumnInfo *>& cols)
1504
1504
{
1505
 
  const ColumnInfo *cat= new(std::nothrow) ColumnInfo("TABLE_CATALOG",
 
1505
  const drizzled::plugin::ColumnInfo *cat= new(std::nothrow) drizzled::plugin::ColumnInfo("TABLE_CATALOG",
1506
1506
                                                      FN_REFLEN,
1507
1507
                                                      DRIZZLE_TYPE_VARCHAR,
1508
1508
                                                      0,
1514
1514
    return true;
1515
1515
  }
1516
1516
 
1517
 
  const ColumnInfo *sch= new(std::nothrow) ColumnInfo("TABLE_SCHEMA",
 
1517
  const drizzled::plugin::ColumnInfo *sch= new(std::nothrow) drizzled::plugin::ColumnInfo("TABLE_SCHEMA",
1518
1518
                                                      NAME_CHAR_LEN,
1519
1519
                                                      DRIZZLE_TYPE_VARCHAR,
1520
1520
                                                      0,
1526
1526
    return true;
1527
1527
  }
1528
1528
 
1529
 
  const ColumnInfo *name= new(std::nothrow) ColumnInfo("TABLE_NAME",
 
1529
  const drizzled::plugin::ColumnInfo *name= new(std::nothrow) drizzled::plugin::ColumnInfo("TABLE_NAME",
1530
1530
                                                       NAME_CHAR_LEN,
1531
1531
                                                       DRIZZLE_TYPE_VARCHAR,
1532
1532
                                                       0,
1538
1538
    return true;
1539
1539
  }
1540
1540
 
1541
 
  const ColumnInfo *type= new(std::nothrow) ColumnInfo("TABLE_TYPE",
 
1541
  const drizzled::plugin::ColumnInfo *type= new(std::nothrow) drizzled::plugin::ColumnInfo("TABLE_TYPE",
1542
1542
                                                       NAME_CHAR_LEN,
1543
1543
                                                       DRIZZLE_TYPE_VARCHAR,
1544
1544
                                                       0,
1550
1550
    return true;
1551
1551
  }
1552
1552
 
1553
 
  const ColumnInfo *engine= new(std::nothrow) ColumnInfo("ENGINE",
 
1553
  const drizzled::plugin::ColumnInfo *engine= new(std::nothrow) drizzled::plugin::ColumnInfo("ENGINE",
1554
1554
                                                         NAME_CHAR_LEN,
1555
1555
                                                         DRIZZLE_TYPE_VARCHAR,
1556
1556
                                                         0,
1562
1562
    return true;
1563
1563
  }
1564
1564
 
1565
 
  const ColumnInfo *version= new(std::nothrow) ColumnInfo("VERSION",
 
1565
  const drizzled::plugin::ColumnInfo *version= new(std::nothrow) drizzled::plugin::ColumnInfo("VERSION",
1566
1566
                                                          MY_INT64_NUM_DECIMAL_DIGITS,
1567
1567
                                                          DRIZZLE_TYPE_LONGLONG,
1568
1568
                                                          0,
1574
1574
    return true;
1575
1575
  }
1576
1576
 
1577
 
  const ColumnInfo *row_format= new(std::nothrow) ColumnInfo("ROW_FORMAT",
 
1577
  const drizzled::plugin::ColumnInfo *row_format= new(std::nothrow) drizzled::plugin::ColumnInfo("ROW_FORMAT",
1578
1578
                                                             10,
1579
1579
                                                             DRIZZLE_TYPE_VARCHAR,
1580
1580
                                                             0,
1586
1586
    return true;
1587
1587
  }
1588
1588
 
1589
 
  const ColumnInfo *tab_rows= new(std::nothrow) ColumnInfo("TABLE_ROWS",
 
1589
  const drizzled::plugin::ColumnInfo *tab_rows= new(std::nothrow) drizzled::plugin::ColumnInfo("TABLE_ROWS",
1590
1590
                                                           MY_INT64_NUM_DECIMAL_DIGITS,
1591
1591
                                                           DRIZZLE_TYPE_LONGLONG,
1592
1592
                                                           0,
1598
1598
    return true;
1599
1599
  }
1600
1600
 
1601
 
  const ColumnInfo *avg_row_len= new(std::nothrow) ColumnInfo("AVG_ROW_LENGTH",
 
1601
  const drizzled::plugin::ColumnInfo *avg_row_len= new(std::nothrow) drizzled::plugin::ColumnInfo("AVG_ROW_LENGTH",
1602
1602
                                                              MY_INT64_NUM_DECIMAL_DIGITS,
1603
1603
                                                              DRIZZLE_TYPE_LONGLONG,
1604
1604
                                                              0,
1610
1610
    return true;
1611
1611
  }
1612
1612
 
1613
 
  const ColumnInfo *data_len= new(std::nothrow) ColumnInfo("DATA_LENGTH",
 
1613
  const drizzled::plugin::ColumnInfo *data_len= new(std::nothrow) drizzled::plugin::ColumnInfo("DATA_LENGTH",
1614
1614
                                                           MY_INT64_NUM_DECIMAL_DIGITS,
1615
1615
                                                           DRIZZLE_TYPE_LONGLONG,
1616
1616
                                                           0,
1622
1622
    return true;
1623
1623
  }
1624
1624
 
1625
 
  const ColumnInfo *max_data_len= new(std::nothrow) ColumnInfo("MAX_DATA_LENGTH",
 
1625
  const drizzled::plugin::ColumnInfo *max_data_len= new(std::nothrow) drizzled::plugin::ColumnInfo("MAX_DATA_LENGTH",
1626
1626
                                                               MY_INT64_NUM_DECIMAL_DIGITS,
1627
1627
                                                               DRIZZLE_TYPE_LONGLONG,
1628
1628
                                                               0,
1634
1634
    return true;
1635
1635
  }
1636
1636
 
1637
 
  const ColumnInfo *idx_len= new(std::nothrow) ColumnInfo("INDEX_LENGTH",
 
1637
  const drizzled::plugin::ColumnInfo *idx_len= new(std::nothrow) drizzled::plugin::ColumnInfo("INDEX_LENGTH",
1638
1638
                                                          MY_INT64_NUM_DECIMAL_DIGITS,
1639
1639
                                                          DRIZZLE_TYPE_LONGLONG,
1640
1640
                                                          0,
1646
1646
    return true;
1647
1647
  }
1648
1648
 
1649
 
  const ColumnInfo *data_free= new(std::nothrow) ColumnInfo("DATA_FREE",
 
1649
  const drizzled::plugin::ColumnInfo *data_free= new(std::nothrow) drizzled::plugin::ColumnInfo("DATA_FREE",
1650
1650
                                                           MY_INT64_NUM_DECIMAL_DIGITS,
1651
1651
                                                           DRIZZLE_TYPE_LONGLONG,
1652
1652
                                                           0,
1658
1658
    return true;
1659
1659
  }
1660
1660
 
1661
 
  const ColumnInfo *auto_inc= new(std::nothrow) ColumnInfo("AUTO_INCREMENT",
 
1661
  const drizzled::plugin::ColumnInfo *auto_inc= new(std::nothrow) drizzled::plugin::ColumnInfo("AUTO_INCREMENT",
1662
1662
                                                           MY_INT64_NUM_DECIMAL_DIGITS,
1663
1663
                                                           DRIZZLE_TYPE_LONGLONG,
1664
1664
                                                           0,
1670
1670
    return true;
1671
1671
  }
1672
1672
 
1673
 
  const ColumnInfo *create_time= new(std::nothrow) ColumnInfo("CREATE_TIME",
 
1673
  const drizzled::plugin::ColumnInfo *create_time= new(std::nothrow) drizzled::plugin::ColumnInfo("CREATE_TIME",
1674
1674
                                                              0,
1675
1675
                                                              DRIZZLE_TYPE_DATETIME,
1676
1676
                                                              0,
1682
1682
    return true;
1683
1683
  }
1684
1684
 
1685
 
  const ColumnInfo *update_time= new(std::nothrow) ColumnInfo("UPDATE_TIME",
 
1685
  const drizzled::plugin::ColumnInfo *update_time= new(std::nothrow) drizzled::plugin::ColumnInfo("UPDATE_TIME",
1686
1686
                                                              0,
1687
1687
                                                              DRIZZLE_TYPE_DATETIME,
1688
1688
                                                              0,
1694
1694
    return true;
1695
1695
  }
1696
1696
 
1697
 
  const ColumnInfo *check_time= new(std::nothrow) ColumnInfo("CHECK_TIME",
 
1697
  const drizzled::plugin::ColumnInfo *check_time= new(std::nothrow) drizzled::plugin::ColumnInfo("CHECK_TIME",
1698
1698
                                                             0,
1699
1699
                                                             DRIZZLE_TYPE_DATETIME,
1700
1700
                                                             0,
1706
1706
    return true;
1707
1707
  }
1708
1708
 
1709
 
  const ColumnInfo *table_coll= new(std::nothrow) ColumnInfo("TABLE_COLLATION",
 
1709
  const drizzled::plugin::ColumnInfo *table_coll= new(std::nothrow) drizzled::plugin::ColumnInfo("TABLE_COLLATION",
1710
1710
                                                             64,
1711
1711
                                                             DRIZZLE_TYPE_VARCHAR,
1712
1712
                                                             0,
1718
1718
    return true;
1719
1719
  }
1720
1720
 
1721
 
  const ColumnInfo *checksum= new(std::nothrow) ColumnInfo("CHECKSUM",
 
1721
  const drizzled::plugin::ColumnInfo *checksum= new(std::nothrow) drizzled::plugin::ColumnInfo("CHECKSUM",
1722
1722
                                                           MY_INT64_NUM_DECIMAL_DIGITS,
1723
1723
                                                           DRIZZLE_TYPE_LONGLONG,
1724
1724
                                                           0,
1730
1730
    return true;
1731
1731
  }
1732
1732
 
1733
 
  const ColumnInfo *create_opt= new(std::nothrow) ColumnInfo("CREATE_OPTIONS",
 
1733
  const drizzled::plugin::ColumnInfo *create_opt= new(std::nothrow) drizzled::plugin::ColumnInfo("CREATE_OPTIONS",
1734
1734
                                                             255,
1735
1735
                                                             DRIZZLE_TYPE_VARCHAR,
1736
1736
                                                             0,
1742
1742
    return true;
1743
1743
  }
1744
1744
 
1745
 
  const ColumnInfo *tab_comment= new(std::nothrow) ColumnInfo("TABLE_COMMENT",
 
1745
  const drizzled::plugin::ColumnInfo *tab_comment= new(std::nothrow) drizzled::plugin::ColumnInfo("TABLE_COMMENT",
1746
1746
                                                              TABLE_COMMENT_MAXLEN,
1747
1747
                                                              DRIZZLE_TYPE_VARCHAR,
1748
1748
                                                              0,
1780
1780
}
1781
1781
 
1782
1782
 
1783
 
bool createTabNamesColumns(vector<const ColumnInfo *>& cols)
 
1783
bool createTabNamesColumns(vector<const drizzled::plugin::ColumnInfo *>& cols)
1784
1784
{
1785
 
  const ColumnInfo *cat= new(std::nothrow) ColumnInfo("TABLE_CATALOG",
 
1785
  const drizzled::plugin::ColumnInfo *cat= new(std::nothrow) drizzled::plugin::ColumnInfo("TABLE_CATALOG",
1786
1786
                                                      FN_REFLEN,
1787
1787
                                                      DRIZZLE_TYPE_VARCHAR,
1788
1788
                                                      0,
1794
1794
    return true;
1795
1795
  }
1796
1796
 
1797
 
  const ColumnInfo *sch= new(std::nothrow) ColumnInfo("TABLE_SCHEMA",
 
1797
  const drizzled::plugin::ColumnInfo *sch= new(std::nothrow) drizzled::plugin::ColumnInfo("TABLE_SCHEMA",
1798
1798
                                                      NAME_CHAR_LEN,
1799
1799
                                                      DRIZZLE_TYPE_VARCHAR,
1800
1800
                                                      0,
1806
1806
    return true;
1807
1807
  }
1808
1808
 
1809
 
  const ColumnInfo *name= new(std::nothrow) ColumnInfo("TABLE_NAME",
 
1809
  const drizzled::plugin::ColumnInfo *name= new(std::nothrow) drizzled::plugin::ColumnInfo("TABLE_NAME",
1810
1810
                                                       NAME_CHAR_LEN,
1811
1811
                                                       DRIZZLE_TYPE_VARCHAR,
1812
1812
                                                       0,
1818
1818
    return true;
1819
1819
  }
1820
1820
 
1821
 
  const ColumnInfo *type= new(std::nothrow) ColumnInfo("TABLE_TYPE",
 
1821
  const drizzled::plugin::ColumnInfo *type= new(std::nothrow) drizzled::plugin::ColumnInfo("TABLE_TYPE",
1822
1822
                                                       NAME_CHAR_LEN,
1823
1823
                                                       DRIZZLE_TYPE_VARCHAR,
1824
1824
                                                       0,
1852
1852
  }
1853
1853
};
1854
1854
 
1855
 
void clearColumns(vector<const ColumnInfo *>& cols)
 
1855
void clearColumns(vector<const drizzled::plugin::ColumnInfo *>& cols)
1856
1856
{
1857
1857
  for_each(cols.begin(), cols.end(), DeleteColumns());
1858
1858
  cols.clear();