~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/pbms/src/discover_ms.cc

  • Committer: Mark Atwood
  • Date: 2011-11-11 18:23:18 UTC
  • mfrom: (2456.1.5 rf)
  • Revision ID: me@mark.atwood.name-20111111182318-skgcp9ce65fd2goa
mergeĀ lp:~olafvdspek/drizzle/refactor11

Show diffs side-by-side

added added

removed removed

Lines of Context:
122
122
check_if_keyname_exists(const char *name, KEY *start, KEY *end)
123
123
{
124
124
  for (KEY *key=start ; key != end ; key++)
125
 
    if (!my_strcasecmp(system_charset_info,name,key->name))
 
125
    if (!system_charset_info->strcasecmp(name,key->name))
126
126
      return 1;
127
127
  return 0;
128
128
}
438
438
    /* Check if we have used the same field name before */
439
439
    for (dup_no=0; (dup_field=it2++) != sql_field; dup_no++)
440
440
    {
441
 
      if (my_strcasecmp(system_charset_info,
442
 
                        sql_field->field_name,
443
 
                        dup_field->field_name) == 0)
 
441
      if (system_charset_info->strcasecmp(sql_field->field_name, dup_field->field_name) == 0)
444
442
      {
445
443
        /*
446
444
          If this was a CREATE ... SELECT statement, accept a field
617
615
    else
618
616
      (*key_count)--;
619
617
    if (key->DOT_STR(name) && !tmp_table && (key->type != Key::PRIMARY) &&
620
 
        !my_strcasecmp(system_charset_info,key->DOT_STR(name),primary_key_name))
 
618
        !system_charset_info->strcasecmp(key->DOT_STR(name),primary_key_name))
621
619
    {
622
620
      my_error(ER_WRONG_NAME_FOR_INDEX, MYF(0), key->DOT_STR(name));
623
621
      DBUG_RETURN(TRUE);
759
757
 
760
758
      it= alter_info->create_list;
761
759
      field=0;
762
 
      while ((sql_field=it++) &&
763
 
             my_strcasecmp(system_charset_info,
764
 
                           column->DOT_STR(field_name),
765
 
                           sql_field->field_name))
766
 
        field++;
 
760
      while ((sql_field=it++) && system_charset_info->strcasecmp(column->DOT_STR(field_name), sql_field->field_name))
 
761
       field++;
767
762
      if (!sql_field)
768
763
      {
769
764
        my_error(ER_KEY_COLUMN_DOES_NOT_EXITS, MYF(0), column->field_name);
771
766
      }
772
767
      while ((dup_column= cols2++) != column)
773
768
      {
774
 
        if (!my_strcasecmp(system_charset_info,
775
 
                           column->DOT_STR(field_name), dup_column->DOT_STR(field_name)))
 
769
        if (!system_charset_info->strcasecmp(column->DOT_STR(field_name), dup_column->DOT_STR(field_name)))
776
770
        {
777
771
          my_printf_error(ER_DUP_FIELDNAME,
778
772
                          ER(ER_DUP_FIELDNAME),MYF(0),