~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/include/trx0sys.ic

  • Committer: lbieber
  • Date: 2010-10-06 16:34:16 UTC
  • mfrom: (1816.1.3 build)
  • Revision ID: lbieber@orisndriz08-20101006163416-ea0sl59qgpglk21y
Merge Monty - Change the requirement from either libinnodb to libhaildb. Also, tied it to version 2.2
Merge Andrew - fix bug 650935: remove --compress from all clients
Merge Andrew - fix bug 653471: Add -A to drizzle client
Merge Travis - 621861 = To change C structs to C++ classes in Drizzle

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*****************************************************************************
2
2
 
3
 
Copyright (C) 1996, 2009, Innobase Oy. All Rights Reserved.
 
3
Copyright (c) 1996, 2009, Innobase Oy. All Rights Reserved.
4
4
 
5
5
This program is free software; you can redistribute it and/or modify it under
6
6
the terms of the GNU General Public License as published by the Free Software
266
266
        trx = UT_LIST_GET_FIRST(trx_sys->trx_list);
267
267
 
268
268
        while (trx != NULL) {
269
 
                if (trx_id == trx->id) {
 
269
                if (0 == ut_dulint_cmp(trx_id, trx->id)) {
270
270
 
271
271
                        return(trx);
272
272
                }
315
315
 
316
316
        ut_ad(mutex_own(&(kernel_mutex)));
317
317
 
318
 
        if (trx_id < trx_list_get_min_trx_id()) {
 
318
        if (ut_dulint_cmp(trx_id, trx_list_get_min_trx_id()) < 0) {
319
319
 
320
320
                return(FALSE);
321
321
        }
322
322
 
323
 
        if (UNIV_UNLIKELY(trx_id >= trx_sys->max_trx_id)) {
 
323
        if (ut_dulint_cmp(trx_id, trx_sys->max_trx_id) >= 0) {
324
324
 
325
325
                /* There must be corruption: we return TRUE because this
326
326
                function is only called by lock_clust_rec_some_has_impl()
359
359
        Thus trx id values will not overlap when the database is
360
360
        repeatedly started! */
361
361
 
362
 
        if ((ulint) trx_sys->max_trx_id % TRX_SYS_TRX_ID_WRITE_MARGIN == 0) {
 
362
        if (ut_dulint_get_low(trx_sys->max_trx_id)
 
363
            % TRX_SYS_TRX_ID_WRITE_MARGIN == 0) {
363
364
 
364
365
                trx_sys_flush_max_trx_id();
365
366
        }
366
367
 
367
 
        id = trx_sys->max_trx_id++;
 
368
        id = trx_sys->max_trx_id;
 
369
 
 
370
        UT_DULINT_INC(trx_sys->max_trx_id);
368
371
 
369
372
        return(id);
370
373
}