List:Internals« Previous MessageNext Message »
From:serg Date:August 31 2002 8:42pm
Subject:bk commit into 4.0 tree
View as plain text  
Below is the list of changes that have just been committed into a local
4.0 repository of serg. When serg 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://www.mysql.com/doc/I/n/Installing_source_tree.html

ChangeSet
  1.1277 02/08/31 20:42:41 serg@stripped +6 -0
  LOCK+change+OPTIMIZE MyISAM bug

  sql/ha_myisam.cc
    1.101 02/08/31 20:42:39 serg@stripped +2 -1
    LOCK+change+OPTIMIZE MyISAM bug

  mysql-test/t/myisam.test
    1.10 02/08/31 20:42:39 serg@stripped +11 -0
    LOCK+change+OPTIMIZE MyISAM bug

  mysql-test/t/delete.test
    1.5 02/08/31 20:42:39 serg@stripped +0 -8
    moving the test case to where it belongs

  mysql-test/r/myisam.result
    1.13 02/08/31 20:42:39 serg@stripped +8 -0
    LOCK+change+OPTIMIZE MyISAM bug

  mysql-test/r/delete.result
    1.4 02/08/31 20:42:39 serg@stripped +0 -13
    moving the test case to where it belongs

  myisam/mi_delete_all.c
    1.9 02/08/31 20:42:39 serg@stripped +2 -2
    reverting the wrong bugfix

# 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:	serg
# Host:	serg.mysql.com
# Root:	/usr/home/serg/Abk/mysql-4.0

--- 1.8/myisam/mi_delete_all.c	Fri Aug 30 19:17:22 2002
+++ 1.9/myisam/mi_delete_all.c	Sat Aug 31 20:42:39 2002
@@ -35,11 +35,11 @@
   if (_mi_mark_file_changed(info))
     goto err;
 
-  state->state.records=info->state->records=info->state->del=state->split=0;
+  info->state->records=info->state->del=state->split=0;
   state->dellink = HA_OFFSET_ERROR;
   state->sortkey=  (ushort) ~0;
   info->state->key_file_length=share->base.keystart;
-  state->state.data_file_length=info->state->data_file_length=0;
+  info->state->data_file_length=0;
   info->state->empty=info->state->key_empty=0;
   state->checksum=0;
 

--- 1.100/sql/ha_myisam.cc	Tue Jul 23 15:31:14 2002
+++ 1.101/sql/ha_myisam.cc	Sat Aug 31 20:42:39 2002
@@ -566,11 +566,12 @@
   }
 
   if (!optimize ||
+      memcmp(file->state, & share->state.state, sizeof(MI_STATUS_INFO)) ||
       ((file->state->del || share->state.split != file->state->records) &&
        (!(param.testflag & T_QUICK) ||
 	!(share->state.changed & STATE_NOT_OPTIMIZED_KEYS))))
   {
-    ulonglong key_map= ((local_testflag & T_CREATE_MISSING_KEYS) ? 
+    ulonglong key_map= ((local_testflag & T_CREATE_MISSING_KEYS) ?
 			((ulonglong) 1L << share->base.keys)-1 :
 			share->state.key_map);
     uint testflag=param.testflag;

--- 1.4/mysql-test/t/delete.test	Fri Aug 30 19:17:22 2002
+++ 1.5/mysql-test/t/delete.test	Sat Aug 31 20:42:39 2002
@@ -35,11 +35,3 @@
 insert into t1 values (2),(4),(6),(8),(10),(12),(14),(16),(18),(20),(22),(24),(26),(23),(27);
 delete from t1 where a=27;
 drop table t1;
-CREATE TABLE t1 (a INT);
-INSERT INTO  t1 VALUES (1), (2), (3);
-LOCK TABLES t1 WRITE;
-DELETE FROM t1;
-OPTIMIZE TABLE t1;
-SELECT * FROM t1;
-CHECK TABLE t1;
-drop table if exists t1;

--- 1.12/mysql-test/r/myisam.result	Sun Jun 30 23:50:28 2002
+++ 1.13/mysql-test/r/myisam.result	Sat Aug 31 20:42:39 2002
@@ -100,3 +100,11 @@
 Table	Op	Msg_type	Msg_text
 test.t1	check	status	OK
 drop table t1;
+CREATE TABLE t1 (a INT);
+INSERT INTO  t1 VALUES (1), (2), (3);
+LOCK TABLES t1 WRITE;
+INSERT INTO  t1 VALUES (1), (2), (3);
+OPTIMIZE TABLE t1;
+Table	Op	Msg_type	Msg_text
+test.t1	optimize	status	OK
+DROP TABLE t1;

--- 1.9/mysql-test/t/myisam.test	Sun Jun 30 23:50:28 2002
+++ 1.10/mysql-test/t/myisam.test	Sat Aug 31 20:42:39 2002
@@ -93,3 +93,14 @@
 REPAIR TABLE t1;
 CHECK TABLE t1;
 drop table t1;
+
+#
+# Test of OPTIMIZE of locked and modified tables
+#
+CREATE TABLE t1 (a INT);
+INSERT INTO  t1 VALUES (1), (2), (3);
+LOCK TABLES t1 WRITE;
+INSERT INTO  t1 VALUES (1), (2), (3);
+OPTIMIZE TABLE t1;
+DROP TABLE t1;
+

--- 1.3/mysql-test/r/delete.result	Fri Aug 30 19:17:22 2002
+++ 1.4/mysql-test/r/delete.result	Sat Aug 31 20:42:39 2002
@@ -24,16 +24,3 @@
 insert into t1 values (2),(4),(6),(8),(10),(12),(14),(16),(18),(20),(22),(24),(26),(23),(27);
 delete from t1 where a=27;
 drop table t1;
-CREATE TABLE t1 (a INT);
-INSERT INTO  t1 VALUES (1), (2), (3);
-LOCK TABLES t1 WRITE;
-DELETE FROM t1;
-OPTIMIZE TABLE t1;
-Table	Op	Msg_type	Msg_text
-test.t1	optimize	status	OK
-SELECT * FROM t1;
-a
-CHECK TABLE t1;
-Table	Op	Msg_type	Msg_text
-test.t1	check	status	OK
-drop table if exists t1;
Thread
bk commit into 4.0 treeserg31 Aug