| 9175 | }; |
| 9176 | |
| 9177 | CPP_UNNAMED_NS_END |
| 9178 | |
| 9179 | int THD::binlog_write_row(TABLE* table, bool is_trans, |
| 9180 | uchar const *record, |
| 9181 | const uchar* extra_row_info) |
| 9182 | { |
| 9183 | DBUG_ASSERT(is_current_stmt_binlog_format_row() && mysql_bin_log.is_open()); |
| 9184 | |
| 9185 | /* |
| 9186 | Pack records into format for transfer. We are allocating more |
| 9187 | memory than needed, but that doesn't matter. |
| 9188 | */ |
| 9189 | Row_data_memory memory(table, max_row_length(table, record)); |
| 9190 | if (!memory.has_memory()) |
| 9191 | return HA_ERR_OUT_OF_MEM; |
| 9192 | |
| 9193 | uchar *row_data= memory.slot(0); |
| 9194 | |
| 9195 | size_t const len= pack_row(table, table->write_set, row_data, record); |
| 9196 | |
| 9197 | Rows_log_event* const ev= |
| 9198 | binlog_prepare_pending_rows_event(table, server_id, len, is_trans, |
| 9199 | static_cast<Write_rows_log_event*>(0), |
| 9200 | extra_row_info); |
| 9201 | |
| 9202 | if (unlikely(ev == 0)) |
| 9203 | return HA_ERR_OUT_OF_MEM; |
| 9204 | |
| 9205 | return ev->add_row_data(row_data, len); |
| 9206 | } |
| 9207 | |
| 9208 | int THD::binlog_update_row(TABLE* table, bool is_trans, |
| 9209 | const uchar *before_record, |
nothing calls this directly
no outgoing calls
no test coverage detected