~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: lbieber
  • Date: 2010-10-05 22:23:12 UTC
  • mfrom: (1813.1.4 build)
  • Revision ID: lbieber@orisndriz08-20101005222312-weuq0ardk3gcryau
Merge Travis - 621861 - convert structs to classes
Merge Billy - 621331 - Replace use of stringstream with boost::lexical_cast
Merge Travis - 621861 = To change C structs to C++ classes in Drizzle
Merge Andrew - fix bug 653300 - Syntax error on inport of a SQL file produced by drizzledump

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*****************************************************************************
2
2
 
3
 
Copyright (C) 1997, 2009, Innobase Oy. All Rights Reserved.
 
3
Copyright (c) 1997, 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
64
64
        trx_id_t                trx_id) /*!< in: trx id */
65
65
{
66
66
        ulint   n_ids;
 
67
        int     cmp;
67
68
        ulint   i;
68
69
 
69
 
        if (trx_id < view->up_limit_id) {
 
70
        if (ut_dulint_cmp(trx_id, view->up_limit_id) < 0) {
70
71
 
71
72
                return(TRUE);
72
73
        }
73
74
 
74
 
        if (trx_id >= view->low_limit_id) {
 
75
        if (ut_dulint_cmp(trx_id, view->low_limit_id) >= 0) {
75
76
 
76
77
                return(FALSE);
77
78
        }
84
85
        n_ids = view->n_trx_ids;
85
86
 
86
87
        for (i = 0; i < n_ids; i++) {
87
 
                trx_id_t        view_trx_id
88
 
                        = read_view_get_nth_trx_id(view, n_ids - i - 1);
89
88
 
90
 
                if (trx_id <= view_trx_id) {
91
 
                        return(trx_id != view_trx_id);
 
89
                cmp = ut_dulint_cmp(
 
90
                        trx_id,
 
91
                        read_view_get_nth_trx_id(view, n_ids - i - 1));
 
92
                if (cmp <= 0) {
 
93
                        return(cmp < 0);
92
94
                }
93
95
        }
94
96