~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/charset.cc

  • Committer: Brian Aker
  • Date: 2011-01-18 00:26:36 UTC
  • mfrom: (2085.2.3 alter-table)
  • Revision ID: brian@tangent.org-20110118002636-mfyvnv58auvqr5gc
First pass on fix for UTF-8, this checks all of our schema names.

Show diffs side-by-side

added added

removed removed

Lines of Context:
56
56
       cs < all_charsets+array_elements(all_charsets)-1 ;
57
57
       cs++)
58
58
  {
59
 
    if ( cs[0] && cs[0]->name &&
60
 
         !my_strcasecmp(&my_charset_utf8_general_ci, cs[0]->name, name))
 
59
    if ( cs[0] && cs[0]->name && !my_strcasecmp(&my_charset_utf8_general_ci, cs[0]->name, name))
 
60
    {
61
61
      return cs[0]->number;
 
62
    }
62
63
  }
63
64
  return 0;
64
65
}
213
214
       cs < all_charsets+array_elements(all_charsets)-1 ;
214
215
       cs++)
215
216
  {
216
 
    if ( cs[0] && cs[0]->csname && (cs[0]->state & cs_flags) &&
217
 
         !my_strcasecmp(&my_charset_utf8_general_ci, cs[0]->csname, charset_name))
 
217
    if ( cs[0] && cs[0]->csname && (cs[0]->state & cs_flags) && !my_strcasecmp(&my_charset_utf8_general_ci, cs[0]->csname, charset_name))
218
218
      return cs[0]->number;
219
219
  }
220
220
  return 0;