1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

SQL: fill_record() field-value inconsistency fix [#365 bug 2]

Affected tests (forced mode): binlog_encryption.encrypted_slave
This commit is contained in:
Aleksey Midenkov
2017-11-28 22:56:01 +03:00
parent 47ea526efa
commit 8d548f8e86
6 changed files with 66 additions and 31 deletions

View File

@ -145,6 +145,10 @@ class Table_triggers_list: public Sql_alloc
*/
Field **record0_field;
uchar *extra_null_bitmap;
/**
System Versioning: record0_field without system fields.
*/
Field **vers_user_field;
/**
Copy of TABLE::Field array with field pointers set to TABLE::record[1]
buffer instead of TABLE::record[0] (used for OLD values in on UPDATE
@ -208,7 +212,7 @@ public:
/* End of character ser context. */
Table_triggers_list(TABLE *table_arg)
:record0_field(0), extra_null_bitmap(0), record1_field(0),
:record0_field(0), extra_null_bitmap(0), vers_user_field(0), record1_field(0),
trigger_table(table_arg),
m_has_unparseable_trigger(false), count(0)
{
@ -273,6 +277,7 @@ public:
TABLE_LIST *table_list);
Field **nullable_fields() { return record0_field; }
Field **vers_user_fields() { return vers_user_field; }
void reset_extra_null_bitmap()
{
size_t null_bytes= (trigger_table->s->stored_fields -
@ -307,13 +312,6 @@ private:
}
};
inline Field **TABLE::field_to_fill()
{
return triggers && triggers->nullable_fields() ? triggers->nullable_fields()
: non_generated_field ? non_generated_field : field;
}
bool add_table_for_trigger(THD *thd,
const sp_name *trg_name,
bool continue_if_not_exist,