~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/handler/ha_innodb.cc

  • Committer: Brian Aker
  • Date: 2011-11-04 21:06:16 UTC
  • mto: This revision was merged to the branch mainline in revision 2450.
  • Revision ID: brian@tangent.org-20111104210616-2at42agch94dkwb0
Additional fixes for libdrizzle.

Show diffs side-by-side

added added

removed removed

Lines of Context:
603
603
 
604
604
    const char *ext= strchr(filename->c_str(), '.');
605
605
 
606
 
    if (ext == NULL || system_charset_info->strcasecmp(ext, DEFAULT_FILE_EXTENSION) ||
 
606
    if (ext == NULL || my_strcasecmp(system_charset_info, ext, DEFAULT_FILE_EXTENSION) ||
607
607
        (filename->compare(0, strlen(TMP_FILE_PREFIX), TMP_FILE_PREFIX) == 0))
608
608
    { }
609
609
    else
1324
1324
  const char* a,  /*!< in: first string to compare */
1325
1325
  const char* b)  /*!< in: second string to compare */
1326
1326
{
1327
 
  return(system_charset_info->strcasecmp(a, b));
 
1327
  return(my_strcasecmp(system_charset_info, a, b));
1328
1328
}
1329
1329
 
1330
1330
/******************************************************************//**
1335
1335
/*================*/
1336
1336
  char* a)  /*!< in/out: string to put in lower case */
1337
1337
{
1338
 
  system_charset_info->casedn_str(a);
 
1338
  my_casedn_str(system_charset_info, a);
1339
1339
}
1340
1340
 
1341
1341
UNIV_INTERN
7846
7846
  mutex_enter(&(dict_sys->mutex));
7847
7847
  dict_foreign_t* foreign = UT_LIST_GET_FIRST(prebuilt->table->foreign_list);
7848
7848
 
7849
 
  while (foreign != NULL) 
7850
 
  {
 
7849
  while (foreign != NULL) {
 
7850
 
7851
7851
    uint ulen;
7852
7852
    char uname[NAME_LEN + 1];           /* Unencoded name */
7853
7853
    char db_name[NAME_LEN + 1];
7890
7890
        break;
7891
7891
    }
7892
7892
 
 
7893
    ulong length;
7893
7894
    if (foreign->type & DICT_FOREIGN_ON_DELETE_CASCADE)
 
7895
    {
 
7896
      length=7;
7894
7897
      tmp_buff= "CASCADE";
 
7898
    }
7895
7899
    else if (foreign->type & DICT_FOREIGN_ON_DELETE_SET_NULL)
 
7900
    {
 
7901
      length=8;
7896
7902
      tmp_buff= "SET NULL";
 
7903
    }
7897
7904
    else if (foreign->type & DICT_FOREIGN_ON_DELETE_NO_ACTION)
 
7905
    {
 
7906
      length=9;
7898
7907
      tmp_buff= "NO ACTION";
 
7908
    }
7899
7909
    else
 
7910
    {
 
7911
      length=8;
7900
7912
      tmp_buff= "RESTRICT";
7901
 
    lex_string_t *tmp_delete_method = session->make_lex_string(NULL, str_ref(tmp_buff));
 
7913
    }
 
7914
    lex_string_t *tmp_delete_method = session->make_lex_string(NULL, str_ref(tmp_buff, length));
 
7915
 
7902
7916
 
7903
7917
    if (foreign->type & DICT_FOREIGN_ON_UPDATE_CASCADE)
 
7918
    {
 
7919
      length=7;
7904
7920
      tmp_buff= "CASCADE";
 
7921
    }
7905
7922
    else if (foreign->type & DICT_FOREIGN_ON_UPDATE_SET_NULL)
 
7923
    {
 
7924
      length=8;
7906
7925
      tmp_buff= "SET NULL";
 
7926
    }
7907
7927
    else if (foreign->type & DICT_FOREIGN_ON_UPDATE_NO_ACTION)
 
7928
    {
 
7929
      length=9;
7908
7930
      tmp_buff= "NO ACTION";
 
7931
    }
7909
7932
    else
 
7933
    {
 
7934
      length=8;
7910
7935
      tmp_buff= "RESTRICT";
7911
 
    lex_string_t *tmp_update_method = session->make_lex_string(NULL, str_ref(tmp_buff));
7912
 
 
7913
 
    lex_string_t *tmp_referenced_key_name = foreign->referenced_index && foreign->referenced_index->name
7914
 
      ? session->make_lex_string(NULL, str_ref(foreign->referenced_index->name))
7915
 
      : NULL;
 
7936
    }
 
7937
    lex_string_t *tmp_update_method = session->make_lex_string(NULL, str_ref(tmp_buff, length));
 
7938
 
 
7939
    lex_string_t *tmp_referenced_key_name = NULL;
 
7940
 
 
7941
    if (foreign->referenced_index && foreign->referenced_index->name)
 
7942
    {
 
7943
      tmp_referenced_key_name = session->make_lex_string(NULL, str_ref(foreign->referenced_index->name));
 
7944
    }
7916
7945
 
7917
7946
    ForeignKeyInfo f_key_info(
7918
 
      tmp_foreign_id, tmp_referenced_db, tmp_referenced_table,
7919
 
      tmp_update_method, tmp_delete_method, tmp_referenced_key_name,
7920
 
      tmp_foreign_fields, tmp_referenced_fields);
 
7947
                              tmp_foreign_id, tmp_referenced_db, tmp_referenced_table,
 
7948
                              tmp_update_method, tmp_delete_method, tmp_referenced_key_name,
 
7949
                              tmp_foreign_fields, tmp_referenced_fields);
7921
7950
 
7922
7951
    f_key_list->push_back((ForeignKeyInfo*)session->mem.memdup(&f_key_info, sizeof(ForeignKeyInfo)));
7923
7952
    foreign = UT_LIST_GET_NEXT(foreign_list, foreign);
7925
7954
  mutex_exit(&(dict_sys->mutex));
7926
7955
  prebuilt->trx->op_info = "";
7927
7956
 
7928
 
  return 0;
 
7957
  return(0);
7929
7958
}
7930
7959
 
7931
7960
/*****************************************************************//**