diff options
author | unknown <svoj@mysql.com/april.(none)> | 2007-06-15 03:22:40 +0500 |
---|---|---|
committer | unknown <svoj@mysql.com/april.(none)> | 2007-06-15 03:22:40 +0500 |
commit | 0a91dbcf53e021155e56c02ee50b4314ffad7ccd (patch) | |
tree | cf09647d5458efd71af8189e95f611cc4c35adff /mysql-test/r/csv.result | |
parent | 837ba138b10f4c6551e935d746942f27a0a198a0 (diff) | |
download | mariadb-git-0a91dbcf53e021155e56c02ee50b4314ffad7ccd.tar.gz |
BUG#28971 - ALTER TABLE followed by UPDATE for a CSV table
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.
Diffstat (limited to 'mysql-test/r/csv.result')
-rw-r--r-- | mysql-test/r/csv.result | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/mysql-test/r/csv.result b/mysql-test/r/csv.result index ede5d9a32fd..1196a264fd3 100644 --- a/mysql-test/r/csv.result +++ b/mysql-test/r/csv.result @@ -5240,3 +5240,11 @@ CREATE TABLE `bug21328` ( insert into bug21328 values (1,NULL,NULL); alter table bug21328 engine=myisam; drop table bug21328; +create table t1(a blob, b int) engine=csv; +insert into t1 values('a', 1); +flush tables; +update t1 set b=2; +select * from t1; +a b +a 2 +drop table t1; |