~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Monty Taylor
  • Date: 2010-09-17 18:32:14 UTC
  • mto: (1775.1.1 build)
  • mto: This revision was merged to the branch mainline in revision 1773.
  • Revision ID: mordred@inaugust.com-20100917183214-iy27rrta26et3dli
Updated pandora-build files to version 0.151

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (C) 2008 PrimeBase Technologies GmbH, Germany
 
1
/* Copyright (c) 2008 PrimeBase Technologies GmbH, Germany
2
2
 *
3
3
 * PrimeBase Media Stream for MySQL
4
4
 *
14
14
 *
15
15
 * You should have received a copy of the GNU General Public License
16
16
 * along with this program; if not, write to the Free Software
17
 
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 
17
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18
18
 *
19
19
 * Paul McCullagh
20
20
 *
134
134
static void xt_my_set_notnull_in_record(Field *field, char *record)
135
135
{
136
136
        if (field->null_ptr)
137
 
                record[(uint) (field->null_ptr - (uchar *) field->TABLE_RECORD_0)] &= (uchar) ~field->null_bit;
 
137
                record[(uint) (field->null_ptr - (uchar *) field->getTable()->getInsertRecord())] &= (uchar) ~field->null_bit;
138
138
}
139
139
 
140
140
/*
244
244
#if MYSQL_VERSION_ID < 50114
245
245
                curr_field->ptr = (byte *) buf + curr_field->offset();
246
246
#else
247
 
                curr_field->ptr = (byte *) buf + curr_field->offset(curr_field->table->RECORD_0);
 
247
                curr_field->ptr = (byte *) buf + curr_field->offset(curr_field->table->getInsertRecord());
248
248
#endif
249
249
                switch (curr_field->field_name[0]) {
250
250
                        case 'A':
354
354
        save_write_set = table->write_set;
355
355
        table->write_set = NULL;
356
356
 
357
 
        memset(buf, 0xFF, table->getNullBytes());
 
357
        memset(buf, 0xFF, table->s->null_bytes);
358
358
 
359
359
        tp_ptr = *((XTTablePathPtr *) xt_sl_item_at(ost_db->db_table_paths, row_id));
360
360
 
361
 
        for (Field **field=TABLE_FIELDS ; *field ; field++) {
 
361
        for (Field **field=table->getFields() ; *field ; field++) {
362
362
                curr_field = *field;
363
363
 
364
364
                save = curr_field->ptr;
365
365
#if MYSQL_VERSION_ID < 50114
366
366
                curr_field->ptr = (byte *) buf + curr_field->offset();
367
367
#else
368
 
                curr_field->ptr = (byte *) buf + curr_field->offset(curr_field->TABLE_RECORD_0);
 
368
                curr_field->ptr = (byte *) buf + curr_field->offset(curr_field->getTable()->getInsertRecord());
369
369
#endif
370
370
                switch (curr_field->field_name[0]) {
371
371
                        case 'P':
464
464
        save_write_set = table->write_set;
465
465
        table->write_set = NULL;
466
466
 
467
 
        memset(buf, 0xFF, table->getNullBytes());
 
467
        memset(buf, 0xFF, table->s->null_bytes);
468
468
 
469
469
        stat_name = xt_get_stat_meta_data(rec_id)->sm_name;
470
470
        stat_value = xt_get_statistic(&tt_statistics, ost_db, rec_id);
471
471
 
472
 
        for (Field **field=TABLE_FIELDS ; *field ; field++) {
 
472
        for (Field **field=table->getFields() ; *field ; field++) {
473
473
                curr_field = *field;
474
474
 
475
475
                save = curr_field->ptr;
476
476
#if MYSQL_VERSION_ID < 50114
477
477
                curr_field->ptr = (byte *) buf + curr_field->offset();
478
478
#else
479
 
                curr_field->ptr = (byte *) buf + curr_field->offset(curr_field->TABLE_RECORD_0);
 
479
                curr_field->ptr = (byte *) buf + curr_field->offset(curr_field->getTable()->getInsertRecord());
480
480
#endif
481
481
                switch (curr_field->field_name[0]) {
482
482
                        case 'I':
541
541
void XTSystemTableShare::shutDown(XTThreadPtr XT_UNUSED(self))
542
542
{
543
543
        if (sys_lock_inited) {
544
 
                MYSQL_FREE_LOCK(sys_location_lock);
545
 
                MYSQL_FREE_LOCK(sys_statistics_lock);
 
544
                sys_location_lock.deinit();
 
545
                sys_statistics_lock.deinit();
546
546
                sys_lock_inited = FALSE;
547
547
        }
548
548
}