~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-07-30 20:31:19 UTC
  • mto: This revision was merged to the branch mainline in revision 1679.
  • Revision ID: brian@gaz-20100730203119-89g2ye4zwnvcacxg
First pass in encapsulating row

Show diffs side-by-side

added added

removed removed

Lines of Context:
613
613
#else
614
614
        ASSERT(table == field->table);
615
615
        if (field->null_ptr)
616
 
                record[(uint) (field->null_ptr - (uchar *) table->record[0])] &= (uchar) ~field->null_bit;
 
616
                record[(uint) (field->null_ptr - (uchar *) table->getInsertRecord())] &= (uchar) ~field->null_bit;
617
617
#endif
618
618
}
619
619
 
625
625
                        return TRUE;
626
626
#else
627
627
                ASSERT(table == field->table);
628
 
                if (record[(uint) (field->null_ptr - (uchar *) table->record[0])] & (uchar) field->null_bit)
 
628
                if (record[(uint) (field->null_ptr - (uchar *) table->getInsertRecord())] & (uchar) field->null_bit)
629
629
                        return TRUE;
630
630
#endif
631
631
        }
645
645
        from = dest + field->offset(table->getDefaultValues());
646
646
#else
647
647
        ASSERT(table == field->table);
648
 
        from = dest + field->offset(table->record[0]);
 
648
        from = dest + field->offset(table->getInsertRecord());
649
649
#endif
650
650
        switch (field->real_type()) {
651
651
#ifndef DRIZZLED
768
768
        from = dest + field->offset(table->getDefaultValues());
769
769
#else
770
770
        ASSERT(table == field->table);
771
 
        from = dest + field->offset(table->record[0]);
 
771
        from = dest + field->offset(table->getInsertRecord());
772
772
#endif
773
773
        switch (field->real_type()) {
774
774
#ifndef DRIZZLED
1858
1858
#ifdef DRIZZLED
1859
1859
                field->ptr = (byte *) buffer + field->offset(table->getDefaultValues());
1860
1860
#else
1861
 
                field->ptr = (byte *) buffer + field->offset(field->table->record[0]);
 
1861
                field->ptr = (byte *) buffer + field->offset(field->table->getInsertRecord());
1862
1862
#endif
1863
1863
                field->val_str(&val);
1864
1864
                field->ptr = save;                                      // Restore org row pointer
1890
1890
#ifdef DRIZZLED
1891
1891
        field->ptr = (byte *) buffer + field->offset(table->getDefaultValues());
1892
1892
#else
1893
 
        field->ptr = (byte *) buffer + field->offset(field->table->record[0]);
 
1893
        field->ptr = (byte *) buffer + field->offset(field->table->getInsertRecord());
1894
1894
#endif
1895
1895
        error = field->store(value, len, &my_charset_utf8_general_ci);
1896
1896
        field->ptr = save;                                      // Restore org row pointer
2420
2420
#ifdef DRIZZLED
2421
2421
                        seg->null_pos = (uint) (field->null_ptr - (uchar*) table_arg->getDefaultValues());
2422
2422
#else
2423
 
                        seg->null_pos = (uint) (field->null_ptr - (uchar*) table_arg->record[0]);
 
2423
                        seg->null_pos = (uint) (field->null_ptr - (uchar*) table_arg->getInsertRecord());
2424
2424
#endif
2425
2425
                }
2426
2426
                else {
2452
2452
                else if (field->type() == MYSQL_TYPE_BIT) {
2453
2453
                        seg->bit_length = ((Field_bit *) field)->bit_len;
2454
2454
                        seg->bit_start = ((Field_bit *) field)->bit_ofs;
2455
 
                        seg->bit_pos = (uint) (((Field_bit *) field)->bit_ptr - (uchar*) table_arg->record[0]);
 
2455
                        seg->bit_pos = (uint) (((Field_bit *) field)->bit_ptr - (uchar*) table_arg->getInsertRecord());
2456
2456
                }
2457
2457
#else
2458
2458
                /* Drizzle uses HA_KEYTYPE_ULONG_INT keys for enums > 1 byte, which is not consistent with MySQL, so we fix it here  */
2870
2870
#ifdef DRIZZLED
2871
2871
                        dic->dic_ind_rec_len = curr_field->offset(my_tab->getDefaultValues());
2872
2872
#else
2873
 
                        dic->dic_ind_rec_len = curr_field->offset(my_tab->record[0]);
 
2873
                        dic->dic_ind_rec_len = curr_field->offset(my_tab->getInsertRecord());
2874
2874
#endif
2875
2875
                }
2876
2876
        }