~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/myisam/mi_rnext.cc

  • Committer: Monty Taylor
  • Date: 2010-07-09 14:06:50 UTC
  • Revision ID: mordred@inaugust.com-20100709140650-ojeih829v3wbdkyv
Added include guard for generator.h to make cpplint happy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
 
12
12
   You should have received a copy of the GNU General Public License
13
13
   along with this program; if not, write to the Free Software
14
 
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
 
14
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
15
15
 
16
16
#include "myisam_priv.h"
17
17
 
38
38
 
39
39
  if (fast_mi_readinfo(info))
40
40
    return(errno);
 
41
  if (info->s->concurrent_insert)
 
42
    pthread_rwlock_rdlock(&info->s->key_root_lock[inx]);
41
43
  changed=_mi_test_if_changed(info);
42
44
  if (!flag)
43
45
  {
81
83
    }
82
84
    if (!error && res == 2)
83
85
    {
 
86
      if (info->s->concurrent_insert)
 
87
        pthread_rwlock_unlock(&info->s->key_root_lock[inx]);
84
88
      info->lastpos= HA_OFFSET_ERROR;
85
89
      return(errno= HA_ERR_END_OF_FILE);
86
90
    }
87
91
  }
88
92
 
89
 
  /* Don't clear if database-changed */
 
93
  if (info->s->concurrent_insert)
 
94
    pthread_rwlock_unlock(&info->s->key_root_lock[inx]);
 
95
 
 
96
        /* Don't clear if database-changed */
90
97
  info->update&= (HA_STATE_CHANGED | HA_STATE_ROW_CHANGED);
91
98
  info->update|= HA_STATE_NEXT_FOUND;
92
99