~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to storage/innobase/row/row0sel.c

  • Committer: Grant Limberg
  • Date: 2008-08-12 21:13:01 UTC
  • mto: (322.1.1 codestyle)
  • mto: This revision was merged to the branch mainline in revision 324.
  • Revision ID: grant@glsoftware.net-20080812211301-ym3wsowelkgp16s2
renamed all instances of MYSQL_ to DRIZZLE_

Show diffs side-by-side

added added

removed removed

Lines of Context:
2319
2319
                }
2320
2320
 
2321
2321
                if (dtype_get_mysql_type(dfield_get_type(dfield))
2322
 
                    == DATA_MYSQL_TRUE_VARCHAR
 
2322
                    == DATA_DRIZZLE_TRUE_VARCHAR
2323
2323
                    && dfield_get_type(dfield)->mtype != DATA_INT) {
2324
2324
                        /* In a MySQL key value format, a true VARCHAR is
2325
2325
                        always preceded by 2 bytes of a length field.
2478
2478
 
2479
2479
                field_end = dest + templ->mysql_col_len;
2480
2480
 
2481
 
                if (templ->mysql_type == DATA_MYSQL_TRUE_VARCHAR) {
 
2481
                if (templ->mysql_type == DATA_DRIZZLE_TRUE_VARCHAR) {
2482
2482
                        /* This is a >= 5.0.3 type true VARCHAR. Store the
2483
2483
                        length of the data to the first byte or the first
2484
2484
                        two bytes of dest. */
2698
2698
                        case DATA_BINARY:
2699
2699
                        case DATA_VARMYSQL:
2700
2700
                                if (templ->mysql_type
2701
 
                                    == DATA_MYSQL_TRUE_VARCHAR) {
 
2701
                                    == DATA_DRIZZLE_TRUE_VARCHAR) {
2702
2702
                                        /* This is a >= 5.0.3 type
2703
2703
                                        true VARCHAR.  Zero the field. */
2704
2704
                                        pad_char = 0x00;
3091
3091
        byte*   buf;
3092
3092
        ulint   i;
3093
3093
 
3094
 
        ut_ad(prebuilt->n_fetch_cached < MYSQL_FETCH_CACHE_SIZE);
 
3094
        ut_ad(prebuilt->n_fetch_cached < DRIZZLE_FETCH_CACHE_SIZE);
3095
3095
        ut_ad(rec_offs_validate(rec, NULL, offsets));
3096
3096
        ut_a(!prebuilt->templ_contains_blob);
3097
3097
 
3098
3098
        if (prebuilt->fetch_cache[0] == NULL) {
3099
3099
                /* Allocate memory for the fetch cache */
3100
3100
 
3101
 
                for (i = 0; i < MYSQL_FETCH_CACHE_SIZE; i++) {
 
3101
                for (i = 0; i < DRIZZLE_FETCH_CACHE_SIZE; i++) {
3102
3102
 
3103
3103
                        /* A user has reported memory corruption in these
3104
3104
                        buffers in Linux. Put magic numbers there to help
3422
3422
                }
3423
3423
 
3424
3424
                if (prebuilt->fetch_cache_first > 0
3425
 
                    && prebuilt->fetch_cache_first < MYSQL_FETCH_CACHE_SIZE) {
 
3425
                    && prebuilt->fetch_cache_first < DRIZZLE_FETCH_CACHE_SIZE) {
3426
3426
 
3427
3427
                        /* The previous returned row was popped from the fetch
3428
3428
                        cache, but the cache was not full at the time of the
4186
4186
        if (prebuilt->idx_cond_func)
4187
4187
        {
4188
4188
          int res;
4189
 
          ut_ad(prebuilt->template_type != ROW_MYSQL_DUMMY_TEMPLATE);
 
4189
          ut_ad(prebuilt->template_type != ROW_DRIZZLE_DUMMY_TEMPLATE);
4190
4190
          offsets = rec_get_offsets(rec, index, offsets, ULINT_UNDEFINED, &heap);
4191
4191
          row_sel_store_mysql_rec(buf, prebuilt, rec,
4192
4192
                                  offsets, 0, prebuilt->n_index_fields);
4278
4278
                                offsets));
4279
4279
 
4280
4280
        if ((match_mode == ROW_SEL_EXACT
4281
 
             || prebuilt->n_rows_fetched >= MYSQL_FETCH_CACHE_THRESHOLD)
 
4281
             || prebuilt->n_rows_fetched >= DRIZZLE_FETCH_CACHE_THRESHOLD)
4282
4282
            && prebuilt->select_lock_type == LOCK_NONE
4283
4283
            && !prebuilt->templ_contains_blob
4284
4284
            && !prebuilt->clust_index_was_generated
4285
4285
            && !prebuilt->used_in_HANDLER
4286
4286
            && prebuilt->template_type
4287
 
            != ROW_MYSQL_DUMMY_TEMPLATE) {
 
4287
            != ROW_DRIZZLE_DUMMY_TEMPLATE) {
4288
4288
 
4289
4289
                /* Inside an update, for example, we do not cache rows,
4290
4290
                since we may use the cursor position to do the actual
4302
4302
                                                 some_fields_in_buffer? 
4303
4303
                                                 prebuilt->n_index_fields: 0,
4304
4304
                                                 buf);
4305
 
                if (prebuilt->n_fetch_cached == MYSQL_FETCH_CACHE_SIZE) {
 
4305
                if (prebuilt->n_fetch_cached == DRIZZLE_FETCH_CACHE_SIZE) {
4306
4306
 
4307
4307
                        goto got_row;
4308
4308
                }
4309
4309
 
4310
4310
                goto next_rec;
4311
4311
        } else {
4312
 
                if (prebuilt->template_type == ROW_MYSQL_DUMMY_TEMPLATE) {
 
4312
                if (prebuilt->template_type == ROW_DRIZZLE_DUMMY_TEMPLATE) {
4313
4313
                        memcpy(buf + 4, result_rec
4314
4314
                               - rec_offs_extra_size(offsets),
4315
4315
                               rec_offs_size(offsets));