List:Internals« Previous MessageNext Message »
From:jani Date:June 30 2005 1:13pm
Subject:bk commit into 4.1 tree (jani:1.2327) BUG#6993
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of jani. When jani 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.2327 05/06/30 16:13:22 jani@stripped +4 -0
  Fixed Bug#11226 and reverted fix for Bug#6993.
  Using 8 bytes for data pointer does not work at least on
  all computers. The result may become 0 or negative number.
  (mysqld, myisamchk)
   

  sql/mysqld.cc
    1.578 05/06/30 16:13:18 jani@stripped +1 -1
    Restricted myisam_data_pointer_size back to 7.

  mysql-test/t/variables.test
    1.48 05/06/30 16:13:18 jani@stripped +5 -1
    Restricted myisam_data_pointer_size back to 7.

  mysql-test/r/variables.result
    1.60 05/06/30 16:13:18 jani@stripped +2 -2
    Restricted myisam_data_pointer_size back to 7.

  myisam/mi_create.c
    1.45 05/06/30 16:13:18 jani@stripped +3 -4
    Fixed Bug#11226, "Dynamic table >4GB issue".

# 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:	jani
# Host:	ua141d10.elisa.omakaista.fi
# Root:	/home/my/bk/mysql-4.1

--- 1.44/myisam/mi_create.c	2005-04-01 19:56:42 +03:00
+++ 1.45/myisam/mi_create.c	2005-06-30 16:13:18 +03:00
@@ -194,11 +194,10 @@
       test(test_all_bits(options, HA_OPTION_CHECKSUM | HA_PACK_RECORD));
   min_pack_length+=packed;
 
-  if (!ci->data_file_length)
+  if (!ci->data_file_length && ci->max_rows)
   {
-    if (ci->max_rows == 0 || pack_reclength == INT_MAX32)
-      ci->data_file_length= INT_MAX32-1;		/* Should be enough */
-    else if ((~(ulonglong) 0)/ci->max_rows < (ulonglong) pack_reclength)
+    if (pack_reclength == INT_MAX32 ||
+             (~(ulonglong) 0)/ci->max_rows < (ulonglong) pack_reclength)
       ci->data_file_length= ~(ulonglong) 0;
     else
       ci->data_file_length=(ulonglong) ci->max_rows*pack_reclength;

--- 1.577/sql/mysqld.cc	2005-06-21 18:18:50 +03:00
+++ 1.578/sql/mysqld.cc	2005-06-30 16:13:18 +03:00
@@ -5153,7 +5153,7 @@
    "Default pointer size to be used for MyISAM tables.",
    (gptr*) &myisam_data_pointer_size,
    (gptr*) &myisam_data_pointer_size, 0, GET_ULONG, REQUIRED_ARG,
-   4, 2, 8, 0, 1, 0},
+   4, 2, 7, 0, 1, 0},
   {"myisam_max_extra_sort_file_size", OPT_MYISAM_MAX_EXTRA_SORT_FILE_SIZE,
    "Used to help MySQL to decide when to use the slow but safe key cache index create method.",
    (gptr*) &global_system_variables.myisam_max_extra_sort_file_size,

--- 1.59/mysql-test/r/variables.result	2005-06-02 14:16:36 +03:00
+++ 1.60/mysql-test/r/variables.result	2005-06-30 16:13:18 +03:00
@@ -482,10 +482,10 @@
   `c3` longtext
 ) ENGINE=MyISAM DEFAULT CHARSET=latin1
 drop table t1;
-SET GLOBAL MYISAM_DATA_POINTER_SIZE= 8;
+SET GLOBAL MYISAM_DATA_POINTER_SIZE= 7;
 SHOW VARIABLES LIKE 'MYISAM_DATA_POINTER_SIZE';
 Variable_name	Value
-myisam_data_pointer_size	8
+myisam_data_pointer_size	7
 SET GLOBAL table_cache=-1;
 SHOW VARIABLES LIKE 'table_cache';
 Variable_name	Value

--- 1.47/mysql-test/t/variables.test	2005-06-02 14:16:37 +03:00
+++ 1.48/mysql-test/t/variables.test	2005-06-30 16:13:18 +03:00
@@ -363,9 +363,13 @@
 
 #
 # Bug #6993: myisam_data_pointer_size
+# Wrong bug report, data pointer size must be restricted to 7,
+# setting to 8 will not work on all computers, myisamchk and
+# the server may see a wrong value, such as 0 or negative number
+# if 8 bytes is set.
 #
 
-SET GLOBAL MYISAM_DATA_POINTER_SIZE= 8;
+SET GLOBAL MYISAM_DATA_POINTER_SIZE= 7;
 SHOW VARIABLES LIKE 'MYISAM_DATA_POINTER_SIZE';
 
 #
Thread
bk commit into 4.1 tree (jani:1.2327) BUG#6993jani30 Jun