List:Commits« Previous MessageNext Message »
From:pekka Date:May 19 2006 3:43am
Subject:bk commit into 5.1 tree (pekka:1.2147)
View as plain text  
Below is the list of changes that have just been committed into a local
5.1 repository of . When  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.2147 06/05/19 05:43:05 pekka@stripped +1 -0
  Merge mysql.com:/space/pekka/ndb/version/my51
  into  mysql.com:/space/pekka/ndb/version/my51-tmp

  sql/sql_table.cc
    1.334 06/05/19 05:42:45 pekka@stripped +0 -0
    Auto merged

# 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:	pekka
# Host:	orca.ndb.mysql.com
# Root:	/space/pekka/ndb/version/my51-tmp/RESYNC

--- 1.333/sql/sql_table.cc	2006-05-13 06:19:53 +02:00
+++ 1.334/sql/sql_table.cc	2006-05-19 05:42:45 +02:00
@@ -3426,111 +3426,6 @@
 
 
 /****************************************************************************
-** Create table from a list of fields and items
-****************************************************************************/
-
-TABLE *create_table_from_items(THD *thd, HA_CREATE_INFO *create_info,
-			       TABLE_LIST *create_table,
-			       List<create_field> *extra_fields,
-			       List<Key> *keys,
-			       List<Item> *items,
-			       MYSQL_LOCK **lock,
-                               TABLEOP_HOOKS *hooks)
-{
-  TABLE tmp_table;		// Used during 'create_field()'
-  TABLE_SHARE share;
-  TABLE *table= 0;
-  uint select_field_count= items->elements;
-  /* Add selected items to field list */
-  List_iterator_fast<Item> it(*items);
-  Item *item;
-  Field *tmp_field;
-  bool not_used;
-  DBUG_ENTER("create_table_from_items");
-
-  tmp_table.alias= 0;
-  tmp_table.timestamp_field= 0;
-  tmp_table.s= &share;
-  init_tmp_table_share(&share, "", 0, "", "");
-
-  tmp_table.s->db_create_options=0;
-  tmp_table.s->blob_ptr_size= portable_sizeof_char_ptr;
-  tmp_table.s->db_low_byte_first= 
-        test(create_info->db_type == &myisam_hton ||
-             create_info->db_type == &heap_hton);
-  tmp_table.null_row=tmp_table.maybe_null=0;
-
-  while ((item=it++))
-  {
-    create_field *cr_field;
-    Field *field;
-    if (item->type() == Item::FUNC_ITEM)
-      field=item->tmp_table_field(&tmp_table);
-    else
-      field=create_tmp_field(thd, &tmp_table, item, item->type(),
-                             (Item ***) 0, &tmp_field, 0, 0, 0, 0, 0);
-    if (!field ||
-	!(cr_field=new create_field(field,(item->type() == Item::FIELD_ITEM ?
-					   ((Item_field *)item)->field :
-					   (Field*) 0))))
-      DBUG_RETURN(0);
-    if (item->maybe_null)
-      cr_field->flags &= ~NOT_NULL_FLAG;
-    extra_fields->push_back(cr_field);
-  }
-  /*
-    create and lock table
-
-    We don't log the statement, it will be logged later.
-
-    If this is a HEAP table, the automatic DELETE FROM which is written to the
-    binlog when a HEAP table is opened for the first time since startup, must
-    not be written: 1) it would be wrong (imagine we're in CREATE SELECT: we
-    don't want to delete from it) 2) it would be written before the CREATE
-    TABLE, which is a wrong order. So we keep binary logging disabled when we
-    open_table().
-    TODO: create and open should be done atomic !
-  */
-  {
-    tmp_disable_binlog(thd);
-    if (!mysql_create_table(thd, create_table->db, create_table->table_name,
-                            create_info, *extra_fields, *keys, 0,
-                            select_field_count))
-    {
-      if (! (table= open_table(thd, create_table, thd->mem_root, (bool*) 0,
-                               MYSQL_LOCK_IGNORE_FLUSH)))
-        quick_rm_table(create_info->db_type, create_table->db,
-                       table_case_name(create_info, create_table->table_name));
-    }
-    reenable_binlog(thd);
-    if (!table)                                   // open failed
-      DBUG_RETURN(0);
-  }
-
-  /*
-    FIXME: What happens if trigger manages to be created while we are
-           obtaining this lock ? May be it is sensible just to disable
-           trigger execution in this case ? Or will MYSQL_LOCK_IGNORE_FLUSH
-           save us from that ?
-  */
-  table->reginfo.lock_type=TL_WRITE;
-  hooks->prelock(&table, 1);                    // Call prelock hooks
-  if (! ((*lock)= mysql_lock_tables(thd, &table, 1,
-                                    MYSQL_LOCK_IGNORE_FLUSH, &not_used)))
-  {
-    VOID(pthread_mutex_lock(&LOCK_open));
-    hash_delete(&open_cache,(byte*) table);
-    VOID(pthread_mutex_unlock(&LOCK_open));
-    quick_rm_table(create_info->db_type, create_table->db,
-		   table_case_name(create_info, create_table->table_name));
-    DBUG_RETURN(0);
-  }
-  table->file->extra(HA_EXTRA_WRITE_CACHE);
-  DBUG_RETURN(table);
-}
-
-
-/****************************************************************************
 ** Alter a table definition
 ****************************************************************************/
 
Thread
bk commit into 5.1 tree (pekka:1.2147)pekka19 May