~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/trx/trx0trx.c

Merge initial InnoDB+ import.

This was applied by generating a patch between MySQL 5.1.50 InnoDB plugin and
the just-merged innodb+ from mysql-trunk revision-id: vasil.dimov@oracle.com-20100422110752-1zowoqxel5xx3z2e

Then, some manual merge resolving and it worked. This should make it much
easier to merge the rest of InnoDB 1.1 and 1.2 from the mysql tree using
my bzr-reapply script.

This takes us to InnoDB 1.1.1(ish).

Show diffs side-by-side

added added

removed removed

Lines of Context:
51
51
the kernel mutex */
52
52
UNIV_INTERN ulint       trx_n_mysql_transactions = 0;
53
53
 
 
54
#ifdef UNIV_PFS_MUTEX
 
55
/* Key to register the mutex with performance schema */
 
56
UNIV_INTERN mysql_pfs_key_t     trx_undo_mutex_key;
 
57
#endif /* UNIV_PFS_MUTEX */
 
58
 
54
59
/*************************************************************//**
55
60
Set detailed error message for the transaction. */
56
61
UNIV_INTERN
119
124
        trx->table_id = ut_dulint_zero;
120
125
 
121
126
        trx->mysql_thd = NULL;
 
127
        trx->mysql_query_str = NULL;
122
128
        trx->active_trans = 0;
123
129
        trx->duplicates = 0;
124
130
 
127
133
        trx->mysql_log_file_name = NULL;
128
134
        trx->mysql_log_offset = 0;
129
135
 
130
 
        mutex_create(&trx->undo_mutex, SYNC_TRX_UNDO);
 
136
        mutex_create(trx_undo_mutex_key, &trx->undo_mutex, SYNC_TRX_UNDO);
131
137
 
132
138
        trx->rseg = NULL;
133
139
 
754
760
                if (undo) {
755
761
                        mutex_enter(&kernel_mutex);
756
762
                        trx->no = trx_sys_get_new_trx_no();
757
 
 
758
763
                        mutex_exit(&kernel_mutex);
759
764
 
760
765
                        /* It is not necessary to obtain trx->undo_mutex here
935
940
        trx->rseg = NULL;
936
941
        trx->undo_no = ut_dulint_zero;
937
942
        trx->last_sql_stat_start.least_undo_no = ut_dulint_zero;
 
943
        trx->mysql_query_str = NULL;
938
944
 
939
945
        ut_ad(UT_LIST_GET_LEN(trx->wait_thrs) == 0);
940
946
        ut_ad(UT_LIST_GET_LEN(trx->trx_locks) == 0);