List:Commits« Previous MessageNext Message »
From:monty Date:December 1 2006 3:58am
Subject:bk commit into 5.0 tree (monty:1.2316)
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://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2006-12-01 05:58:26+02:00, monty@stripped +12 -0
  Merge bk-internal.mysql.com:/home/bk/mysql-5.0-marvel
  into  mysql.com:/home/my/mysql-5.0
  MERGE: 1.2301.1.27

  libmysql/libmysql.c@stripped, 2006-12-01 05:58:20+02:00, monty@stripped +0 -0
    Auto merged
    MERGE: 1.250.1.1

  sql/item_func.cc@stripped, 2006-12-01 05:58:20+02:00, monty@stripped +0 -0
    Auto merged
    MERGE: 1.312.1.2

  sql/item_strfunc.cc@stripped, 2006-12-01 05:58:21+02:00, monty@stripped +0 -0
    Auto merged
    MERGE: 1.288.1.1

  sql/item_sum.cc@stripped, 2006-12-01 05:58:21+02:00, monty@stripped +0 -0
    Auto merged
    MERGE: 1.189.1.1

  sql/mysqld.cc@stripped, 2006-12-01 05:58:21+02:00, monty@stripped +0 -0
    Auto merged
    MERGE: 1.580.1.1

  sql/set_var.cc@stripped, 2006-12-01 05:58:21+02:00, monty@stripped +0 -0
    Auto merged
    MERGE: 1.171.1.2

  sql/sql_cache.cc@stripped, 2006-12-01 05:58:21+02:00, monty@stripped +0 -0
    Auto merged
    MERGE: 1.93.1.2

  sql/sql_class.h@stripped, 2006-12-01 05:58:21+02:00, monty@stripped +0 -0
    Auto merged
    MERGE: 1.311.1.1

  sql/sql_select.cc@stripped, 2006-12-01 05:58:22+02:00, monty@stripped +0 -0
    Auto merged
    MERGE: 1.476.1.1

  sql/sql_trigger.cc@stripped, 2006-12-01 05:58:22+02:00, monty@stripped +0 -0
    Auto merged
    MERGE: 1.58.1.1

  sql/sql_yacc.yy@stripped, 2006-12-01 05:58:22+02:00, monty@stripped +0 -0
    Auto merged
    MERGE: 1.494.1.2

  sql/table.cc@stripped, 2006-12-01 05:58:22+02:00, monty@stripped +0 -0
    Auto merged
    MERGE: 1.238.1.1

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

--- 1.252/libmysql/libmysql.c	2006-11-29 10:18:41 +02:00
+++ 1.253/libmysql/libmysql.c	2006-12-01 05:58:20 +02:00
@@ -175,6 +175,9 @@
 #ifdef EMBEDDED_LIBRARY
   end_embedded_server();
 #endif
+  finish_client_errs();
+  vio_end();
+
   /* If library called my_init(), free memory allocated by it */
   if (!org_my_init_done)
   {
@@ -185,10 +188,11 @@
 #endif
   }
   else
+  {
+    free_charsets();
     mysql_thread_end();
-  finish_client_errs();
-  free_charsets();
-  vio_end();
+  }
+
   mysql_client_init= org_my_init_done= 0;
 #ifdef EMBEDDED_SERVER
   if (stderror_file)

--- 1.314/sql/item_func.cc	2006-11-29 01:41:12 +02:00
+++ 1.315/sql/item_func.cc	2006-12-01 05:58:20 +02:00
@@ -2333,7 +2333,7 @@
       return 0;
 
     /* start is now sufficiently valid to pass to charpos function */
-    start= a->charpos(start);
+    start= a->charpos((int) start);
 
     if (start + b->length() > a->length())
       return 0;
@@ -2343,7 +2343,8 @@
     return start + 1;
   
   if (!cmp_collation.collation->coll->instr(cmp_collation.collation,
-                                            a->ptr()+start, a->length()-start,
+                                            a->ptr()+start,
+                                            (uint) (a->length()-start),
                                             b->ptr(), b->length(),
                                             &match, 1))
     return 0;
