~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/show.cc

Merge Padraig

Show diffs side-by-side

added added

removed removed

Lines of Context:
71
71
{
72
72
  if (schema_table->getFirstColumnIndex() == 0)
73
73
    schema_table->setFirstColumnIndex(-1);
74
 
  if (schema_table->getSecondColumnIndex())
 
74
  if (schema_table->getSecondColumnIndex() == 0)
75
75
   schema_table->setSecondColumnIndex(-1);
76
76
 
77
77
  all_schema_tables.push_back(schema_table);
97
97
      if (*wildstr == wild_prefix && wildstr[1])
98
98
        wildstr++;
99
99
      if (my_toupper(cs, *wildstr++) != my_toupper(cs, *str++))
100
 
        return(1);
 
100
        return (1);
101
101
    }
102
102
    if (! *wildstr )
103
103
      return (*str != 0);
108
108
    }
109
109
    else
110
110
    {                                           /* Found '*' */
111
 
      if (!*wildstr)
112
 
        return(0);              /* '*' as last char: OK */
 
111
      if (! *wildstr)
 
112
        return (0);             /* '*' as last char: OK */
113
113
      flag=(*wildstr != wild_many && *wildstr != wild_one);
114
114
      do
115
115
      {
116
 
        if (flag)
117
 
        {
118
 
          char cmp;
119
 
          if ((cmp= *wildstr) == wild_prefix && wildstr[1])
120
 
            cmp=wildstr[1];
121
 
          cmp=my_toupper(cs, cmp);
122
 
          while (*str && my_toupper(cs, *str) != cmp)
123
 
            str++;
124
 
    if (!*str)
 
116
        if (flag)
 
117
        {
 
118
          char cmp;
 
119
          if ((cmp= *wildstr) == wild_prefix && wildstr[1])
 
120
            cmp= wildstr[1];
 
121
          cmp= my_toupper(cs, cmp);
 
122
          while (*str && my_toupper(cs, *str) != cmp)
 
123
            str++;
 
124
          if (! *str)
 
125
            return (1);
 
126
        }
 
127
        if (wild_case_compare(cs, str, wildstr) == 0)
 
128
          return (0);
 
129
      } while (*str++);
125
130
      return (1);
126
 
        }
127
 
  if (wild_case_compare(cs, str,wildstr) == 0)
128
 
      return (0);
129
 
      } while (*str++);
130
 
      return(1);
131
131
    }
132
132
  }
133
133
  return (*str != '\0');
376
376
  protocol->prepareForResend();
377
377
  {
378
378
    if (table_list->schema_table)
379
 
      protocol->store(table_list->schema_table->getTableName());
 
379
      protocol->store(table_list->schema_table->getTableName().c_str());
380
380
    else
381
381
      protocol->store(table_list->table->alias);
382
382
  }
606
606
      (create_info_arg->options & HA_LEX_CREATE_IF_NOT_EXISTS))
607
607
    packet->append(STRING_WITH_LEN("IF NOT EXISTS "));
608
608
  if (table_list->schema_table)
609
 
    alias= table_list->schema_table->getTableName();
 
609
    alias= table_list->schema_table->getTableName().c_str();
610
610
  else
611
611
    alias= share->table_name.str;
612
612
 
