List:Internals« Previous MessageNext Message »
From:monty Date:December 6 2004 3:15pm
Subject:bk commit into 5.0 tree (monty:1.1716)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of monty. When monty 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://www.mysql.com/doc/I/n/Installing_source_tree.html

ChangeSet
  1.1716 04/12/06 17:15:54 monty@stripped +22 -0
  After merge fixes
  Fixed compiler warnings
  Fix core dump when sending SIGHUP to mysqld

  sql/sql_view.cc
    1.29 04/12/06 17:15:49 monty@stripped +3 -2
    Added missing DBUG_RETURN
    Fixed compiler warnings
    Added flag to signal that the view is a derived table

  sql/sql_update.cc
    1.131 04/12/06 17:15:49 monty@stripped +2 -4
    Fixed compiler warning

  sql/sql_table.cc
    1.199 04/12/06 17:15:49 monty@stripped +1 -0
    Added missing DBUG_VOID_RETURN

  sql/sql_select.cc
    1.260 04/12/06 17:15:49 monty@stripped +32 -18
    More debugging

  sql/sql_parse.cc
    1.373 04/12/06 17:15:48 monty@stripped +6 -6
    After merge fixes

  sql/sql_lex.cc
    1.122 04/12/06 17:15:48 monty@stripped +2 -1
    After merge fixes
    Removed compiler warnings

  sql/sql_insert.cc
    1.126 04/12/06 17:15:48 monty@stripped +16 -11
    Fixed compiler warnings
    After merge fixes

  sql/sql_derived.cc
    1.63 04/12/06 17:15:48 monty@stripped +3 -3
    Fixed comment
    Added missing DBUG_RETURN

  sql/sql_acl.cc
    1.114 04/12/06 17:15:48 monty@stripped +2 -1
    Better comment

  sql/mysqld.cc
    1.411 04/12/06 17:15:48 monty@stripped +1 -1
    Fix core dump when sending SIGHUP to mysqld

  sql/item.cc
    1.97 04/12/06 17:15:48 monty@stripped +2 -0
    After merge fixes

  sql-common/client.c
    1.55 04/12/06 17:15:48 monty@stripped +1 -1
    After merge fixes

  mysql-test/t/rpl_create_database.test
    1.3 04/12/06 17:15:48 monty@stripped +1 -0
    After merge fixes

  mysql-test/t/rpl_charset.test
    1.10 04/12/06 17:15:48 monty@stripped +13 -8
    After merge fixes

  mysql-test/r/rpl_loaddata_rule_m.result
    1.9 04/12/06 17:15:48 monty@stripped +2 -2
    After merge fixes

  mysql-test/r/rpl_create_database.result
    1.3 04/12/06 17:15:48 monty@stripped +14 -14
    After merge fixes

  mysql-test/r/rpl_charset.result
    1.11 04/12/06 17:15:48 monty@stripped +9 -9
    After merge fixes

  mysql-test/r/insert_select.result
    1.22 04/12/06 17:15:48 monty@stripped +2 -2
    After merge fixes

  mysql-test/r/innodb.result
    1.84 04/12/06 17:15:48 monty@stripped +1 -1
    After merge fixes

  mysql-test/r/group_min_max.result
    1.6 04/12/06 17:15:48 monty@stripped +1 -1
    After merge fixes

  mysql-test/r/grant.result
    1.30 04/12/06 17:15:48 monty@stripped +2 -2
    After merge fixes

  mysql-test/r/drop_temp_table.result
    1.10 04/12/06 17:15:48 monty@stripped +4 -4
    After merge fixes

# 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:	monty
# Host:	narttu.mysql.fi
# Root:	/home/my/mysql-5.0

