List:Commits« Previous MessageNext Message »
From:jonas Date:January 4 2006 3:31pm
Subject:bk commit into 5.1 tree (jonas:1.1986)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of jonas. When jonas 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.1986 06/01/04 16:30:58 jonas@stripped +20 -0
  Merge perch.ndb.mysql.com:/home/jonas/src/mysql-5.1-new
  into  perch.ndb.mysql.com:/home/jonas/src/51-dd

  sql/ha_partition.cc
    1.19 06/01/04 16:30:55 jonas@stripped +0 -0
    SCCS merged

  libmysqld/Makefile.am
    1.73 06/01/04 16:30:55 jonas@stripped +0 -0
    SCCS merged

  storage/ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp
    1.17 06/01/04 16:27:59 jonas@stripped +0 -0
    Auto merged

  storage/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp
    1.14 06/01/04 16:27:59 jonas@stripped +0 -0
    Auto merged

  storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp
    1.97 06/01/04 16:27:59 jonas@stripped +0 -0
    Auto merged

  storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp
    1.42 06/01/04 16:27:59 jonas@stripped +0 -0
    Auto merged

  storage/ndb/src/kernel/blocks/backup/Backup.cpp
    1.30 06/01/04 16:27:59 jonas@stripped +0 -0
    Auto merged

  sql/sql_yacc.yy
    1.425 06/01/04 16:27:59 jonas@stripped +0 -0
    Auto merged

  sql/sql_parse.cc
    1.486 06/01/04 16:27:59 jonas@stripped +0 -0
    Auto merged

  sql/share/errmsg.txt
    1.56 06/01/04 16:27:59 jonas@stripped +0 -0
    Auto merged

  sql/sql_lex.h
    1.208 06/01/04 16:27:58 jonas@stripped +0 -0
    Auto merged

  sql/mysql_priv.h
    1.347 06/01/04 16:27:58 jonas@stripped +0 -0
    Auto merged

  sql/log.cc
    1.182 06/01/04 16:27:58 jonas@stripped +0 -0
    Auto merged

  sql/handler.h
    1.171 06/01/04 16:27:58 jonas@stripped +0 -0
    Auto merged

  sql/ha_ndbcluster.cc
    1.221 06/01/04 16:27:58 jonas@stripped +0 -0
    Auto merged

  sql/ha_myisammrg.cc
    1.77 06/01/04 16:27:58 jonas@stripped +0 -0
    Auto merged

  sql/ha_myisam.cc
    1.167 06/01/04 16:27:58 jonas@stripped +0 -0
    Auto merged

  sql/ha_berkeley.cc
    1.167 06/01/04 16:27:58 jonas@stripped +0 -0
    Auto merged

  sql/Makefile.am
    1.124 06/01/04 16:27:58 jonas@stripped +0 -0
    Auto merged

  BitKeeper/etc/ignore
    1.219 06/01/04 16:27:50 jonas@stripped +38 -105
    auto-union

# 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:	jonas
# Host:	perch.ndb.mysql.com
# Root:	/home/jonas/src/51-dd/RESYNC

--- 1.123/sql/Makefile.am	2005-12-22 09:07:58 +01:00
+++ 1.124/sql/Makefile.am	2006-01-04 16:27:58 +01:00
@@ -54,6 +54,7 @@
 			sql_error.h field.h handler.h mysqld_suffix.h \
 			ha_heap.h ha_myisam.h ha_myisammrg.h ha_partition.h \
 			opt_range.h protocol.h rpl_tblmap.h \
+			log.h sql_show.h rpl_rli.h \
 			sql_select.h structs.h table.h sql_udf.h hash_filo.h\
 			lex.h lex_symbol.h sql_acl.h sql_crypt.h  \
 			log_event.h sql_repl.h slave.h rpl_filter.h \

--- 1.166/sql/ha_berkeley.cc	2005-12-29 08:19:36 +01:00
+++ 1.167/sql/ha_berkeley.cc	2006-01-04 16:27:58 +01:00
@@ -700,7 +700,7 @@
     if ((error= db_env->txn_begin(db_env, NULL, (DB_TXN**) &transaction, 0)) ||
 	(error= (file->open(file, transaction,
 			    fn_format(name_buff, name, "", ha_berkeley_ext,
-				      2 | 4),
+				      MY_UNPACK_FILENAME|MY_APPEND_EXT),
 			    "main", DB_BTREE, open_mode, 0))) ||
 	(error= transaction->commit(transaction, 0)))
     {
@@ -2094,7 +2094,8 @@
   int error;
   DBUG_ENTER("ha_berkeley::create");
 
-  fn_format(name_buff,name,"", ha_berkeley_ext,2 | 4);
+  fn_format(name_buff,name,"", ha_berkeley_ext,
+            MY_UNPACK_FILENAME|MY_APPEND_EXT);
 
   /* Create the main table that will hold the real rows */
   if ((error= create_sub_table(name_buff,"main",DB_BTREE,0)))
@@ -2143,8 +2144,9 @@
   if ((error=db_create(&file, db_env, 0)))
     my_errno=error; /* purecov: inspected */
   else
-    error=file->remove(file,fn_format(name_buff,name,"",ha_berkeley_ext,2 | 4),
-		       NULL,0);
+    error=file->remove(file,fn_format(name_buff,name,"",ha_berkeley_ext,
+                                      MY_UNPACK_FILENAME|MY_APPEND_EXT),
+                       NULL,0);
   file=0;					// Safety
   DBUG_RETURN(error);
 }
