~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to drizzled/item/ident.cc

Merge Monty

Show diffs side-by-side

added added

removed removed

Lines of Context:
18
18
 */
19
19
 
20
20
#include "config.h"
21
 
#include CSTDINT_H
22
21
#include <drizzled/show.h>
23
22
#include <drizzled/table.h>
24
23
#include <drizzled/current_session.h>
25
24
#include <drizzled/item/ident.h>
26
25
 
 
26
using namespace drizzled;
27
27
using namespace std;
28
28
 
29
29
const uint32_t NO_CACHED_FIELD_INDEX= UINT32_MAX;
84
84
    return field_name ? field_name : name ? name : "tmp_field";
85
85
  if (db_name && db_name[0])
86
86
  {
87
 
    tmp=(char*) sql_alloc((uint32_t) strlen(db_name)+(uint32_t) strlen(table_name)+
 
87
    tmp=(char*) memory::sql_alloc((uint32_t) strlen(db_name)+(uint32_t) strlen(table_name)+
88
88
                          (uint32_t) strlen(field_name)+3);
89
89
    sprintf(tmp,"%s.%s.%s",db_name,table_name,field_name);
90
90
  }
92
92
  {
93
93
    if (table_name[0])
94
94
    {
95
 
      tmp= (char*) sql_alloc((uint32_t) strlen(table_name) +
 
95
      tmp= (char*) memory::sql_alloc((uint32_t) strlen(table_name) +
96
96
                             (uint32_t) strlen(field_name) + 2);
97
97
      sprintf(tmp, "%s.%s", table_name, field_name);
98
98
    }