#include <item_strfunc.h>
Inheritance diagram for Item_func_right:


Public Member Functions | |
| Item_func_right (Item *a, Item *b) | |
| String * | val_str (String *) |
| void | fix_length_and_dec () |
| const char * | func_name () const |
Private Attributes | |
| String | tmp_value |
Definition at line 196 of file item_strfunc.h.
| void Item_func_right::fix_length_and_dec | ( | ) | [virtual] |
Implements Item_result_field.
Definition at line 1100 of file item_strfunc.cc.
References Item_func::args, Item::collation, Item_str_func::left_right_max_length(), and DTCollation::set().
01101 { 01102 collation.set(args[0]->collation); 01103 left_right_max_length(); 01104 }
Here is the call graph for this function:

| const char* Item_func_right::func_name | ( | ) | const [inline, virtual] |
Implements Item.
Definition at line 1078 of file item_strfunc.cc.
References Item_func::args, String::charpos(), DBUG_ASSERT, Item::fixed, String::length(), my_empty_string(), Item::null_value, String::numchars(), String::set(), start(), tmp_value, Item_str_func::val_int(), and Item::val_str().
01079 { 01080 DBUG_ASSERT(fixed == 1); 01081 String *res =args[0]->val_str(str); 01082 long length =(long) args[1]->val_int(); 01083 01084 if ((null_value=(args[0]->null_value || args[1]->null_value))) 01085 return 0; /* purecov: inspected */ 01086 if (length <= 0) 01087 return &my_empty_string; /* purecov: inspected */ 01088 if (res->length() <= (uint) length) 01089 return res; /* purecov: inspected */ 01090 01091 uint start=res->numchars(); 01092 if (start <= (uint) length) 01093 return res; 01094 start=res->charpos(start - (uint) length); 01095 tmp_value.set(*res,start,res->length()-start); 01096 return &tmp_value; 01097 }
Here is the call graph for this function:

String Item_func_right::tmp_value [private] |
1.4.7