1513
1513
{
1514
1514
  InfoSchemaTable *schema_table= table->schema_table;
1515
1515
  const char *field_name1= schema_table->getFirstColumnIndex() >= 0 ?
1516
 
    schema_table->getColumnName(schema_table->getFirstColumnIndex()) : "";
 
1516
    schema_table->getColumnName(schema_table->getFirstColumnIndex()).c_str() : "";
1517
1517
  const char *field_name2= schema_table->getSecondColumnIndex() >= 0 ?
1518
 
    schema_table->getColumnName(schema_table->getSecondColumnIndex()) : "";
 
1518
    schema_table->getColumnName(schema_table->getSecondColumnIndex()).c_str() : "";
1519
1519
 
1520
1520
  if (item_func->functype() == Item_func::EQ_FUNC ||
1521
1521
      item_func->functype() == Item_func::EQUAL_FUNC)
1641
1641
    const CHARSET_INFO * const cs= system_charset_info;
1642
1642
    InfoSchemaTable *schema_table= table->schema_table;
1643
1643
    const char *field_name1= schema_table->getFirstColumnIndex() >= 0 ?
1644
 
      schema_table->getColumnName(schema_table->getFirstColumnIndex()) : "";
 
1644
      schema_table->getColumnName(schema_table->getFirstColumnIndex()).c_str() : "";
1645
1645
    const char *field_name2= schema_table->getSecondColumnIndex() >= 0 ?
1646
 
      schema_table->getColumnName(schema_table->getSecondColumnIndex()) : "";
 
1646
      schema_table->getColumnName(schema_table->getSecondColumnIndex()).c_str() : "";
1647
1647
    if (table->table != item_field->field->table ||
1648
1648
        (cs->coll->strnncollsp(cs, (unsigned char *) field_name1, strlen(field_name1),
1649
1649
                               (unsigned char *) item_field->field_name,
1883
1883
    if (wild)
1884
1884
    {
1885
1885
      if (wild_case_compare(files_charset_info,
1886
 
                            schema_table->getTableName(),
 
1886
                            schema_table->getTableName().c_str(),
1887
1887
                            wild))
1888
1888
        return(0);
1889
1889
    }
1890
1890
  
1891
1891
    if ((file_name= session->make_lex_string(file_name, 
1892
 
                                             schema_table->getTableName(),
1893
 
                                             strlen(schema_table->getTableName()),
 
1892
                                             schema_table->getTableName().c_str(),
 
1893
                                             schema_table->getTableName().length(),
1894
1894
                                             true)) &&
1895
1895
        !file_list->push_back(file_name))
1896
1896
      return(0);
1905
1905
  InfoSchemaTable *tmp_schema_table= schema_tables;
1906
1906
  st_add_schema_table add_data;
1907
1907
 
1908
 
  for (; tmp_schema_table->getTableName(); tmp_schema_table++)
 
1908
  for (; tmp_schema_table->getTableName().length() != 0; tmp_schema_table++)
1909
1909
  {
1910
1910
    if (tmp_schema_table->isHidden())
1911
1911
      continue;
1912
1912
    if (wild)
1913
1913
    {
1914
1914
      if (wild_case_compare(files_charset_info,
1915
 
                            tmp_schema_table->getTableName(),
 
1915
                            tmp_schema_table->getTableName().c_str(),
1916
1916
                            wild))
1917
1917
        continue;
1918
1918
    }
1919
1919
    if ((file_name=
1920
1920
         session->make_lex_string(file_name, 
1921
 
                                  tmp_schema_table->getTableName(),
1922
 
                                  strlen(tmp_schema_table->getTableName()), 
 
1921
                                  tmp_schema_table->getTableName().c_str(),
 
1922
                                  tmp_schema_table->getTableName().length(), 
1923
1923
                                  true)) &&
1924
1924
        !files->push_back(file_name))
1925
1925
      continue;
2141
2141
                  OPEN_FULL_TABLE - open FRM, data, index files
2142
2142
  @param[in]      tables               I_S table table_list
2143
2143
  @param[in]      schema_table         I_S table struct
2144
 
  @param[in]      schema_table_idx     I_S table index
2145
2144
 
2146
2145
  @return         return a set of flags
2147
2146
    @retval       SKIP_OPEN_TABLE | OPEN_FRM_ONLY | OPEN_FULL_TABLE
2148
2147
*/
2149
2148
 
2150
2149
static uint32_t get_table_open_method(TableList *tables,
2151
 
                                      InfoSchemaTable *schema_table,
2152
 
                                      enum enum_schema_tables)
 
2150
                                      InfoSchemaTable *schema_table)
2153
2151
{
2154
2152
  /*
2155
2153
    determine which method will be used for table opening
2179
2177
  @param[in]      schema_table             I_S table struct
2180
2178
  @param[in]      db_name                  database name
2181
2179
  @param[in]      table_name               table name
2182
 
  @param[in]      schema_table_idx         I_S table index
2183
2180
 
2184
2181
  @return         Operation status
2185
2182
    @retval       0           Table is processed and we can continue
2191
2188
static int fill_schema_table_from_frm(Session *session,TableList *tables,
2192
2189
                                      InfoSchemaTable *schema_table,
2193
2190
                                      LEX_STRING *db_name,
2194
 
                                      LEX_STRING *table_name,
2195
 
                                      enum enum_schema_tables)
 
2191
                                      LEX_STRING *table_name)
2196
2192
{
2197
2193
  Table *table= tables->table;
2198
2194
  TableShare *share;
2285
2281
 
2286
2282
  schema_table_idx= get_schema_table_idx(schema_table);
2287
2283
  tables->table_open_method= table_open_method=
2288
 
    get_table_open_method(tables, schema_table, schema_table_idx);
 
2284
    get_table_open_method(tables, schema_table);
2289
2285
  /*
2290
2286
    this branch processes SHOW FIELDS, SHOW INDEXES commands.
2291
2287
    see sql_parse.cc, prepare_schema_table() function where
2392
2388
                !with_i_schema)
2393
2389
            {
2394
2390
              if (!fill_schema_table_from_frm(session, tables, schema_table, db_name,
2395
 
                                              table_name, schema_table_idx))
 
2391
                                              table_name))
2396
2392
                continue;
2397
2393
            }
2398
2394
 
2960
2956
}
2961
2957
 
2962
2958
 
2963
 
 
2964
 
int CharSetISMethods::fillTable(Session *session, TableList *tables, COND *)
2965
 
{
2966
 
  CHARSET_INFO **cs;
2967
 
  const char *wild= session->lex->wild ? session->lex->wild->ptr() : NULL;
2968
 
  Table *table= tables->table;
2969
 
  const CHARSET_INFO * const scs= system_charset_info;
2970
 
 
2971
 
  for (cs= all_charsets ; cs < all_charsets+255 ; cs++)
2972
 
  {
2973
 
    const CHARSET_INFO * const tmp_cs= cs[0];
2974
 
    if (tmp_cs && (tmp_cs->state & MY_CS_PRIMARY) &&
2975
 
        (tmp_cs->state & MY_CS_AVAILABLE) &&
2976
 
        !(tmp_cs->state & MY_CS_HIDDEN) &&
2977
 
        !(wild && wild[0] &&
2978
 
          wild_case_compare(scs, tmp_cs->csname,wild)))
2979
 
    {
2980
 
      const char *comment;
2981
 
      table->restoreRecordAsDefault();
2982
 
      table->field[0]->store(tmp_cs->csname, strlen(tmp_cs->csname), scs);
2983
 
      table->field[1]->store(tmp_cs->name, strlen(tmp_cs->name), scs);
2984
 
      comment= tmp_cs->comment ? tmp_cs->comment : "";
2985
 
      table->field[2]->store(comment, strlen(comment), scs);
2986
 
      table->field[3]->store((int64_t) tmp_cs->mbmaxlen, true);
2987
 
      if (schema_table_store_record(session, table))
2988
 
        return 1;
2989
 
    }
2990
 
  }
2991
 
  return 0;
2992
 
}
2993
 
 
2994
 
 
2995
 
int CollationISMethods::fillTable(Session *session, TableList *tables, COND *)
2996
 
{
2997
 
  CHARSET_INFO **cs;
2998
 
  const char *wild= session->lex->wild ? session->lex->wild->ptr() : NULL;
2999
 
  Table *table= tables->table;
3000
 
  const CHARSET_INFO * const scs= system_charset_info;
3001
 
  for (cs= all_charsets ; cs < all_charsets+255 ; cs++ )
3002
 
  {
3003
 
    CHARSET_INFO **cl;
3004
 
    const CHARSET_INFO *tmp_cs= cs[0];
3005
 
    if (!tmp_cs || !(tmp_cs->state & MY_CS_AVAILABLE) ||
3006
 
         (tmp_cs->state & MY_CS_HIDDEN) ||
3007
 
        !(tmp_cs->state & MY_CS_PRIMARY))
3008
 
      continue;
3009
 
    for (cl= all_charsets; cl < all_charsets+255 ;cl ++)
3010
 
    {
3011
 
      const CHARSET_INFO *tmp_cl= cl[0];
3012
 
      if (!tmp_cl || !(tmp_cl->state & MY_CS_AVAILABLE) ||
3013
 
          !my_charset_same(tmp_cs, tmp_cl))
3014
 
        continue;
3015
 
      if (!(wild && wild[0] &&
3016
 
          wild_case_compare(scs, tmp_cl->name,wild)))
3017
 
      {
3018
 
        const char *tmp_buff;
3019
 
        table->restoreRecordAsDefault();
3020
 
        table->field[0]->store(tmp_cl->name, strlen(tmp_cl->name), scs);
3021
 
        table->field[1]->store(tmp_cl->csname , strlen(tmp_cl->csname), scs);
3022
 
        table->field[2]->store((int64_t) tmp_cl->number, true);
3023
 
        tmp_buff= (tmp_cl->state & MY_CS_PRIMARY) ? "Yes" : "";
3024
 
        table->field[3]->store(tmp_buff, strlen(tmp_buff), scs);
3025
 
        tmp_buff= (tmp_cl->state & MY_CS_COMPILED)? "Yes" : "";
3026
 
        table->field[4]->store(tmp_buff, strlen(tmp_buff), scs);
3027
 
        table->field[5]->store((int64_t) tmp_cl->strxfrm_multiply, true);
3028
 
        if (schema_table_store_record(session, table))
3029
 
          return 1;
3030
 
      }
3031
 
    }
3032
 
  }
3033
 
  return 0;
3034
 
}
3035
 
 
3036
 
 
3037
 
int CollCharISMethods::fillTable(Session *session, TableList *tables, COND *)
3038
 
{
3039
 
  CHARSET_INFO **cs;
3040
 
  Table *table= tables->table;
3041
 
  const CHARSET_INFO * const scs= system_charset_info;
3042
 
  for (cs= all_charsets ; cs < all_charsets+255 ; cs++ )
3043
 
  {
3044
 
    CHARSET_INFO **cl;
3045
 
    const CHARSET_INFO *tmp_cs= cs[0];
3046
 
    if (!tmp_cs || !(tmp_cs->state & MY_CS_AVAILABLE) ||
3047
 
        !(tmp_cs->state & MY_CS_PRIMARY))
3048
 
      continue;
3049
 
    for (cl= all_charsets; cl < all_charsets+255 ;cl ++)
3050
 
    {
3051
 
      const CHARSET_INFO *tmp_cl= cl[0];
3052
 
      if (!tmp_cl || !(tmp_cl->state & MY_CS_AVAILABLE) ||
3053
 
          !my_charset_same(tmp_cs,tmp_cl))
3054
 
        continue;
3055
 
      table->restoreRecordAsDefault();
3056
 
      table->field[0]->store(tmp_cl->name, strlen(tmp_cl->name), scs);
3057
 
      table->field[1]->store(tmp_cl->csname , strlen(tmp_cl->csname), scs);
3058
 
      if (schema_table_store_record(session, table))
3059
 
        return 1;
3060
 
    }
3061
 
  }
3062
 
  return 0;
3063
 
}
3064
 
 
3065
 
 
3066
2959
int StatsISMethods::processTable(Session *session, TableList *tables,
3067
2960
                                  Table *table, bool res,
3068
2961
                                  LEX_STRING *db_name,
3512
3405
    : table_name(table_name_arg) {}
3513
3406
  result_type operator() (argument_type schema_table)
3514
3407
  {
3515
 
    return !my_strcasecmp(system_charset_info,
3516
 
                          schema_table->getTableName(),
3517
 
                          table_name);
 
3408
    return ! my_strcasecmp(system_charset_info,
 
3409
                           schema_table->getTableName().c_str(),
 
3410
                           table_name);
3518
3411
  }
3519
3412
};
3520
3413
 
3535
3428
{
3536
3429
  InfoSchemaTable *schema_table= schema_tables;
3537
3430
 
3538
 
  for (; schema_table->getTableName(); schema_table++)
 
3431
  for (; schema_table->getTableName().length() != 0; schema_table++)
3539
3432
  {
3540
 
    if (!my_strcasecmp(system_charset_info,
3541
 
                       schema_table->getTableName(),
3542
 
                       table_name))
 
3433
    if (! my_strcasecmp(system_charset_info,
 
3434
                        schema_table->getTableName().c_str(),
 
3435
                        table_name))
3543
3436
      return(schema_table);
3544
3437
  }
3545
3438
 
3575
3468
    switch (column->getType()) {
3576
3469
    case DRIZZLE_TYPE_LONG:
3577
3470
    case DRIZZLE_TYPE_LONGLONG:
3578
 
      if (!(item= new Item_return_int(column->getName(),
 
3471
      if (!(item= new Item_return_int(column->getName().c_str(),
3579
3472
                                      column->getLength(),
3580
3473
                                      column->getType(),
3581
3474
                                      column->getValue())))
3587
3480
    case DRIZZLE_TYPE_DATE:
3588
3481
    case DRIZZLE_TYPE_TIMESTAMP:
3589
3482
    case DRIZZLE_TYPE_DATETIME:
3590
 
      if (!(item=new Item_return_date_time(column->getName(),
 
3483
      if (!(item=new Item_return_date_time(column->getName().c_str(),
3591
3484
                                           column->getType())))
3592
3485
      {
3593
3486
        return(0);
3594
3487
      }
3595
3488
      break;
3596
3489
    case DRIZZLE_TYPE_DOUBLE:
3597
 
      if ((item= new Item_float(column->getName(), 0.0, NOT_FIXED_DEC,
 
3490
      if ((item= new Item_float(column->getName().c_str(), 0.0, NOT_FIXED_DEC,
3598
3491
                           column->getLength())) == NULL)
3599
3492
        return NULL;
3600
3493
      break;
3610
3503
        item->max_length+= 1;
3611
3504
      if (item->decimals > 0)
3612
3505
        item->max_length+= 1;
3613
 
      item->set_name(column->getName(),
3614
 
                     strlen(column->getName()), cs);
 
3506
      item->set_name(column->getName().c_str(),
 
3507
                     column->getName().length(), cs);
3615
3508
      break;
3616
3509
    case DRIZZLE_TYPE_BLOB:
3617
 
      if (!(item= new Item_blob(column->getName(),
 
3510
      if (!(item= new Item_blob(column->getName().c_str(),
3618
3511
                                column->getLength())))
3619
3512
      {
3620
3513
        return(0);
3625
3518
      {
3626
3519
        return(0);
3627
3520
      }
3628
 
      item->set_name(column->getName(),
3629
 
                     strlen(column->getName()), cs);
 
3521
      item->set_name(column->getName().c_str(),
 
3522
                     column->getName().length(), cs);
3630
3523
      break;
3631
3524
    }
3632
3525
    field_list.push_back(item);
3682
3575
  while (iter != columns.end())
3683
3576
  {
3684
3577
    const ColumnInfo *column= *iter;
3685
 
    if (column->getOldName())
 
3578
    if (column->getOldName().length() != 0)
3686
3579
    {
3687
3580
      Item_field *field= new Item_field(context,
3688
 
                                        NULL, NULL, column->getName());
 
3581
                                        NULL, NULL,
 
3582
                                        column->getName().c_str());
3689
3583
      if (field)
3690
3584
      {
3691
 
        field->set_name(column->getOldName(),
3692
 
                        strlen(column->getOldName()),
 
3585
        field->set_name(column->getOldName().c_str(),
 
3586
                        column->getOldName().length(),
3693
3587
                        system_charset_info);
3694
3588
        if (session->add_item_to_list(field))
3695
3589
          return 1;
3715
3609
    const ColumnInfo *column= columns[1];
3716
3610
    String buffer(tmp,sizeof(tmp), system_charset_info);
3717
3611
    Item_field *field= new Item_field(context,
3718
 
                                      NULL, NULL, column->getName());
 
3612
                                      NULL, NULL, column->getName().c_str());
3719
3613
    if (!field || session->add_item_to_list(field))
3720
3614
      return 1;
3721
3615
    buffer.length(0);
3722
 
    buffer.append(column->getOldName());
 
3616
    buffer.append(column->getOldName().c_str());
3723
3617
    if (lex->wild && lex->wild->ptr())
3724
3618
    {
3725
3619
      buffer.append(STRING_WITH_LEN(" ("));
3743
3637
 
3744
3638
  const ColumnInfo *column= columns[2];
3745
3639
  buffer.length(0);
3746
 
  buffer.append(column->getOldName());
 
3640
  buffer.append(column->getOldName().c_str());
3747
3641
  buffer.append(lex->select_lex.db);
3748
3642
  if (lex->wild && lex->wild->ptr())
3749
3643
  {
3752
3646
    buffer.append(')');
3753
3647
  }
3754
3648
  Item_field *field= new Item_field(context,
3755
 
                                    NULL, NULL, column->getName());
 
3649
                                    NULL, NULL, column->getName().c_str());
3756
3650
  if (session->add_item_to_list(field))
3757
3651
    return 1;
3758
3652
  field->set_name(buffer.ptr(), buffer.length(), system_charset_info);
3760
3654
  {
3761
3655
    field->set_name(buffer.ptr(), buffer.length(), system_charset_info);
3762
3656
    column= columns[3];
3763
 
    field= new Item_field(context, NULL, NULL, column->getName());
 
3657
    field= new Item_field(context, NULL, NULL, column->getName().c_str());
3764
3658
    if (session->add_item_to_list(field))
3765
3659
      return 1;
3766
 
    field->set_name(column->getOldName(), strlen(column->getOldName()),
 
3660
    field->set_name(column->getOldName().c_str(), 
 
3661
                    column->getOldName().length(),
3767
3662
                    system_charset_info);
3768
3663
  }
3769
3664
  return 0;
3787
3682
                               *field_num == 18))
3788
3683
      continue;
3789
3684
    Item_field *field= new Item_field(context,
3790
 
                                      NULL, NULL, column->getName());
3791
 
    if (field)
3792
 
    {
3793
 
      field->set_name(column->getOldName(),
3794
 
                      strlen(column->getOldName()),
3795
 
                      system_charset_info);
3796
 
      if (session->add_item_to_list(field))
3797
 
        return 1;
3798
 
    }
3799
 
  }
3800
 
  return 0;
3801
 
}
3802
 
 
3803
 
 
3804
 
int CharSetISMethods::oldFormat(Session *session, InfoSchemaTable *schema_table)
3805
 
  const
3806
 
{
3807
 
  int fields_arr[]= {0, 2, 1, 3, -1};
3808
 
  int *field_num= fields_arr;
3809
 
  const InfoSchemaTable::Columns columns= schema_table->getColumns();
3810
 
  const ColumnInfo *column;
3811
 
  Name_resolution_context *context= &session->lex->select_lex.context;
3812
 
 
3813
 
  for (; *field_num >= 0; field_num++)
3814
 
  {
3815
 
    column= columns[*field_num];
3816
 
    Item_field *field= new Item_field(context,
3817
 
                                      NULL, NULL, column->getName());
3818
 
    if (field)
3819
 
    {
3820
 
      field->set_name(column->getOldName(),
3821
 
                      strlen(column->getOldName()),
 
3685
                                      NULL, NULL, column->getName().c_str());
 
3686
    if (field)
 
3687
    {
 
3688
      field->set_name(column->getOldName().c_str(),
 
3689
                      column->getOldName().length(),
3822
3690
                      system_charset_info);
3823
3691
      if (session->add_item_to_list(field))
3824
3692
        return 1;
3893
3761
  */
3894
3762
  session->make_lex_string(&db, INFORMATION_SCHEMA_NAME.c_str(),
3895
3763
                       INFORMATION_SCHEMA_NAME.length(), 0);
3896
 
  session->make_lex_string(&table, schema_table->getTableName(),
3897
 
                           strlen(schema_table->getTableName()), 0);
 
3764
  session->make_lex_string(&table, schema_table->getTableName().c_str(),
 
3765
                           schema_table->getTableName().length(), 0);
3898
3766
  if (schema_table->oldFormat(session, schema_table) ||   /* Handle old syntax */
3899
3767
      !sel->add_table_to_list(session, new Table_ident(session, db, table, 0),
3900
3768
                              0, 0, TL_READ))
3998
3866
  ColumnInfo("CATALOG_NAME",
3999
3867
            FN_REFLEN,
4000
3868
            DRIZZLE_TYPE_VARCHAR,
4001
 
            0, 1, 0, SKIP_OPEN_TABLE),
 
3869
            0, 1, "", SKIP_OPEN_TABLE),
4002
3870
  ColumnInfo("SCHEMA_NAME",
4003
3871
            NAME_CHAR_LEN,
4004
3872
            DRIZZLE_TYPE_VARCHAR,
4005
3873
            0, 0, "Database", SKIP_OPEN_TABLE),
4006
3874
  ColumnInfo("DEFAULT_CHARACTER_SET_NAME", 
4007
 
            64, DRIZZLE_TYPE_VARCHAR, 0, 0, 0,
 
3875
            64, DRIZZLE_TYPE_VARCHAR, 0, 0, "",
4008
3876
            SKIP_OPEN_TABLE),
4009
3877
  ColumnInfo("DEFAULT_COLLATION_NAME",
4010
 
            64, DRIZZLE_TYPE_VARCHAR, 0, 0, 0,
 
3878
            64, DRIZZLE_TYPE_VARCHAR, 0, 0, "",
4011
3879
            SKIP_OPEN_TABLE),
4012
3880
  ColumnInfo("SQL_PATH",
4013
3881
            FN_REFLEN,
4014
3882
            DRIZZLE_TYPE_VARCHAR,
4015
 
            0, 1, 0, SKIP_OPEN_TABLE),
 
3883
            0, 1, "", SKIP_OPEN_TABLE),
4016
3884
  ColumnInfo()
4017
3885
};
4018
3886
 
4020
3888
ColumnInfo tables_fields_info[]=
4021
3889
{
4022
3890
  ColumnInfo("TABLE_CATALOG",  FN_REFLEN, DRIZZLE_TYPE_VARCHAR,
4023
 
            0, 1, 0, SKIP_OPEN_TABLE),
 
3891
            0, 1, "", SKIP_OPEN_TABLE),
4024
3892
  ColumnInfo("TABLE_SCHEMA", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR,
4025
 
            0, 0, 0, SKIP_OPEN_TABLE), 
 
3893
            0, 0, "", SKIP_OPEN_TABLE), 
4026
3894
  ColumnInfo("TABLE_NAME", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR,
4027
3895
            0, 0, "Name", SKIP_OPEN_TABLE),
4028
3896
  ColumnInfo("TABLE_TYPE", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR,
4029
 
            0, 0, 0, OPEN_FRM_ONLY),
 
3897
            0, 0, "", OPEN_FRM_ONLY),
