sql_class.h   sql_class.h 
skipping to change at line 2273 skipping to change at line 2273
@see set_trans_pos @see set_trans_pos
@see get_trans_pos @see get_trans_pos
@todo Similar information is kept in the patch for BUG#11762277 @todo Similar information is kept in the patch for BUG#11762277
and by the master/slave heartbeat implementation. We should merge and by the master/slave heartbeat implementation. We should merge
these positions instead of maintaining three different ones. these positions instead of maintaining three different ones.
*/ */
/**@{*/ /**@{*/
const char *m_trans_log_file; const char *m_trans_log_file;
const char *m_trans_fixed_log_file;
my_off_t m_trans_end_pos; my_off_t m_trans_end_pos;
/**@}*/ /**@}*/
public: public:
void issue_unsafe_warnings(); void issue_unsafe_warnings();
uint get_binlog_table_maps() const { uint get_binlog_table_maps() const {
return binlog_table_maps; return binlog_table_maps;
} }
void clear_binlog_table_maps() { void clear_binlog_table_maps() {
skipping to change at line 2325 skipping to change at line 2326
Tables changed in transaction (that must be invalidated in query cac he). Tables changed in transaction (that must be invalidated in query cac he).
List contain only transactional tables, that not invalidated in quer y List contain only transactional tables, that not invalidated in quer y
cache (instead of full list of changed in transaction tables). cache (instead of full list of changed in transaction tables).
*/ */
CHANGED_TABLE_LIST* changed_tables; CHANGED_TABLE_LIST* changed_tables;
MEM_ROOT mem_root; // Transaction-life memory allocation pool MEM_ROOT mem_root; // Transaction-life memory allocation pool
/* /*
(Mostly) binlog-specific fields use while flushing the caches (Mostly) binlog-specific fields use while flushing the caches
and committing transactions. and committing transactions.
We don't use bitfield any more in the struct. Modification will
be lost when concurrently updating multiple bit fields. It will
cause a race condition in a multi-threaded application. And we
already caught a race condition case between xid_written and
ready_preempt in MYSQL_BIN_LOG::ordered_commit.
*/ */
struct { struct {
bool enabled:1; // see ha_enable_transaction() bool enabled; // see ha_enable_transaction()
bool pending:1; // Is the transaction commit pendin bool pending; // Is the transaction commit pending?
g? bool xid_written; // The session wrote an XID
bool xid_written:1; // The session wrote an XID bool real_commit; // Is this a "real" commit?
bool real_commit:1; // Is this a "real" commit? bool commit_low; // see MYSQL_BIN_LOG::ordered_commit
bool commit_low:1; // see MYSQL_BIN_LOG::ordered_commi bool run_hooks; // Call the after_commit hook
t
#ifndef DBUG_OFF #ifndef DBUG_OFF
bool ready_preempt:1; // internal in MYSQL_BIN_LOG::order ed_commit bool ready_preempt; // internal in MYSQL_BIN_LOG::ordered _commit
#endif #endif
} flags; } flags;
void cleanup() void cleanup()
{ {
DBUG_ENTER("THD::st_transaction::cleanup"); DBUG_ENTER("THD::st_transaction::cleanup");
changed_tables= 0; changed_tables= 0;
savepoints= 0; savepoints= 0;
/* /*
skipping to change at line 2775 skipping to change at line 2782
/**@{*/ /**@{*/
void set_trans_pos(const char *file, my_off_t pos) void set_trans_pos(const char *file, my_off_t pos)
{ {
DBUG_ENTER("THD::set_trans_pos"); DBUG_ENTER("THD::set_trans_pos");
DBUG_ASSERT(((file == 0) && (pos == 0)) || ((file != 0) && (pos != 0))) ; DBUG_ASSERT(((file == 0) && (pos == 0)) || ((file != 0) && (pos != 0))) ;
if (file) if (file)
{ {
DBUG_PRINT("enter", ("file: %s, pos: %llu", file, pos)); DBUG_PRINT("enter", ("file: %s, pos: %llu", file, pos));
// Only the file name should be used, not the full path // Only the file name should be used, not the full path
m_trans_log_file= file + dirname_length(file); m_trans_log_file= file + dirname_length(file);
MEM_ROOT *log_file_mem_root= &main_mem_root;
if (!m_trans_fixed_log_file)
m_trans_fixed_log_file= new (log_file_mem_root) char[FN_REFLEN + 1]
;
m_trans_fixed_log_file= strdup_root(log_file_mem_root,
file + dirname_length(file));
} }
else else
{
m_trans_log_file= NULL; m_trans_log_file= NULL;
m_trans_fixed_log_file= NULL;
}
m_trans_end_pos= pos; m_trans_end_pos= pos;
DBUG_PRINT("return", ("m_trans_log_file: %s, m_trans_end_pos: %llu", DBUG_PRINT("return", ("m_trans_log_file: %s, m_trans_fixed_log_file: %s
m_trans_log_file, m_trans_end_pos)); , "
"m_trans_end_pos: %llu", m_trans_log_file,
m_trans_fixed_log_file, m_trans_end_pos));
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }
void get_trans_pos(const char **file_var, my_off_t *pos_var) const void get_trans_pos(const char **file_var, my_off_t *pos_var) const
{ {
DBUG_ENTER("THD::get_trans_pos"); DBUG_ENTER("THD::get_trans_pos");
if (file_var) if (file_var)
*file_var = m_trans_log_file; *file_var = m_trans_log_file;
if (pos_var) if (pos_var)
*pos_var= m_trans_end_pos; *pos_var= m_trans_end_pos;
DBUG_PRINT("return", ("file: %s, pos: %llu", DBUG_PRINT("return", ("file: %s, pos: %llu",
file_var ? *file_var : "<none>", file_var ? *file_var : "<none>",
pos_var ? *pos_var : 0)); pos_var ? *pos_var : 0));
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }
void get_trans_fixed_pos(const char **file_var, my_off_t *pos_var) const
{
DBUG_ENTER("THD::get_trans_fixed_pos");
if (file_var)
*file_var = m_trans_fixed_log_file;
if (pos_var)
*pos_var= m_trans_end_pos;
DBUG_PRINT("return", ("file: %s, pos: %llu",
file_var ? *file_var : "<none>",
pos_var ? *pos_var : 0));
DBUG_VOID_RETURN;
}
/**@}*/ /**@}*/
/* /*
Error code from committing or rolling back the transaction. Error code from committing or rolling back the transaction.
*/ */
int commit_error; enum Commit_error
{
CE_NONE= 0,
CE_FLUSH_ERROR,
CE_COMMIT_ERROR,
CE_ERROR_COUNT
} commit_error;
/* /*
Define durability properties that engines may check to Define durability properties that engines may check to
improve performance. improve performance.
*/ */
enum durability_properties durability_property; enum durability_properties durability_property;
/* /*
If checking this in conjunction with a wait condition, please If checking this in conjunction with a wait condition, please
include a check after enter_cond() if you want to avoid a race include a check after enter_cond() if you want to avoid a race
skipping to change at line 4200 skipping to change at line 4235
public: public:
TABLE_LIST *table_list; TABLE_LIST *table_list;
TABLE *table; TABLE *table;
private: private:
/** /**
The columns of the table to be inserted into, *or* the columns of the The columns of the table to be inserted into, *or* the columns of the
table from which values are selected. For legacy reasons both are table from which values are selected. For legacy reasons both are
allowed. allowed.
*/ */
List<Item> *fields; List<Item> *fields;
protected:
/// ha_start_bulk_insert has been called. Never cleared.
bool bulk_insert_started;
public: public:
ulonglong autoinc_value_of_last_inserted_row; // autogenerated or not ulonglong autoinc_value_of_last_inserted_row; // autogenerated or not
COPY_INFO info; COPY_INFO info;
COPY_INFO update; ///< the UPDATE part of "info" COPY_INFO update; ///< the UPDATE part of "info"
bool insert_into_view; bool insert_into_view;
/** /**
Creates a select_insert for routing a result set to an existing Creates a select_insert for routing a result set to an existing
table. table.
skipping to change at line 4265 skipping to change at line 4303
TABLE *table_par, TABLE *table_par,
List<Item> *target_columns, List<Item> *target_columns,
List<Item> *target_or_source_columns, List<Item> *target_or_source_columns,
List<Item> *update_fields, List<Item> *update_fields,
List<Item> *update_values, List<Item> *update_values,
enum_duplicates duplic, enum_duplicates duplic,
bool ignore) bool ignore)
:table_list(table_list_par), :table_list(table_list_par),
table(table_par), table(table_par),
fields(target_or_source_columns), fields(target_or_source_columns),
bulk_insert_started(false),
autoinc_value_of_last_inserted_row(0), autoinc_value_of_last_inserted_row(0),
info(COPY_INFO::INSERT_OPERATION, info(COPY_INFO::INSERT_OPERATION,
target_columns, target_columns,
// manage_defaults // manage_defaults
(target_columns == NULL || target_columns->elements != 0), (target_columns == NULL || target_columns->elements != 0),
duplic, duplic,
ignore), ignore),
update(COPY_INFO::UPDATE_OPERATION, update(COPY_INFO::UPDATE_OPERATION,
update_fields, update_fields,
update_values), update_values),
skipping to change at line 5088 skipping to change at line 5127
inline bool add_value_to_list(THD *thd, Item *value) inline bool add_value_to_list(THD *thd, Item *value)
{ {
return thd->lex->value_list.push_back(value); return thd->lex->value_list.push_back(value);
} }
inline bool add_order_to_list(THD *thd, Item *item, bool asc) inline bool add_order_to_list(THD *thd, Item *item, bool asc)
{ {
return thd->lex->current_select->add_order_to_list(thd, item, asc); return thd->lex->current_select->add_order_to_list(thd, item, asc);
} }
inline bool add_gorder_to_list(THD *thd, Item *item, bool asc)
{
return thd->lex->current_select->add_gorder_to_list(thd, item, asc);
}
inline bool add_group_to_list(THD *thd, Item *item, bool asc) inline bool add_group_to_list(THD *thd, Item *item, bool asc)
{ {
return thd->lex->current_select->add_group_to_list(thd, item, asc); return thd->lex->current_select->add_group_to_list(thd, item, asc);
} }
#endif /* MYSQL_SERVER */ #endif /* MYSQL_SERVER */
#endif /* SQL_CLASS_INCLUDED */ #endif /* SQL_CLASS_INCLUDED */
 End of changes. 13 change blocks. 
11 lines changed or deleted 55 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/