List:Commits« Previous MessageNext Message »
From:Daniel Fischer Date:December 1 2006 1:03pm
Subject:bk commit into 5.0 tree (df:1.2319)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of df. When df 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 13:02:54+01:00, df@stripped +15 -0
  Merge dfischer@stripped:/home/bk/mysql-5.0-marvel
  into  kahlann.erinye.com:/home/df/mysql/build/mysql-5.0-build
  MERGE: 1.2301.12.12

  client/mysqltest.c@stripped, 2006-12-01 13:02:49+01:00, df@stripped +0 -0
    Auto merged
    MERGE: 1.259.1.1

  libmysql/libmysql.c@stripped, 2006-12-01 13:02:49+01:00, df@stripped +0 -0
    Auto merged
    MERGE: 1.250.1.1

  sql/field.cc@stripped, 2006-12-01 13:02:49+01:00, df@stripped +0 -0
    Auto merged
    MERGE: 1.331.1.1

  sql/item.cc@stripped, 2006-12-01 13:02:50+01:00, df@stripped +0 -0
    Auto merged
    MERGE: 1.242.1.1

  sql/item_func.cc@stripped, 2006-12-01 13:02:50+01:00, df@stripped +0 -0
    Auto merged
    MERGE: 1.312.1.2

  sql/item_strfunc.cc@stripped, 2006-12-01 13:02:50+01:00, df@stripped +0 -0
    Auto merged
    MERGE: 1.288.1.1

  sql/item_sum.cc@stripped, 2006-12-01 13:02:50+01:00, df@stripped +0 -0
    Auto merged
    MERGE: 1.189.2.1

  sql/mysqld.cc@stripped, 2006-12-01 13:02:50+01:00, df@stripped +0 -0
    Auto merged
    MERGE: 1.579.1.1

  sql/opt_range.cc@stripped, 2006-12-01 13:02:50+01:00, df@stripped +0 -0
    Auto merged
    MERGE: 1.232.1.1

  sql/set_var.cc@stripped, 2006-12-01 13:02:50+01:00, df@stripped +0 -0
    Auto merged
    MERGE: 1.171.1.2

  sql/sql_base.cc@stripped, 2006-12-01 13:02:50+01:00, df@stripped +0 -0
    Auto merged
    MERGE: 1.356.1.1

  sql/sql_cache.cc@stripped, 2006-12-01 13:02:51+01:00, df@stripped +0 -0
    Auto merged
    MERGE: 1.93.1.2

  sql/sql_trigger.cc@stripped, 2006-12-01 13:02:51+01:00, df@stripped +0 -0
    Auto merged
    MERGE: 1.58.1.1

  sql/sql_yacc.yy@stripped, 2006-12-01 13:02:51+01:00, df@stripped +0 -0
    Auto merged
    MERGE: 1.494.1.2

  sql/table.cc@stripped, 2006-12-01 13:02:51+01:00, df@stripped +0 -0
    Auto merged
    MERGE: 1.237.1.2

# 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:	df
# Host:	kahlann.erinye.com
# Root:	/home/df/mysql/build/mysql-5.0-build/RESYNC

--- 1.252/libmysql/libmysql.c	2006-11-29 09:18:41 +01:00
+++ 1.253/libmysql/libmysql.c	2006-12-01 13:02:49 +01:00
@@ -175,6 +175,9 @@ void STDCALL mysql_server_end()
 #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 @@ void STDCALL mysql_server_end()
 #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.332/sql/field.cc	2006-11-28 14:47:46 +01:00
+++ 1.333/sql/field.cc	2006-12-01 13:02:49 +01:00
@@ -4815,7 +4815,7 @@ int Field_time::store_time(TIME *ltime, 
             (ltime->minute * 100 + ltime->second);
   if (ltime->neg)
     tmp= -tmp;
-  return Field_time::store((longlong) tmp);
+  return Field_time::store((longlong) tmp, FALSE);
 }
 
 