4030
3898
  ColumnInfo("ENGINE", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR,
4031
3899
            0, 1, "Engine", OPEN_FRM_ONLY),
4032
3900
  ColumnInfo("VERSION", MY_INT64_NUM_DECIMAL_DIGITS, DRIZZLE_TYPE_LONGLONG, 0,
4062
3930
 
4063
3931
ColumnInfo columns_fields_info[]=
4064
3932
{
4065
 
  ColumnInfo("TABLE_CATALOG", FN_REFLEN, DRIZZLE_TYPE_VARCHAR, 0, 1, 0, OPEN_FRM_ONLY),
4066
 
  ColumnInfo("TABLE_SCHEMA", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0, 0, OPEN_FRM_ONLY),
4067
 
  ColumnInfo("TABLE_NAME", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0, 0, OPEN_FRM_ONLY),
 
3933
  ColumnInfo("TABLE_CATALOG", FN_REFLEN, DRIZZLE_TYPE_VARCHAR, 0, 1, "", OPEN_FRM_ONLY),
 
3934
  ColumnInfo("TABLE_SCHEMA", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0, "", OPEN_FRM_ONLY),
 
3935
  ColumnInfo("TABLE_NAME", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0, "", OPEN_FRM_ONLY),
4068
3936
  ColumnInfo("COLUMN_NAME", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0, "Field",
4069
3937
   OPEN_FRM_ONLY),
4070
3938
  ColumnInfo("ORDINAL_POSITION", MY_INT64_NUM_DECIMAL_DIGITS, DRIZZLE_TYPE_LONGLONG, 0,
4071
 
   MY_I_S_UNSIGNED, 0, OPEN_FRM_ONLY),
 
3939
   MY_I_S_UNSIGNED, "", OPEN_FRM_ONLY),
4072
3940
  ColumnInfo("COLUMN_DEFAULT", MAX_FIELD_VARCHARLENGTH, DRIZZLE_TYPE_VARCHAR, 0,
4073
3941
   1, "Default", OPEN_FRM_ONLY),
4074
3942
  ColumnInfo("IS_NULLABLE", 3, DRIZZLE_TYPE_VARCHAR, 0, 0, "Null", OPEN_FRM_ONLY),
4075
 
  ColumnInfo("DATA_TYPE", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0, 0, OPEN_FRM_ONLY),
 
3943
  ColumnInfo("DATA_TYPE", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0, "", OPEN_FRM_ONLY),
4076
3944
  ColumnInfo("CHARACTER_MAXIMUM_LENGTH", MY_INT64_NUM_DECIMAL_DIGITS, DRIZZLE_TYPE_LONGLONG,
4077
 
   0, (MY_I_S_MAYBE_NULL | MY_I_S_UNSIGNED), 0, OPEN_FRM_ONLY),
 
3945
   0, (MY_I_S_MAYBE_NULL | MY_I_S_UNSIGNED), "", OPEN_FRM_ONLY),
