• unknown's avatar
    BUG#28971 - ALTER TABLE followed by UPDATE for a CSV table · 0a91dbcf
    unknown authored
                make server crash
    
    UPDATE against CSV table may cause server crash or update a table with wrong
    values.
    
    CSV can write only a whole row at once. That means it must read all columns,
    that it is not going to update, and write them along with updated columns.
    But only limited set of columns was read, those that were needed for the
    UPDATE query.
    
    With this fix all columns are read in case we're performing an UPDATE.
    
    
    mysql-test/r/csv.result:
      A test case for BUG#28971.
    mysql-test/t/csv.test:
      A test case for BUG#28971.
      Flush tables is here just to make crash more probable. If we remove it,
      fields will have old values from previous query and server won't crash.
    storage/csv/ha_tina.cc:
      CSV engine is not capable to update single column,
      because it can only write a row at once. Thus we must
      read all columns if a table is opened for update.
    0a91dbcf
csv.test 100 KB