mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
MDEV-500: Session variable for server_id
MDEV-26: Global transaction id, partial commit Change server_id to be a session variable. User with SUPER can set it to binlog with different server_id. Implement backward-compatible ::server_id mirror for plugins.
This commit is contained in:
@@ -914,7 +914,7 @@ THD::THD()
|
||||
/* Variables with default values */
|
||||
proc_info="login";
|
||||
where= THD::DEFAULT_WHERE;
|
||||
server_id = ::server_id;
|
||||
variables.server_id = global_system_variables.server_id;
|
||||
slave_net = 0;
|
||||
command=COM_CONNECT;
|
||||
*scramble= '\0';
|
||||
@@ -5157,7 +5157,7 @@ int THD::binlog_write_row(TABLE* table, bool is_trans,
|
||||
size_t const len= pack_row(table, cols, row_data, record);
|
||||
|
||||
Rows_log_event* const ev=
|
||||
binlog_prepare_pending_rows_event(table, server_id, cols, colcnt,
|
||||
binlog_prepare_pending_rows_event(table, variables.server_id, cols, colcnt,
|
||||
len, is_trans,
|
||||
static_cast<Write_rows_log_event*>(0));
|
||||
|
||||
@@ -5201,7 +5201,7 @@ int THD::binlog_update_row(TABLE* table, bool is_trans,
|
||||
#endif
|
||||
|
||||
Rows_log_event* const ev=
|
||||
binlog_prepare_pending_rows_event(table, server_id, cols, colcnt,
|
||||
binlog_prepare_pending_rows_event(table, variables.server_id, cols, colcnt,
|
||||
before_size + after_size, is_trans,
|
||||
static_cast<Update_rows_log_event*>(0));
|
||||
|
||||
@@ -5232,7 +5232,7 @@ int THD::binlog_delete_row(TABLE* table, bool is_trans,
|
||||
size_t const len= pack_row(table, cols, row_data, record);
|
||||
|
||||
Rows_log_event* const ev=
|
||||
binlog_prepare_pending_rows_event(table, server_id, cols, colcnt,
|
||||
binlog_prepare_pending_rows_event(table, variables.server_id, cols, colcnt,
|
||||
len, is_trans,
|
||||
static_cast<Delete_rows_log_event*>(0));
|
||||
|
||||
|
Reference in New Issue
Block a user