@@ -4288,7 +4289,7 @@
 
 
 bool Item_func_get_user_var::set_value(THD *thd,
-                                       sp_rcontext */*ctx*/, Item **it)
+                                       sp_rcontext * /*ctx*/, Item **it)
 {
   Item_func_set_user_var *suv= new Item_func_set_user_var(get_name(), *it);
   /*

--- 1.289/sql/item_strfunc.cc	2006-11-16 13:16:44 +02:00
+++ 1.290/sql/item_strfunc.cc	2006-12-01 05:58:21 +02:00
@@ -983,8 +983,8 @@
     length= res->length() + 1;
 
   /* start and length are now sufficiently valid to pass to charpos function */
-  start= res->charpos(start);
-  length= res->charpos(length, start);
+  start= res->charpos((int) start);
+  length= res->charpos((int) length, (uint32) start);
 
   /* Re-testing with corrected params */
   if (start > res->length() + 1)
@@ -992,8 +992,8 @@
   if (length > res->length() - start)
     length= res->length() - start;
 
-  if (res->length() - length + res2->length() >
-      current_thd->variables.max_allowed_packet)
+  if ((ulonglong) (res->length() - length + res2->length()) >
+      (ulonglong) current_thd->variables.max_allowed_packet)
   {
     push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
 			ER_WARN_ALLOWED_PACKET_OVERFLOWED,
@@ -1002,7 +1002,7 @@
     goto null;
   }
   res=copy_if_not_alloced(str,res,res->length());
-  res->replace(start,length,*res2);
+  res->replace((uint32) start,(uint32) length,*res2);
   return res;
 null:
   null_value=1;
@@ -1078,7 +1078,7 @@
     return &my_empty_string;
 
   if ((res->length() <= (ulonglong) length) ||
-      (res->length() <= (char_pos= res->charpos(length))))
+      (res->length() <= (char_pos= res->charpos((int) length))))
     return res;
 
   tmp_value.set(*res, 0, char_pos);
@@ -1170,17 +1170,17 @@
     return &my_empty_string;
 
   start= ((start < 0) ? res->numchars() + start : start - 1);
-  start= res->charpos(start);
+  start= res->charpos((int) start);
   if ((start < 0) || ((uint) start + 1 > res->length()))
     return &my_empty_string;
 
-  length= res->charpos(length, start);
+  length= res->charpos((int) length, (uint32) start);
   tmp_length= res->length() - start;
   length= min(length, tmp_length);
 
-  if (!start && res->length() == (ulonglong) length)
+  if (!start && (longlong) res->length() == length)
     return res;
-  tmp_value.set(*res, (ulonglong) start, (ulonglong) length);
+  tmp_value.set(*res, (uint32) start, (uint32) length);
   return &tmp_value;
 }
 
@@ -2228,7 +2228,7 @@
   char *to;
   /* must be longlong to avoid truncation */
   longlong tmp_count= args[1]->val_int();
-  long count= tmp_count;
+  long count= (long) tmp_count;
   String *res= args[0]->val_str(str);
 
   /* Assumes that the maximum length of a String is < INT_MAX32. */
@@ -2330,7 +2330,7 @@
 
   if (count <= (res_char_length= res->numchars()))
   {						// String to pad is big enough
-    res->length(res->charpos(count));		// Shorten result if longer
+    res->length(res->charpos((int) count));     // Shorten result if longer
     return (res);
   }
   pad_char_length= rpad->numchars();
@@ -2347,7 +2347,7 @@
   if (args[2]->null_value || !pad_char_length)
     goto err;
   res_byte_length= res->length();	/* Must be done before alloc_buffer */
-  if (!(res= alloc_buffer(res,str,&tmp_value,byte_count)))
+  if (!(res= alloc_buffer(res,str,&tmp_value, (ulong) byte_count)))
     goto err;
 
   to= (char*) res->ptr()+res_byte_length;
@@ -2361,7 +2361,7 @@
   }
   if (count)
   {
-    pad_byte_length= rpad->charpos(count);
+    pad_byte_length= rpad->charpos((int) count);
     memcpy(to,ptr_pad,(size_t) pad_byte_length);
     to+= pad_byte_length;
   }
