~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/pbxt/src/myxt_xt.cc

  • Committer: Brian Aker
  • Date: 2010-11-06 05:47:12 UTC
  • mto: This revision was merged to the branch mainline in revision 1909.
  • Revision ID: brian@tangent.org-20101106054712-jwxd8e0s0s3nm7qn
Merge in encapsulations in filesort.

Show diffs side-by-side

added added

removed removed

Lines of Context:
663
663
                        memcpy(&data, ((char *) from)+packlength, sizeof(char*));
664
664
                        
665
665
                        //*len = ((Field_blob *) field)->get_length((byte *) from);
666
 
                        *len = ((Field_blob *) field)->get_length((byte *) from, GET_TABLE_SHARE(table)->db_low_byte_first);
 
666
                        *len = ((Field_blob *) field)->get_length((byte *) from, packlength, GET_TABLE_SHARE(table)->db_low_byte_first);
667
667
                        return data;
668
668
                }
669
669
#ifndef DRIZZLED
727
727
                case DRIZZLE_TYPE_DATE:
728
728
                case DRIZZLE_TYPE_DECIMAL:
729
729
                case DRIZZLE_TYPE_ENUM:
730
 
                case DRIZZLE_TYPE_UUID:
731
730
#endif
732
731
                        break;
733
732
        }
773
772
                        */
774
773
                        xtWord4 packlength = ((Field_blob *) field)->pack_length_no_ptr();
775
774
 
776
 
                        ((Field_blob *) field)->store_length((byte *) from, len, GET_TABLE_SHARE(table)->db_low_byte_first);
 
775
                        ((Field_blob *) field)->store_length((byte *) from, packlength, len, GET_TABLE_SHARE(table)->db_low_byte_first);
777
776
                        memcpy_fixed(((char *) from)+packlength, &data, sizeof(char*));
778
777
 
779
778
                        if (data)
841
840
                case DRIZZLE_TYPE_DATE:
842
841
                case DRIZZLE_TYPE_DECIMAL:
843
842
                case DRIZZLE_TYPE_ENUM:
844
 
                case DRIZZLE_TYPE_UUID:
845
843
#endif
846
844
                        break;
847
845
        }
1843
1841
                xt_lock_mutex(self, &tab->tab_dic_field_lock);
1844
1842
                pushr_(xt_unlock_mutex, &tab->tab_dic_field_lock);
1845
1843
                field->ptr = (byte *) buffer + field->offset(table->getDefaultValues());
1846
 
                field->val_str_internal(&val);
 
1844
                field->val_str(&val);
1847
1845
                field->ptr = save;                                      // Restore org row pointer
1848
1846
                freer_(); // xt_unlock_mutex(&tab->tab_dic_field_lock)
1849
1847
                xt_strcpy(len, value, val.c_ptr());
2200
2198
                        }
2201
2199
                }
2202
2200
 
2203
 
                seg->col_idx = field->position();
 
2201
                seg->col_idx = field->field_index;
2204
2202
                seg->is_recs_in_range = 1;
2205
2203
                seg->is_selectivity = 1;
2206
2204
                seg->type = (int) type;
2314
2312
                /* NOTE: do not set if the field is only partially in the index!!! */
2315
2313
                if (!partial_field)
2316
2314
#ifdef DRIZZLED
2317
 
                        MX_BIT_FAST_TEST_AND_SET(&mi_col_map, field->position());
 
2315
                        MX_BIT_FAST_TEST_AND_SET(&mi_col_map, field->field_index);
2318
2316
#else
2319
 
                        MX_BIT_FAST_TEST_AND_SET(&ind->mi_col_map, field->position());
 
2317
                        MX_BIT_FAST_TEST_AND_SET(&ind->mi_col_map, field->field_index);
2320
2318
#endif
2321
2319
        }
2322
2320
 
2440
2438
                for (key_part = index->key_part; key_part != key_part_end; key_part++) {
2441
2439
                        curr_field = key_part->field;
2442
2440
 
2443
 
                        if ((u_int) curr_field->position()+1 > dic->dic_ind_cols_req)
2444
 
                                dic->dic_ind_cols_req = curr_field->position()+1;
 
2441
                        if ((u_int) curr_field->field_index+1 > dic->dic_ind_cols_req)
 
2442
                                dic->dic_ind_cols_req = curr_field->field_index+1;
2445
2443
                }
2446
2444
        }
2447
2445
 
2478
2476
                                else
2479
2477
                                        max_ave_row_size = 200;
2480
2478
                                large_blob_field_count++;
2481
 
                                if ((u_int) curr_field->position()+1 > dic->dic_blob_cols_req)
2482
 
                                        dic->dic_blob_cols_req = curr_field->position()+1;
 
2479
                                if ((u_int) curr_field->field_index+1 > dic->dic_blob_cols_req)
 
2480
                                        dic->dic_blob_cols_req = curr_field->field_index+1;
2483
2481
                                dic->dic_blob_count++;
2484
2482
                                xt_realloc(self, (void **) &dic->dic_blob_cols, sizeof(Field *) * dic->dic_blob_count);
2485
2483
                                dic->dic_blob_cols[dic->dic_blob_count-1] = curr_field;
3062
3060
                THD *thd = current_thd;
3063
3061
 
3064
3062
                if (thd)
3065
 
                        return (MX_CHARSET_INFO *)thd->charset();
 
3063
                        return (MX_CHARSET_INFO *)thd_charset(thd);
3066
3064
        }
3067
3065
        return (MX_CHARSET_INFO *)&my_charset_utf8_general_ci;
3068
3066
}
3176
3174
{
3177
3175
        Session *session = (Session *) s;
3178
3176
 
 
3177
        session->lockForDelete();
3179
3178
        delete session;
3180
3179
 
3181
3180
        if (end_threads)
3182
 
          drizzled::internal::my_thread_end();
 
3181
                drizzled::internal::my_thread_end();
3183
3182
}
3184
3183
#else
3185
3184
xtPublic void myxt_destroy_thread(void *thread, xtBool end_threads)