~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/foreign_key.cc

  • Committer: Olaf van der Spek
  • Date: 2011-10-06 18:18:31 UTC
  • mto: This revision was merged to the branch mainline in revision 2433.
  • Revision ID: olafvdspek@gmail.com-20111006181831-1ix5b80ry7iifbjf
Use lex_string assign(), data() and size()

Show diffs side-by-side

added added

removed removed

Lines of Context:
27
27
#include <drizzled/internal/my_sys.h>
28
28
#include <drizzled/table_ident.h>
29
29
 
30
 
namespace drizzled
31
 
{
 
30
namespace drizzled {
32
31
 
33
32
extern const charset_info_st *system_charset_info;
34
33
 
61
60
  pfkey->set_update_option(update_opt_arg);
62
61
  pfkey->set_delete_option(delete_opt_arg);
63
62
 
64
 
  pfkey->set_references_table_name(table->table.str);
 
63
  pfkey->set_references_table_name(table->table.data());
65
64
 
66
65
  Key_part_spec *keypart;
67
66
  List<Key_part_spec>::iterator col_it(cols.begin());
68
67
  while ((keypart= col_it++))
69
68
  {
70
 
    pfkey->add_column_names(keypart->field_name.str);
 
69
    pfkey->add_column_names(keypart->field_name.data());
71
70
  }
72
71
 
73
72
  List<Key_part_spec>::iterator ref_it(ref_cols.begin());
74
73
  while ((keypart= ref_it++))
75
74
  {
76
 
    pfkey->add_references_columns(keypart->field_name.str);
 
75
    pfkey->add_references_columns(keypart->field_name.data());
77
76
  }
78
77
 
79
78
}
197
196
    it= table_fields.begin();
198
197
    while ((sql_field= it++) &&
199
198
           my_strcasecmp(system_charset_info,
200
 
                         column->field_name.str,
 
199
                         column->field_name.data(),
201
200
                         sql_field->field_name)) {}
202
201
    if (!sql_field)
203
202
    {
204
 
      my_error(ER_KEY_COLUMN_DOES_NOT_EXITS, MYF(0), column->field_name.str);
 
203
      my_error(ER_KEY_COLUMN_DOES_NOT_EXITS, MYF(0), column->field_name.data());
205
204
      return true;
206
205
    }
207
206
  }