1 #ifndef PROCEDURE_INCLUDED 
    2 #define PROCEDURE_INCLUDED 
   27 #include "sql_class.h"                           
   37      this->item_name.
set(name_par);
 
   39   enum Type type()
 const { 
return Item::PROC_ITEM; }
 
   40   virtual void set(
const char *str,uint length, 
const CHARSET_INFO *cs)=0;
 
   41   virtual void set(longlong nr)=0;
 
   42   virtual enum_field_types field_type() 
const=0;
 
   43   void set(
const char *str) { 
set(str,(uint) strlen(str), default_charset()); }
 
   44   unsigned int size_of() { 
return sizeof(*this);}  
 
   54   enum Item_result result_type ()
 const { 
return INT_RESULT; }
 
   55   enum_field_types field_type()
 const { 
return MYSQL_TYPE_LONGLONG; }
 
   56   void set(longlong nr) { value=nr; }
 
   57   void set(
const char *str,uint length, 
const CHARSET_INFO *cs)
 
   58   { 
int err; value=my_strntoll(cs,str,length,10,NULL,&err); }
 
   59   double val_real() { 
return (
double) value; }
 
   60   longlong val_int() { 
return value; }
 
   61   String *val_str(
String *s) { s->set(value, default_charset()); 
return s; }
 
   63   bool get_date(
MYSQL_TIME *ltime, uint fuzzydate)
 
   71   unsigned int size_of() { 
return sizeof(*this);}
 
   79     { this->max_length=length; }
 
   80   enum Item_result result_type ()
 const { 
return STRING_RESULT; }
 
   81   enum_field_types field_type()
 const { 
return MYSQL_TYPE_VARCHAR; }
 
   82   void set(longlong nr) { str_value.set(nr, default_charset()); }
 
   83   void set(
const char *str, uint length, 
const CHARSET_INFO *cs)
 
   84   { str_value.copy(str,length,cs); }
 
   90     return my_strntod(cs, (
char*) str_value.ptr(), str_value.length(),
 
   91                       &end_not_used, &err_not_used);
 
   97     return my_strntoll(cs,str_value.ptr(),str_value.length(),10,NULL,&err);
 
   99   bool get_date(
MYSQL_TIME *ltime, uint fuzzydate)
 
  112   unsigned int size_of() { 
return sizeof(*this);}