Bug #33067 Update of CSV row incorrect for some BLOBs,
Submitted: 7 Dec 2007 17:48 Modified: 9 Apr 18:23
Reporter: Tim Clark
Status: Closed
Category:Server: CSV Severity:S2 (Serious)
Version:5.1.22 OS:Other (i5/OS v5r4 PASE)
Assigned to: Bugs System Target Version:5.1.24
Tags: UPDATE, BLOB, csv
Triage: D2 (Serious)

[7 Dec 2007 17:48] Tim Clark
Description:
The CSV engine does not honor update requests for BLOB fields when the new and old field
values have the same length. "Rows matched" is set to 1, but "Changed" is 0. Other engines
(MyISAM and InnoDB) appear to handle this without a problem.

How to repeat:
create table csvtest (c1 tinyblob) engine=csv;
Query OK, 0 rows affected (0.07 sec)           
                                               
insert into csvtest values("This");            
Query OK, 1 row affected (0.02 sec)            
                                               
update csvtest set c1="That" where c1 = "This";
Query OK, 0 rows affected (0.01 sec)           
Rows matched: 1  Changed: 0  Warnings: 0       
                                               
select * from csvtest;                         
+------+                                       
| c1   |                                       
+------+                                       
| This |                                       
+------+                                       
1 row in set (0.02 sec)
[3 Jan 20:59] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/commits/40530

ChangeSet@1.2649, 2008-01-03 11:58:35-08:00, antony@pcg5ppc.xiphis.org +4 -0
  Bug#33067
    "Update of CSV row incorrect for some BLOBs"
    when reading in rows, move blob columns into temporary storage not
    allocated by Field_blob class or else row update operation will
    alter original row and make mysql think that nothing has been changed.
  fix incrementing wrong statistic values.
[17 Jan 20:17] Mattias Jonsson
OK to push.
[17 Jan 23:22] Brian Aker
Looks good, push.
[17 Jan 23:53] Antony Curtis
Queued to 5.1-engines and 6.0-engines repositories.
[27 Mar 12:21] Bugs System
Pushed into 5.1.24-rc
[27 Mar 18:53] Bugs System
Pushed into 6.0.5-alpha
[31 Mar 22:01] Jon Stephens
Pushed into 5.1.23-ndb-6.3.11.
[9 Apr 18:23] Jon Stephens
Documented in the 5.1.23-ndb-6.3.11, 5.1.24, and 6.0.5 changelogs as follows:

        The CSV engine did not honor update requests for BLOB columns when the
        new column value had the same length as the value to be updated.