~ubuntu-branches/ubuntu/maverick/mysql-5.1/maverick-proposed

« back to all changes in this revision

Viewing changes to sql/ha_ndbcluster.cc

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-02-22 14:16:05 UTC
  • mto: This revision was merged to the branch mainline in revision 20.
  • Revision ID: package-import@ubuntu.com-20120222141605-nxlu9yzc6attylc2
Tags: upstream-5.1.61
ImportĀ upstreamĀ versionĀ 5.1.61

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* Copyright (C) 2000-2003 MySQL AB
 
1
/* Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
2
2
 
3
3
  This program is free software; you can redistribute it and/or modify
4
4
  it under the terms of the GNU General Public License as published by
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., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
15
 
*/
 
14
  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA */
16
15
 
17
16
/**
18
17
  @file
1293
1292
  for (i= 0; i < tab->s->keys; i++, key_info++, key_name++)
1294
1293
  {
1295
1294
    if ((error= add_index_handle(thd, dict, key_info, *key_name, i)))
 
1295
    {
1296
1296
      if (ignore_error)
1297
1297
        m_index[i].index= m_index[i].unique_index= NULL;
1298
1298
      else
1299
1299
        break;
 
1300
    }
1300
1301
    m_index[i].null_in_unique_index= FALSE;
1301
1302
    if (check_index_fields_not_null(key_info))
1302
1303
      m_index[i].null_in_unique_index= TRUE;
6265
6266
  for (;;)
6266
6267
  {
6267
6268
    Ndb_tuple_id_range_guard g(m_share);
6268
 
    if (m_skip_auto_increment &&
6269
 
        ndb->readAutoIncrementValue(m_table, g.range, auto_value) ||
 
6269
    if ((m_skip_auto_increment &&
 
6270
        ndb->readAutoIncrementValue(m_table, g.range, auto_value)) ||
6270
6271
        ndb->getAutoIncrementValue(m_table, g.range, auto_value, cache_size, increment, offset))
6271
6272
    {
6272
6273
      if (--retries &&
8409
8410
      DBUG_PRINT("error", ("get_share: failed to alloc share"));
8410
8411
      if (!have_lock)
8411
8412
        pthread_mutex_unlock(&ndbcluster_mutex);
8412
 
      my_error(ER_OUTOFMEMORY, MYF(0), sizeof(*share));
 
8413
      my_error(ER_OUTOFMEMORY, MYF(0), static_cast<int>(sizeof(*share)));
8413
8414
      DBUG_RETURN(0);
8414
8415
    }
8415
8416
  }
9916
9917
  {
9917
9918
    Field *field= table->field[i];
9918
9919
    const NDBCOL *col= tab->getColumn(i);
9919
 
    if (col->getStorageType() == NDB_STORAGETYPE_MEMORY && create_info->storage_media != HA_SM_MEMORY ||
9920
 
        col->getStorageType() == NDB_STORAGETYPE_DISK && create_info->storage_media != HA_SM_DISK)
 
9920
    if ((col->getStorageType() == NDB_STORAGETYPE_MEMORY && create_info->storage_media != HA_SM_MEMORY) ||
 
9921
        (col->getStorageType() == NDB_STORAGETYPE_DISK && create_info->storage_media != HA_SM_DISK))
9921
9922
    {
9922
9923
      DBUG_PRINT("info", ("Column storage media is changed"));
9923
9924
      DBUG_RETURN(COMPATIBLE_DATA_NO);