List:Commits« Previous MessageNext Message »
From:dlenev Date:July 6 2006 10:31am
Subject:bk commit into 5.0 tree (dlenev:1.2216)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of dlenev. When dlenev 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.2216 06/07/06 14:31:32 dlenev@stripped +11 -0
  Merge bk-internal.mysql.com:/home/bk/mysql-5.0-runtime
  into  mysql.com:/home/dlenev/mysql-5.0-bg18437-3

  mysql-test/r/federated.result
    1.32 06/07/06 14:31:28 dlenev@stripped +28 -28
    Manual merge.

  sql/sql_update.cc
    1.192 06/07/06 14:28:52 dlenev@stripped +0 -0
    Auto merged

  sql/sql_trigger.cc
    1.53 06/07/06 14:28:52 dlenev@stripped +0 -0
    Auto merged

  sql/sql_table.cc
    1.317 06/07/06 14:28:52 dlenev@stripped +0 -0
    Auto merged

  sql/sql_parse.cc
    1.562 06/07/06 14:28:52 dlenev@stripped +0 -0
    Auto merged

  sql/sql_insert.cc
    1.195 06/07/06 14:28:52 dlenev@stripped +0 -0
    Auto merged

  sql/sql_delete.cc
    1.176 06/07/06 14:28:52 dlenev@stripped +0 -0
    Auto merged

  sql/mysql_priv.h
    1.396 06/07/06 14:28:51 dlenev@stripped +0 -0
    Auto merged

  sql/item.cc
    1.226 06/07/06 14:28:51 dlenev@stripped +0 -0
    Auto merged

  sql/ha_ndbcluster.cc
    1.270 06/07/06 14:28:51 dlenev@stripped +0 -0
    Auto merged

  mysql-test/t/federated.test
    1.28 06/07/06 14:28:51 dlenev@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:	dlenev
# Host:	jabberwock.site
# Root:	/home/dlenev/mysql-5.0-bg18437-3/RESYNC

