~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/function/get_system_var.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:
63
63
  sys_var *var;
64
64
  lex_string_t *base_name, *component_name;
65
65
 
66
 
  if (component.str)
 
66
  if (component.data())
67
67
  {
68
68
    base_name= &component;
69
69
    component_name= &name;
74
74
    component_name= &component;                 // Empty string
75
75
  }
76
76
 
77
 
  if (!(var= find_sys_var(base_name->str)))
 
77
  if (!(var= find_sys_var(base_name->data())))
78
78
    return 0;
79
 
  if (component.str)
 
79
  if (component.data())
80
80
  {
81
 
    my_error(ER_VARIABLE_IS_NOT_STRUCT, MYF(0), base_name->str);
 
81
    my_error(ER_VARIABLE_IS_NOT_STRUCT, MYF(0), base_name->data());
82
82
    return 0;
83
83
  }
84
84
  session->lex().setCacheable(false);
85
85
 
86
86
  set_if_smaller(component_name->length, (size_t)MAX_SYS_VAR_LENGTH);
87
87
 
88
 
  return new Item_func_get_system_var(var, var_type, component_name,
89
 
                                      NULL, 0);
 
88
  return new Item_func_get_system_var(var, var_type, component_name, NULL, 0);
90
89
}
91
90
 
92
91