~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/dict/dict0crea.c

  • Committer: Lee Bieber
  • Date: 2010-11-20 01:33:21 UTC
  • mfrom: (1878.10.4 drizzle_bug665252)
  • Revision ID: kalebral@gmail.com-20101120013321-7nk9lq4nnr20zk6b
Merge Billy - removed my_getsysdate, my_micro_time and my_micro_time_and_time and replaced with boost::date_time for compatibility.

Show diffs side-by-side

added added

removed removed

Lines of Context:
240
240
        ibool           is_path;
241
241
        mtr_t           mtr;
242
242
        ulint           space = 0;
243
 
        ibool           file_per_table;
244
243
 
245
244
        ut_ad(mutex_own(&(dict_sys->mutex)));
246
245
 
247
246
        table = node->table;
248
247
 
249
 
        /* Cache the global variable "srv_file_per_table" to
250
 
        a local variable before using it. Please note
251
 
        "srv_file_per_table" is not under dict_sys mutex
252
 
        protection, and could be changed while executing
253
 
        this function. So better to cache the current value
254
 
        to a local variable, and all future reference to
255
 
        "srv_file_per_table" should use this local variable. */
256
 
        file_per_table = srv_file_per_table;
257
 
 
258
 
        dict_hdr_get_new_id(&table->id, NULL, NULL);
 
248
        dict_hdr_get_new_id(&table->id, NULL,
 
249
                            srv_file_per_table ? &space : NULL);
259
250
 
260
251
        thr_get_trx(thr)->table_id = table->id;
261
252
 
262
 
        if (file_per_table) {
263
 
                /* Get a new space id if srv_file_per_table is set */
264
 
                dict_hdr_get_new_id(NULL, NULL, &space);
265
 
 
 
253
        if (srv_file_per_table) {
266
254
                if (UNIV_UNLIKELY(space == ULINT_UNDEFINED)) {
267
255
                        return(DB_ERROR);
268
256
                }
590
578
        ins_node_set_new_row(node->ind_def, row);
591
579
 
592
580
        /* Note that the index was created by this transaction. */
593
 
        index->trx_id = trx->id;
 
581
        index->trx_id = (ib_uint64_t) ut_conv_dulint_to_longlong(trx->id);
594
582
 
595
583
        return(DB_SUCCESS);
596
584
}
627
615
{
628
616
        dict_index_t*   index;
629
617
        dict_table_t*   sys_indexes;
 
618
        dict_table_t*   table;
630
619
        dtuple_t*       search_tuple;
631
620
        ulint           zip_size;
632
621
        btr_pcur_t      pcur;
635
624
        ut_ad(mutex_own(&(dict_sys->mutex)));
636
625
 
637
626
        index = node->index;
 
627
        table = node->table;
638
628
 
639
629
        sys_indexes = dict_sys->sys_indexes;
640
630
 
759
749
        ibool           drop = !space;
760
750
        ulint           zip_size;
761
751
        ulint           type;
762
 
        index_id_t      index_id;
 
752
        dulint          index_id;
763
753
        rec_t*          rec;
764
754
        const byte*     ptr;
765
755
        ulint           len;
852
842
        for (index = UT_LIST_GET_FIRST(table->indexes);
853
843
             index;
854
844
             index = UT_LIST_GET_NEXT(indexes, index)) {
855
 
                if (index->id == index_id) {
 
845
                if (!ut_dulint_cmp(index->id, index_id)) {
856
846
                        root_page_no = btr_create(type, space, zip_size,
857
847
                                                  index_id, index, mtr);
858
848
                        index->page = (unsigned int) root_page_no;
862
852
 
863
853
        ut_print_timestamp(stderr);
864
854
        fprintf(stderr,
865
 
                "  InnoDB: Index %llu of table %s is missing\n"
 
855
                "  InnoDB: Index %lu %lu of table %s is missing\n"
866
856
                "InnoDB: from the data dictionary during TRUNCATE!\n",
867
 
                (ullint) index_id,
 
857
                ut_dulint_get_high(index_id),
 
858
                ut_dulint_get_low(index_id),
868
859
                table->name);
869
860
 
870
861
        return(FIL_NULL);
1116
1107
 
1117
1108
        if (node->state == INDEX_ADD_TO_CACHE) {
1118
1109
 
1119
 
                index_id_t      index_id = node->index->id;
 
1110
                dulint  index_id = node->index->id;
1120
1111
 
1121
1112
                err = dict_index_add_to_cache(
1122
1113
                        node->table, node->index, FIL_NULL,