mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Cherry picking patch for BUG#37051
This commit is contained in:
@ -237,12 +237,15 @@ struct sql_ex_info
|
||||
packet (i.e. a query) sent from client to master;
|
||||
First, an auxiliary log_event status vars estimation:
|
||||
*/
|
||||
#define MAX_SIZE_LOG_EVENT_STATUS (4 /* flags2 */ + \
|
||||
8 /* sql mode */ + \
|
||||
1 + 1 + 255 /* catalog */ + \
|
||||
4 /* autoinc */ + \
|
||||
6 /* charset */ + \
|
||||
MAX_TIME_ZONE_NAME_LENGTH)
|
||||
#define MAX_SIZE_LOG_EVENT_STATUS (1 + 4 /* type, flags2 */ + \
|
||||
1 + 8 /* type, sql_mode */ + \
|
||||
1 + 1 + 255 /* type, length, catalog */ + \
|
||||
1 + 4 /* type, auto_increment */ + \
|
||||
1 + 6 /* type, charset */ + \
|
||||
1 + 1 + 255 /* type, length, time_zone */ + \
|
||||
1 + 2 /* type, lc_time_names_number */ + \
|
||||
1 + 2 /* type, charset_database_number */ + \
|
||||
1 + 8 /* type, table_map_for_update */)
|
||||
#define MAX_LOG_EVENT_HEADER ( /* in order of Query_log_event::write */ \
|
||||
LOG_EVENT_HEADER_LEN + /* write_header */ \
|
||||
QUERY_HEADER_LEN + /* write_data */ \
|
||||
@ -306,6 +309,8 @@ struct sql_ex_info
|
||||
#define Q_LC_TIME_NAMES_CODE 7
|
||||
|
||||
#define Q_CHARSET_DATABASE_CODE 8
|
||||
|
||||
#define Q_TABLE_MAP_FOR_UPDATE_CODE 9
|
||||
/* Intvar event post-header */
|
||||
|
||||
#define I_TYPE_OFFSET 0
|
||||
@ -1455,6 +1460,22 @@ protected:
|
||||
This field is written if it is not 0.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>table_map_for_update</td>
|
||||
<td>Q_TABLE_MAP_FOR_UPDATE_CODE == 9</td>
|
||||
<td>8 byte integer</td>
|
||||
|
||||
<td>The value of the table map that is to be updated by the
|
||||
multi-table update query statement. Every bit of this variable
|
||||
represents a table, and is set to 1 if the corresponding table is
|
||||
to be updated by this statement.
|
||||
|
||||
The value of this variable is set when executing a multi-table update
|
||||
statement and used by slave to apply filter rules without opening
|
||||
all the tables on slave. This is required because some tables may
|
||||
not exist on slave because of the filter rules.
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
@subsection Query_log_event_notes_on_previous_versions Notes on Previous Versions
|
||||
@ -1471,6 +1492,9 @@ protected:
|
||||
|
||||
* See Q_CHARSET_DATABASE_CODE in the table above.
|
||||
|
||||
* When adding new status vars, please don't forget to update the
|
||||
MAX_SIZE_LOG_EVENT_STATUS, and update function code_name
|
||||
|
||||
*/
|
||||
class Query_log_event: public Log_event
|
||||
{
|
||||
@ -1548,6 +1572,11 @@ public:
|
||||
const char *time_zone_str;
|
||||
uint lc_time_names_number; /* 0 means en_US */
|
||||
uint charset_database_number;
|
||||
/*
|
||||
map for tables that will be updated for a multi-table update query
|
||||
statement, for other query statements, this will be zero.
|
||||
*/
|
||||
ulonglong table_map_for_update;
|
||||
|
||||
#ifndef MYSQL_CLIENT
|
||||
|
||||
|
Reference in New Issue
Block a user