--- 1.225/sql/item.cc	2006-06-30 11:26:32 +04:00
+++ 1.226/sql/item.cc	2006-07-06 14:28:51 +04:00
@@ -5362,9 +5362,14 @@
 void Item_trigger_field::setup_field(THD *thd, TABLE *table,
                                      GRANT_INFO *table_grant_info)
 {
+  /*
+    There is no sense in marking fields used by trigger with current value
+    of THD::query_id since it is completely unrelated to the THD::query_id
+    value for statements which will invoke trigger. So instead we use
+    Table_triggers_list::mark_fields_used() method which is called during
+    execution of these statements.
+  */
   bool save_set_query_id= thd->set_query_id;
-
-  /* TODO: Think more about consequences of this step. */
   thd->set_query_id= 0;
   /*
     Try to find field by its name and if it will be found

--- 1.395/sql/mysql_priv.h	2006-06-26 21:19:04 +04:00
+++ 1.396/sql/mysql_priv.h	2006-07-06 14:28:51 +04:00
@@ -726,9 +726,7 @@
                        TABLE_LIST *table_list,
                        List<create_field> &fields,
                        List<Key> &keys,
-                       uint order_num, ORDER *order,
-                       enum enum_duplicates handle_duplicates,
-                       bool ignore,
+                       uint order_num, ORDER *order, bool ignore,
                        ALTER_INFO *alter_info, bool do_send_ok);
 bool mysql_recreate_table(THD *thd, TABLE_LIST *table_list, bool do_send_ok);
 bool mysql_create_like_table(THD *thd, TABLE_LIST *table,
@@ -764,6 +762,8 @@
                   bool ignore);
 int check_that_all_fields_are_given_values(THD *thd, TABLE *entry,
                                            TABLE_LIST *table_list);
+void mark_fields_used_by_triggers_for_insert_stmt(THD *thd, TABLE *table,
+                                                  enum_duplicates duplic);
 bool mysql_prepare_delete(THD *thd, TABLE_LIST *table_list, Item **conds);
 bool mysql_delete(THD *thd, TABLE_LIST *table_list, COND *conds,
                   SQL_LIST *order, ha_rows rows, ulonglong options,

--- 1.175/sql/sql_delete.cc	2006-07-02 01:51:01 +04:00
+++ 1.176/sql/sql_delete.cc	2006-07-06 14:28:52 +04:00
@@ -391,7 +391,7 @@
 bool mysql_multi_delete_prepare(THD *thd)
 {
   LEX *lex= thd->lex;
-  TABLE_LIST *aux_tables= (TABLE_LIST *)lex->auxilliary_table_list.first;
+  TABLE_LIST *aux_tables= (TABLE_LIST *)lex->auxiliary_table_list.first;
   TABLE_LIST *target_tbl;
   DBUG_ENTER("mysql_multi_delete_prepare");
 

--- 1.194/sql/sql_insert.cc	2006-06-27 03:34:07 +04:00
+++ 1.195/sql/sql_insert.cc	2006-07-06 14:28:52 +04:00
@@ -241,6 +241,33 @@
 }
 
 
+/*
+  Mark fields used by triggers for INSERT-like statement.
+
+  SYNOPSIS
+    mark_fields_used_by_triggers_for_insert_stmt()
+      thd     The current thread
+      table   Table to which insert will happen
+      duplic  Type of duplicate handling for insert which will happen
+
+  NOTE
+    For REPLACE there is no sense in marking particular fields
+    used by ON DELETE trigger as to execute it properly we have
+    to retrieve and store values for all table columns anyway.
+*/
+
+void mark_fields_used_by_triggers_for_insert_stmt(THD *thd, TABLE *table,
+                                                  enum_duplicates duplic)
+{
+  if (table->triggers)
+  {
+    table->triggers->mark_fields_used(thd, TRG_EVENT_INSERT);
+    if (duplic == DUP_UPDATE)
+      table->triggers->mark_fields_used(thd, TRG_EVENT_UPDATE);
+  }
+}
+
+
 bool mysql_insert(THD *thd,TABLE_LIST *table_list,
                   List<Item> &fields,
                   List<List_item> &values_list,
@@ -400,6 +427,17 @@
   thd->proc_info="update";
   if (duplic != DUP_ERROR || ignore)
     table->file->extra(HA_EXTRA_IGNORE_DUP_KEY);
+  if (duplic == DUP_REPLACE)
+  {
+    if (!table->triggers || !table->triggers->has_delete_triggers())
+      table->file->extra(HA_EXTRA_WRITE_CAN_REPLACE);
+    /*
+      REPLACE should change values of all columns so we should mark
+      all columns as columns to be set. As nice side effect we will
+      retrieve columns which values are needed for ON DELETE triggers.
+    */
+    table->file->extra(HA_EXTRA_RETRIEVE_ALL_COLS);
+  }
   /*
     let's *try* to start bulk inserts. It won't necessary
     start them as values_list.elements should be greater than
@@ -428,6 +466,8 @@
     error= 1;
   }
 
+  mark_fields_used_by_triggers_for_insert_stmt(thd, table, duplic);
+
   if (table_list->prepare_where(thd, 0, TRUE) ||
       table_list->prepare_check_option(thd))
     error= 1;
@@ -598,6 +638,9 @@
   thd->next_insert_id=0;			// Reset this if wrongly used
   if (duplic != DUP_ERROR || ignore)
     table->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY);
+  if (duplic == DUP_REPLACE &&
+      (!table->triggers || !table->triggers->has_delete_triggers()))
+    table->file->extra(HA_EXTRA_WRITE_CANNOT_REPLACE);
 
   /* Reset value of LAST_INSERT_ID if no rows where inserted */
   if (!info.copied && thd->insert_id_used)
@@ -1879,7 +1922,8 @@
 {
   int error;
   ulong max_rows;
-  bool using_ignore=0, using_bin_log=mysql_bin_log.is_open();
+  bool using_ignore= 0, using_opt_replace= 0;
+  bool using_bin_log= mysql_bin_log.is_open();
   delayed_row *row;
   DBUG_ENTER("handle_inserts");
 
@@ -1941,6 +1985,13 @@
       table->file->extra(HA_EXTRA_IGNORE_DUP_KEY);
       using_ignore=1;
     }
+    if (info.handle_duplicates == DUP_REPLACE &&
+        (!table->triggers ||
+         !table->triggers->has_delete_triggers()))
+    {
+      table->file->extra(HA_EXTRA_WRITE_CAN_REPLACE);
+      using_opt_replace= 1;
+    }
     thd.clear_error(); // reset error for binlog
     if (write_record(&thd, table, &info))
     {
@@ -1953,6 +2004,11 @@
       using_ignore=0;
       table->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY);
     }
+    if (using_opt_replace)
+    {
+      using_opt_replace= 0;
+      table->file->extra(HA_EXTRA_WRITE_CANNOT_REPLACE);
+    }
     if (row->query && row->log_query && using_bin_log)
     {
       Query_log_event qinfo(&thd, row->query, row->query_length, 0, FALSE);
@@ -2198,6 +2254,12 @@
   thd->cuted_fields=0;
   if (info.ignore || info.handle_duplicates != DUP_ERROR)
     table->file->extra(HA_EXTRA_IGNORE_DUP_KEY);
+  if (info.handle_duplicates == DUP_REPLACE)
+  {
+    if (!table->triggers || !table->triggers->has_delete_triggers())
+      table->file->extra(HA_EXTRA_WRITE_CAN_REPLACE);
+    table->file->extra(HA_EXTRA_RETRIEVE_ALL_COLS);
+  }
   thd->no_trans_update= 0;
   thd->abort_on_warning= (!info.ignore &&
                           (thd->variables.sql_mode &
@@ -2207,6 +2269,10 @@
          check_that_all_fields_are_given_values(thd, table, table_list)) ||
         table_list->prepare_where(thd, 0, TRUE) ||
         table_list->prepare_check_option(thd));
+
+  if (!res)
+    mark_fields_used_by_triggers_for_insert_stmt(thd, table,
+                                                 info.handle_duplicates);
   DBUG_RETURN(res);
 }
 
@@ -2372,6 +2438,7 @@
 
   error= (!thd->prelocked_mode) ? table->file->end_bulk_insert():0;
   table->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY);
