~ubuntu-branches/ubuntu/precise/mysql-5.1/precise

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2010-06-21 15:31:05 UTC
  • mfrom: (1.1.3 upstream)
  • mto: This revision was merged to the branch mainline in revision 6.
  • Revision ID: james.westby@ubuntu.com-20100621153105-pbbz3t6nyrf9t2zq
Tags: upstream-5.1.48
ImportĀ upstreamĀ versionĀ 5.1.48

Show diffs side-by-side

added added

removed removed

Lines of Context:
2452
2452
        byte*   pad_ptr;
2453
2453
 
2454
2454
        ut_ad(len != UNIV_SQL_NULL);
 
2455
        UNIV_MEM_ASSERT_RW(data, len);
2455
2456
 
2456
2457
        if (templ->type == DATA_INT) {
2457
2458
                /* Convert integer data from Innobase to a little-endian
2687
2688
                        /* MySQL assumes that the field for an SQL
2688
2689
                        NULL value is set to the default value. */
2689
2690
 
 
2691
                        UNIV_MEM_ASSERT_RW(prebuilt->default_rec
 
2692
                                           + templ->mysql_col_offset,
 
2693
                                           templ->mysql_col_len);
2690
2694
                        mysql_rec[templ->mysql_null_byte_offset]
2691
2695
                                |= (byte) templ->mysql_null_bit_mask;
2692
2696
                        memcpy(mysql_rec + templ->mysql_col_offset,
3007
3011
 
3008
3012
                for (i = 0; i < prebuilt->n_template; i++) {
3009
3013
                        templ = prebuilt->mysql_template + i;
 
3014
#if 0 /* Some of the cached_rec may legitimately be uninitialized. */
 
3015
                        UNIV_MEM_ASSERT_RW(cached_rec
 
3016
                                           + templ->mysql_col_offset,
 
3017
                                           templ->mysql_col_len);
 
3018
#endif
3010
3019
                        ut_memcpy(buf + templ->mysql_col_offset,
3011
3020
                                  cached_rec + templ->mysql_col_offset,
3012
3021
                                  templ->mysql_col_len);
3021
3030
                }
3022
3031
        }
3023
3032
        else {
 
3033
#if 0 /* Some of the cached_rec may legitimately be uninitialized. */
 
3034
                UNIV_MEM_ASSERT_RW(prebuilt->fetch_cache
 
3035
                                   [prebuilt->fetch_cache_first],
 
3036
                                   prebuilt->mysql_prefix_len);
 
3037
#endif
3024
3038
                ut_memcpy(buf,
3025
3039
                          prebuilt->fetch_cache[prebuilt->fetch_cache_first],
3026
3040
                          prebuilt->mysql_prefix_len);
3070
3084
        }
3071
3085
 
3072
3086
        ut_ad(prebuilt->fetch_cache_first == 0);
 
3087
        UNIV_MEM_INVALID(prebuilt->fetch_cache[prebuilt->n_fetch_cached],
 
3088
                         prebuilt->mysql_row_len);
3073
3089
 
3074
3090
        if (UNIV_UNLIKELY(!row_sel_store_mysql_rec(
3075
3091
                                  prebuilt->fetch_cache[