@@ -2162,9 +2164,11 @@
   {
     /* On should not do a file->close() after rename returns */
     error= file->rename(file, 
-			fn_format(from_buff, from, "", ha_berkeley_ext, 2 | 4),
+			fn_format(from_buff, from, "", 
+                                  ha_berkeley_ext,
+                                  MY_UNPACK_FILENAME|MY_APPEND_EXT),
 			NULL, fn_format(to_buff, to, "", ha_berkeley_ext,
-					2 | 4), 0);
+                                        MY_UNPACK_FILENAME|MY_APPEND_EXT), 0);
   }
   return error;
 }
@@ -2414,7 +2418,8 @@
 			   (hidden_primary_key ? berkeley_cmp_hidden_key :
 			    berkeley_cmp_packed_key));
   tmp_file->app_private= (void*) (table->key_info+table->primary_key);
-  fn_format(name_buff,share->table_name.str,"", ha_berkeley_ext, 2 | 4);
+  fn_format(name_buff,share->table_name.str,"", ha_berkeley_ext,
+            MY_UNPACK_FILENAME|MY_APPEND_EXT);      
   if ((error=tmp_file->verify(tmp_file, name_buff, NullS, (FILE*) 0,
 			      hidden_primary_key ? 0 : DB_NOORDERCHK)))
   {
@@ -2560,7 +2565,8 @@
       char name_buff[FN_REFLEN];
       uint open_mode= (((table->db_stat & HA_READ_ONLY) ? DB_RDONLY : 0)
 		       | DB_THREAD);
-      fn_format(name_buff, share->table_name, "", ha_berkeley_ext, 2 | 4);
+      fn_format(name_buff, share->table_name, "", ha_berkeley_ext,
+                MY_UNPACK_FILENAME|MY_APPEND_EXT);
       if (!db_create(&share->status_block, db_env, 0))
       {
 	if (share->status_block->open(share->status_block, NULL, name_buff,
@@ -2642,7 +2648,8 @@
       share->status_block->set_flags(share->status_block,0); /* purecov: inspected */
       if (share->status_block->open(share->status_block, NULL,
 				    fn_format(name_buff,share->table_name,
-                                              "", ha_berkeley_ext,2 | 4),
+                                              "", ha_berkeley_ext,
+                                              MY_UNPACK_FILENAME|MY_APPEND_EXT),
 				    "status", DB_BTREE,
 				    DB_THREAD | DB_CREATE, my_umask)) /* purecov: inspected */
 	goto end; /* purecov: inspected */

--- 1.166/sql/ha_myisam.cc	2005-12-31 05:53:48 +01:00
+++ 1.167/sql/ha_myisam.cc	2006-01-04 16:27:58 +01:00
@@ -86,6 +86,7 @@
   NULL,    /* Start Consistent Snapshot */
   NULL,    /* Flush logs */
   NULL,    /* Show status */
+  NULL,    /* Alter Tablespace */
   HTON_CAN_RECREATE
 };
 

--- 1.76/sql/ha_myisammrg.cc	2005-12-29 08:19:36 +01:00
+++ 1.77/sql/ha_myisammrg.cc	2006-01-04 16:27:58 +01:00
@@ -106,8 +106,9 @@
   char name_buff[FN_REFLEN];
 
   DBUG_PRINT("info", ("ha_myisammrg::open"));
-  if (!(file=myrg_open(fn_format(name_buff,name,"","",2 | 4), mode,
-		       test_if_locked)))
+  if (!(file=myrg_open(fn_format(name_buff,name,"","",
+                                 MY_UNPACK_FILENAME|MY_APPEND_EXT),
+                       mode, test_if_locked)))
   {
     DBUG_PRINT("info", ("ha_myisammrg::open exit %d", my_errno));
     return (my_errno ? my_errno : -1);
@@ -470,8 +471,8 @@
         This means that it might not be possible to move the DATADIR of
         an embedded server without changing the paths in the .MRG file.
       */
-      uint length= my_snprintf(buff, FN_REFLEN, "%s/%s/%s", mysql_data_home,
-			       tables->db, tables->table_name);
+      uint length= build_table_filename(buff, sizeof(buff),
+                                        tables->db, tables->table_name, "");
       /*
         If a MyISAM table is in the same directory as the MERGE table,
         we use the table name without a path. This means that the
@@ -489,7 +490,9 @@
     *pos++= table_name;
   }
   *pos=0;
-  DBUG_RETURN(myrg_create(fn_format(buff,name,"","",2+4+16),
+  DBUG_RETURN(myrg_create(fn_format(buff,name,"","",
+                                    MY_RESOLVE_SYMLINKS|
+                                    MY_UNPACK_FILENAME|MY_APPEND_EXT),
 			  table_names,
                           create_info->merge_insert_method,
                           (my_bool) 0));

--- 1.170/sql/handler.h	2005-12-29 08:19:37 +01:00
+++ 1.171/sql/handler.h	2006-01-04 16:27:58 +01:00
@@ -624,19 +624,52 @@
 
   List<char> part_field_list;
   List<char> subpart_field_list;
-
+  
+  /* 
+    If there is no subpartitioning, use only this func to get partition ids.
+    If there is subpartitioning, use the this func to get partition id when
+    you have both partition and subpartition fields.
+  */
   get_part_id_func get_partition_id;
+
+  /* Get partition id when we don't have subpartition fields */
   get_part_id_func get_part_partition_id;
-  get_subpart_id_func get_subpartition_id;
 
+  /* 
+    Get subpartition id when we have don't have partition fields by we do
+    have subpartition ids.
+    Mikael said that for given constant tuple 
+    {subpart_field1, ..., subpart_fieldN} the subpartition id will be the
+    same in all subpartitions
+  */
+  get_subpart_id_func get_subpartition_id;
+  
+  /* NULL-terminated list of fields used in partitioned expression */
   Field **part_field_array;
+  /* NULL-terminated list of fields used in subpartitioned expression */
   Field **subpart_field_array;
+
+  /* 
+    Array of all fields used in partition and subpartition expression,
+    without duplicates, NULL-terminated.
+  */
   Field **full_part_field_array;
 
   Item *part_expr;
   Item *subpart_expr;
 
   Item *item_free_list;
+  
+  /* 
+    A bitmap of partitions used by the current query. 
+    Usage pattern:
+    * It is guaranteed that all partitions are set to be unused on query start.
+    * Before index/rnd_init(), partition pruning code sets the bits for used
+      partitions.
+    * The handler->extra(HA_EXTRA_RESET) call at query end sets all partitions
+      to be unused.
+  */
+  MY_BITMAP used_partitions;
 
   union {
     longlong *range_int_array;
@@ -838,6 +871,13 @@
 bool mysql_unpack_partition(THD *thd, const uchar *part_buf,
                             uint part_info_len, TABLE *table,
                             handlerton *default_db_type);
+void make_used_partitions_str(partition_info *part_info, String *parts_str);
+uint32 get_list_array_idx_for_endpoint(partition_info *part_info,
+                                       bool left_endpoint,
+                                       bool include_endpoint);
+uint32 get_partition_id_range_for_endpoint(partition_info *part_info,
+                                           bool left_endpoint,
+                                           bool include_endpoint);
 #endif
 
 

--- 1.181/sql/log.cc	2005-12-24 12:06:57 +01:00
+++ 1.182/sql/log.cc	2006-01-04 16:27:58 +01:00
@@ -88,6 +88,7 @@
   NULL,                         /* Start Consistent Snapshot */
   NULL,                         /* Flush logs */
   NULL,                         /* Show status */
+  NULL,                         /* Alter Tablespace */
   HTON_NOT_USER_SELECTABLE | HTON_HIDDEN
 };
 

--- 1.346/sql/mysql_priv.h	2005-12-23 05:32:39 +01:00
+++ 1.347/sql/mysql_priv.h	2006-01-04 16:27:58 +01:00
@@ -1017,7 +1017,7 @@
                                uint offset_to_list,
                                const char *db_name,
                                const char *table_name);
-TABLE_LIST *unique_table(TABLE_LIST *table, TABLE_LIST *table_list);
+TABLE_LIST *unique_table(THD *thd, TABLE_LIST *table, TABLE_LIST *table_list);
 TABLE *find_temporary_table(THD *thd, const char *db, const char *table_name);
 TABLE *find_temporary_table(THD *thd, TABLE_LIST *table_list);
 bool close_temporary_table(THD *thd, TABLE_LIST *table_list);
@@ -1175,6 +1175,7 @@
 extern Ge_creator ge_creator;
 extern Le_creator le_creator;
 extern char language[FN_REFLEN], reg_ext[FN_EXTLEN];
+extern uint reg_ext_length;
 extern char glob_hostname[FN_REFLEN], mysql_home[FN_REFLEN];
 extern char pidfile_name[FN_REFLEN], system_time_zone[30], *opt_init_file;
 extern char log_error_file[FN_REFLEN], *opt_tc_log_file;
@@ -1376,6 +1377,8 @@
 void mysql_lock_abort(THD *thd, TABLE *table);
 bool mysql_lock_abort_for_thread(THD *thd, TABLE *table);
 MYSQL_LOCK *mysql_lock_merge(MYSQL_LOCK *a,MYSQL_LOCK *b);
+TABLE_LIST *mysql_lock_have_duplicate(THD *thd, TABLE_LIST *needle,
+                                      TABLE_LIST *haystack);
 bool lock_global_read_lock(THD *thd);
 void unlock_global_read_lock(THD *thd);
 bool wait_if_global_read_lock(THD *thd, bool abort_on_refresh,
@@ -1498,7 +1501,15 @@
 char *get_field(MEM_ROOT *mem, Field *field);
 bool get_field(MEM_ROOT *mem, Field *field, class String *res);
 int wild_case_compare(CHARSET_INFO *cs, const char *str,const char *wildstr);
+char *fn_rext(char *name);
 
+/* Conversion functions */
+uint strconvert(CHARSET_INFO *from_cs, const char *from,
+                CHARSET_INFO *to_cs, char *to, uint to_length, uint *errors);
+uint filename_to_tablename(const char *from, char *to, uint to_length);
+uint tablename_to_filename(const char *from, char *to, uint to_length);
+uint build_table_filename(char *buff, size_t bufflen, const char *db,
+                          const char *table, const char *ext);
 /* from hostname.cc */
 struct in_addr;
 my_string ip_to_hostname(struct in_addr *in,uint *errors);

--- 1.207/sql/sql_lex.h	2005-12-22 09:07:58 +01:00
+++ 1.208/sql/sql_lex.h	2006-01-04 16:27:58 +01:00
@@ -105,6 +105,11 @@
 // describe/explain types
 #define DESCRIBE_NORMAL		1
 #define DESCRIBE_EXTENDED	2
+/*
+  This is not #ifdef'ed because we want "EXPLAIN PARTITIONS ..." to produce
+  additional "partitions" column even if partitioning is not compiled in.
+*/
+#define DESCRIBE_PARTITIONS	4
 
 enum enum_sp_suid_behaviour
 {

--- 1.485/sql/sql_parse.cc	2005-12-23 05:32:39 +01:00
+++ 1.486/sql/sql_parse.cc	2006-01-04 16:27:59 +01:00
@@ -2229,6 +2229,7 @@
   case SCH_STATUS:
   case SCH_PROCEDURES:
   case SCH_CHARSETS:
+  case SCH_ENGINES:
   case SCH_COLLATIONS:
   case SCH_COLLATION_CHARACTER_SET_APPLICABILITY:
   case SCH_USER_PRIVILEGES:
@@ -2823,7 +2824,7 @@
         if (!(lex->create_info.options & HA_LEX_CREATE_TMP_TABLE))
         {
           TABLE_LIST *duplicate;
-          if ((duplicate= unique_table(create_table, select_tables)))
+          if ((duplicate= unique_table(thd, create_table, select_tables)))
           {
             update_non_unique_table_error(create_table, "CREATE", duplicate);
             res= 1;
@@ -2839,7 +2840,7 @@
                tab= tab->next_local)
           {
             TABLE_LIST *duplicate;
-            if ((duplicate= unique_table(tab, select_tables)))
+            if ((duplicate= unique_table(thd, tab, select_tables)))
             {
               update_non_unique_table_error(tab, "CREATE", duplicate);
               res= 1;

--- 1.424/sql/sql_yacc.yy	2005-12-23 05:32:40 +01:00
+++ 1.425/sql/sql_yacc.yy	2006-01-04 16:27:59 +01:00
@@ -870,7 +870,7 @@
         definer view_replace_or_algorithm view_replace view_algorithm_opt
         view_algorithm view_or_trigger_tail view_suid view_tail view_list_opt
         view_list view_select view_check_option trigger_tail
-        install uninstall partition_entry
+        install uninstall partition_entry binlog_base64_event
 END_OF_INPUT
 
 %type <NONE> call sp_proc_stmts sp_proc_stmts1 sp_proc_stmt
@@ -4833,6 +4833,7 @@
            Lex->sql_command = SQLCOM_BINLOG_BASE64_EVENT;
            Lex->comment= $2;
         }
+        ;
 
 check:
 	CHECK_SYM table_or_tables
@@ -7550,6 +7551,9 @@
 	  {
 	    LEX *lex=Lex;
 	    lex->sql_command= SQLCOM_SHOW_STORAGE_ENGINES;
+            lex->orig_sql_command= SQLCOM_SHOW_AUTHORS;
+            if (prepare_schema_table(YYTHD, lex, 0, SCH_ENGINES))
+              YYABORT;
 	  }
 	| AUTHORS_SYM
 	  {
@@ -7852,7 +7856,9 @@
 opt_extended_describe:
 	/* empty */ {}
 	| EXTENDED_SYM { Lex->describe|= DESCRIBE_EXTENDED; }
+	| PARTITIONS_SYM { Lex->describe|= DESCRIBE_PARTITIONS; }
 	;
+
 
 opt_describe_column:
 	/* empty */	{}

--- 1.55/sql/share/errmsg.txt	2005-12-22 09:09:22 +01:00
+++ 1.56/sql/share/errmsg.txt	2006-01-04 16:27:59 +01:00
@@ -5372,7 +5372,7 @@
 	eng "WSAStartup Failed"
 	ger "WSAStartup fehlgeschlagen"
 ER_DIFF_GROUPS_PROC  
-	eng "Can't handle procedures with differents groups yet"
+	eng "Can't handle procedures with different groups yet"
 	ger "Kann Prozeduren mit unterschiedlichen Gruppen noch nicht verarbeiten"
 ER_NO_GROUP_FOR_PROC  
 	eng "Select must have a group with this procedure"

--- 1.29/storage/ndb/src/kernel/blocks/backup/Backup.cpp	2005-12-21 16:47:15 +01:00
+++ 1.30/storage/ndb/src/kernel/blocks/backup/Backup.cpp	2006-01-04 16:27:59 +01:00
@@ -3916,7 +3916,7 @@
     req->userReference = reference();
     req->varIndex      = 0;
     req->offset        = tmp - c_startOfPages;
-    req->size          = sz; // Avrunda uppot
+    req->size          = sz; // Round up
     
     sendSignal(NDBFS_REF, GSN_FSAPPENDREQ, signal, 
 	       FsAppendReq::SignalLength, JBA);

--- 1.41/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp	2005-12-21 16:47:15 +01:00
+++ 1.42/storage/ndb/src/kernel/blocks/dbdih/DbdihMain.cpp	2006-01-04 16:27:59 +01:00
@@ -11363,7 +11363,11 @@
 
   cnoReplicas = 1;
   ndb_mgm_get_int_parameter(p, CFG_DB_NO_REPLICAS, &cnoReplicas);
-  cnoReplicas = cnoReplicas > 4 ? 4 : cnoReplicas;
+  if (cnoReplicas > 4)
+  {
+    progError(__LINE__, NDBD_EXIT_INVALID_CONFIG,
+	      "Only up to four replicas are supported. Check NoOfReplicas.");
+  }
 
   cgcpDelay = 2000;
   ndb_mgm_get_int_parameter(p, CFG_DB_GCP_INTERVAL, &cgcpDelay);
@@ -11953,14 +11957,14 @@
     break;
   case CheckNodeGroups::GetNodeGroupMembers: {
     ok = true;
-    Uint32 ownNodeGoup =
+    Uint32 ownNodeGroup =
       Sysfile::getNodeGroup(sd->nodeId, SYSFILE->nodeGroups);
 
-    sd->output = ownNodeGoup;
+    sd->output = ownNodeGroup;
     sd->mask.clear();
 
     NodeGroupRecordPtr ngPtr;
-    ngPtr.i = ownNodeGoup;
+    ngPtr.i = ownNodeGroup;
     ptrAss(ngPtr, nodeGroupRecord);
     for (Uint32 j = 0; j < ngPtr.p->nodeCount; j++) {
       jam();
@@ -11968,7 +11972,7 @@
     }
 #if 0
     for (int i = 0; i < MAX_NDB_NODES; i++) {
-      if (ownNodeGoup == 
+      if (ownNodeGroup == 
 	  Sysfile::getNodeGroup(i, SYSFILE->nodeGroups)) {
 	sd->mask.set(i);
       }

--- 1.96/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2005-12-28 12:55:45 +01:00
+++ 1.97/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp	2006-01-04 16:27:59 +01:00
@@ -18414,60 +18414,54 @@
 Dblqh::execCREATE_TRIG_REQ(Signal* signal)
 {
   jamEntry();
-  NodeId myNodeId = getOwnNodeId();
-  BlockReference tupref = calcTupBlockRef(myNodeId);
 
-  sendSignal(tupref, GSN_CREATE_TRIG_REQ, signal, CreateTrigReq::SignalLength, JBB);
+  sendSignal(DBTUP_REF, GSN_CREATE_TRIG_REQ, signal,
+             CreateTrigReq::SignalLength, JBB);
 }
 
 void
 Dblqh::execCREATE_TRIG_CONF(Signal* signal)
 {
   jamEntry();
-  NodeId myNodeId = getOwnNodeId();
-  BlockReference dictref = calcDictBlockRef(myNodeId);
 
-  sendSignal(dictref, GSN_CREATE_TRIG_CONF, signal, CreateTrigConf::SignalLength, JBB);
+  sendSignal(DBDICT_REF, GSN_CREATE_TRIG_CONF, signal,
+             CreateTrigConf::SignalLength, JBB);
 }
 
 void
 Dblqh::execCREATE_TRIG_REF(Signal* signal)
 {
   jamEntry();
-  NodeId myNodeId = getOwnNodeId();
-  BlockReference dictref = calcDictBlockRef(myNodeId);
 
-  sendSignal(dictref, GSN_CREATE_TRIG_REF, signal, CreateTrigRef::SignalLength, JBB);
+  sendSignal(DBDICT_REF, GSN_CREATE_TRIG_REF, signal,
+             CreateTrigRef::SignalLength, JBB);
 }
 
 void
 Dblqh::execDROP_TRIG_REQ(Signal* signal)
 {
   jamEntry();
-  NodeId myNodeId = getOwnNodeId();
-  BlockReference tupref = calcTupBlockRef(myNodeId);
 
-  sendSignal(tupref, GSN_DROP_TRIG_REQ, signal, DropTrigReq::SignalLength, JBB);
+  sendSignal(DBTUP_REF, GSN_DROP_TRIG_REQ, signal,
+             DropTrigReq::SignalLength, JBB);
 }
 
 void
 Dblqh::execDROP_TRIG_CONF(Signal* signal)
 {
   jamEntry();
-  NodeId myNodeId = getOwnNodeId();
-  BlockReference dictref = calcDictBlockRef(myNodeId);
 
-  sendSignal(dictref, GSN_DROP_TRIG_CONF, signal, DropTrigConf::SignalLength, JBB);
+  sendSignal(DBDICT_REF, GSN_DROP_TRIG_CONF, signal,
+             DropTrigConf::SignalLength, JBB);
 }
 
 void
 Dblqh::execDROP_TRIG_REF(Signal* signal)
 {
   jamEntry();
-  NodeId myNodeId = getOwnNodeId();
-  BlockReference dictref = calcDictBlockRef(myNodeId);
 
-  sendSignal(dictref, GSN_DROP_TRIG_REF, signal, DropTrigRef::SignalLength, JBB);
+  sendSignal(DBDICT_REF, GSN_DROP_TRIG_REF, signal,
+             DropTrigRef::SignalLength, JBB);
 }
 
 Uint32 Dblqh::calcPageCheckSum(LogPageRecordPtr logP){

--- 1.13/storage/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp	2006-01-02 11:33:03 +01:00
+++ 1.14/storage/ndb/src/kernel/blocks/dbtup/DbtupCommit.cpp	2006-01-04 16:27:59 +01:00
@@ -418,7 +418,7 @@
   if(!regOperPtr.p->is_first_operation())
   {
     /**
-     * Out of order commit 
+     * Out of order commit   XXX check effect on triggers
      */
     fix_commit_order(regOperPtr);
   }

--- 1.16/storage/ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp	2005-12-23 10:50:13 +01:00
+++ 1.17/storage/ndb/src/kernel/blocks/dbtup/DbtupTrigger.cpp	2006-01-04 16:27:59 +01:00
@@ -559,8 +559,9 @@
 
   /**
    * Set correct operation type and fix change mask
+   * Note ALLOC is set in "orig" tuple
    */
-  if(req_struct->m_tuple_ptr->m_header_bits & Tuple_header::ALLOC)
+  if(save_ptr->m_header_bits & Tuple_header::ALLOC)
   {
     if(save == ZDELETE)
     {
@@ -570,6 +571,14 @@
       goto end;
     }
     regOperPtr->op_struct.op_type = ZINSERT;
+  }
+  else if (save == ZINSERT)
+  /**
+   * Tuple was not created but last op is INSERT.
+   * This is possible only on DELETE + INSERT
+   */
+  {
+    regOperPtr->op_struct.op_type = ZUPDATE;
   }
 
   ndbrequire(regOperPtr->is_first_operation());

--- 1.220/sql/ha_ndbcluster.cc	2006-01-03 21:15:18 +01:00
+++ 1.221/sql/ha_ndbcluster.cc	2006-01-04 16:27:58 +01:00
@@ -3123,7 +3123,6 @@
   DBUG_VOID_RETURN;
 }
 
-
 int ha_ndbcluster::extra(enum ha_extra_function operation)
 {
   DBUG_ENTER("extra");
@@ -3132,6 +3131,8 @@
     DBUG_PRINT("info", ("HA_EXTRA_RESET"));
     DBUG_PRINT("info", ("Clearing condition stack"));
     cond_clear();
+    if (m_part_info)
+      bitmap_clear_all(&m_part_info->used_partitions);
     break;
   case HA_EXTRA_IGNORE_DUP_KEY:       /* Dup keys don't rollback everything*/
     DBUG_PRINT("info", ("HA_EXTRA_IGNORE_DUP_KEY"));
@@ -3962,7 +3963,8 @@
   DBUG_ENTER("ha_ndbcluster::create");
   DBUG_PRINT("enter", ("name: %s", name));
 
-  fn_format(name2, name, "", "",2);       // Remove the .frm extension
+  strcpy(name2, name);
+  DBUG_ASSERT(*fn_rext((char*)name2) == 0);
   set_dbname(name2);
   set_tabname(name2);    
 

--- 1.72/libmysqld/Makefile.am	2005-12-22 01:29:10 +01:00
+++ 1.73/libmysqld/Makefile.am	2006-01-04 16:30:55 +01:00
@@ -64,13 +64,14 @@
 	spatial.cc gstream.cc sql_help.cc tztime.cc sql_cursor.cc \
 	sp_head.cc sp_pcontext.cc sp.cc sp_cache.cc sp_rcontext.cc \
 	parse_file.cc sql_view.cc sql_trigger.cc my_decimal.cc \
+	item_xmlfunc.cc \
         rpl_filter.cc sql_partition.cc handlerton.cc sql_plugin.cc \
         sql_tablespace.cc
 
 libmysqld_int_a_SOURCES= $(libmysqld_sources) $(libmysqlsources) $(sqlsources)
 EXTRA_libmysqld_a_SOURCES =	ha_innodb.cc ha_berkeley.cc ha_archive.cc \
 			ha_blackhole.cc ha_federated.cc ha_ndbcluster.cc \
-			ha_tina.cc ha_example.cc ha_partition.cc
+			ha_partition.cc
 libmysqld_a_DEPENDENCIES= @mysql_se_objs@
 libmysqld_a_SOURCES=
 
@@ -83,6 +84,7 @@
 INC_LIB=	$(top_builddir)/regex/libregex.a \
 		$(top_builddir)/storage/myisam/libmyisam.a \
 		$(top_builddir)/storage/myisammrg/libmyisammrg.a \
+		$(top_builddir)/storage/archive/libarchive.a \
 		$(top_builddir)/storage/heap/libheap.a \
 		$(top_builddir)/mysys/libmysys.a \
 		$(top_builddir)/strings/libmystrings.a \

--- 1.18/sql/ha_partition.cc	2005-12-31 05:53:54 +01:00
+++ 1.19/sql/ha_partition.cc	2006-01-04 16:30:55 +01:00
@@ -96,6 +96,7 @@
   NULL, /* Start Consistent Snapshot */
   NULL, /* Flush logs */
   NULL, /* Show status */
+  NULL, /* Alter Tablespace */
   HTON_NOT_USER_SELECTABLE | HTON_HIDDEN
 };
 

--- 1.218/BitKeeper/etc/ignore	2005-12-23 05:32:41 +01:00
+++ 1.219/BitKeeper/etc/ignore	2006-01-04 16:27:50 +01:00
@@ -133,107 +133,6 @@
 autom4te.cache/output.0
 autom4te.cache/requests
 autom4te.cache/traces.0
-storage/bdb/*.ds?
-storage/bdb/*.vcproj
-storage/bdb/README
-storage/bdb/btree/btree_auto.c
-storage/bdb/build_unix/*
-storage/bdb/build_vxworks/db.h
-storage/bdb/build_vxworks/db_int.h
-storage/bdb/build_win32/db.h
-storage/bdb/build_win32/db_archive.dsp
-storage/bdb/build_win32/db_checkpoint.dsp
-storage/bdb/build_win32/db_config.h
-storage/bdb/build_win32/db_cxx.h
-storage/bdb/build_win32/db_deadlock.dsp
-storage/bdb/build_win32/db_dll.dsp
-storage/bdb/build_win32/db_dump.dsp
-storage/bdb/build_win32/db_int.h
-storage/bdb/build_win32/db_java.dsp
-storage/bdb/build_win32/db_load.dsp
-storage/bdb/build_win32/db_perf.dsp
-storage/bdb/build_win32/db_printlog.dsp
-storage/bdb/build_win32/db_recover.dsp
-storage/bdb/build_win32/db_stat.dsp
-storage/bdb/build_win32/db_static.dsp
-storage/bdb/build_win32/db_tcl.dsp
-storage/bdb/build_win32/db_test.dsp
-storage/bdb/build_win32/db_upgrade.dsp
-storage/bdb/build_win32/db_verify.dsp
-storage/bdb/build_win32/ex_access.dsp
-storage/bdb/build_win32/ex_btrec.dsp
-storage/bdb/build_win32/ex_env.dsp
-storage/bdb/build_win32/ex_lock.dsp
-storage/bdb/build_win32/ex_mpool.dsp
-storage/bdb/build_win32/ex_tpcb.dsp
-storage/bdb/build_win32/excxx_access.dsp
-storage/bdb/build_win32/excxx_btrec.dsp
-storage/bdb/build_win32/excxx_env.dsp
-storage/bdb/build_win32/excxx_lock.dsp
-storage/bdb/build_win32/excxx_mpool.dsp
-storage/bdb/build_win32/excxx_tpcb.dsp
-storage/bdb/build_win32/include.tcl
-storage/bdb/build_win32/libdb.def
-storage/bdb/build_win32/libdb.rc
-storage/bdb/db/crdel_auto.c
-storage/bdb/db/db_auto.c
-storage/bdb/dbinc_auto/*.*
-storage/bdb/dbreg/dbreg_auto.c
-storage/bdb/dist/autom4te-2.53.cache/*
-storage/bdb/dist/autom4te-2.53.cache/output.0
-storage/bdb/dist/autom4te-2.53.cache/requests
-storage/bdb/dist/autom4te-2.53.cache/traces.0
-storage/bdb/dist/autom4te.cache/*
-storage/bdb/dist/autom4te.cache/output.0
-storage/bdb/dist/autom4te.cache/requests
-storage/bdb/dist/autom4te.cache/traces.0
-storage/bdb/dist/config.hin
-storage/bdb/dist/configure
-storage/bdb/dist/tags
-storage/bdb/dist/template/db_server_proc
-storage/bdb/dist/template/gen_client_ret
-storage/bdb/dist/template/rec_btree
-storage/bdb/dist/template/rec_crdel
-storage/bdb/dist/template/rec_db
-storage/bdb/dist/template/rec_dbreg
-storage/bdb/dist/template/rec_fileops
-storage/bdb/dist/template/rec_hash
-storage/bdb/dist/template/rec_log
-storage/bdb/dist/template/rec_qam
-storage/bdb/dist/template/rec_txn
-storage/bdb/fileops/fileops_auto.c
-storage/bdb/hash/hash_auto.c
-storage/bdb/include/btree_auto.h
-storage/bdb/include/btree_ext.h
-storage/bdb/include/clib_ext.h
-storage/bdb/include/common_ext.h
-storage/bdb/include/crdel_auto.h
-storage/bdb/include/db_auto.h
-storage/bdb/include/db_ext.h
-storage/bdb/include/db_server.h
-storage/bdb/include/env_ext.h
-storage/bdb/include/gen_client_ext.h
-storage/bdb/include/gen_server_ext.h
-storage/bdb/include/hash_auto.h
-storage/bdb/include/hash_ext.h
-storage/bdb/include/lock_ext.h
-storage/bdb/include/log_auto.h
-storage/bdb/include/log_ext.h
-storage/bdb/include/mp_ext.h
-storage/bdb/include/mutex_ext.h
-storage/bdb/include/os_ext.h
-storage/bdb/include/qam_auto.h
-storage/bdb/include/qam_ext.h
-storage/bdb/include/rpc_client_ext.h
-storage/bdb/include/rpc_server_ext.h
-storage/bdb/include/tcl_ext.h
-storage/bdb/include/txn_auto.h
-storage/bdb/include/txn_ext.h
-storage/bdb/include/xa_ext.h
-storage/bdb/log/log_auto.c
-storage/bdb/qam/qam_auto.c
-storage/bdb/txn/txn_auto.c
-storage/bdb/txn/txn_autop.c
 binary/*
 bkpull.log
 bkpull.log*
@@ -270,6 +169,7 @@
 client/mysqlmanager-pwgen
 client/mysqlmanagerc
 client/mysqlshow
+client/mysqlslap
 client/mysqltest
 client/mysqltestmanager-pwgen
 client/mysqltestmanagerc
@@ -386,6 +286,7 @@
 isam/test3
 isamchk/*.ds?
 isamchk/*.vcproj
+item_xmlfunc.cc
 lib_debug/*
 lib_release/*
 libmysql/*.c
@@ -537,6 +438,7 @@
 libmysqld/sql_state.c
 libmysqld/sql_string.cc
 libmysqld/sql_table.cc
+libmysqld/sql_tablespace.cc
 libmysqld/sql_test.cc
 libmysqld/sql_trigger.cc
 libmysqld/sql_udf.cc
@@ -1137,6 +1039,9 @@
 stamp-h3
 stamp-h4
 start_mysqld.sh
+storage/archive/archive_test
+storage/bdb/*.ds?
+storage/bdb/*.vcproj
 storage/bdb/README
 storage/bdb/btree/btree_auto.c
 storage/bdb/btree/btree_autop.c
@@ -1156,6 +1061,38 @@
 storage/bdb/build_vxworks/dbdemo/dbdemo22.wpj
 storage/bdb/build_win32/*.dsp
 storage/bdb/build_win32/*.h
+storage/bdb/build_win32/db.h
+storage/bdb/build_win32/db_archive.dsp
+storage/bdb/build_win32/db_checkpoint.dsp
+storage/bdb/build_win32/db_config.h
+storage/bdb/build_win32/db_cxx.h
+storage/bdb/build_win32/db_deadlock.dsp
+storage/bdb/build_win32/db_dll.dsp
+storage/bdb/build_win32/db_dump.dsp
+storage/bdb/build_win32/db_int.h
+storage/bdb/build_win32/db_java.dsp
+storage/bdb/build_win32/db_load.dsp
+storage/bdb/build_win32/db_perf.dsp
+storage/bdb/build_win32/db_printlog.dsp
+storage/bdb/build_win32/db_recover.dsp
+storage/bdb/build_win32/db_stat.dsp
+storage/bdb/build_win32/db_static.dsp
+storage/bdb/build_win32/db_tcl.dsp
+storage/bdb/build_win32/db_test.dsp
+storage/bdb/build_win32/db_upgrade.dsp
+storage/bdb/build_win32/db_verify.dsp
+storage/bdb/build_win32/ex_access.dsp
+storage/bdb/build_win32/ex_btrec.dsp
+storage/bdb/build_win32/ex_env.dsp
+storage/bdb/build_win32/ex_lock.dsp
+storage/bdb/build_win32/ex_mpool.dsp
+storage/bdb/build_win32/ex_tpcb.dsp
+storage/bdb/build_win32/excxx_access.dsp
+storage/bdb/build_win32/excxx_btrec.dsp
+storage/bdb/build_win32/excxx_env.dsp
+storage/bdb/build_win32/excxx_lock.dsp
+storage/bdb/build_win32/excxx_mpool.dsp
+storage/bdb/build_win32/excxx_tpcb.dsp
 storage/bdb/build_win32/include.tcl
 storage/bdb/build_win32/libdb.def
 storage/bdb/build_win32/libdb.rc
@@ -1658,5 +1595,3 @@
 vio/viotest.cpp
 zlib/*.ds?
 zlib/*.vcproj
-client/mysqlslap
-libmysqld/sql_tablespace.cc
Thread
bk commit into 5.1 tree (jonas:1.1986)jonas4 Jan