+  table->file->extra(HA_EXTRA_WRITE_CANNOT_REPLACE);
 
   /*
     We must invalidate the table in the query cache before binlog writing
@@ -2601,6 +2668,12 @@
   thd->cuted_fields=0;
   if (info.ignore || info.handle_duplicates != DUP_ERROR)
     table->file->extra(HA_EXTRA_IGNORE_DUP_KEY);
+  if (info.handle_duplicates == DUP_REPLACE)
+  {
+    if (!table->triggers || !table->triggers->has_delete_triggers())
+      table->file->extra(HA_EXTRA_WRITE_CAN_REPLACE);
+    table->file->extra(HA_EXTRA_RETRIEVE_ALL_COLS);
+  }
   if (!thd->prelocked_mode)
     table->file->start_bulk_insert((ha_rows) 0);
   thd->no_trans_update= 0;
@@ -2640,6 +2713,7 @@
   else
   {
     table->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY);
+    table->file->extra(HA_EXTRA_WRITE_CANNOT_REPLACE);
     VOID(pthread_mutex_lock(&LOCK_open));
     mysql_unlock_tables(thd, lock);
     /*
@@ -2673,6 +2747,7 @@
   if (table)
   {
     table->file->extra(HA_EXTRA_NO_IGNORE_DUP_KEY);
+    table->file->extra(HA_EXTRA_WRITE_CANNOT_REPLACE);
     enum db_type table_type=table->s->db_type;
     if (!table->s->tmp_table)
     {

--- 1.561/sql/sql_parse.cc	2006-07-04 23:46:11 +04:00
+++ 1.562/sql/sql_parse.cc	2006-07-06 14:28:52 +04:00
@@ -3089,8 +3089,7 @@
 			       lex->key_list,
 			       select_lex->order_list.elements,
                                (ORDER *) select_lex->order_list.first,
-			       lex->duplicates, lex->ignore, &lex->alter_info,
-                               1);
+			       lex->ignore, &lex->alter_info, 1);
       }
       break;
     }
@@ -7028,7 +7027,7 @@
   DBUG_RETURN(mysql_alter_table(thd,table_list->db,table_list->table_name,
 				&create_info, table_list,
 				fields, keys, 0, (ORDER*)0,
-				DUP_ERROR, 0, &alter_info, 1));
+                                0, &alter_info, 1));
 }
 
 
@@ -7046,7 +7045,7 @@
   DBUG_RETURN(mysql_alter_table(thd,table_list->db,table_list->table_name,
 				&create_info, table_list,
 				fields, keys, 0, (ORDER*)0,
-				DUP_ERROR, 0, alter_info, 1));
+                                0, alter_info, 1));
 }
 
 

--- 1.316/sql/sql_table.cc	2006-06-27 03:34:07 +04:00
+++ 1.317/sql/sql_table.cc	2006-07-06 14:28:52 +04:00
@@ -35,9 +35,7 @@
 static bool check_if_keyname_exists(const char *name,KEY *start, KEY *end);
 static char *make_unique_key_name(const char *field_name,KEY *start,KEY *end);
 static int copy_data_between_tables(TABLE *from,TABLE *to,
-				    List<create_field> &create,
-				    enum enum_duplicates handle_duplicates,
-                                    bool ignore,
+                                    List<create_field> &create, bool ignore,
 				    uint order_num, ORDER *order,
 				    ha_rows *copied,ha_rows *deleted);
 static bool prepare_blob_field(THD *thd, create_field *sql_field);
@@ -3141,8 +3139,7 @@
                        HA_CREATE_INFO *create_info,
                        TABLE_LIST *table_list,
                        List<create_field> &fields, List<Key> &keys,
-                       uint order_num, ORDER *order,
-                       enum enum_duplicates handle_duplicates, bool ignore,
+                       uint order_num, ORDER *order, bool ignore,
                        ALTER_INFO *alter_info, bool do_send_ok)
 {
   TABLE *table,*new_table=0;
@@ -3737,8 +3734,7 @@
   {
     new_table->timestamp_field_type= TIMESTAMP_NO_AUTO_SET;
     new_table->next_number_field=new_table->found_next_number_field;
-    error=copy_data_between_tables(table,new_table,create_list,
-				   handle_duplicates, ignore,
+    error=copy_data_between_tables(table, new_table, create_list, ignore,
 				   order_num, order, &copied, &deleted);
   }
   thd->last_insert_id=next_insert_id;		// Needed for correct log
@@ -3961,7 +3957,6 @@
 static int
 copy_data_between_tables(TABLE *from,TABLE *to,
 			 List<create_field> &create,
-			 enum enum_duplicates handle_duplicates,
                          bool ignore,
 			 uint order_num, ORDER *order,
 			 ha_rows *copied,
@@ -4064,8 +4059,7 @@
   */
   from->file->extra(HA_EXTRA_RETRIEVE_ALL_COLS);
   init_read_record(&info, thd, from, (SQL_SELECT *) 0, 1,1);
