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

« back to all changes in this revision

Viewing changes to storage/innodb_plugin/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:
2498
2498
        byte*   pad_ptr;
2499
2499
 
2500
2500
        ut_ad(len != UNIV_SQL_NULL);
 
2501
        UNIV_MEM_ASSERT_RW(data, len);
2501
2502
 
2502
2503
        switch (templ->type) {
2503
2504
        case DATA_INT:
2746
2747
                        /* MySQL assumes that the field for an SQL
2747
2748
                        NULL value is set to the default value. */
2748
2749
 
 
2750
                        UNIV_MEM_ASSERT_RW(prebuilt->default_rec
 
2751
                                           + templ->mysql_col_offset,
 
2752
                                           templ->mysql_col_len);
2749
2753
                        mysql_rec[templ->mysql_null_byte_offset]
2750
2754
                                |= (byte) templ->mysql_null_bit_mask;
2751
2755
                        memcpy(mysql_rec + templ->mysql_col_offset,
3070
3074
 
3071
3075
                for (i = 0; i < prebuilt->n_template; i++) {
3072
3076
                        templ = prebuilt->mysql_template + i;
 
3077
#if 0 /* Some of the cached_rec may legitimately be uninitialized. */
 
3078
                        UNIV_MEM_ASSERT_RW(cached_rec
 
3079
                                           + templ->mysql_col_offset,
 
3080
                                           templ->mysql_col_len);
 
3081
#endif
3073
3082
                        ut_memcpy(buf + templ->mysql_col_offset,
3074
3083
                                  cached_rec + templ->mysql_col_offset,
3075
3084
                                  templ->mysql_col_len);
3084
3093
                }
3085
3094
        }
3086
3095
        else {
 
3096
#if 0 /* Some of the cached_rec may legitimately be uninitialized. */
 
3097
                UNIV_MEM_ASSERT_RW(prebuilt->fetch_cache
 
3098
                                   [prebuilt->fetch_cache_first],
 
3099
                                   prebuilt->mysql_prefix_len);
 
3100
#endif
3087
3101
                ut_memcpy(buf,
3088
3102
                          prebuilt->fetch_cache[prebuilt->fetch_cache_first],
3089
3103
                          prebuilt->mysql_prefix_len);
3134
3148
        }
3135
3149
 
3136
3150
        ut_ad(prebuilt->fetch_cache_first == 0);
 
3151
        UNIV_MEM_INVALID(prebuilt->fetch_cache[prebuilt->n_fetch_cached],
 
3152
                         prebuilt->mysql_row_len);
3137
3153
 
3138
3154
        if (UNIV_UNLIKELY(!row_sel_store_mysql_rec(
3139
3155
                                  prebuilt->fetch_cache[
3595
3611
                trx->has_search_latch = FALSE;
3596
3612
        }
3597
3613
 
 
3614
        ut_ad(prebuilt->sql_stat_start || trx->conc_state == TRX_ACTIVE);
 
3615
        ut_ad(trx->conc_state == TRX_NOT_STARTED
 
3616
              || trx->conc_state == TRX_ACTIVE);
 
3617
        ut_ad(prebuilt->sql_stat_start
 
3618
              || prebuilt->select_lock_type != LOCK_NONE
 
3619
              || trx->read_view);
 
3620
 
3598
3621
        trx_start_if_not_started(trx);
3599
3622
 
3600
3623
        if (trx->isolation_level <= TRX_ISO_READ_COMMITTED