--- 1.96/sql/item.cc	2004-11-26 17:23:50 +02:00
+++ 1.97/sql/item.cc	2004-12-06 17:15:48 +02:00
@@ -187,6 +187,7 @@
 void Item_ident::cleanup()
 {
   DBUG_ENTER("Item_ident::cleanup");
+#ifdef CANT_BE_USED_AS_MEMORY_IS_FREED
   DBUG_PRINT("enter", ("b:%s(%s), t:%s(%s), f:%s(%s)",
 		       db_name ? db_name : "(null)",
                        orig_db_name ? orig_db_name : "(null)",
@@ -194,6 +195,7 @@
                        orig_table_name ? orig_table_name : "(null)",
 		       field_name ? field_name : "(null)",
                        orig_field_name ? orig_field_name : "(null)"));
+#endif
   Item::cleanup();
   db_name= orig_db_name; 
   table_name= orig_table_name;

--- 1.410/sql/mysqld.cc	2004-12-06 02:05:22 +02:00
+++ 1.411/sql/mysqld.cc	2004-12-06 17:15:48 +02:00
@@ -2128,7 +2128,7 @@
       {
 	reload_acl_and_cache((THD*) 0,
 			     (REFRESH_LOG | REFRESH_TABLES | REFRESH_FAST |
-			      REFRESH_STATUS | REFRESH_GRANT |
+			      REFRESH_GRANT |
 			      REFRESH_THREADS | REFRESH_HOSTS),
 			     (TABLE_LIST*) 0, NULL); // Flush logs
 	mysql_print_status((THD*) 0);		// Send debug some info

--- 1.113/sql/sql_acl.cc	2004-12-06 02:05:22 +02:00
+++ 1.114/sql/sql_acl.cc	2004-12-06 17:15:48 +02:00
@@ -446,7 +446,8 @@
 
   SYNOPSIS
     acl_reload()
-    thd			Thread handle
+    thd			Thread handle. Note that this may be NULL if we refresh
+			because we got a signal    
 */
 
 void acl_reload(THD *thd)

--- 1.125/sql/sql_insert.cc	2004-12-06 11:38:52 +02:00
+++ 1.126/sql/sql_insert.cc	2004-12-06 17:15:48 +02:00
@@ -116,7 +116,8 @@
       Item *item;
       TABLE_LIST *tbl= 0;
       table_map map= 0;
-      while (item= it++)
+
+      while ((item= it++))
         map|= item->used_tables();
       if (table_list->check_single_table(&tbl, map) || tbl == 0)
       {
@@ -1840,19 +1841,23 @@
     DBUG_RETURN(0);
   }
 
-  thd->count_cuted_fields= CHECK_FIELD_WARN;		// calc cuted fields
+  thd->count_cuted_fields= CHECK_FIELD_WARN;	// Calculate cuted fields
   store_values(values);
   thd->count_cuted_fields= CHECK_FIELD_IGNORE;
   if (thd->net.report_error)
     DBUG_RETURN(1);
-  switch (table_list->view_check_option(thd,
-                                        thd->lex->duplicates == DUP_IGNORE)) {
-  case VIEW_CHECK_SKIP:
-    DBUG_RETURN(0);
-  case VIEW_CHECK_ERROR:
-    DBUG_RETURN(1);
+  if (table_list)                               // Not CREATE ... SELECT
+  {
+    switch (table_list->view_check_option(thd,
+                                          thd->lex->duplicates ==
+                                          DUP_IGNORE)) {
+    case VIEW_CHECK_SKIP:
+      DBUG_RETURN(0);
+    case VIEW_CHECK_ERROR:
+      DBUG_RETURN(1);
+    }
   }
-  if (!(error= write_record(table,&info)) && table->next_number_field)
+  if (!(error= write_record(thd, table,&info)) && table->next_number_field)
   {
     /* Clear for next record */
     table->next_number_field->reset();
@@ -1866,9 +1871,9 @@
 void select_insert::store_values(List<Item> &values)
 {
   if (fields->elements)
-    fill_record(*fields, values, 1);
+    fill_record(thd, *fields, values, 1);
   else
-    fill_record(table->field, values, 1);
+    fill_record(thd, table->field, values, 1);
 }
 
 void select_insert::send_error(uint errcode,const char *err)

--- 1.121/sql/sql_lex.cc	2004-12-06 11:38:52 +02:00
+++ 1.122/sql/sql_lex.cc	2004-12-06 17:15:48 +02:00
@@ -144,8 +144,9 @@
   lex->select_lex.init_order();
   lex->select_lex.group_list.empty();
   lex->describe= 0;
-  lex->subqueries= lex->derived_tables= FALSE;
+  lex->subqueries= FALSE;
   lex->view_prepare_mode= FALSE;
+  lex->derived_tables= 0;
   lex->lock_option= TL_READ;
   lex->found_colon= 0;
   lex->safe_to_cache_query= 1;

--- 1.372/sql/sql_parse.cc	2004-12-06 11:38:52 +02:00
+++ 1.373/sql/sql_parse.cc	2004-12-06 17:15:48 +02:00
@@ -615,7 +615,7 @@
 }
 
 
-static void reset_mqh(THD *thd, LEX_USER *lu, bool get_them= 0)
+static void reset_mqh(LEX_USER *lu, bool get_them= 0)
 {
 #ifndef NO_EMBEDDED_ACCESS_CHECKS
   (void) pthread_mutex_lock(&LOCK_user_conn);
@@ -3396,7 +3396,7 @@
     {
       if (mysql_bin_log.is_open())
       {
-        Query_log_event qinfo(thd, thd->query, thd->query_length, 0);
+        Query_log_event qinfo(thd, thd->query, thd->query_length, 0, FALSE);
         mysql_bin_log.write(&qinfo);
       }
       send_ok(thd);
@@ -3512,7 +3512,7 @@
 	  List_iterator <LEX_USER> str_list(lex->users_list);
 	  LEX_USER *user;
 	  while ((user=str_list++))
-	    reset_mqh(thd,user);
+	    reset_mqh(user);
 	}
       }
     }
@@ -5637,7 +5637,7 @@
     acl_reload(thd);
     grant_reload(thd);
     if (mqh_used)
-      reset_mqh(thd,(LEX_USER *) NULL,TRUE);
+      reset_mqh((LEX_USER *) NULL,TRUE);
   }
 #endif
   if (options & REFRESH_LOG)
@@ -5713,7 +5713,7 @@
   }
   if (options & REFRESH_HOSTS)
     hostname_cache_refresh();
