~drizzle-trunk/drizzle/development

« back to all changes in this revision

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

A few changes to make the patch smaller/easier.

Show diffs side-by-side

added added

removed removed

Lines of Context:
101
101
        trx->dict_operation = TRX_DICT_OP_NONE;
102
102
        trx->table_id = ut_dulint_zero;
103
103
 
104
 
        trx->mysql_session = NULL;
 
104
        trx->mysql_thd = NULL;
105
105
        trx->mysql_query_str = NULL;
106
106
        trx->active_trans = 0;
107
107
        trx->duplicates = 0;
255
255
 
256
256
                ut_print_timestamp(stderr);
257
257
                fprintf(stderr,
258
 
                        "  InnoDB: Error: MySQL is freeing a session\n"
 
258
                        "  InnoDB: Error: MySQL is freeing a thd\n"
259
259
                        "InnoDB: though trx->n_mysql_tables_in_use is %lu\n"
260
260
                        "InnoDB: and trx->mysql_n_tables_locked is %lu.\n",
261
261
                        (ulong)trx->n_mysql_tables_in_use,
1590
1590
/**************************************************************************
1591
1591
Prints info about a transaction to the given file. The caller must own the
1592
1592
kernel mutex and must have called
1593
 
innobase_mysql_prepare_print_arbitrary_session(), unless he knows that MySQL
 
1593
innobase_mysql_prepare_print_arbitrary_thd(), unless he knows that MySQL
1594
1594
or InnoDB cannot meanwhile change the info printed here. */
1595
1595
UNIV_INTERN
1596
1596
void
1697
1697
                putc('\n', f);
1698
1698
        }
1699
1699
 
1700
 
        if (trx->mysql_session != NULL) {
1701
 
                innobase_mysql_print_session(f, trx->mysql_session, max_query_len);
 
1700
        if (trx->mysql_thd != NULL) {
 
1701
                innobase_mysql_print_thd(f, trx->mysql_thd, max_query_len);
1702
1702
        }
1703
1703
}
1704
1704
 
1717
1717
        ibool   a_notrans_edit;
1718
1718
        ibool   b_notrans_edit;
1719
1719
 
1720
 
        /* If mysql_session is NULL for a transaction we assume that it has
 
1720
        /* If mysql_thd is NULL for a transaction we assume that it has
1721
1721
        not edited non-transactional tables. */
1722
1722
 
1723
 
        a_notrans_edit = a->mysql_session != NULL
1724
 
            && session_has_edited_nontrans_tables(a->mysql_session);
 
1723
        a_notrans_edit = a->mysql_thd != NULL
 
1724
            && thd_has_edited_nontrans_tables(a->mysql_thd);
1725
1725
 
1726
 
        b_notrans_edit = b->mysql_session != NULL
1727
 
            && session_has_edited_nontrans_tables(b->mysql_session);
 
1726
        b_notrans_edit = b->mysql_thd != NULL
 
1727
            && thd_has_edited_nontrans_tables(b->mysql_thd);
1728
1728
 
1729
1729
        if (a_notrans_edit && !b_notrans_edit) {
1730
1730