~ubuntu-branches/ubuntu/trusty/drizzle/trusty

« back to all changes in this revision

Viewing changes to drizzled/item.cc

  • Committer: Bazaar Package Importer
  • Author(s): Monty Taylor
  • Date: 2010-10-02 14:17:48 UTC
  • mfrom: (1.1.1 upstream)
  • mto: (2.1.17 sid)
  • mto: This revision was merged to the branch mainline in revision 3.
  • Revision ID: james.westby@ubuntu.com-20101002141748-m6vbfbfjhrw1153e
Tags: 2010.09.1802-1
* New upstream release.
* Removed pid-file argument hack.
* Updated GPL-2 address to be new address.
* Directly copy in drizzledump.1 since debian doesn't have sphinx 1.0 yet.
* Link to jquery from libjs-jquery. Add it as a depend.
* Add drizzled.8 symlink to the install files.

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
#include "drizzled/field/varstring.h"
50
50
#include "drizzled/internal/m_string.h"
51
51
 
 
52
#include <cstdio>
52
53
#include <math.h>
53
54
#include <algorithm>
54
55
#include <float.h>
787
788
  if (session->lex->describe & DESCRIBE_EXTENDED)
788
789
  {
789
790
    char warn_buff[DRIZZLE_ERRMSG_SIZE];
790
 
    sprintf(warn_buff, ER(ER_WARN_FIELD_RESOLVED),
 
791
    snprintf(warn_buff, sizeof(warn_buff), ER(ER_WARN_FIELD_RESOLVED),
791
792
            db_name, (db_name[0] ? "." : ""),
792
793
            table_name, (table_name [0] ? "." : ""),
793
794
            resolved_item->field_name,
829
830
                  0);
830
831
    }
831
832
    else
832
 
      prev_subselect_item->used_tables_cache|= found_field->table->map;
 
833
      prev_subselect_item->used_tables_cache|= found_field->getTable()->map;
833
834
    prev_subselect_item->const_item_cache= 0;
834
835
    mark_as_dependent(session, last_select, current_sel, resolved_item,
835
836
                      dependent);
906
907
        if (cur_field->db_name && db_name)
907
908
        {
908
909
          /* If field_name is also qualified by a database name. */
909
 
          if (strcmp(cur_field->db_name, db_name))
 
910
          if (strcasecmp(cur_field->db_name, db_name))
910
911
            /* Same field names, different databases. */
911
912
            return NULL;
912
913
          ++cur_match_degree;
952
953
    Search for a column or derived column named as 'ref' in the SELECT
953
954
    clause of the current select.
954
955
  */
955
 
  if (!(select_ref= find_item_in_list(ref, *(select->get_item_list()),
 
956
  if (!(select_ref= find_item_in_list(session,
 
957
                                      ref, *(select->get_item_list()),
956
958
                                      &counter, REPORT_EXCEPT_NOT_FOUND,
957
959
                                      &resolution)))
958
960
    return NULL; /* Some error occurred. */
1125
1127
    field= new Field_blob(max_length, maybe_null, name,
1126
1128
                          collation.collation);
1127
1129
  else
1128
 
    field= new Field_varstring(max_length, maybe_null, name, table->s,
 
1130
    field= new Field_varstring(max_length, maybe_null, name, table->getMutableShare(),
1129
1131
                               collation.collation);
1130
1132
 
1131
1133
  if (field)
1595
1597
             convert_blob_length <= Field_varstring::MAX_SIZE &&
1596
1598
             convert_blob_length)
1597
1599
      new_field= new Field_varstring(convert_blob_length, maybe_null,
1598
 
                                     item->name, table->s,
 
1600
                                     item->name, table->getMutableShare(),
1599
1601
                                     item->collation.collation);
1600
1602
    else
1601
1603
      new_field= item->make_string_field(table);