~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/table_ident.h

  • 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:
42
42
  explicit Table_ident(lex_string_t table_arg)
43
43
    : table(table_arg), sel(NULL)
44
44
  {
45
 
    db.str= 0;
 
45
    db.assign(static_cast<const char*>(NULL), 0);
46
46
  }
47
47
 
48
48
  /*
54
54
  explicit Table_ident(Select_Lex_Unit *s) : sel(s)
55
55
  {
56
56
    /* We must have a table name here as this is used with add_table_to_list */
57
 
    db.str= const_cast<char*>("");                    /* a subject to casedn_str */
58
 
    db.length= 0;
59
 
    table.str= const_cast<char*>("*");
60
 
    table.length= 1;
 
57
    db.assign("", 0); // a subject to casedn_str
 
58
    table.assign("*", 1);
61
59
  }
62
60
  bool is_derived_table() const { return test(sel); }
63
61
};