From: Date: November 6 2005 12:11am Subject: bk commit into 4.1 tree (petr:1.2465) BUG#14672 List-Archive: http://lists.mysql.com/internals/32008 X-Bug: 14672 Message-Id: <20051105231121.8F90D22813A@linux.local> Below is the list of changes that have just been committed into a local 4.1 repository of cps. When cps does a push these changes will be propagated to the main repository and, within 24 hours after the push, to the public repository. For information on how to access the public repository see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html ChangeSet 1.2465 05/11/06 02:11:12 petr@stripped +3 -0 Fix Bug#14672 Bug in deletion sql/examples/ha_tina.cc 1.10 05/11/06 02:11:00 petr@stripped +2 -1 Add O_APPEND flag to my_open. We should always add rows to the end of file mysql-test/t/csv.test 1.4 05/11/06 02:11:00 petr@stripped +19 -0 Add test for a bug mysql-test/r/csv.result 1.3 05/11/06 02:11:00 petr@stripped +27 -0 correct result file # This is a BitKeeper patch. What follows are the unified diffs for the # set of deltas contained in the patch. The rest of the patch, the part # that BitKeeper cares about, is below these diffs. # User: petr # Host: owlet. # Root: /home/cps/mysql/trees/mysql-4.1 --- 1.2/mysql-test/r/csv.result 2005-11-05 15:07:59 +03:00 +++ 1.3/mysql-test/r/csv.result 2005-11-06 02:11:00 +03:00 @@ -4949,3 +4949,30 @@ 6 6 DROP TABLE bug13894; +DROP TABLE IF EXISTS bug14672; +CREATE TABLE bug14672 (c1 integer) engine = CSV; +INSERT INTO bug14672 VALUES (1), (2), (3); +SELECT * FROM bug14672; +c1 +1 +2 +3 +DELETE FROM bug14672 WHERE c1 = 2; +SELECT * FROM bug14672; +c1 +1 +3 +INSERT INTO bug14672 VALUES (4); +SELECT * FROM bug14672; +c1 +1 +3 +4 +INSERT INTO bug14672 VALUES (5); +SELECT * FROM bug14672; +c1 +1 +3 +4 +5 +DROP TABLE bug14672; --- 1.3/mysql-test/t/csv.test 2005-11-05 15:07:59 +03:00 +++ 1.4/mysql-test/t/csv.test 2005-11-06 02:11:00 +03:00 @@ -1332,4 +1332,23 @@ SELECT * FROM bug13894; DROP TABLE bug13894; +# +# Bug #14672 Bug in deletion +# + +--disable_warnings +DROP TABLE IF EXISTS bug14672; +--enable_warnings + +CREATE TABLE bug14672 (c1 integer) engine = CSV; +INSERT INTO bug14672 VALUES (1), (2), (3); +SELECT * FROM bug14672; +DELETE FROM bug14672 WHERE c1 = 2; +SELECT * FROM bug14672; +INSERT INTO bug14672 VALUES (4); +SELECT * FROM bug14672; +INSERT INTO bug14672 VALUES (5); +SELECT * FROM bug14672; +DROP TABLE bug14672; + # End of 4.1 tests --- 1.9/sql/examples/ha_tina.cc 2005-11-05 15:07:59 +03:00 +++ 1.10/sql/examples/ha_tina.cc 2005-11-06 02:11:00 +03:00 @@ -166,7 +166,8 @@ thr_lock_init(&share->lock); pthread_mutex_init(&share->mutex,MY_MUTEX_INIT_FAST); - if ((share->data_file= my_open(data_file_name, O_RDWR, MYF(0))) == -1) + if ((share->data_file= my_open(data_file_name, O_RDWR|O_APPEND, + MYF(0))) == -1) goto error2; /* We only use share->data_file for writing, so we scan to the end to append */