@@ -2433,14 +2433,14 @@
 
   if (count <= res_char_length)
   {
-    res->length(res->charpos(count));
+    res->length(res->charpos((int) count));
     return res;
   }
   
   pad_char_length= pad->numchars();
   byte_count= count * collation.collation->mbmaxlen;
   
-  if (byte_count > current_thd->variables.max_allowed_packet)
+  if ((ulonglong) byte_count > current_thd->variables.max_allowed_packet)
   {
     push_warning_printf(current_thd, MYSQL_ERROR::WARN_LEVEL_WARN,
 			ER_WARN_ALLOWED_PACKET_OVERFLOWED,
@@ -2449,7 +2449,8 @@
     goto err;
   }
 
-  if (args[2]->null_value || !pad_char_length || str->alloc(byte_count))
+  if (args[2]->null_value || !pad_char_length ||
+      str->alloc((uint32) byte_count))
     goto err;
   
   str->length(0);
@@ -2461,7 +2462,7 @@
     count-= pad_char_length;
   }
   if (count > 0)
-    str->append(pad->ptr(), pad->charpos(count), collation.collation);
+    str->append(pad->ptr(), pad->charpos((int) count), collation.collation);
 
   str->append(*res);
   null_value= 0;
@@ -2791,7 +2792,7 @@
   tmp_value.length(stat_info.st_size);
   my_close(file, MYF(0));
   null_value = 0;
-  return &tmp_value;
+  DBUG_RETURN(&tmp_value);
 
 err:
   null_value = 1;
@@ -3281,4 +3282,3 @@
   strmov(s+18, clock_seq_and_node_str);
   return str;
 }
-

--- 1.581/sql/mysqld.cc	2006-11-30 21:56:01 +02:00
+++ 1.582/sql/mysqld.cc	2006-12-01 05:58:21 +02:00
@@ -6184,6 +6184,7 @@
   {"Open_streams",             (char*) &my_stream_opened,       SHOW_LONG_CONST},
   {"Open_tables",              (char*) 0,                       SHOW_OPENTABLES},
   {"Opened_tables",            (char*) offsetof(STATUS_VAR, opened_tables), SHOW_LONG_STATUS},
+  {"Prepared_stmt_count",      (char*) &prepared_stmt_count,    SHOW_LONG_CONST},
 #ifdef HAVE_QUERY_CACHE
   {"Qcache_free_blocks",       (char*) &query_cache.free_memory_blocks, SHOW_LONG_CONST},
   {"Qcache_free_memory",       (char*) &query_cache.free_memory, SHOW_LONG_CONST},
@@ -6353,6 +6354,7 @@
   binlog_cache_use=  binlog_cache_disk_use= 0;
   max_used_connections= slow_launch_threads = 0;
   mysqld_user= mysqld_chroot= opt_init_file= opt_bin_logname = 0;
+  prepared_stmt_count= 0;
   errmesg= 0;
   mysqld_unix_port= opt_mysql_tmpdir= my_bind_addr_str= NullS;
   bzero((gptr) &mysql_tmpdir_list, sizeof(mysql_tmpdir_list));