-  if (ignore ||
-      handle_duplicates == DUP_REPLACE)
+  if (ignore)
     to->file->extra(HA_EXTRA_IGNORE_DUP_KEY);
   thd->row_count= 0;
   restore_record(to, s->default_values);        // Create empty record
@@ -4092,8 +4086,7 @@
     }
     if ((error=to->file->write_row((byte*) to->record[0])))
     {
-      if ((!ignore &&
-	   handle_duplicates != DUP_REPLACE) ||
+      if (!ignore ||
 	  (error != HA_ERR_FOUND_DUPP_KEY &&
 	   error != HA_ERR_FOUND_DUPP_UNIQUE))
       {
@@ -4171,7 +4164,7 @@
   DBUG_RETURN(mysql_alter_table(thd, NullS, NullS, &create_info,
                                 table_list, lex->create_list,
                                 lex->key_list, 0, (ORDER *) 0,
-                                DUP_ERROR, 0, &lex->alter_info, do_send_ok));
+                                0, &lex->alter_info, do_send_ok));
 }
 
 

--- 1.191/sql/sql_update.cc	2006-06-29 11:40:23 +04:00
+++ 1.192/sql/sql_update.cc	2006-07-06 14:28:52 +04:00
@@ -433,6 +433,9 @@
                                (MODE_STRICT_TRANS_TABLES |
                                 MODE_STRICT_ALL_TABLES)));
 
+  if (table->triggers)
+    table->triggers->mark_fields_used(thd, TRG_EVENT_UPDATE);
+
   while (!(error=info.read_record(&info)) && !thd->killed)
   {
     if (!(select && select->skip_record()))
@@ -754,6 +757,9 @@
         my_error(ER_NON_UPDATABLE_TABLE, MYF(0), tl->alias, "UPDATE");
         DBUG_RETURN(TRUE);
       }