4078
3946
  ColumnInfo("CHARACTER_OCTET_LENGTH", MY_INT64_NUM_DECIMAL_DIGITS , DRIZZLE_TYPE_LONGLONG,
4079
 
   0, (MY_I_S_MAYBE_NULL | MY_I_S_UNSIGNED), 0, OPEN_FRM_ONLY),
 
3947
   0, (MY_I_S_MAYBE_NULL | MY_I_S_UNSIGNED), "", OPEN_FRM_ONLY),
4080
3948
  ColumnInfo("NUMERIC_PRECISION", MY_INT64_NUM_DECIMAL_DIGITS, DRIZZLE_TYPE_LONGLONG,
4081
 
   0, (MY_I_S_MAYBE_NULL | MY_I_S_UNSIGNED), 0, OPEN_FRM_ONLY),
 
3949
   0, (MY_I_S_MAYBE_NULL | MY_I_S_UNSIGNED), "", OPEN_FRM_ONLY),
4082
3950
  ColumnInfo("NUMERIC_SCALE", MY_INT64_NUM_DECIMAL_DIGITS , DRIZZLE_TYPE_LONGLONG,
4083
 
   0, (MY_I_S_MAYBE_NULL | MY_I_S_UNSIGNED), 0, OPEN_FRM_ONLY),