@@ -5411,11 +5411,11 @@ int Field_newdate::store_time(TIME *ltim
   if (type == MYSQL_TIMESTAMP_DATE || type == MYSQL_TIMESTAMP_DATETIME)
   {
     tmp=ltime->year*16*32+ltime->month*32+ltime->day;
-    if ((my_bool)check_date(ltime, tmp,
-                            (TIME_FUZZY_DATE |
-                             (current_thd->variables.sql_mode &
-                              (MODE_NO_ZERO_IN_DATE | MODE_NO_ZERO_DATE |
-                               MODE_INVALID_DATES))), &error))
+    if (check_date(ltime, tmp != 0,
+                   (TIME_FUZZY_DATE |
+                    (current_thd->variables.sql_mode &
+                     (MODE_NO_ZERO_IN_DATE | MODE_NO_ZERO_DATE |
+                      MODE_INVALID_DATES))), &error))
     {
       char buff[12];
       String str(buff, sizeof(buff), &my_charset_latin1);
@@ -5635,11 +5635,11 @@ int Field_datetime::store_time(TIME *lti
   {
     tmp=((ltime->year*10000L+ltime->month*100+ltime->day)*LL(1000000)+
 	 (ltime->hour*10000L+ltime->minute*100+ltime->second));
-    if ((my_bool)check_date(ltime, tmp,
-                            (TIME_FUZZY_DATE |
-                             (current_thd->variables.sql_mode &
-                              (MODE_NO_ZERO_IN_DATE | MODE_NO_ZERO_DATE |
-                               MODE_INVALID_DATES))), &error))
+    if (check_date(ltime, tmp != 0,
+                   (TIME_FUZZY_DATE |
+                    (current_thd->variables.sql_mode &
+                     (MODE_NO_ZERO_IN_DATE | MODE_NO_ZERO_DATE |
+                      MODE_INVALID_DATES))), &error))
     {
       char buff[19];
       String str(buff, sizeof(buff), &my_charset_latin1);
@@ -8120,7 +8120,7 @@ int Field_bit::store_decimal(const my_de
 {
   int err= 0;
   longlong i= convert_decimal2longlong(val, 1, &err);
-  return test(err | store(i));
+  return test(err | store(i, TRUE));
 }
 
 
@@ -8273,7 +8273,7 @@ Field_bit_as_char::Field_bit_as_char(cha
 int Field_bit_as_char::store(const char *from, uint length, CHARSET_INFO *cs)
 {
   int delta;
-  uchar bits= field_length & 7;
+  uchar bits= (uchar) (field_length & 7);
 
   for (; length && !*from; from++, length--);          // skip left 0's
   delta= bytes_in_rec - length;

--- 1.243/sql/item.cc	2006-11-28 14:47:46 +01:00
+++ 1.244/sql/item.cc	2006-12-01 13:02:50 +01:00
@@ -276,7 +276,6 @@ my_decimal *Item::val_decimal_from_date(
 {
   DBUG_ASSERT(fixed == 1);
   TIME ltime;
-  longlong date;
   if (get_date(&ltime, TIME_FUZZY_DATE))
   {
     my_decimal_set_zero(decimal_value);
@@ -290,7 +289,6 @@ my_decimal *Item::val_decimal_from_time(
 {
   DBUG_ASSERT(fixed == 1);
   TIME ltime;
-  longlong date;
   if (get_time(&ltime))
   {
     my_decimal_set_zero(decimal_value);
@@ -5656,7 +5654,7 @@ void Item_trigger_field::set_required_pr
 }
 
 
-bool Item_trigger_field::set_value(THD *thd, sp_rcontext */*ctx*/, Item **it)
+bool Item_trigger_field::set_value(THD *thd, sp_rcontext * /*ctx*/, Item **it)
 {
   Item *item= sp_prepare_func_item(thd, it);
 

--- 1.314/sql/item_func.cc	2006-11-29 00:41:12 +01:00
+++ 1.315/sql/item_func.cc	2006-12-01 13:02:50 +01:00
@@ -2333,7 +2333,7 @@ longlong Item_func_locate::val_int()
       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 @@ longlong Item_func_locate::val_int()
     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::eq(const It
 
 
 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 12:16:44 +01:00
+++ 1.290/sql/item_strfunc.cc	2006-12-01 13:02:50 +01:00
@@ -983,8 +983,8 @@ String *Item_func_insert::val_str(String
     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 @@ String *Item_func_insert::val_str(String
   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 @@ String *Item_func_insert::val_str(String
     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 @@ String *Item_func_left::val_str(String *
     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 @@ String *Item_func_substr::val_str(String
     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 @@ String *Item_func_repeat::val_str(String
   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 @@ String *Item_func_rpad::val_str(String *
 
   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 @@ String *Item_func_rpad::val_str(String *
   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 @@ String *Item_func_rpad::val_str(String *
   }
   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 @@ String *Item_func_lpad::val_str(String *
 
   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 @@ String *Item_func_lpad::val_str(String *
     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 @@ String *Item_func_lpad::val_str(String *
     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 @@ String *Item_load_file::val_str(String *
   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 @@ String *Item_func_uuid::val_str(String *
   strmov(s+18, clock_seq_and_node_str);
   return str;
 }
-

--- 1.191/sql/item_sum.cc	2006-11-30 12:22:29 +01:00
+++ 1.192/sql/item_sum.cc	2006-12-01 13:02:50 +01:00
@@ -3413,8 +3413,8 @@ bool Item_func_group_concat::setup(THD *
       duplicate values (according to the syntax of this function). If there
       is no DISTINCT or ORDER BY clauses, we don't create this tree.
     */
-    init_tree(tree, min(thd->variables.max_heap_table_size,
-                        thd->variables.sortbuff_size/16), 0,
+    init_tree(tree, (uint) min(thd->variables.max_heap_table_size,
+                               thd->variables.sortbuff_size/16), 0,
               tree_key_length, compare_key, 0, NULL, (void*) this);
   }
 

--- 1.581/sql/mysqld.cc	2006-11-30 20:56:01 +01:00
+++ 1.582/sql/mysqld.cc	2006-12-01 13:02:50 +01:00
@@ -6184,6 +6184,7 @@ struct show_var_st status_vars[]= {
   {"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 @@ static void mysql_init_variables(void)
   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.233/sql/opt_range.cc	2006-11-29 11:25:19 +01:00
+++ 1.234/sql/opt_range.cc	2006-12-01 13:02:50 +01:00
@@ -1924,7 +1924,7 @@ int SQL_SELECT::test_quick_select(THD *t
 	key_parts->null_bit=	 key_part_info->null_bit;
         key_parts->image_type =
           (key_info->flags & HA_SPATIAL) ? Field::itMBR : Field::itRAW;
-        key_parts->flag=         key_part_info->key_part_flag;
+        key_parts->flag=         (uint8) key_part_info->key_part_flag;
       }
       param.real_keynr[param.keys++]=idx;
     }
@@ -6240,7 +6240,7 @@ QUICK_RANGE_SELECT *get_quick_select_for
     key_part->length=  	    key_info->key_part[part].length;
     key_part->store_length= key_info->key_part[part].store_length;
     key_part->null_bit=     key_info->key_part[part].null_bit;
-    key_part->flag=         key_info->key_part[part].key_part_flag;
+    key_part->flag=         (uint8) key_info->key_part[part].key_part_flag;
   }
   if (insert_dynamic(&quick->ranges,(gptr)&range))
     goto err;

--- 1.357/sql/sql_base.cc	2006-11-29 12:59:55 +01:00
+++ 1.358/sql/sql_base.cc	2006-12-01 13:02:50 +01:00
@@ -686,7 +686,7 @@ void close_temporary_tables(THD *thd)
 
   /* We always quote db,table names though it is slight overkill */
   if (found_user_tables &&
-      !(was_quote_show= (thd->options & OPTION_QUOTE_SHOW_CREATE)))
+      !(was_quote_show= test(thd->options & OPTION_QUOTE_SHOW_CREATE)))
   {
     thd->options |= OPTION_QUOTE_SHOW_CREATE;
   }

--- 1.95/sql/sql_cache.cc	2006-11-29 00:44:08 +01:00
+++ 1.96/sql/sql_cache.cc	2006-12-01 13:02:51 +01:00
@@ -906,7 +906,7 @@ sql mode: 0x%lx, sort len: %lu, conncat 
     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 @@ Query_cache::send_result_to_client(THD *
       (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 @@ Query_cache::send_result_to_client(THD *
   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 @@ sql mode: 0x%lx, sort len: %lu, conncat 
       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 @@ sql mode: 0x%lx, sort len: %lu, conncat 
 #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 @@ void Query_cache::invalidate(CHANGED_TAB
       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 @@ Query_cache::register_tables_from_list(T
     {
       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 @@ Query_cache::insert_table(uint key_len, 
       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 @@ static TABLE_COUNTER_TYPE process_and_co
     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 @@ Query_cache::is_cacheable(THD *thd, uint
       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 @@ Query_cache::is_cacheable(THD *thd, uint
   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 @@ my_bool Query_cache::check_integrity(boo
 	(((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 16:53:56 +01:00
+++ 1.498/sql/sql_yacc.yy	2006-12-01 13:02:51 +01:00
@@ -1626,7 +1626,6 @@ sp_decl:
             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.239/sql/table.cc	2006-11-29 15:21:26 +01:00
+++ 1.240/sql/table.cc	2006-12-01 13:02:51 +01:00
@@ -730,6 +730,7 @@ int openfrm(THD *thd, const char *name, 
 	if (key_part->fieldnr)
 	{					// Should always be true !
 	  Field *field=key_part->field=outparam->field[key_part->fieldnr-1];
+          key_part->type= field->key_type();
 	  if (field->null_ptr)
 	  {
 	    key_part->null_offset=(uint) ((byte*) field->null_ptr -

--- 1.59/sql/sql_trigger.cc	2006-11-13 23:38:34 +01:00
+++ 1.60/sql/sql_trigger.cc	2006-12-01 13:02:51 +01:00
@@ -356,7 +356,7 @@ bool Table_triggers_list::create_trigger
   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 @@ bool Table_triggers_list::check_n_load(T
         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 @@ bool Table_triggers_list::check_n_load(T
           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 @@ Table_triggers_list::change_table_name_i
 {
   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 @@ Table_triggers_list::change_table_name_i
   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.172/sql/set_var.cc	2006-11-21 14:53:31 +01:00
+++ 1.173/sql/set_var.cc	2006-12-01 13:02:50 +01:00
@@ -247,7 +247,7 @@ sys_var_thd_ulong	sys_max_delayed_thread
                                                 fix_max_connections);
 sys_var_thd_ulong	sys_max_error_count("max_error_count",
 					    &SV::max_error_count);
-sys_var_thd_ulong	sys_max_heap_table_size("max_heap_table_size",
+sys_var_thd_ulonglong	sys_max_heap_table_size("max_heap_table_size",
 						&SV::max_heap_table_size);
 sys_var_thd_ulong       sys_pseudo_thread_id("pseudo_thread_id",
 					     &SV::pseudo_thread_id,
@@ -414,7 +414,7 @@ sys_var_thd_enum	sys_tx_isolation("tx_is
 					 &SV::tx_isolation,
 					 &tx_isolation_typelib,
 					 fix_tx_isolation);
-sys_var_thd_ulong	sys_tmp_table_size("tmp_table_size",
+sys_var_thd_ulonglong	sys_tmp_table_size("tmp_table_size",
 					   &SV::tmp_table_size);
 sys_var_bool_ptr  sys_timed_mutexes("timed_mutexes",
                                     &timed_mutexes);
@@ -2830,7 +2830,7 @@ static bool set_option_autocommit(THD *t
 {
   /* 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;

--- 1.260/client/mysqltest.c	2006-11-29 06:24:31 +01:00
+++ 1.261/client/mysqltest.c	2006-12-01 13:02:49 +01:00
@@ -948,8 +948,8 @@ int dyn_string_cmp(DYNAMIC_STRING* ds, c
     die(NullS);
   if (!eval_result && (uint) stat_info.st_size != ds->length)
   {
-    DBUG_PRINT("info",("Size differs:  result size: %u  file size: %llu",
-		       ds->length, stat_info.st_size));
+    DBUG_PRINT("info",("Size differs:  result size: %u  file size: %lu",
+		       ds->length, (ulong) stat_info.st_size));
     DBUG_PRINT("info",("result: '%s'", ds->str));
     DBUG_RETURN(RESULT_LENGTH_MISMATCH);
   }
@@ -3132,14 +3132,15 @@ void do_connect(struct st_command *comma
     else if (!strncmp(con_options, "COMPRESS", 8))
       con_compress= 1;
     else
-      die("Illegal option to connect: %.*s", end - con_options, con_options);
+      die("Illegal option to connect: %.*s", 
+          (int) (end - con_options), con_options);
     /* Process next option */
     con_options= end;
   }
 
   if (next_con == connections_end)
     die("Connection limit exhausted, you can have max %d connections",
-        (sizeof(connections)/sizeof(struct st_connection)));
+        (int) (sizeof(connections)/sizeof(struct st_connection)));
 
   if (find_connection_by_name(ds_connection_name.str))
     die("Connection %s already exists", ds_connection_name.str);
@@ -3460,10 +3461,10 @@ int read_line(char *buf, int size)
 	DBUG_RETURN(0);
       }
       else if ((c == '{' &&
-                (!my_strnncoll_simple(charset_info, "while", 5,
-                                      buf, min(5, p - buf), 0) ||
-                 !my_strnncoll_simple(charset_info, "if", 2,
-                                      buf, min(2, p - buf), 0))))
+                (!my_strnncoll_simple(charset_info, (const uchar*) "while", 5,
+                                      (uchar*) buf, min(5, p - buf), 0) ||
+                 !my_strnncoll_simple(charset_info, (const uchar*) "if", 2,
+                                      (uchar*) buf, min(2, p - buf), 0))))
       {
         /* Only if and while commands can be terminated by { */
         *p++= c;
Thread
bk commit into 5.0 tree (df:1.2319)Daniel Fischer1 Dec