+
+      if (table->triggers)
+        table->triggers->mark_fields_used(thd, TRG_EVENT_UPDATE);
 
       DBUG_PRINT("info",("setting table `%s` for update", tl->alias));
       /*

--- 1.52/sql/sql_trigger.cc	2006-06-28 23:54:10 +04:00
+++ 1.53/sql/sql_trigger.cc	2006-07-06 14:28:52 +04:00
@@ -1024,8 +1024,15 @@
         }
 
         /*
-          Let us bind Item_trigger_field objects representing access to fields
-          in old/new versions of row in trigger to Field objects in table being
+          Gather all Item_trigger_field objects representing access to fields
+          in old/new versions of row in trigger into lists containing all such
+          objects for the triggers with same action and timing.
+        */
+        triggers->trigger_fields[lex.trg_chistics.event]
+                                [lex.trg_chistics.action_time]=
+          (Item_trigger_field *)(lex.trg_table_fields.first);
+        /*
+          Also let us bind these objects to Field objects in table being
           opened.
 
           We ignore errors here, because if even something is wrong we still
@@ -1532,6 +1539,39 @@
   }
 
   return err_status;
+}
+
+
+/*
+  Mark fields of subject table which we read/set in its triggers as such.
+
+  SYNOPSIS
+    mark_fields_used()
+      thd    Current thread context
+      event  Type of event triggers for which we are going to inspect
+
+  DESCRIPTION
+    This method marks fields of subject table which are read/set in its
+    triggers as such (by setting Field::query_id equal to THD::query_id)
+    and thus informs handler that values for these fields should be
+    retrieved/stored during execution of statement.
+*/
+
+void Table_triggers_list::mark_fields_used(THD *thd, trg_event_type event)
+{
+  int action_time;
+  Item_trigger_field *trg_field;
+
+  for (action_time= 0; action_time < (int)TRG_ACTION_MAX; action_time++)
+  {
+    for (trg_field= trigger_fields[event][action_time]; trg_field;
+         trg_field= trg_field->next_trg_field)
+    {
+      /* We cannot mark fields which does not present in table. */
+      if (trg_field->field_idx != (uint)-1)
+        table->field[trg_field->field_idx]->query_id = thd->query_id;
+    }
+  }
 }
 
 

--- 1.269/sql/ha_ndbcluster.cc	2006-06-30 21:07:22 +04:00
+++ 1.270/sql/ha_ndbcluster.cc	2006-07-06 14:28:51 +04:00
@@ -3217,20 +3217,11 @@
     break;
   case HA_EXTRA_IGNORE_DUP_KEY:       /* Dup keys don't rollback everything*/
     DBUG_PRINT("info", ("HA_EXTRA_IGNORE_DUP_KEY"));
-    if (current_thd->lex->sql_command == SQLCOM_REPLACE && !m_has_unique_index)
-    {
-      DBUG_PRINT("info", ("Turning ON use of write instead of insert"));
-      m_use_write= TRUE;
-    } else 
-    {
-      DBUG_PRINT("info", ("Ignoring duplicate key"));
-      m_ignore_dup_key= TRUE;
-    }
+    DBUG_PRINT("info", ("Ignoring duplicate key"));
+    m_ignore_dup_key= TRUE;
     break;
   case HA_EXTRA_NO_IGNORE_DUP_KEY:
     DBUG_PRINT("info", ("HA_EXTRA_NO_IGNORE_DUP_KEY"));
