mariadb/mysql-test/suite
Monty ea1b25046c New simpler bugfix for UPDATE and virtual BLOBs
When updating a table with virtual BLOB columns, the following might
happen:
- an old record is read from the table, it has no virtual blob values
- update_virtual_fields() is run, vcol blob gets its value into the
  record. But only a pointer to the value is in the table->record[0],
  the value is in Field_blob::value String (but it doesn't have to be!
  it can be in the record, if the column is just a copy of another
  columns: ... b VARCHAR, c BLOB AS (b) ...)
- store_record(table,record[1]), old record now is in record[1]
- fill_record() prepares new values in record[0], vcol blob is updated,
  new value replaces the old one in the Field_blob::value
- now both record[1] and record[0] have a pointer that points to the
  *new* vcol blob value. Or record[1] has a pointer to nowhere if
   Field_blob::value had to realloc.

To fix this I have introduced a new String object 'read_value' in
Field_blob.  When updating virtual columns when a row has been read,
the allocated value is stored in 'read_value' instead of 'value'.  The
allocated blobs for the new row is stored in 'value' as before.

I also made, as a safety precaution, the insert delayed handling of
blobs more general by using value to store strings instead of the
record.  This ensures that virtual functions on delayed insert should
work in as in the case of normal insert.

Triggers are now properly updating the read, write and vcol maps for used
fields. This means that we don't need VCOL_UPDATE_FOR_READ_WRITE anymore
and there is no need for any other special handling of triggers in
update_virtual_fields().

To be able to test how many times virtual fields are invoked, I also
relaxed rules that one can use local (@) variables in DEFAULT and non
persistent virtual field expressions.
2017-01-11 09:18:35 +02:00
..
archive Merge 10.1 into 10.2 2017-01-10 14:39:28 +02:00
binlog cleanup: binlog.binlog_killed_simulate 2016-12-29 13:23:42 +01:00
binlog_encryption cleanup: binlog.binlog_row_annotate 2016-12-29 13:23:35 +01:00
csv MDEV-6720 - enable connection log in mysqltest by default 2016-03-31 10:11:16 +04:00
encryption Merge 10.1 into 10.2 2017-01-09 09:47:12 +02:00
engines Follow-up for a411d7f4f6 - change in formatting of SHOW CREATE TABLE 2016-12-15 02:35:31 +02:00
federated bugfix: multi-UPDATE, vcols, const tables 2016-12-12 20:27:38 +01:00
funcs_1 enable tests that were skipped because of have_xtradb 2016-12-29 13:23:49 +01:00
funcs_2
galera Merge 10.1 to 10.2 2017-01-05 10:48:03 +02:00
galera_3nodes Merge 10.1 into 10.2 2016-12-30 08:53:54 +02:00
gcol Merge branch '10.1' into 10.2 2016-12-29 13:23:18 +01:00
handler MDEV-7660 - MySQL WL#6671 "Improve scalability by not using thr_lock.c locks 2016-11-03 16:35:15 +04:00
heap
innodb Merge 10.1 into 10.2 2017-01-09 09:47:12 +02:00
innodb_fts Merge branch 'bb-10.2-mdev-6076' into 10.2 2016-12-29 15:05:04 +02:00
innodb_gis Merge branch '10.1' into 10.2 2016-12-29 13:23:18 +01:00
innodb_zip Merge branch '10.1' into 10.2 2016-12-29 13:23:18 +01:00
jp
large_tests
maria Merge branch '10.1' into 10.2 2016-12-29 13:23:18 +01:00
mtr/t
mtr2
multi_source Merge branch '10.1' into 10.2 2016-12-29 13:23:18 +01:00
ndb
optimizer_unfixed_bugs Merge branch '10.1' into 10.2 2016-12-29 13:23:18 +01:00
parts Merge branch 'bb-10.2-mdev-6076' into 10.2 2016-12-29 15:05:04 +02:00
percona MDEV-6720 - enable connection log in mysqltest by default 2016-03-31 10:11:16 +04:00
perfschema Fixed bugs found by mysql-test-run: 2017-01-11 09:18:35 +02:00
perfschema_stress
plugins Merge branch '10.1' into 10.2 2016-12-29 13:23:18 +01:00
roles Merge branch '10.1' into 10.2 2016-12-29 13:23:18 +01:00
rpl Fixed issues found by buildbot 2017-01-11 09:18:35 +02:00
storage_engine cleanup: remove Item::intro_version 2016-12-12 20:27:25 +01:00
stress MDEV-6720 - enable connection log in mysqltest by default 2016-03-31 10:11:16 +04:00
sys_vars Make atomic writes general 2017-01-11 09:18:35 +02:00
unit better identify C/C unit tests in mysql-test 2016-09-12 17:51:50 +02:00
vcol New simpler bugfix for UPDATE and virtual BLOBs 2017-01-11 09:18:35 +02:00
wsrep Merge branch '10.1' into 10.2 2016-12-29 13:23:18 +01:00