--- 1.95/sql/sql_cache.cc	2006-11-29 01:44:08 +02:00
+++ 1.96/sql/sql_cache.cc	2006-12-01 05:58:21 +02:00
@@ -906,7 +906,7 @@
     if (thd->db_length)
     {
       memcpy(thd->query+thd->query_length+1, thd->db, thd->db_length);
-      DBUG_PRINT("qcache", ("database : %s length %u",
+      DBUG_PRINT("qcache", ("database: %s  length: %u",
 			    thd->db, thd->db_length)); 
     }
     else
@@ -1052,7 +1052,7 @@
       (pre-space is removed in dispatch_command)
 
       First '/' looks like comment before command it is not
-      frequently appeared in real lihe, consequently we can
+      frequently appeared in real life, consequently we can
       check all such queries, too.
     */
     if ((my_toupper(system_charset_info, sql[i])     != 'S' ||
@@ -1081,7 +1081,7 @@
   if (thd->db_length)
   {
     memcpy(sql+query_length+1, thd->db, thd->db_length);
-    DBUG_PRINT("qcache", ("database: '%s' length %u",
+    DBUG_PRINT("qcache", ("database: '%s'  length: %u",
 			  thd->db, thd->db_length));
   }
   else
@@ -1234,9 +1234,9 @@
       if (engine_data != table->engine_data())
       {
         DBUG_PRINT("qcache",
-                   ("Handler require invalidation queries of %s.%s %lld-%lld",
-                              table_list.db, table_list.alias,
-                              engine_data, table->engine_data()));
+                   ("Handler require invalidation queries of %s.%s %lu-%lu",
+                    table_list.db, table_list.alias,
+                    (ulong) engine_data, (ulong) table->engine_data()));
         invalidate_table((byte *) table->db(), table->key_length());
       }
       else
@@ -1257,10 +1257,10 @@
 #ifndef EMBEDDED_LIBRARY
   do
   {
-    DBUG_PRINT("qcache", ("Results  (len: %lu  used: %lu  headers: %u)",
+    DBUG_PRINT("qcache", ("Results  (len: %lu  used: %lu  headers: %lu)",
 			  result_block->length, result_block->used,
-			  result_block->headers_len()+
-			  ALIGN_SIZE(sizeof(Query_cache_result))));
+			  (ulong) (result_block->headers_len()+
+                                   ALIGN_SIZE(sizeof(Query_cache_result)))));
     
     Query_cache_result *result = result_block->result();
     if (net_real_write(&thd->net, result->data(),
@@ -1342,7 +1342,7 @@
       for (; tables_used; tables_used= tables_used->next)
       {
 	invalidate_table((byte*) tables_used->key, tables_used->key_length);
-	DBUG_PRINT("qcache", (" db %s, table %s", tables_used->key,
+	DBUG_PRINT("qcache", ("db: %s  table: %s", tables_used->key,
 			      tables_used->key+
 			      strlen(tables_used->key)+1));
       }
@@ -2353,7 +2353,7 @@
     {
       char key[MAX_DBKEY_LENGTH];
       uint key_length;
-      DBUG_PRINT("qcache", ("view %s, db %s",
+      DBUG_PRINT("qcache", ("view: %s  db: %s",
                             tables_used->view_name.str,
                             tables_used->view_db.str));
       key_length= (uint) (strmov(strmov(key, tables_used->view_db.str) + 1,
@@ -2474,11 +2474,11 @@
       table_block->table()->engine_data() != engine_data)
   {
     DBUG_PRINT("qcache",
-               ("Handler require invalidation queries of %s.%s %lld-%lld",
+               ("Handler require invalidation queries of %s.%s %lu-%lu",
                 table_block->table()->db(),
                 table_block->table()->table(),
-                engine_data,
-                table_block->table()->engine_data()));
+                (ulong) engine_data,
+                (ulong) table_block->table()->engine_data()));
     /*
       as far as we delete all queries with this table, table block will be
       deleted, too
@@ -2976,7 +2976,7 @@
     table_count++;
     if (tables_used->view)
     {
-      DBUG_PRINT("qcache", ("view %s, db %s",
+      DBUG_PRINT("qcache", ("view: %s  db: %s",
                             tables_used->view_name.str,
                             tables_used->view_db.str));
       *tables_type|= HA_CACHE_TBL_NONTRANSACT;
@@ -3042,7 +3042,7 @@
       lex->safe_to_cache_query)
   {
     DBUG_PRINT("qcache", ("options: %lx  %lx  type: %u",
-                          OPTION_TO_QUERY_CACHE,
+                          (long) OPTION_TO_QUERY_CACHE,
                           (long) lex->select_lex.options,
                           (int) thd->variables.query_cache_type));
 
@@ -3062,7 +3062,7 @@
   DBUG_PRINT("qcache",
 	     ("not interesting query: %d or not cacheable, options %lx %lx  type: %u",
 	      (int) lex->sql_command,
-	      OPTION_TO_QUERY_CACHE,
+	      (long) OPTION_TO_QUERY_CACHE,
 	      (long) lex->select_lex.options,
 	      (int) thd->variables.query_cache_type));
   DBUG_RETURN(0);
@@ -3772,8 +3772,8 @@
 	(((long)first_block) % (long)ALIGN_SIZE(1)))
     {
       DBUG_PRINT("error",
-		 ("block 0x%lx do not aligned by %d", (ulong) block,
-		  ALIGN_SIZE(1)));
+		 ("block 0x%lx do not aligned by %d", (long) block,
+		  (int) ALIGN_SIZE(1)));
       result = 1;
     }
     // Check memory allocation

--- 1.497/sql/sql_yacc.yy	2006-11-29 17:53:56 +02:00
+++ 1.498/sql/sql_yacc.yy	2006-12-01 05:58:22 +02:00
@@ -1626,7 +1626,6 @@
             uint num_vars= pctx->context_var_count();
             enum enum_field_types var_type= (enum enum_field_types) $4;
             Item *dflt_value_item= $5;
-            create_field *create_field_op;
             
             if (!dflt_value_item)
             {

--- 1.59/sql/sql_trigger.cc	2006-11-14 00:38:34 +02:00
+++ 1.60/sql/sql_trigger.cc	2006-12-01 05:58:22 +02:00
@@ -356,7 +356,7 @@
   char dir_buff[FN_REFLEN], file_buff[FN_REFLEN], trigname_buff[FN_REFLEN],
        trigname_path[FN_REFLEN];
   LEX_STRING dir, file, trigname_file;
-  LEX_STRING *trg_def, *name;
+  LEX_STRING *trg_def;
   LEX_STRING definer_user;
   LEX_STRING definer_host;
   ulonglong *trg_sql_mode;
@@ -879,7 +879,7 @@
         DBUG_RETURN(1);
 
       List_iterator_fast<LEX_STRING> it(triggers->definitions_list);
-      LEX_STRING *trg_create_str, *trg_name_str;
+      LEX_STRING *trg_create_str;
       ulonglong *trg_sql_mode;
 
       if (triggers->definition_modes_list.is_empty() &&
@@ -996,7 +996,7 @@
           goto err_with_lex_cleanup;
         }
 
-        lex.sphead->set_info(0, 0, &lex.sp_chistics, *trg_sql_mode);
+        lex.sphead->set_info(0, 0, &lex.sp_chistics, (ulong) *trg_sql_mode);
 
         triggers->bodies[lex.trg_chistics.event]
                              [lex.trg_chistics.action_time]= lex.sphead;
@@ -1337,7 +1337,6 @@
 {
   char path_buff[FN_REFLEN];
   LEX_STRING *def, *on_table_name, new_def;
-  ulonglong *sql_mode;
   ulong save_sql_mode= thd->variables.sql_mode;
   List_iterator_fast<LEX_STRING> it_def(definitions_list);
   List_iterator_fast<LEX_STRING> it_on_table_name(on_table_names_list);
@@ -1351,7 +1350,7 @@
   while ((def= it_def++))
   {
     on_table_name= it_on_table_name++;
-    thd->variables.sql_mode= *(it_mode++);
+    thd->variables.sql_mode= (ulong) *(it_mode++);
 
     /* Construct CREATE TRIGGER statement with new table name. */
     buff.length(0);

--- 1.173/sql/set_var.cc	2006-12-01 03:37:33 +02:00
+++ 1.174/sql/set_var.cc	2006-12-01 05:58:21 +02:00
@@ -2830,7 +2830,7 @@
 {
   /* The test is negative as the flag we use is NOT autocommit */
 
-  ulong org_options=thd->options;
+  ulonglong org_options= thd->options;
 
   if (var->save_result.ulong_value != 0)
     thd->options&= ~((sys_var_thd_bit*) var->var)->bit_flag;
Thread
bk commit into 5.0 tree (monty:1.2316)monty1 Dec