4084
 
  ColumnInfo("CHARACTER_SET_NAME", 64, DRIZZLE_TYPE_VARCHAR, 0, 1, 0, OPEN_FRM_ONLY),
 
3951
   0, (MY_I_S_MAYBE_NULL | MY_I_S_UNSIGNED), "", OPEN_FRM_ONLY),
 
3952
  ColumnInfo("CHARACTER_SET_NAME", 64, DRIZZLE_TYPE_VARCHAR, 0, 1, "", OPEN_FRM_ONLY),
4085
3953
  ColumnInfo("COLLATION_NAME", 64, DRIZZLE_TYPE_VARCHAR, 0, 1, "Collation", OPEN_FRM_ONLY),
4086
3954
  ColumnInfo("COLUMN_TYPE", 65535, DRIZZLE_TYPE_VARCHAR, 0, 0, "Type", OPEN_FRM_ONLY),
4087
3955
  ColumnInfo("COLUMN_KEY", 3, DRIZZLE_TYPE_VARCHAR, 0, 0, "Key", OPEN_FRM_ONLY),
4094
3962
};
4095
3963
 
4096
3964
 
4097
 
ColumnInfo charsets_fields_info[]=
4098
 
{
4099
 
  ColumnInfo("CHARACTER_SET_NAME", 64, DRIZZLE_TYPE_VARCHAR, 0, 0, "Charset",
4100
 
   SKIP_OPEN_TABLE),
4101
 
  ColumnInfo("DEFAULT_COLLATE_NAME", 64, DRIZZLE_TYPE_VARCHAR, 0, 0, "Default collation",
4102
 
   SKIP_OPEN_TABLE),
4103
 
  ColumnInfo("DESCRIPTION", 60, DRIZZLE_TYPE_VARCHAR, 0, 0, "Description",
4104
 
   SKIP_OPEN_TABLE),
4105
 
  ColumnInfo("MAXLEN", 3, DRIZZLE_TYPE_LONGLONG, 0, 0, "Maxlen", SKIP_OPEN_TABLE),
4106
 
  ColumnInfo()
4107
 
};
4108
 
 
4109
 
 
4110
3965
ColumnInfo collation_fields_info[]=
4111
3966
{
4112
3967
  ColumnInfo("COLLATION_NAME", 64, DRIZZLE_TYPE_VARCHAR, 0, 0, "Collation", SKIP_OPEN_TABLE),
4124
3979
 
4125
3980
ColumnInfo coll_charset_app_fields_info[]=
4126
3981
{
4127
 
  ColumnInfo("COLLATION_NAME", 64, DRIZZLE_TYPE_VARCHAR, 0, 0, 0, SKIP_OPEN_TABLE),
4128
 
  ColumnInfo("CHARACTER_SET_NAME", 64, DRIZZLE_TYPE_VARCHAR, 0, 0, 0, SKIP_OPEN_TABLE),
 
3982
  ColumnInfo("COLLATION_NAME", 64, DRIZZLE_TYPE_VARCHAR, 0, 0, "", SKIP_OPEN_TABLE),
 
3983
  ColumnInfo("CHARACTER_SET_NAME", 64, DRIZZLE_TYPE_VARCHAR, 0, 0, "", SKIP_OPEN_TABLE),
4129
3984
  ColumnInfo()
4130
3985
};
4131
3986
 
4132
3987
 
4133
3988
ColumnInfo stat_fields_info[]=
4134
3989
{
4135
 
  ColumnInfo("TABLE_CATALOG", FN_REFLEN, DRIZZLE_TYPE_VARCHAR, 0, 1, 0, OPEN_FRM_ONLY),
4136
 
  ColumnInfo("TABLE_SCHEMA", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0, 0, OPEN_FRM_ONLY),
 
3990
  ColumnInfo("TABLE_CATALOG", FN_REFLEN, DRIZZLE_TYPE_VARCHAR, 0, 1, "", OPEN_FRM_ONLY),
 
3991
  ColumnInfo("TABLE_SCHEMA", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0, "", OPEN_FRM_ONLY),
4137
3992
  ColumnInfo("TABLE_NAME", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0, "Table", OPEN_FRM_ONLY),
4138
3993
  ColumnInfo("NON_UNIQUE", 1, DRIZZLE_TYPE_LONGLONG, 0, 0, "Non_unique", OPEN_FRM_ONLY),
4139
 
  ColumnInfo("INDEX_SCHEMA", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0, 0, OPEN_FRM_ONLY),
 
3994
  ColumnInfo("INDEX_SCHEMA", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0, "", OPEN_FRM_ONLY),
4140
3995
  ColumnInfo("INDEX_NAME", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0, "Key_name",
4141
3996
   OPEN_FRM_ONLY),
4142
3997
  ColumnInfo("SEQ_IN_INDEX", 2, DRIZZLE_TYPE_LONGLONG, 0, 0, "Seq_in_index", OPEN_FRM_ONLY),
4157
4012
 
4158
4013
ColumnInfo table_constraints_fields_info[]=
4159
4014
{
4160
 
  ColumnInfo("CONSTRAINT_CATALOG", FN_REFLEN, DRIZZLE_TYPE_VARCHAR, 0, 1, 0, OPEN_FULL_TABLE),
4161
 
  ColumnInfo("CONSTRAINT_SCHEMA", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0, 0,
4162
 
   OPEN_FULL_TABLE),
4163
 
  ColumnInfo("CONSTRAINT_NAME", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0, 0,
4164
 
   OPEN_FULL_TABLE),
4165
 
  ColumnInfo("TABLE_SCHEMA", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0, 0, OPEN_FULL_TABLE),
4166
 
  ColumnInfo("TABLE_NAME", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0, 0, OPEN_FULL_TABLE),
4167
 
  ColumnInfo("CONSTRAINT_TYPE", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0, 0,
4168
 
   OPEN_FULL_TABLE),
 
4015
  ColumnInfo("CONSTRAINT_CATALOG", FN_REFLEN, DRIZZLE_TYPE_VARCHAR, 0, 1, "", OPEN_FULL_TABLE),
 
4016
  ColumnInfo("CONSTRAINT_SCHEMA", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0,
 
4017
   "", OPEN_FULL_TABLE),
 
4018
  ColumnInfo("CONSTRAINT_NAME", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0,
 
4019
   "", OPEN_FULL_TABLE),
 
4020
  ColumnInfo("TABLE_SCHEMA", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0, "", OPEN_FULL_TABLE),
 
4021
  ColumnInfo("TABLE_NAME", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0, "", OPEN_FULL_TABLE),
 
4022
  ColumnInfo("CONSTRAINT_TYPE", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0, 
 
4023
   "", OPEN_FULL_TABLE),
4169
4024
  ColumnInfo()
4170
4025
};
4171
4026
 
4172
4027
 
4173
4028
ColumnInfo key_column_usage_fields_info[]=
4174
4029
{
4175
 
  ColumnInfo("CONSTRAINT_CATALOG", FN_REFLEN, DRIZZLE_TYPE_VARCHAR, 0, 1, 0, OPEN_FULL_TABLE),
4176
 
  ColumnInfo("CONSTRAINT_SCHEMA", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0, 0,
4177
 
   OPEN_FULL_TABLE),
4178
 
  ColumnInfo("CONSTRAINT_NAME", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0, 0,
4179
 
   OPEN_FULL_TABLE),
4180
 
  ColumnInfo("TABLE_CATALOG", FN_REFLEN, DRIZZLE_TYPE_VARCHAR, 0, 1, 0, OPEN_FULL_TABLE),
4181
 
  ColumnInfo("TABLE_SCHEMA", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0, 0, OPEN_FULL_TABLE),
4182
 
  ColumnInfo("TABLE_NAME", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0, 0,
4183
 
  OPEN_FULL_TABLE),
4184
 
  ColumnInfo("COLUMN_NAME", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0, 0, OPEN_FULL_TABLE),
4185
 
  ColumnInfo("ORDINAL_POSITION", 10 ,DRIZZLE_TYPE_LONGLONG, 0, 0, 0, OPEN_FULL_TABLE),
4186
 
  ColumnInfo("POSITION_IN_UNIQUE_CONSTRAINT", 10 ,DRIZZLE_TYPE_LONGLONG, 0, 1, 0,
4187
 
   OPEN_FULL_TABLE),
4188
 
  ColumnInfo("REFERENCED_TABLE_SCHEMA", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 1, 0,
4189
 
   OPEN_FULL_TABLE),
4190
 
  ColumnInfo("REFERENCED_TABLE_NAME", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 1, 0,
4191
 
   OPEN_FULL_TABLE),
4192
 
  ColumnInfo("REFERENCED_COLUMN_NAME", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 1, 0,
4193
 
   OPEN_FULL_TABLE),
 
4030
  ColumnInfo("CONSTRAINT_CATALOG", FN_REFLEN, DRIZZLE_TYPE_VARCHAR, 0, 1, "", OPEN_FULL_TABLE),
 
4031
  ColumnInfo("CONSTRAINT_SCHEMA", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0,
 
4032
   "", OPEN_FULL_TABLE),
 
4033
  ColumnInfo("CONSTRAINT_NAME", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0,
 
4034
   "", OPEN_FULL_TABLE),
 
4035
  ColumnInfo("TABLE_CATALOG", FN_REFLEN, DRIZZLE_TYPE_VARCHAR, 0, 1, "", OPEN_FULL_TABLE),
 
4036
  ColumnInfo("TABLE_SCHEMA", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0, "", OPEN_FULL_TABLE),
 
4037
  ColumnInfo("TABLE_NAME", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0,
 
4038
  "", OPEN_FULL_TABLE),
 
4039
  ColumnInfo("COLUMN_NAME", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0, "", OPEN_FULL_TABLE),
 
4040
  ColumnInfo("ORDINAL_POSITION", 10 ,DRIZZLE_TYPE_LONGLONG, 0, 0, "", OPEN_FULL_TABLE),
 
4041
  ColumnInfo("POSITION_IN_UNIQUE_CONSTRAINT", 10 ,DRIZZLE_TYPE_LONGLONG, 0, 1,
 
4042
   "", OPEN_FULL_TABLE),
 
4043
  ColumnInfo("REFERENCED_TABLE_SCHEMA", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 1,
 
4044
   "", OPEN_FULL_TABLE),
 
4045
  ColumnInfo("REFERENCED_TABLE_NAME", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 1,
 
4046
   "", OPEN_FULL_TABLE),
 
4047
  ColumnInfo("REFERENCED_COLUMN_NAME", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 1,
 
4048
   "", OPEN_FULL_TABLE),
4194
4049
  ColumnInfo()
4195
4050
};
4196
4051
 
4197
4052
 
4198
4053
ColumnInfo table_names_fields_info[]=
4199
4054
{
4200
 
  ColumnInfo("TABLE_CATALOG", FN_REFLEN, DRIZZLE_TYPE_VARCHAR, 0, 1, 0, SKIP_OPEN_TABLE),
4201
 
  ColumnInfo("TABLE_SCHEMA",NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0, 0, SKIP_OPEN_TABLE),
 
4055
  ColumnInfo("TABLE_CATALOG", FN_REFLEN, DRIZZLE_TYPE_VARCHAR, 0, 1, "", SKIP_OPEN_TABLE),
 
4056
  ColumnInfo("TABLE_SCHEMA",NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0, "", SKIP_OPEN_TABLE),
4202
4057
  ColumnInfo("TABLE_NAME", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0, "Tables_in_",
4203
4058
   SKIP_OPEN_TABLE),
4204
4059
  ColumnInfo("TABLE_TYPE", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0, "Table_type",
4231
4086
{
4232
4087
  ColumnInfo("PLUGIN_NAME", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0, "Name",
4233
4088
   SKIP_OPEN_TABLE),
4234
 
  ColumnInfo("PLUGIN_VERSION", 20, DRIZZLE_TYPE_VARCHAR, 0, 0, 0, SKIP_OPEN_TABLE),
 
4089
  ColumnInfo("PLUGIN_VERSION", 20, DRIZZLE_TYPE_VARCHAR, 0, 0, "", SKIP_OPEN_TABLE),
4235
4090
  ColumnInfo("PLUGIN_STATUS", 10, DRIZZLE_TYPE_VARCHAR, 0, 0, "Status", SKIP_OPEN_TABLE),
4236
 
  ColumnInfo("PLUGIN_AUTHOR", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 1, 0, SKIP_OPEN_TABLE),
4237
 
  ColumnInfo("PLUGIN_DESCRIPTION", 65535, DRIZZLE_TYPE_VARCHAR, 0, 1, 0, SKIP_OPEN_TABLE),
 
4091
  ColumnInfo("PLUGIN_AUTHOR", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 1, "", SKIP_OPEN_TABLE),
 
4092
  ColumnInfo("PLUGIN_DESCRIPTION", 65535, DRIZZLE_TYPE_VARCHAR, 0, 1, "", SKIP_OPEN_TABLE),
4238
4093
  ColumnInfo("PLUGIN_LICENSE", 80, DRIZZLE_TYPE_VARCHAR, 0, 1, "License", SKIP_OPEN_TABLE),
4239
4094
  ColumnInfo()
4240
4095
};
4241
4096
 
4242
4097
ColumnInfo referential_constraints_fields_info[]=
4243
4098
{
4244
 
  ColumnInfo("CONSTRAINT_CATALOG", FN_REFLEN, DRIZZLE_TYPE_VARCHAR, 0, 1, 0, OPEN_FULL_TABLE),
4245
 
  ColumnInfo("CONSTRAINT_SCHEMA", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0, 0,
4246
 
   OPEN_FULL_TABLE),
4247
 
  ColumnInfo("CONSTRAINT_NAME", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0, 0,
4248
 
   OPEN_FULL_TABLE),
4249
 
  ColumnInfo("UNIQUE_CONSTRAINT_CATALOG", FN_REFLEN, DRIZZLE_TYPE_VARCHAR, 0, 1, 0,
4250
 
   OPEN_FULL_TABLE),
4251
 
  ColumnInfo("UNIQUE_CONSTRAINT_SCHEMA", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0, 0,
4252
 
   OPEN_FULL_TABLE),
 
4099
  ColumnInfo("CONSTRAINT_CATALOG", FN_REFLEN, DRIZZLE_TYPE_VARCHAR, 0, 1, "", OPEN_FULL_TABLE),
 
4100
  ColumnInfo("CONSTRAINT_SCHEMA", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0,
 
4101
   "", OPEN_FULL_TABLE),
 
4102
  ColumnInfo("CONSTRAINT_NAME", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0,
 
4103
   "", OPEN_FULL_TABLE),
 
4104
  ColumnInfo("UNIQUE_CONSTRAINT_CATALOG", FN_REFLEN, DRIZZLE_TYPE_VARCHAR, 0, 1,
 
4105
   "", OPEN_FULL_TABLE),
 
4106
  ColumnInfo("UNIQUE_CONSTRAINT_SCHEMA", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0,
 
4107
   "", OPEN_FULL_TABLE),
4253
4108
  ColumnInfo("UNIQUE_CONSTRAINT_NAME", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0,
4254
 
   MY_I_S_MAYBE_NULL, 0, OPEN_FULL_TABLE),
4255
 
  ColumnInfo("MATCH_OPTION", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0, 0, OPEN_FULL_TABLE),
4256
 
  ColumnInfo("UPDATE_RULE", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0, 0, OPEN_FULL_TABLE),
4257
 
  ColumnInfo("DELETE_RULE", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0, 0, OPEN_FULL_TABLE),
4258
 
  ColumnInfo("TABLE_NAME", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0, 0, OPEN_FULL_TABLE),
4259
 
  ColumnInfo("REFERENCED_TABLE_NAME", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0, 0,
4260
 
   OPEN_FULL_TABLE),
 
4109
   MY_I_S_MAYBE_NULL, "", OPEN_FULL_TABLE),
 
4110
  ColumnInfo("MATCH_OPTION", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0, "", OPEN_FULL_TABLE),
 
4111
  ColumnInfo("UPDATE_RULE", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0, "", OPEN_FULL_TABLE),
 
4112
  ColumnInfo("DELETE_RULE", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0, "", OPEN_FULL_TABLE),
 
4113
  ColumnInfo("TABLE_NAME", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0, "", OPEN_FULL_TABLE),
 
4114
  ColumnInfo("REFERENCED_TABLE_NAME", NAME_CHAR_LEN, DRIZZLE_TYPE_VARCHAR, 0, 0,
 
4115
   "", OPEN_FULL_TABLE),
4261
4116
  ColumnInfo()
4262
4117
};
4263
4118
 
4264
 
static CharSetISMethods char_set_methods;
4265
 
static CollationISMethods collations_methods;
4266
 
static CollCharISMethods coll_char_methods;
4267
4119
static ColumnsISMethods columns_methods;
4268
4120
static StatusISMethods status_methods;
4269
4121
static VariablesISMethods variables_methods;
4277
4129
static TabConstraintsISMethods tab_constraints_methods;
4278
4130
static TabNamesISMethods tab_names_methods;
4279
4131
 
4280
 
static InfoSchemaTable char_set_table("CHARACTER_SETS",
4281
 
                                      charsets_fields_info,
4282
 
                                      -1, -1, false, false, 0,
4283
 
                                      &char_set_methods);
4284
 
static InfoSchemaTable collations_table("COLLATIONS",
4285
 
                                        collation_fields_info,
4286
 
                                        -1, -1, false, false, 0,
4287
 
                                        &collations_methods);
4288
 
static InfoSchemaTable
4289
 
  coll_char_set_table("COLLATION_CHARACTER_SET_APPLICABILITY",
4290
 
                      coll_charset_app_fields_info,
4291
 
                      -1, -1, false, false, 0,
4292
 
                      &coll_char_methods);
4293
4132
static InfoSchemaTable columns_table("COLUMNS",
4294
4133
                                     columns_fields_info,
4295
4134
                                     1, 2, false, true, OPTIMIZE_I_S_TABLE,
4363
4202
 
4364
4203
InfoSchemaTable schema_tables[]=
4365
4204
{
4366
 
  char_set_table,
4367
 
  collations_table,
4368
 
  coll_char_set_table,
4369
4205
  columns_table,
4370
4206
  global_stat_table,
4371
4207
  global_var_table,