-    DBUG_PRINT("info", ("Turning OFF use of write instead of insert"));
-    m_use_write= FALSE;
     m_ignore_dup_key= FALSE;
     break;
   case HA_EXTRA_RETRIEVE_ALL_COLS:    /* Retrieve all columns, not just those
@@ -3260,7 +3251,19 @@
   case HA_EXTRA_KEYREAD_PRESERVE_FIELDS:
     DBUG_PRINT("info", ("HA_EXTRA_KEYREAD_PRESERVE_FIELDS"));
     break;
-
+  case HA_EXTRA_WRITE_CAN_REPLACE:
+    DBUG_PRINT("info", ("HA_EXTRA_WRITE_CAN_REPLACE"));
+    if (!m_has_unique_index)
+    {
+      DBUG_PRINT("info", ("Turning ON use of write instead of insert"));
+      m_use_write= TRUE;
+    }
+    break;
+  case HA_EXTRA_WRITE_CANNOT_REPLACE:
+    DBUG_PRINT("info", ("HA_EXTRA_WRITE_CANNOT_REPLACE"));
+    DBUG_PRINT("info", ("Turning OFF use of write instead of insert"));
+    m_use_write= FALSE;
+    break;
   }
   
   DBUG_RETURN(0);

--- 1.31/mysql-test/r/federated.result	2006-06-29 19:35:55 +04:00
+++ 1.32/mysql-test/r/federated.result	2006-07-06 14:31:28 +04:00
@@ -1689,6 +1689,34 @@
 9	abc	ppc
 drop table federated.t1, federated.t2;
 drop table federated.t1, federated.t2;
+drop table if exists federated.t1;
+create table federated.t1 (a int, b int, c int);
+drop table if exists federated.t1;
+drop table if exists federated.t2;
+create table federated.t1 (a int,  b int, c int) engine=federated connection='mysql://root@stripped:SLAVE_PORT/federated/t1';
+create trigger federated.t1_bi before insert on federated.t1 for each row set new.c= new.a * new.b;
+create table federated.t2 (a int, b int);
+insert into federated.t2 values (13, 17), (19, 23);
+insert into federated.t1 (a, b) values (1, 2), (3, 5), (7, 11);
+select * from federated.t1;
+a	b	c
+1	2	2
+3	5	15
+7	11	77
+delete from federated.t1;
+insert into federated.t1 (a, b) select * from federated.t2;
+select * from federated.t1;
+a	b	c
+13	17	221
+19	23	437
+delete from federated.t1;
+load data infile '../std_data_ln/loaddata5.dat' into table federated.t1 fields terminated by '' enclosed by '' ignore 1 lines (a, b);
+select * from federated.t1;
+a	b	c
+3	4	12
+5	6	30
+drop tables federated.t1, federated.t2;
+drop table federated.t1;
 DROP TABLE IF EXISTS federated.t1;
 DROP DATABASE IF EXISTS federated;
 DROP TABLE IF EXISTS federated.t1;

--- 1.27/mysql-test/t/federated.test	2006-06-29 19:35:55 +04:00
+++ 1.28/mysql-test/t/federated.test	2006-07-06 14:28:51 +04:00
@@ -1365,4 +1365,46 @@
 connection slave;
 drop table federated.t1, federated.t2;
 
+# 
+# Additional test for bug#18437 "Wrong values inserted with a before
+# update trigger on NDB table". SQL-layer didn't properly inform
+# handler about fields which were read and set in triggers. In some
+# cases this resulted in incorrect (garbage) values of OLD variables
+# and lost changes to NEW variables.
+# Since for federated engine only operation which is affected by wrong
+# fields mark-up is handler::write_row() this file constains coverage
+# for ON INSERT triggers only. Tests for other types of triggers reside
+# in ndb_trigger.test.
+#
+--disable_warnings
+drop table if exists federated.t1;
+--enable_warnings
+create table federated.t1 (a int, b int, c int);
+connection master;
+--disable_warnings
+drop table if exists federated.t1;
+drop table if exists federated.t2;
+--enable_warnings
+--replace_result $SLAVE_MYPORT SLAVE_PORT
+eval create table federated.t1 (a int,  b int, c int) engine=federated connection='mysql://root@stripped:$SLAVE_MYPORT/federated/t1';
+create trigger federated.t1_bi before insert on federated.t1 for each row set new.c= new.a * new.b;
+create table federated.t2 (a int, b int);
+insert into federated.t2 values (13, 17), (19, 23);
+# Each of three statements should correctly set values for all three fields
+# insert
+insert into federated.t1 (a, b) values (1, 2), (3, 5), (7, 11);
+select * from federated.t1;
+delete from federated.t1;
+# insert ... select
+insert into federated.t1 (a, b) select * from federated.t2;
+select * from federated.t1;
+delete from federated.t1;
+# load
+load data infile '../std_data_ln/loaddata5.dat' into table federated.t1 fields terminated by '' enclosed by '' ignore 1 lines (a, b);
+select * from federated.t1;
+drop tables federated.t1, federated.t2;
+
+connection slave;
+drop table federated.t1;
+
 source include/federated_cleanup.inc;
Thread
bk commit into 5.0 tree (dlenev:1.2216)dlenev6 Jul