~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

  • Committer: Brian Aker
  • Date: 2010-05-28 01:36:09 UTC
  • Revision ID: brian@gaz-20100528013609-lvsd6znyufrpmddk
Rollup patch for hiding tableshare.

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
 * Derived from code Copyright (C) 2000-2004 MySQL AB
3
3
 *
4
4
 * PrimeBase XT
15
15
 *
16
16
 * You should have received a copy of the GNU General Public License
17
17
 * along with this program; if not, write to the Free Software
18
 
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
 
18
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19
19
 *
20
20
 *  Created by Leslie on 8/27/08.
21
21
 *
213
213
  int           timestamps= 0, timestamps_with_niladic= 0;
214
214
  int           field_no,dup_no;
215
215
  int           select_field_pos,auto_increment=0;
216
 
  List<Create_field>::iterator it(alter_info->create_list);
217
 
  List<Create_field>::iterator it2(alter_info->create_list);
 
216
  List_iterator<Create_field> it(alter_info->create_list);
 
217
  List_iterator<Create_field> it2(alter_info->create_list);
218
218
  uint total_uneven_bit_length= 0;
219
219
  DBUG_ENTER("mysql_prepare_create_table");
220
220
 
308
308
        */
309
309
        interval= sql_field->interval= typelib(thd->mem_root,
310
310
                                               sql_field->interval_list);
311
 
        List<String>::iterator int_it(sql_field->interval_list);
 
311
        List_iterator<String> int_it(sql_field->interval_list);
312
312
        String conv, *tmp;
313
313
        char comma_buf[2];
314
314
        int comma_length= cs->cset->wc_mb(cs, ',', (uchar*) comma_buf,
539
539
 
540
540
  /* Create keys */
541
541
 
542
 
  List<Key>::iterator key_iterator(alter_info->key_list);
543
 
  List<Key>::iterator key_iterator2(alter_info->key_list);
 
542
  List_iterator<Key> key_iterator(alter_info->key_list);
 
543
  List_iterator<Key> key_iterator2(alter_info->key_list);
544
544
  uint key_parts=0, fk_key_count=0;
545
545
  bool primary_key=0,unique_key=0;
546
546
  Key *key, *key2;
752
752
    if (key_info->block_size)
753
753
      key_info->flags|= HA_USES_BLOCK_SIZE;
754
754
 
755
 
    List<Key_part_spec>::iterator cols(key->columns), cols2(key->columns);
 
755
    List_iterator<Key_part_spec> cols(key->columns), cols2(key->columns);
756
756
    CHARSET_INFO *ft_key_charset=0;  // for FULLTEXT
757
757
    for (uint column_nr=0 ; (column=cols++) ; column_nr++)
758
758
    {
1147
1147
    goto err;
1148
1148
  }
1149
1149
 
1150
 
  MYSQL_LOCK(LOCK_open);
 
1150
  pthread_mutex_lock(&LOCK_open);
1151
1151
  if (!internal_tmp_table && !(create_info->options & HA_LEX_CREATE_TMP_TABLE))
1152
1152
  {
1153
1153
    if (!access(path,F_OK))
1261
1261
   */
1262
1262
  error= FALSE;
1263
1263
unlock_and_end:
1264
 
  MYSQL_UNLOCK(LOCK_open);
 
1264
  pthread_mutex_unlock(&LOCK_open);
1265
1265
 
1266
1266
err:
1267
1267
  thd_proc_info(thd, "After create");
1325
1325
                                COLUMN_FORMAT_TYPE_FIXED,
1326
1326
#endif
1327
1327
                       NULL /*default_value*/, NULL /*on_update_value*/, &comment, NULL /*change*/, 
1328
 
                       NULL /*interval_list*/, info->field_charset, 0 /*uint_geom_type*/
1329
 
#ifdef MARIADB_BASE_VERSION
1330
 
                       , NULL /*vcol_info*/, NULL /* create options */
1331
 
#endif
1332
 
                       )) 
 
1328
                       NULL /*interval_list*/, info->field_charset, 0 /*uint_geom_type*/)) 
1333
1329
                        goto error;
1334
1330
 
1335
1331
 
1353
1349
        }
1354
1350
        
1355
1351
        /* Create an internal temp table */
1356
 
#ifdef WITH_PARTITION_STORAGE_ENGINE
1357
 
        partition_info *part_info;
1358
 
 
1359
 
        part_info = thd->work_part_info;
1360
 
#endif
1361
1352
        if (mysql_create_table_no_lock(thd, db, name, &mylex.create_info, &mylex.alter_info, 1, 0)) 
1362
1353
                goto error;
1363
 
#ifdef WITH_PARTITION_STORAGE_ENGINE
1364
 
        thd->work_part_info = part_info;
1365
 
#endif
1366
1354
 
1367
1355
        noerror:
1368
1356
        err = 0;