List:Internals« Previous MessageNext Message »
From:msvensson Date:November 21 2005 12:28pm
Subject:bk commit into 4.1 tree (msvensson:1.2467) BUG#14514
View as plain text  
Below is the list of changes that have just been committed into a local
4.1 repository of msvensson. When msvensson 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.2467 05/11/21 12:27:58 msvensson@neptunus.(none) +5 -0
  Bug #14514  	Creating table with packed key fails silently
   - Backport from 5.0

  sql/handler.cc
    1.171 05/11/21 12:27:55 msvensson@neptunus.(none) +1 -1
    Use new bit for create from engine

  sql/ha_ndbcluster.cc
    1.174 05/11/21 12:27:55 msvensson@neptunus.(none) +1 -1
    Use new bitmask for table_options to detect if create from engine

  mysql-test/t/ndb_basic.test
    1.27 05/11/21 12:27:55 msvensson@neptunus.(none) +8 -0
    Add test case for bug14514

  mysql-test/r/ndb_basic.result
    1.25 05/11/21 12:27:55 msvensson@neptunus.(none) +4 -0
    Add test result

  include/my_base.h
    1.65 05/11/21 12:27:55 msvensson@neptunus.(none) +1 -1
    Rename HA_CREATE_FROM_ENGINE to HA_OPTION_CREATE_FROM_ENGINE, ie. it's a bit in the
table_options variable

# 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:	msvensson
# Host:	neptunus.(none)
# Root:	/home/msvensson/mysql/mysql-4.1

--- 1.64/include/my_base.h	2005-10-25 01:27:29 +02:00
+++ 1.65/include/my_base.h	2005-11-21 12:27:55 +01:00
@@ -231,6 +231,7 @@
 #define HA_OPTION_CHECKSUM		32
 #define HA_OPTION_DELAY_KEY_WRITE	64
 #define HA_OPTION_NO_PACK_KEYS		128  /* Reserved for MySQL */
+#define HA_OPTION_CREATE_FROM_ENGINE	256
 #define HA_OPTION_TEMP_COMPRESS_RECORD	((uint) 16384)	/* set by isamchk */
 #define HA_OPTION_READ_ONLY_DATA	((uint) 32768)	/* Set by isamchk */
 
@@ -241,7 +242,6 @@
 #define HA_CREATE_TMP_TABLE	4
 #define HA_CREATE_CHECKSUM	8
 #define HA_CREATE_DELAY_KEY_WRITE 64
-#define HA_CREATE_FROM_ENGINE   128 
 
 	/* Bits in flag to _status */
 

--- 1.170/sql/handler.cc	2005-07-20 18:40:47 +02:00
+++ 1.171/sql/handler.cc	2005-11-21 12:27:55 +01:00
@@ -1382,7 +1382,7 @@
     DBUG_RETURN(3);
 
   update_create_info_from_table(&create_info, &table);
-  create_info.table_options|= HA_CREATE_FROM_ENGINE;
+  create_info.table_options|= HA_OPTION_CREATE_FROM_ENGINE;
 
   if (lower_case_table_names == 2 &&
       !(table.file->table_flags() & HA_FILE_BASED))

--- 1.24/mysql-test/r/ndb_basic.result	2005-04-08 11:38:20 +02:00
+++ 1.25/mysql-test/r/ndb_basic.result	2005-11-21 12:27:55 +01:00
@@ -667,3 +667,7 @@
 57	newval
 58	newval
 drop table t1;
+CREATE TABLE t1 ( b INT ) PACK_KEYS = 0 ENGINE = ndb;
+select * from t1;
+b
+drop table t1;

--- 1.26/mysql-test/t/ndb_basic.test	2005-07-28 02:21:44 +02:00
+++ 1.27/mysql-test/t/ndb_basic.test	2005-11-21 12:27:55 +01:00
@@ -606,4 +606,12 @@
 
 drop table t1;
 
+#
+# BUG#14514 Creating table with packed key fails silently
+#
+
+CREATE TABLE t1 ( b INT ) PACK_KEYS = 0 ENGINE = ndb;
+select * from t1;
+drop table t1;
+
 # End of 4.1 tests

--- 1.173/sql/ha_ndbcluster.cc	2005-10-14 11:22:51 +02:00
+++ 1.174/sql/ha_ndbcluster.cc	2005-11-21 12:27:55 +01:00
@@ -3711,7 +3711,7 @@
   const void *data, *pack_data;
   const char **key_names= form->keynames.type_names;
   char name2[FN_HEADLEN];
-  bool create_from_engine= (info->table_options & HA_CREATE_FROM_ENGINE);
+  bool create_from_engine= (info->table_options & HA_OPTION_CREATE_FROM_ENGINE);
    
   DBUG_ENTER("create");
   DBUG_PRINT("enter", ("name: %s", name));
Thread
bk commit into 4.1 tree (msvensson:1.2467) BUG#14514msvensson21 Nov