-  if (options & REFRESH_STATUS)
+  if (thd && (options & REFRESH_STATUS))
     refresh_status();
   if (options & REFRESH_THREADS)
     flush_thread_cache();
@@ -5743,7 +5743,7 @@
  }
 #endif
  if (options & REFRESH_USER_RESOURCES)
-   reset_mqh(thd,(LEX_USER *) NULL);
+   reset_mqh((LEX_USER *) NULL);
  if (write_to_binlog)
    *write_to_binlog= tmp_write_to_binlog;
  return result;

--- 1.259/sql/sql_select.cc	2004-12-06 02:05:24 +02:00
+++ 1.260/sql/sql_select.cc	2004-12-06 17:15:49 +02:00
@@ -1249,7 +1249,7 @@
 
     /* Copy data to the temporary table */
     thd->proc_info= "Copying to tmp table";
-    
+    DBUG_PRINT("info", ("%s", thd->proc_info));
     if ((tmp_error= do_select(curr_join, (List<Item> *) 0, curr_tmp_table, 0)))
     {
       error= tmp_error;
@@ -1377,6 +1377,7 @@
       }
       
       thd->proc_info="Copying to group table";
+      DBUG_PRINT("info", ("%s", thd->proc_info));
       tmp_error= -1;
       if (curr_join != this)
       {
@@ -1615,6 +1616,7 @@
   else
   {
     thd->proc_info="Sending data";
+    DBUG_PRINT("info", ("%s", thd->proc_info));
     error= do_select(curr_join, curr_fields_list, NULL, procedure);
     thd->limit_found_rows= curr_join->send_records;
     thd->examined_row_count= curr_join->examined_rows;
@@ -1910,6 +1912,8 @@
 Cursor::close()
 {
   THD *thd= join->thd;
+  DBUG_ENTER("Cursor::close");
+
   join->join_free(0);
   if (unit)
   {
@@ -1940,6 +1944,7 @@
   }
   join= 0;
   unit= 0;
+  DBUG_VOID_RETURN;
 }
 
 
@@ -4718,11 +4723,12 @@
   KEYUSE *keyuse;
   uint table_count;
   THD *thd=join->thd;
+  DBUG_ENTER("get_best_combination");
 
   table_count=join->tables;
   if (!(join->join_tab=join_tab=
 	(JOIN_TAB*) thd->alloc(sizeof(JOIN_TAB)*table_count)))
-    return TRUE;
+    DBUG_RETURN(TRUE);
 
   join->full_join=0;
 
@@ -4736,6 +4742,7 @@
     form->reginfo.join_tab=j;
     if (!*j->on_expr_ref)
       form->reginfo.not_exists_optimize=0;	// Only with LEFT JOIN
+    DBUG_PRINT("info",("type: %d", j->type));
     if (j->type == JT_CONST)
       continue;					// Handled in make_join_stat..
 
@@ -4751,13 +4758,13 @@
 	join->full_join=1;
     }
     else if (create_ref_for_key(join, j, keyuse, used_tables))
-      return TRUE;				// Something went wrong
+      DBUG_RETURN(TRUE);                        // Something went wrong
   }
 
   for (i=0 ; i < table_count ; i++)
     join->map2table[join->join_tab[i].table->tablenr]=join->join_tab+i;
   update_depend_map(join);
-  return 0;
+  DBUG_RETURN(0);
 }
 
 
@@ -4770,6 +4777,7 @@
   uint keyparts,length,key;
   TABLE *table;
   KEY *keyinfo;
+  DBUG_ENTER("create_ref_for_key");
 
   /*  Use best key from find_best */
   table=j->table;
@@ -4819,7 +4827,7 @@
 						   (keyparts+1)))) ||
       !(j->ref.items=    (Item**) thd->alloc(sizeof(Item*)*keyparts)))
   {
-    return TRUE;
+    DBUG_RETURN(TRUE);
   }
   j->ref.key_buff2=j->ref.key_buff+ALIGN_SIZE(length);
   j->ref.key_err=1;
@@ -4832,7 +4840,7 @@
   {
     j->ref.items[0]=((Item_func*)(keyuse->val))->key_item();
     if (keyuse->used_tables)
-      return TRUE; // not supported yet. SerG
+      DBUG_RETURN(TRUE);                        // not supported yet. SerG
 
     j->type=JT_FT;
   }
@@ -4856,7 +4864,7 @@
                            maybe_null ?  (char*) key_buff : 0,
                            keyinfo->key_part[i].length, keyuse->val);
 	if (thd->is_fatal_error)
-	  return TRUE;
+	  DBUG_RETURN(TRUE);
 	tmp.copy();
       }
       else
@@ -4876,7 +4884,7 @@
   } /* not ftkey */
   *ref_key=0;				// end_marker
   if (j->type == JT_FT)
-    return 0;
+    DBUG_RETURN(0);
   if (j->type == JT_CONST)
     j->table->const_table= 1;
   else if (((keyinfo->flags & (HA_NOSAME | HA_NULL_PART_KEY |
@@ -4900,7 +4908,7 @@
   }
   else
     j->type=JT_EQ_REF;
-  return 0;
+  DBUG_RETURN(0);
 }
 
 
@@ -4963,10 +4971,11 @@
 {
   TABLE **tableptr;
   JOIN_TAB *join_tab;
+  DBUG_ENTER("make_simple_join");
 
   if (!(tableptr=(TABLE**) join->thd->alloc(sizeof(TABLE*))) ||
       !(join_tab=(JOIN_TAB*) join->thd->alloc(sizeof(JOIN_TAB))))
-    return TRUE;
+    DBUG_RETURN(TRUE);
   join->join_tab=join_tab;
   join->table=tableptr; tableptr[0]=tmp_table;
   join->tables=1;
@@ -4996,10 +5005,11 @@
   join_tab->not_used_in_distinct=0;
   join_tab->read_first_record= join_init_read_record;
   join_tab->join=join;
+  join_tab->ref.key_parts= 0;
   bzero((char*) &join_tab->read_record,sizeof(join_tab->read_record));
   tmp_table->status=0;
   tmp_table->null_row=0;
-  return FALSE;
+  DBUG_RETURN(FALSE);
 }
 
 
@@ -8122,6 +8132,7 @@
     keyinfo->key_length=0;
     keyinfo->rec_per_key=0;
     keyinfo->algorithm= HA_KEY_ALG_UNDEF;
+    keyinfo->name= (char*) "group_key";
     for (; group ; group=group->next,key_part_info++)
     {
       Field *field=(*group->item)->get_tmp_table_field();
@@ -8192,7 +8203,7 @@
     keyinfo->key_part=key_part_info;
     keyinfo->flags=HA_NOSAME | HA_NULL_ARE_EQUAL;
     keyinfo->key_length=(uint16) reclength;
-    keyinfo->name=(char*) "tmp";
+    keyinfo->name= (char*) "distinct_key";
     keyinfo->algorithm= HA_KEY_ALG_UNDEF;
     if (null_pack_length)
     {
@@ -11973,6 +11984,8 @@
 {
   List_iterator_fast<Item> it(all_fields);
   Item *item_field,*item;
+  DBUG_ENTER("change_to_use_tmp_fields");
+
   res_selected_fields.empty();
   res_all_fields.empty();
 
@@ -11996,8 +12009,8 @@
 	else
 	  item_field= (Item*) new Item_field(field);
 	if (!item_field)
-	  return TRUE;				// Fatal error
-	item_field->name= item->name;		/*lint -e613 */
+	  DBUG_RETURN(TRUE);                    // Fatal error
+	item_field->name= item->name;
 #ifndef DBUG_OFF
 	if (_db_on_ && !item_field->name)
 	{
@@ -12021,7 +12034,7 @@
   for (i= 0; i < border; i++)
     itr++;
   itr.sublist(res_selected_fields, elements);
-  return FALSE;
+  DBUG_RETURN(FALSE);
 }
 
 
@@ -12092,10 +12105,11 @@
 static bool setup_sum_funcs(THD *thd, Item_sum **func_ptr)
 {
   Item_sum *func;
+  DBUG_ENTER("setup_sum_funcs");
   while ((func= *(func_ptr++)))
     if (func->setup(thd))
-      return TRUE;
-  return FALSE;
+      DBUG_RETURN(TRUE);
+  DBUG_RETURN(FALSE);
 }
 
 
@@ -12617,10 +12631,10 @@
       item_list.push_back(new Item_string(join_type_str[tab->type],
 					  strlen(join_type_str[tab->type]),
 					  cs));
-      uint j;
       /* Build "possible_keys" value and add it to item_list */
       if (!tab->keys.is_clear_all())
       {
+        uint j;
         for (j=0 ; j < table->keys ; j++)
         {
           if (tab->keys.is_set(j))

--- 1.198/sql/sql_table.cc	2004-12-06 11:38:52 +02:00
+++ 1.199/sql/sql_table.cc	2004-12-06 17:15:49 +02:00
@@ -1670,6 +1670,7 @@
 
   /* When lock on LOCK_open is freed other threads can continue */
   pthread_cond_broadcast(&COND_refresh);
+  DBUG_VOID_RETURN;
 }
 
 static int send_check_errmsg(THD *thd, TABLE_LIST* table,

--- 1.130/sql/sql_update.cc	2004-12-06 02:05:24 +02:00
+++ 1.131/sql/sql_update.cc	2004-12-06 17:15:49 +02:00
@@ -776,12 +776,10 @@
     */
     List_iterator_fast<Item> it(*fields);
     Item *item;
-    while (item= it++)
-    {
+    while ((item= it++))
       item->cleanup();
-    }
 
-    /* We have to cleunup translation tables of views. */
+    /* We have to cleanup translation tables of views. */
     for (TABLE_LIST *tbl= table_list; tbl; tbl= tbl->next_global)
       tbl->cleanup_items();
 

--- 1.62/sql/sql_derived.cc	2004-11-05 17:28:58 +02:00
+++ 1.63/sql/sql_derived.cc	2004-12-06 17:15:48 +02:00
@@ -77,7 +77,7 @@
   Create temporary table structure (but do not fill it)
 
   SYNOPSIS
-    mysql_derived(THD *thd, LEX *lex, SELECT_LEX_UNIT *unit, TABLE_LIST *t)
+    mysql_derived_prepare()
     thd			Thread handle
     lex                 LEX for this thread
     orig_table_list     TABLE_LIST for the upper SELECT
@@ -103,6 +103,7 @@
 {
   SELECT_LEX_UNIT *unit= orig_table_list->derived;
   int res= 0;
+  DBUG_ENTER("mysql_derived_prepare");
   if (unit)
   {
     SELECT_LEX *first_select= unit->first_select();
@@ -110,7 +111,6 @@
     select_union *derived_result;
     bool is_union= first_select->next_select() && 
       first_select->next_select()->linkage == UNION_TYPE;
-    DBUG_ENTER("mysql_derived");
 
     if (!(derived_result= new select_union(0)))
       DBUG_RETURN(1); // out of memory
@@ -173,7 +173,7 @@
   }
   else if (orig_table_list->ancestor)
     orig_table_list->set_ancestor();
-  return (res);
+  DBUG_RETURN(res);
 }
 
 

--- 1.28/sql/sql_view.cc	2004-11-26 12:27:05 +02:00
+++ 1.29/sql/sql_view.cc	2004-12-06 17:15:49 +02:00
@@ -312,7 +312,7 @@
 
   send_ok(thd);
   lex->link_first_table_back(view, link_to_local);
-  return 0;
+  DBUG_RETURN(0);
 
 err:
   thd->proc_info= "end";
@@ -793,7 +793,7 @@
         /* re-nest tables of VIEW */
         {
           List_iterator_fast<TABLE_LIST> ti(nested_join->join_list);
-          while(tbl= ti++)
+          while ((tbl= ti++))
           {
             tbl->join_list= &nested_join->join_list;
             tbl->embedding= table;
@@ -832,6 +832,7 @@
     view_select->linkage= DERIVED_TABLE_TYPE;
     table->updatable= 0;
     table->effective_with_check= VIEW_CHECK_NONE;
+    old_lex->subqueries= TRUE;
 
     /* SELECT tree link */
     lex->unit.include_down(table->select_lex);

--- 1.9/mysql-test/r/drop_temp_table.result	2004-12-06 11:38:51 +02:00
+++ 1.10/mysql-test/r/drop_temp_table.result	2004-12-06 17:15:48 +02:00
@@ -11,8 +11,8 @@
 show binlog events;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
 master-bin.000001	4	Format_desc	1	95	Server ver: VERSION, Binlog ver: 4
-master-bin.000001	95	Query	1	190	use `test`; create database `drop-temp+table-test`
-master-bin.000001	190	Query	1	306	use `drop-temp+table-test`; create temporary table `table:name` (a int)
-master-bin.000001	306	Query	1	457	use `drop-temp+table-test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `drop-temp+table-test`.`table:name`
-master-bin.000001	457	Query	1	550	use `drop-temp+table-test`; DO RELEASE_LOCK("a")
+master-bin.000001	95	Query	1	206	create database `drop-temp+table-test`
+master-bin.000001	206	Query	1	322	use `drop-temp+table-test`; create temporary table `table:name` (a int)
+master-bin.000001	322	Query	1	473	use `drop-temp+table-test`; DROP /*!40005 TEMPORARY */ TABLE IF EXISTS `drop-temp+table-test`.`table:name`
+master-bin.000001	473	Query	1	566	use `drop-temp+table-test`; DO RELEASE_LOCK("a")
 drop database `drop-temp+table-test`;

--- 1.10/mysql-test/r/rpl_charset.result	2004-12-06 11:38:51 +02:00
+++ 1.11/mysql-test/r/rpl_charset.result	2004-12-06 17:15:48 +02:00
@@ -105,15 +105,15 @@
 drop database mysqltest3;
 show binlog events from 95;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-master-bin.000001	#	Query	1	#	use `test`; drop database if exists mysqltest2
-master-bin.000001	#	Query	1	#	use `test`; drop database if exists mysqltest3
-master-bin.000001	#	Query	1	#	use `test`; create database mysqltest2 character set latin2
+master-bin.000001	#	Query	1	#	drop database if exists mysqltest2
+master-bin.000001	#	Query	1	#	drop database if exists mysqltest3
+master-bin.000001	#	Query	1	#	create database mysqltest2 character set latin2
 master-bin.000001	#	Query	1	#	use `test`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=8,COLLATION_SERVER=30
-master-bin.000001	#	Query	1	#	use `test`; create database mysqltest3
+master-bin.000001	#	Query	1	#	create database mysqltest3
 master-bin.000001	#	Query	1	#	use `test`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=8,COLLATION_SERVER=64
-master-bin.000001	#	Query	1	#	use `test`; drop database mysqltest3
+master-bin.000001	#	Query	1	#	drop database mysqltest3
 master-bin.000001	#	Query	1	#	use `test`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=8,COLLATION_SERVER=64
-master-bin.000001	#	Query	1	#	use `test`; create database mysqltest3
+master-bin.000001	#	Query	1	#	create database mysqltest3
 master-bin.000001	#	Query	1	#	use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=8,COLLATION_DATABASE=9,COLLATION_SERVER=64
 master-bin.000001	#	Query	1	#	use `mysqltest2`; create table t1 (a int auto_increment primary key, b varchar(100))
 master-bin.000001	#	Query	1	#	use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=4,COLLATION_CONNECTION=27,COLLATION_DATABASE=9,COLLATION_SERVER=64
@@ -158,7 +158,7 @@
 master-bin.000001	#	User var	1	#	@`a`=_cp850 0x4DFC6C6C6572 COLLATE cp850_general_ci
 master-bin.000001	#	Query	1	#	use `mysqltest2`; insert into t1 (b) values(collation(@a))
 master-bin.000001	#	Query	1	#	use `mysqltest2`; SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
-master-bin.000001	#	Query	1	#	use `mysqltest2`; drop database mysqltest2
+master-bin.000001	#	Query	1	#	drop database mysqltest2
 master-bin.000001	#	Query	1	#	SET ONE_SHOT CHARACTER_SET_CLIENT=8,COLLATION_CONNECTION=31,COLLATION_DATABASE=9,COLLATION_SERVER=64
 master-bin.000001	#	Query	1	#	drop database mysqltest3
 set global character_set_server=latin2;
@@ -200,8 +200,8 @@
 CDF32C20E7E020F0FBE1E0EBEAF3	CDF32C20E7E020F0FBE1E0EBEAF3
 stop slave;
 delete from t1;
-change master to master_log_pos=6763;
-start slave until master_log_file='master-bin.000001', master_log_pos=6921;
+change master to master_log_pos=6809;
+start slave until master_log_file='master-bin.000001', master_log_pos=6967;
 start slave;
 select hex(c1), hex(c2) from t1;
 hex(c1)	hex(c2)

--- 1.8/mysql-test/r/rpl_loaddata_rule_m.result	2004-12-06 11:38:51 +02:00
+++ 1.9/mysql-test/r/rpl_loaddata_rule_m.result	2004-12-06 17:15:48 +02:00
@@ -12,6 +12,6 @@
 load data infile '../../std_data/rpl_loaddata.dat' into table test.t1;
 show binlog events from 95;
 Log_name	Pos	Event_type	Server_id	End_log_pos	Info
-master-bin.000001	79	Query	1	79	drop database if exists mysqltest
-master-bin.000001	152	Query	1	152	create database mysqltest
+master-bin.000001	95	Query	1	190	drop database if exists mysqltest
+master-bin.000001	190	Query	1	277	create database mysqltest
 drop database mysqltest;

--- 1.9/mysql-test/t/rpl_charset.test	2004-12-06 11:38:51 +02:00
+++ 1.10/mysql-test/t/rpl_charset.test	2004-12-06 17:15:48 +02:00
@@ -129,7 +129,7 @@
 select @@character_set_server;
 
 # ONE_SHOT on not charset/collation stuff is not allowed
-error 1382;
+-- error 1382
 set one_shot max_join_size=10;
 
 # Test of wrong character set numbers;
@@ -155,17 +155,22 @@
 
 stop slave;
 delete from t1;
-change master to master_log_pos=5847;
-start slave until master_log_file='master-bin.000001', master_log_pos=5983;
-# Slave is supposed to stop _after_ the INSERT, even though 5983 is
+# Slave is now supposed to have stopped _after_ the INSERT
 
 # Note that the following positions may change between MySQL versions!
 
-# This position should be position for the SET
-change master to master_log_pos=6763;
+# This position should be position for the SET ONE SHOT CHARACTER_SET_CLIENT
+# command just before the INSERT.
+# You can find it by doing:
+# ../client/mysqlbinlog var/log/master-bin.000001 | grep -3 CHARACTER_SET | tail -7
+change master to master_log_pos=6809;
+
+# This position should be position of the INSERT command.
+# You can find it by doing:
+#
+# ../client/mysqlbinlog var/log/master-bin.000001 | grep -3 INSERT | tail -4
 
-# This position should be position of the INSERT command
-start slave until master_log_file='master-bin.000001', master_log_pos=6921;
+start slave until master_log_file='master-bin.000001', master_log_pos=6967;
 
 # Slave is supposed to stop _after_ the INSERT, even though 'master_log_pos' is
 # the position of the beginning of the INSERT; after SET slave is not

--- 1.54/sql-common/client.c	2004-11-03 12:39:32 +02:00
+++ 1.55/sql-common/client.c	2004-12-06 17:15:48 +02:00
@@ -1512,6 +1512,7 @@
 #endif
 };
 
+
 MYSQL *
 CLI_MYSQL_REAL_CONNECT(MYSQL *mysql,const char *host, const char *user,
 		       const char *passwd, const char *db,
@@ -1534,7 +1535,6 @@
 #ifdef HAVE_SYS_UN_H
   struct	sockaddr_un UNIXaddr;
 #endif
-
   init_sigpipe_variables
   DBUG_ENTER("mysql_real_connect");
   LINT_INIT(host_info);

--- 1.2/mysql-test/r/rpl_create_database.result	2004-12-03 19:41:47 +02:00
+++ 1.3/mysql-test/r/rpl_create_database.result	2004-12-06 17:15:48 +02:00
@@ -41,20 +41,20 @@
 USE mysqltest_sisyfos;
 CREATE TABLE t2 (a INT);
 SHOW BINLOG EVENTS;
-Log_name	Pos	Event_type	Server_id	Orig_log_pos	Info
-master-bin.000001	4	Start	1	4	Server ver: VERSION, Binlog ver: 3
-master-bin.000001	79	Query	1	79	DROP DATABASE IF EXISTS mysqltest_prometheus
-master-bin.000001	174	Query	1	174	DROP DATABASE IF EXISTS mysqltest_sisyfos
-master-bin.000001	263	Query	1	263	CREATE DATABASE mysqltest_prometheus
-master-bin.000001	350	Query	1	350	CREATE DATABASE mysqltest_sisyfos
-master-bin.000001	431	Query	1	431	use `mysqltest_sisyfos`; CREATE TABLE t1 (b int)
-master-bin.000001	502	Query	1	502	use `mysqltest_sisyfos`; INSERT INTO t1 VALUES(1)
-master-bin.000001	574	Query	1	574	ALTER DATABASE mysqltest_sisyfos CHARACTER SET latin1
-master-bin.000001	675	Query	1	675	DROP DATABASE IF EXISTS mysqltest_sisyfos
-master-bin.000001	764	Query	1	764	use `mysqltest_prometheus`; CREATE TABLE t1 (a INT)
-master-bin.000001	838	Query	1	838	use `mysqltest_prometheus`; INSERT INTO t1 VALUES (1)
-master-bin.000001	914	Query	1	914	CREATE DATABASE mysqltest_sisyfos
-master-bin.000001	995	Query	1	995	use `mysqltest_sisyfos`; CREATE TABLE t2 (a INT)
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+master-bin.000001	#	Format_desc	1	#	Server ver: VERSION, Binlog ver: 4
+master-bin.000001	#	Query	1	#	DROP DATABASE IF EXISTS mysqltest_prometheus
+master-bin.000001	#	Query	1	#	DROP DATABASE IF EXISTS mysqltest_sisyfos
+master-bin.000001	#	Query	1	#	CREATE DATABASE mysqltest_prometheus
+master-bin.000001	#	Query	1	#	CREATE DATABASE mysqltest_sisyfos
+master-bin.000001	#	Query	1	#	use `mysqltest_sisyfos`; CREATE TABLE t1 (b int)
+master-bin.000001	#	Query	1	#	use `mysqltest_sisyfos`; INSERT INTO t1 VALUES(1)
+master-bin.000001	#	Query	1	#	ALTER DATABASE mysqltest_sisyfos CHARACTER SET latin1
+master-bin.000001	#	Query	1	#	DROP DATABASE IF EXISTS mysqltest_sisyfos
+master-bin.000001	#	Query	1	#	use `mysqltest_prometheus`; CREATE TABLE t1 (a INT)
+master-bin.000001	#	Query	1	#	use `mysqltest_prometheus`; INSERT INTO t1 VALUES (1)
+master-bin.000001	#	Query	1	#	CREATE DATABASE mysqltest_sisyfos
+master-bin.000001	#	Query	1	#	use `mysqltest_sisyfos`; CREATE TABLE t2 (a INT)
 SHOW DATABASES;
 Database
 mysql

--- 1.2/mysql-test/t/rpl_create_database.test	2004-12-03 19:41:37 +02:00
+++ 1.3/mysql-test/t/rpl_create_database.test	2004-12-06 17:15:48 +02:00
@@ -56,6 +56,7 @@
 CREATE TABLE t2 (a INT);
 let $VERSION=`select version()`;
 --replace_result $VERSION VERSION
+--replace_column 2 # 5 #
 SHOW BINLOG EVENTS;
 SHOW DATABASES;
 sync_slave_with_master;

--- 1.83/mysql-test/r/innodb.result	2004-12-06 01:34:14 +02:00
+++ 1.84/mysql-test/r/innodb.result	2004-12-06 17:15:48 +02:00
@@ -1696,7 +1696,7 @@
 Innodb_rows_inserted	31706
 show status like "Innodb_rows_read";
 Variable_name	Value
-Innodb_rows_read	80178
+Innodb_rows_read	80161
 show status like "Innodb_rows_updated";
 Variable_name	Value
 Innodb_rows_updated	29530

--- 1.21/mysql-test/r/insert_select.result	2004-12-06 02:05:20 +02:00
+++ 1.22/mysql-test/r/insert_select.result	2004-12-06 17:15:48 +02:00
@@ -87,8 +87,8 @@
 create table t2(unique(a)) select a from t1;
 ERROR 23000: Duplicate entry '1' for key 1
 show binlog events;
-Log_name	Pos	Event_type	Server_id	Orig_log_pos	Info
-master-bin.000001	4	Start	1	4	Server ver: VERSION, Binlog ver: 3
+Log_name	Pos	Event_type	Server_id	End_log_pos	Info
+master-bin.000001	4	Format_desc	1	95	Server ver: VERSION, Binlog ver: 4
 drop table t1;
 create table t1 (a int not null);
 create table t2 (a int not null);

--- 1.29/mysql-test/r/grant.result	2004-12-06 11:38:51 +02:00
+++ 1.30/mysql-test/r/grant.result	2004-12-06 17:15:48 +02:00
@@ -332,10 +332,10 @@
 GRANT INSERT (a, d, c, b) ON `test`.`t1` TO 'grant_user'@'localhost'
 select Host,Db,User,Table_name,Column_name,Column_priv from mysql.columns_priv;
 Host	Db	User	Table_name	Column_name	Column_priv
-localhost	test	grant_user	t1	c	Insert
 localhost	test	grant_user	t1	b	Insert
-localhost	test	grant_user	t1	a	Insert
 localhost	test	grant_user	t1	d	Insert
+localhost	test	grant_user	t1	a	Insert
+localhost	test	grant_user	t1	c	Insert
 revoke ALL PRIVILEGES on t1 from grant_user@localhost;
 show grants for grant_user@localhost;
 Grants for grant_user@localhost

--- 1.5/mysql-test/r/group_min_max.result	2004-11-01 10:12:37 +02:00
+++ 1.6/mysql-test/r/group_min_max.result	2004-12-06 17:15:48 +02:00
@@ -1365,7 +1365,7 @@
 group by a1,a2,b;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	PRIMARY	t1	range	NULL	idx_t1_1	147	NULL	17	Using index for group-by
-2	SUBQUERY	t2	index	NULL	idx_t2_1	163	NULL	164	Using index
+2	SUBQUERY	t2	index	NULL	idx_t2_1	163	NULL	164	Using where; Using index
 explain select a1,a2,b,min(c),max(c) from t1 where (a1 >= 'c' or a2 < 'b') and (b > 'a') group by a1,a2,b;
 id	select_type	table	type	possible_keys	key	key_len	ref	rows	Extra
 1	SIMPLE	t1	range	idx_t1_0,idx_t1_1,idx_t1_2	idx_t1_1	147	NULL	17	Using where; Using index for group-by
Thread
bk commit into 5.0 tree (monty:1.1716)monty6 Dec