List:Internals« Previous MessageNext Message »
From:Georg Richter Date:June 17 2005 1:36pm
Subject:bk commit into 5.0 tree (georg:1.1962)
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of georg. When georg 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.1962 05/06/17 15:36:09 georg@stripped +7 -0
  Merges

  sql/sql_show.cc
    1.253 05/06/17 15:36:03 georg@stripped +0 -0
    manual merge

  sql/sql_prepare.cc
    1.124 05/06/17 15:36:03 georg@stripped +3 -4
    manual merge

  sql/sql_select.cc
    1.341 05/06/17 14:55:01 georg@stripped +0 -0
    Auto merged

  sql/sql_parse.cc
    1.455 05/06/17 14:55:00 georg@stripped +0 -0
    Auto merged

  sql/mysqld.cc
    1.471 05/06/17 14:55:00 georg@stripped +0 -0
    Auto merged

  sql/item_func.cc
    1.221 05/06/17 14:54:59 georg@stripped +0 -0
    Auto merged

  sql/field.cc
    1.265 05/06/17 14:54:59 georg@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:	georg
# Host:	lmy002.wdf.sap.corp
# Root:	/home/georg/work/mysql/prod/mysql-5.0/RESYNC

--- 1.264/sql/field.cc	2005-06-15 17:36:36 +02:00
+++ 1.265/sql/field.cc	2005-06-17 14:54:59 +02:00
@@ -8049,7 +8049,7 @@
                                      struct st_table *table_arg)
   : Field_bit(ptr_arg, len_arg, null_ptr_arg, null_bit_arg, bit_ptr_arg,
               bit_ofs_arg, unireg_check_arg, field_name_arg, table_arg),
-    create_length(len_arg)
+    create_length((uchar) len_arg)
 {
   bit_ptr= 0;
   bit_ofs= 0;

--- 1.220/sql/item_func.cc	2005-06-15 16:01:35 +02:00
+++ 1.221/sql/item_func.cc	2005-06-17 14:54:59 +02:00
@@ -2533,7 +2533,7 @@
           if (is_last_item && !is_separator)
             str_end= substr_end;
           if (!my_strnncoll(cs, (const uchar *) str_begin,
-                            str_end - str_begin,
+                            (uint) (str_end - str_begin),
                             find_str, find_str_len))
             return (longlong) position;
           else

--- 1.470/sql/mysqld.cc	2005-06-16 23:58:25 +02:00
+++ 1.471/sql/mysqld.cc	2005-06-17 14:55:00 +02:00
@@ -2416,7 +2416,7 @@
     */
     opt_date_time_formats[format_type]= str;
   }
-  if (!(*var_ptr= date_time_format_make(format_type, str, strlen(str))))
+  if (!(*var_ptr= date_time_format_make(format_type, str, (uint) strlen(str))))
   {
     fprintf(stderr, "Wrong date/time format specifier: %s\n", str);
     return 1;
@@ -2569,13 +2569,13 @@
 
   sys_init_connect.value_length= 0;
   if ((sys_init_connect.value= opt_init_connect))
-    sys_init_connect.value_length= strlen(opt_init_connect);
+    sys_init_connect.value_length= (uint) strlen(opt_init_connect);
   else
     sys_init_connect.value=my_strdup("",MYF(0));
 
   sys_init_slave.value_length= 0;
   if ((sys_init_slave.value= opt_init_slave))
-    sys_init_slave.value_length= strlen(opt_init_slave);
+    sys_init_slave.value_length= (uint) strlen(opt_init_slave);
   else
     sys_init_slave.value=my_strdup("",MYF(0));
 
@@ -2834,7 +2834,7 @@
 #ifdef HAVE_REPLICATION
   if (opt_bin_log && expire_logs_days)
   {
-    long purge_time= time(0) - expire_logs_days*24*60*60;
+    long purge_time= (long) (time(0) - expire_logs_days*24*60*60);
     if (purge_time >= 0)
       mysql_bin_log.purge_logs_before_date(purge_time);
   }
@@ -3005,7 +3005,7 @@
 
 #ifdef	__WIN__
 /* Before performing any socket operation (like retrieving hostname */
-/* in init_common_variables we have to call WSAStartup              */
+/* in init_common_variables) we have to call WSAStartup              */
   if (!opt_disable_networking)
   {
     WSADATA WsaData;
@@ -6466,7 +6466,7 @@
   case OPT_STORAGE_ENGINE:
   {
     if ((enum db_type)((global_system_variables.table_type=
-                        ha_resolve_by_name(argument, strlen(argument)))) ==
+                        ha_resolve_by_name(argument, (uint) strlen(argument)))) ==
         DB_TYPE_UNKNOWN)
     {
       fprintf(stderr,"Unknown/unsupported table type: %s\n",argument);

--- 1.454/sql/sql_parse.cc	2005-06-16 23:58:26 +02:00
+++ 1.455/sql/sql_parse.cc	2005-06-17 14:55:00 +02:00
@@ -201,8 +201,8 @@
   DBUG_ASSERT(user != 0);
   DBUG_ASSERT(host != 0);
 
-  user_len=strlen(user);
-  temp_len= (strmov(strmov(temp_user, user)+1, host) - temp_user)+1;
+  user_len= (uint) strlen(user);
+  temp_len=  (uint) (strmov(strmov(temp_user, user)+1, host) - temp_user)+1;
   (void) pthread_mutex_lock(&LOCK_user_conn);
   if (!(uc = (struct  user_conn *) hash_search(&hash_user_connections,
 					       (byte*) temp_user, temp_len)))
@@ -972,7 +972,7 @@
     password both send '\0'.
   */
   uint passwd_len= thd->client_capabilities & CLIENT_SECURE_CONNECTION ?
-    *passwd++ : strlen(passwd);
+    *passwd++ : (uint) strlen(passwd);
   db= thd->client_capabilities & CLIENT_CONNECT_WITH_DB ?
     db + passwd_len + 1 : 0;
 
@@ -981,13 +981,13 @@
   {
     db_buff[copy_and_convert(db_buff, sizeof(db_buff)-1,
                              system_charset_info,
-                             db, strlen(db),
+                             db, (uint32) strlen(db),
                              thd->charset(), &dummy_errors)]= 0;
     db= db_buff;
   }
 
   user_buff[copy_and_convert(user_buff, sizeof(user_buff)-1,
-                             system_charset_info, user, strlen(user),
+                             system_charset_info, user, (uint32) strlen(user),
                              thd->charset(), &dummy_errors)]= '\0';
   user= user_buff;
 
@@ -1530,7 +1530,7 @@
     statistic_increment(thd->status_var.com_stat[SQLCOM_CHANGE_DB],
 			&LOCK_status);
     thd->convert_string(&tmp, system_charset_info,
-			packet, strlen(packet), thd->charset());
+			packet, (uint) strlen(packet), thd->charset());
     if (!mysql_change_db(thd, tmp.str))
       mysql_log.write(thd,command,"%s",thd->db);
     break;
@@ -1573,7 +1573,7 @@
     char db_buff[NAME_LEN+1];                 // buffer to store db in utf8 
     char *db= passwd;
     uint passwd_len= thd->client_capabilities & CLIENT_SECURE_CONNECTION ? 
-      *passwd++ : strlen(passwd);
+      *passwd++ : (uint) strlen(passwd);
     db+= passwd_len + 1;
 #ifndef EMBEDDED_LIBRARY
     /* Small check for incoming packet */
@@ -1586,7 +1586,7 @@
     /* Convert database name to utf8 */
     uint dummy_errors;
     db_buff[copy_and_convert(db_buff, sizeof(db_buff)-1,
-                             system_charset_info, db, strlen(db),
+                             system_charset_info, db, (uint32) strlen(db),
                              thd->charset(), &dummy_errors)]= 0;
     db= db_buff;
 
@@ -1768,7 +1768,7 @@
         table_list.schema_table= schema_table;
     }
 
-    thd->query_length= strlen(packet);       // for simplicity: don't optimize
+    thd->query_length= (uint32) strlen(packet);   // for simplicity: don't optimize
     if (!(thd->query=fields=thd->memdup(packet,thd->query_length+1)))
       break;
     mysql_log.write(thd,command,"%s %s",table_list.table_name, fields);
@@ -3212,7 +3212,7 @@
                               &select_lex->item_list,
                               &lex->value_list,
                               select_lex->where,
-                              select_lex->options,
+                              (ulong) select_lex->options,
                               lex->duplicates, lex->ignore, unit, select_lex);
     break;
   }
@@ -3306,7 +3306,7 @@
     unit->set_limit(select_lex);
     res = mysql_delete(thd, all_tables, select_lex->where,
                        &select_lex->order_list,
-                       unit->select_limit_cnt, select_lex->options);
+                       unit->select_limit_cnt, (ulong) select_lex->options);
     break;
   }
   case SQLCOM_DELETE_MULTI:
@@ -4041,7 +4041,7 @@
 
     if (!lex->sphead->m_db.str || !lex->sphead->m_db.str[0])
     {
-      lex->sphead->m_db.length= strlen(thd->db);
+      lex->sphead->m_db.length= (uint) strlen(thd->db);
       lex->sphead->m_db.str= strmake_root(thd->mem_root, thd->db,
                                            lex->sphead->m_db.length);
     }
@@ -5292,7 +5292,7 @@
   mysql_init_select(lex);
   lex->sql_command= SQLCOM_SELECT;
   tmp.str= (char*) var_name;
-  tmp.length=strlen(var_name);
+  tmp.length=(uint) strlen(var_name);
   bzero((char*) &null_lex_string.str, sizeof(null_lex_string));
   add_item_to_list(thd, get_system_var(thd, OPT_SESSION, tmp,
 				       null_lex_string));

--- 1.340/sql/sql_select.cc	2005-06-17 12:53:47 +02:00
+++ 1.341/sql/sql_select.cc	2005-06-17 14:55:01 +02:00
@@ -248,8 +248,8 @@
 		      (ORDER*) select_lex->group_list.first,
 		      select_lex->having,
 		      (ORDER*) lex->proc_list.first,
-		      select_lex->options | thd->options |
-                      setup_tables_done_option,
+		      (ulong) (select_lex->options | thd->options |
+                      setup_tables_done_option),
 		      result, unit, select_lex);
   }
   DBUG_PRINT("info",("res: %d  report_error: %d", res,
@@ -6879,7 +6879,8 @@
   if (outer_ref)
     return cmp;
   JOIN_TAB **idx= (JOIN_TAB **) table_join_idx;
-  cmp= idx[field2->field->table->tablenr]-idx[field1->field->table->tablenr];
+  cmp= (int) (idx[field2->field->table->tablenr] -
+              idx[field1->field->table->tablenr]);
   return cmp < 0 ? -1 : (cmp ? 1 : 0);
 }
 
@@ -8838,7 +8839,7 @@
 
   if (table->s->db_type != DB_TYPE_HEAP || error != HA_ERR_RECORD_FILE_FULL)
   {
-    table->file->print_error(error,MYF(0));
+    table->file->print_error((ulong) error,MYF(0));
     DBUG_RETURN(1);
   }
   new_table= *table;
@@ -8851,7 +8852,7 @@
   thd->proc_info="converting HEAP to MyISAM";
 
   if (create_myisam_tmp_table(&new_table,param,
-			      thd->lex->select_lex.options | thd->options))
+			      (ulong)thd->lex->select_lex.options | thd->options))
     goto err2;
   if (open_tmp_table(&new_table))
     goto err1;
@@ -13288,10 +13289,10 @@
     item_list.push_back(new Item_int((int32)
 				     join->select_lex->select_number));
     item_list.push_back(new Item_string(join->select_lex->type,
-					strlen(join->select_lex->type), cs));
+					(uint) strlen(join->select_lex->type), cs));
     for (uint i=0 ; i < 7; i++)
       item_list.push_back(item_null);
-    item_list.push_back(new Item_string(message,strlen(message),cs));
+    item_list.push_back(new Item_string(message,(uint) strlen(message),cs));
     if (result->send_data(item_list))
       join->error= 1;
   }
@@ -13310,7 +13311,7 @@
     item_list.push_back(new Item_null);
     /* select_type */
     item_list.push_back(new Item_string(join->select_lex->type,
-					strlen(join->select_lex->type),
+					(uint) strlen(join->select_lex->type),
 					cs));
     /* table */
     {
@@ -13337,7 +13338,7 @@
     }
     /* type */
     item_list.push_back(new Item_string(join_type_str[JT_ALL],
-					  strlen(join_type_str[JT_ALL]),
+					  (uint) strlen(join_type_str[JT_ALL]),
 					  cs));
     /* possible_keys */
     item_list.push_back(item_null);
@@ -13386,7 +13387,7 @@
 				       join->select_lex->select_number));
       /* select_type */
       item_list.push_back(new Item_string(join->select_lex->type,
-					  strlen(join->select_lex->type),
+					  (uint) strlen(join->select_lex->type),
 					  cs));
       if (tab->type == JT_ALL && tab->select && tab->select->quick)
       {
@@ -13409,11 +13410,11 @@
       }
       else
 	item_list.push_back(new Item_string(table->alias,
-					    strlen(table->alias),
+					    (uint) strlen(table->alias),
 					    cs));
       /* type */
       item_list.push_back(new Item_string(join_type_str[tab->type],
-					  strlen(join_type_str[tab->type]),
+					  (uint) strlen(join_type_str[tab->type]),
 					  cs));
       /* Build "possible_keys" value and add it to item_list */
       if (!tab->keys.is_clear_all())
@@ -13426,7 +13427,7 @@
             if (tmp1.length())
               tmp1.append(',');
             tmp1.append(table->key_info[j].name, 
-			strlen(table->key_info[j].name),
+			(uint) strlen(table->key_info[j].name),
 			system_charset_info);
           }
         }
@@ -13442,17 +13443,17 @@
 	KEY *key_info=table->key_info+ tab->ref.key;
         register uint length;
 	item_list.push_back(new Item_string(key_info->name,
-					    strlen(key_info->name),
+					    (uint) strlen(key_info->name),
 					    system_charset_info));
-        length= longlong2str(tab->ref.key_length, keylen_str_buf, 10) - 
-                keylen_str_buf;
+        length= (uint) (longlong2str(tab->ref.key_length, keylen_str_buf, 10) - 
+                keylen_str_buf);
         item_list.push_back(new Item_string(keylen_str_buf, length,
                                             system_charset_info));
 	for (store_key **ref=tab->ref.key_copy ; *ref ; ref++)
 	{
 	  if (tmp2.length())
 	    tmp2.append(',');
-	  tmp2.append((*ref)->name(), strlen((*ref)->name()),
+	  tmp2.append((*ref)->name(), (uint) strlen((*ref)->name()),
 		      system_charset_info);
 	}
 	item_list.push_back(new Item_string(tmp2.ptr(),tmp2.length(),cs));
@@ -13462,9 +13463,9 @@
 	KEY *key_info=table->key_info+ tab->index;
         register uint length;
 	item_list.push_back(new Item_string(key_info->name,
-					    strlen(key_info->name),cs));
-        length= longlong2str(key_info->key_length, keylen_str_buf, 10) - 
-                keylen_str_buf;
+					    (uint) strlen(key_info->name),cs));
+        length= (uint) (longlong2str(key_info->key_length, keylen_str_buf, 10) - 
+                keylen_str_buf);
         item_list.push_back(new Item_string(keylen_str_buf, 
                                             length,
                                             system_charset_info));
@@ -13497,7 +13498,7 @@
         key_read=1;
         
       if (tab->info)
-	item_list.push_back(new Item_string(tab->info,strlen(tab->info),cs));
+	item_list.push_back(new Item_string(tab->info,(uint) strlen(tab->info),cs));
       else
       {
         if (quick_type == QUICK_SELECT_I::QS_TYPE_ROR_UNION || 
@@ -13634,7 +13635,7 @@
 			(ORDER*) first->group_list.first,
 			first->having,
 			(ORDER*) thd->lex->proc_list.first,
-			first->options | thd->options | SELECT_DESCRIBE,
+			(ulong) first->options | thd->options | SELECT_DESCRIBE,
 			result, unit, first);
   }
   DBUG_RETURN(res || thd->net.report_error);
@@ -13727,7 +13728,7 @@
       if (schema_table)
       {
         append_identifier(thd, str, schema_table_name,
-                          strlen(schema_table_name));
+                          (uint) strlen(schema_table_name));
         cmp_name= schema_table_name;
       }
       else
@@ -13739,7 +13740,7 @@
     if (my_strcasecmp(table_alias_charset, cmp_name, alias))
     {
       str->append(' ');
-      append_identifier(thd, str, alias, strlen(alias));
+      append_identifier(thd, str, alias, (uint) strlen(alias));
     }
   }
 }

--- 1.252/sql/sql_show.cc	2005-06-16 10:27:17 +02:00
+++ 1.253/sql/sql_show.cc	2005-06-17 15:36:03 +02:00
@@ -313,9 +313,9 @@
     if (db && !(col_access & TABLE_ACLS))
     {
       table_list.db= (char*) db;
-      table_list.db_length= strlen(db);
+      table_list.db_length= (uint) strlen(db);
       table_list.table_name= file->name;
-      table_list.table_name_length= strlen(file->name);
+      table_list.table_name_length= (uint) strlen(file->name);
       table_list.grant.privilege=col_access;
       if (check_grant(thd, TABLE_ACLS, &table_list, 1, UINT_MAX, 1))
         continue;
@@ -483,12 +483,12 @@
     DBUG_RETURN(TRUE);
 
   protocol->prepare_for_resend();
-  protocol->store(dbname, strlen(dbname), system_charset_info);
+  protocol->store(dbname, (uint) strlen(dbname), system_charset_info);
   buffer.length(0);
   buffer.append("CREATE DATABASE ", 16);
   if (create_options & HA_LEX_CREATE_IF_NOT_EXISTS)
     buffer.append("/*!32312 IF NOT EXISTS*/ ", 25);
-  append_identifier(thd, &buffer, dbname, strlen(dbname));
+  append_identifier(thd, &buffer, dbname, (uint) strlen(dbname));
 
   if (create.default_table_charset)
   {
@@ -768,7 +768,7 @@
   else
     alias= (lower_case_table_names == 2 ? table->alias :
             share->table_name);
-  append_identifier(thd, packet, alias, strlen(alias));
+  append_identifier(thd, packet, alias, (uint) strlen(alias));
   packet->append(" (\n", 3);
 
   for (ptr=table->field ; (field= *ptr); ptr++)
@@ -781,7 +781,7 @@
       packet->append(",\n", 2);
 
     packet->append("  ", 2);
-    append_identifier(thd,packet,field->field_name, strlen(field->field_name));
+    append_identifier(thd,packet,field->field_name, (uint) strlen(field->field_name));
     packet->append(' ');
     // check for surprises from the previous call to Field::sql_type()
     if (type.ptr() != tmp)
@@ -902,7 +902,7 @@
     packet->append("KEY ", 4);
 
     if (!found_primary)
-     append_identifier(thd, packet, key_info->name, strlen(key_info->name));
+     append_identifier(thd, packet, key_info->name, (uint) strlen(key_info->name));
 
     if (!(thd->variables.sql_mode & MODE_NO_KEY_OPTIONS) &&
 	!limited_mysql_mode && !foreign_db_mode)
@@ -929,7 +929,7 @@
 
       if (key_part->field)
         append_identifier(thd,packet,key_part->field->field_name,
-			  strlen(key_part->field->field_name));
+			  (uint) strlen(key_part->field->field_name));
       if (!key_part->field ||
           (key_part->length !=
            table->field[key_part->fieldnr-1]->key_length() &&
@@ -953,7 +953,7 @@
 
   if ((for_str= file->get_foreign_key_create_info()))
   {
-    packet->append(for_str, strlen(for_str));
+    packet->append(for_str, (uint) strlen(for_str));
     file->free_foreign_key_create_info(for_str);
   }
 
@@ -1017,7 +1017,7 @@
     if (share->comment && share->comment[0])
     {
       packet->append(" COMMENT=", 9);
-      append_unescaped(packet, share->comment, strlen(share->comment));
+      append_unescaped(packet, share->comment, (uint) strlen(share->comment));
     }
     if (file->raid_type)
     {
@@ -1253,7 +1253,7 @@
   null_lex_str.length= 0;
 
   prefix_end=strnmov(name_buffer, prefix, sizeof(name_buffer)-1);
-  len=name_buffer + sizeof(name_buffer) - prefix_end;
+  len=(uint) (name_buffer + sizeof(name_buffer) - prefix_end);
 
   for (; variables->name; variables++)
   {
@@ -1588,7 +1588,7 @@
           break;
         }
         restore_record(table, s->default_values);
-        table->field[0]->store(name_buffer, strlen(name_buffer),
+        table->field[0]->store(name_buffer, (uint) strlen(name_buffer),
                                system_charset_info);
         table->field[1]->store(pos, (uint32) (end - pos), system_charset_info);
         if (schema_table_store_record(thd, table))
@@ -1704,9 +1704,9 @@
   Table_ident *table_ident;
   LEX_STRING ident_db, ident_table;
   ident_db.str= db; 
-  ident_db.length= strlen(db);
+  ident_db.length= (uint) strlen(db);
   ident_table.str= table;
-  ident_table.length= strlen(table);
+  ident_table.length= (uint) strlen(table);
   table_ident= new Table_ident(thd, ident_db, ident_table, 1);
   sel->init_query();
   if(!sel->add_table_to_list(thd, table_ident, 0, 0, TL_READ,
@@ -1738,12 +1738,12 @@
     const char *field_name1= schema_table->idx_field1 >= 0 ? field_info[schema_table->idx_field1].field_name : "";
     const char *field_name2= schema_table->idx_field2 >= 0 ? field_info[schema_table->idx_field2].field_name : "";
     if (table->table != item_field->field->table ||
-        (cs->coll->strnncollsp(cs, (uchar *) field_name1, strlen(field_name1),
+        (cs->coll->strnncollsp(cs, (uchar *) field_name1, (uint) strlen(field_name1),
                                (uchar *) item_field->field_name, 
-                               strlen(item_field->field_name), 0) &&
-         cs->coll->strnncollsp(cs, (uchar *) field_name2, strlen(field_name2),
+                               (uint) strlen(item_field->field_name), 0) &&
+         cs->coll->strnncollsp(cs, (uchar *) field_name2, (uint) strlen(field_name2),
                                (uchar *) item_field->field_name, 
-                               strlen(item_field->field_name), 0)))
+                               (uint) strlen(item_field->field_name), 0)))
       return 0;
   }
   else if (item->type() == Item::REF_ITEM)
@@ -2012,9 +2012,9 @@
       {
 	restore_record(table, s->default_values);
         table->field[schema_table->idx_field1]->
-          store(base_name, strlen(base_name), system_charset_info);
+          store(base_name, (uint) strlen(base_name), system_charset_info);
         table->field[schema_table->idx_field2]->
-          store(file_name, strlen(file_name),system_charset_info);
+          store(file_name, (uint) strlen(file_name),system_charset_info);
         if (!partial_cond || partial_cond->val_int())
         {
           if (schema_table_idx == SCH_TABLE_NAMES)
@@ -2085,9 +2085,9 @@
                           CHARSET_INFO *cs)
 {
   restore_record(table, s->default_values);
-  table->field[1]->store(db_name, strlen(db_name), system_charset_info);
-  table->field[2]->store(cs->csname, strlen(cs->csname), system_charset_info);
-  table->field[3]->store(cs->name, strlen(cs->name), system_charset_info);
+  table->field[1]->store(db_name, (uint) strlen(db_name), system_charset_info);
+  table->field[2]->store(cs->csname, (uint) strlen(cs->csname), system_charset_info);
+  table->field[3]->store(cs->name, (uint) strlen(cs->name), system_charset_info);
   return schema_table_store_record(thd, table);
 }
 
@@ -2159,15 +2159,15 @@
   DBUG_ENTER("get_schema_tables_record");
 
   restore_record(table, s->default_values);
-  table->field[1]->store(base_name, strlen(base_name), cs);
-  table->field[2]->store(file_name, strlen(file_name), cs);
+  table->field[1]->store(base_name, (uint) strlen(base_name), cs);
+  table->field[2]->store(file_name, (uint) strlen(file_name), cs);
   if (res)
   {
     /*
       there was errors during opening tables
     */
     const char *error= thd->net.last_error;
-    table->field[20]->store(error, strlen(error), cs);
+    table->field[20]->store(error, (uint) strlen(error), cs);
     thd->clear_error();
   }
   else if (tables->view)
@@ -2194,7 +2194,7 @@
       table->field[i]->set_notnull();
     }
     tmp_buff= file->table_type();
-    table->field[4]->store(tmp_buff, strlen(tmp_buff), cs);
+    table->field[4]->store(tmp_buff, (uint) strlen(tmp_buff), cs);
     table->field[5]->store((longlong) share->frm_version);
     enum row_type row_type = file->get_row_type();
     switch (row_type) {
@@ -2221,7 +2221,7 @@
       tmp_buff= "Compact";
       break;
     }
-    table->field[6]->store(tmp_buff, strlen(tmp_buff), cs);
+    table->field[6]->store(tmp_buff, (uint) strlen(tmp_buff), cs);
     if (!tables->schema_table)
     {
       table->field[7]->store((longlong) file->records);
@@ -2248,26 +2248,27 @@
     if (file->create_time)
     {
       thd->variables.time_zone->gmt_sec_to_TIME(&time,
-                                                file->create_time);
+                                                (my_time_t) file->create_time);
       table->field[14]->store_time(&time, MYSQL_TIMESTAMP_DATETIME);
       table->field[14]->set_notnull();
     }
     if (file->update_time)
     {
       thd->variables.time_zone->gmt_sec_to_TIME(&time,
-                                                file->update_time);
+                                                (my_time_t) file->update_time);
       table->field[15]->store_time(&time, MYSQL_TIMESTAMP_DATETIME);
       table->field[15]->set_notnull();
     }
     if (file->check_time)
     {
-      thd->variables.time_zone->gmt_sec_to_TIME(&time, file->check_time);
+      thd->variables.time_zone->gmt_sec_to_TIME(&time, 
+                                                (my_time_t) file->check_time);
       table->field[16]->store_time(&time, MYSQL_TIMESTAMP_DATETIME);
       table->field[16]->set_notnull();
     }
     tmp_buff= (share->table_charset ?
                share->table_charset->name : "default");
-    table->field[17]->store(tmp_buff, strlen(tmp_buff), cs);
+    table->field[17]->store(tmp_buff, (uint) strlen(tmp_buff), cs);
     if (file->table_flags() & (ulong) HA_HAS_CHECKSUM)
     {
       table->field[18]->store((longlong) file->checksum());
@@ -2320,7 +2321,7 @@
       comment= show_table->file->update_table_comment(share->comment);
       if (comment)
       {
-        table->field[20]->store(comment, strlen(comment), cs);
+        table->field[20]->store(comment, (uint) strlen(comment), cs);
         if (comment != share->comment)
           my_free(comment, MYF(0));
       }
@@ -2397,23 +2398,23 @@
       if (tables->schema_table)      // any user has 'select' privilege on all 
                                      // I_S table columns
         table->field[17]->store(grant_types.type_names[0],
-                                strlen(grant_types.type_names[0]), cs);
+                                (uint) strlen(grant_types.type_names[0]), cs);
       else
         table->field[17]->store(tmp+1,end == tmp ? 0 : (uint) (end-tmp-1), cs);
 
 #else
       *end= 0;
 #endif
-      table->field[1]->store(base_name, strlen(base_name), cs);
-      table->field[2]->store(file_name, strlen(file_name), cs);
-      table->field[3]->store(field->field_name, strlen(field->field_name),
+      table->field[1]->store(base_name, (uint) strlen(base_name), cs);
+      table->field[2]->store(file_name, (uint) strlen(file_name), cs);
+      table->field[3]->store(field->field_name, (uint) strlen(field->field_name),
                              cs);
       table->field[4]->store((longlong) count);
       field->sql_type(type);
       table->field[14]->store(type.ptr(), type.length(), cs);		
       tmp_buff= strchr(type.ptr(), '(');
       table->field[7]->store(type.ptr(),
-                             (tmp_buff ? tmp_buff - type.ptr() :
+                             (tmp_buff ? (uint) (tmp_buff - type.ptr()) :
                               type.length()), cs);
       if (show_table->timestamp_field == field &&
           field->unireg_check != Field::TIMESTAMP_UN_FIELD)
@@ -2445,7 +2446,7 @@
                    field->type() != FIELD_TYPE_TIMESTAMP ?
                    "NO" : "YES");
       table->field[6]->store((const char*) pos,
-                             strlen((const char*) pos), cs);
+                             (uint) strlen((const char*) pos), cs);
       if (field->has_charset())
       {
         table->field[8]->store((longlong) field->field_length/
@@ -2499,18 +2500,18 @@
       {
         pos=(byte*) field->charset()->csname;
         table->field[12]->store((const char*) pos,
-                                strlen((const char*) pos), cs);
+                                (uint) strlen((const char*) pos), cs);
         table->field[12]->set_notnull();
         pos=(byte*) field->charset()->name;
         table->field[13]->store((const char*) pos,
-                                strlen((const char*) pos), cs);
+                                (uint) strlen((const char*) pos), cs);
         table->field[13]->set_notnull();
       }
       pos=(byte*) ((field->flags & PRI_KEY_FLAG) ? "PRI" :
                    (field->flags & UNIQUE_KEY_FLAG) ? "UNI" :
                    (field->flags & MULTIPLE_KEY_FLAG) ? "MUL":"");
       table->field[15]->store((const char*) pos,
-                              strlen((const char*) pos), cs);
+                              (uint) strlen((const char*) pos), cs);
       end= tmp;
       if (field->unireg_check == Field::NEXT_NUMBER)
         end=strmov(tmp,"auto_increment");
@@ -2542,10 +2543,10 @@
 	  wild_case_compare(scs, tmp_cs->csname,wild)))
     {
       restore_record(table, s->default_values);
-      table->field[0]->store(tmp_cs->csname, strlen(tmp_cs->csname), scs);
-      table->field[1]->store(tmp_cs->name, strlen(tmp_cs->name), scs);
+      table->field[0]->store(tmp_cs->csname, (uint) strlen(tmp_cs->csname), scs);
+      table->field[1]->store(tmp_cs->name, (uint) strlen(tmp_cs->name), scs);
       table->field[2]->store(tmp_cs->comment ? tmp_cs->comment : "",
-			     strlen(tmp_cs->comment ? tmp_cs->comment : ""),
+			     (uint) strlen(tmp_cs->comment ? tmp_cs->comment : ""),
                              scs);
       table->field[3]->store((longlong) tmp_cs->mbmaxlen);
       if (schema_table_store_record(thd, table))
@@ -2580,13 +2581,13 @@
       {
 	const char *tmp_buff;
 	restore_record(table, s->default_values);
-	table->field[0]->store(tmp_cl->name, strlen(tmp_cl->name), scs);
-        table->field[1]->store(tmp_cl->csname , strlen(tmp_cl->csname), scs);
+	table->field[0]->store(tmp_cl->name, (uint) strlen(tmp_cl->name), scs);
+        table->field[1]->store(tmp_cl->csname , (uint) strlen(tmp_cl->csname), scs);
         table->field[2]->store((longlong) tmp_cl->number);
         tmp_buff= (tmp_cl->state & MY_CS_PRIMARY) ? "Yes" : "";
-	table->field[3]->store(tmp_buff, strlen(tmp_buff), scs);
+	table->field[3]->store(tmp_buff, (uint) strlen(tmp_buff), scs);
         tmp_buff= (tmp_cl->state & MY_CS_COMPILED)? "Yes" : "";
-	table->field[4]->store(tmp_buff, strlen(tmp_buff), scs);
+	table->field[4]->store(tmp_buff, (uint) strlen(tmp_buff), scs);
         table->field[5]->store((longlong) tmp_cl->strxfrm_multiply);
         if (schema_table_store_record(thd, table))
           return 1;
@@ -2616,8 +2617,8 @@
           !my_charset_same(tmp_cs,tmp_cl))
 	continue;
       restore_record(table, s->default_values);
-      table->field[0]->store(tmp_cl->name, strlen(tmp_cl->name), scs);
-      table->field[1]->store(tmp_cl->csname , strlen(tmp_cl->csname), scs);
+      table->field[0]->store(tmp_cl->name, (uint) strlen(tmp_cl->name), scs);
+      table->field[1]->store(tmp_cl->csname , (uint) strlen(tmp_cl->csname), scs);
       if (schema_table_store_record(thd, table))
         return 1;
     }
@@ -2653,10 +2654,10 @@
     if (!wild || !wild[0] || !wild_compare(sp_name, wild, 0))
     {
       int enum_idx= proc_table->field[5]->val_int();
-      table->field[3]->store(sp_name, strlen(sp_name), cs);
+      table->field[3]->store(sp_name, (uint) strlen(sp_name), cs);
       get_field(thd->mem_root, proc_table->field[3], &tmp_string);
       table->field[0]->store(tmp_string.ptr(), tmp_string.length(), cs);
-      table->field[2]->store(sp_db, strlen(sp_db), cs);
+      table->field[2]->store(sp_db, (uint) strlen(sp_db), cs);
       get_field(thd->mem_root, proc_table->field[2], &tmp_string);
       table->field[4]->store(tmp_string.ptr(), tmp_string.length(), cs);
       if (proc_table->field[2]->val_int() == TYPE_ENUM_FUNCTION)
@@ -2688,7 +2689,7 @@
       table->field[17]->store(tmp_string.ptr(), tmp_string.length(), cs);
       get_field(thd->mem_root, proc_table->field[15], &tmp_string);
       table->field[18]->store(tmp_string.ptr(), tmp_string.length(), cs);
-      table->field[19]->store(definer, strlen(definer), cs);
+      table->field[19]->store(definer, (uint) strlen(definer), cs);
       return schema_table_store_record(thd, table);
     }
   }
@@ -2783,16 +2784,16 @@
       for (uint j=0 ; j < key_info->key_parts ; j++,key_part++)
       {
         restore_record(table, s->default_values);
-        table->field[1]->store(base_name, strlen(base_name), cs);
-        table->field[2]->store(file_name, strlen(file_name), cs);
+        table->field[1]->store(base_name, (uint) strlen(base_name), cs);
+        table->field[2]->store(file_name, (uint) strlen(file_name), cs);
         table->field[3]->store((longlong) ((key_info->flags & 
                                             HA_NOSAME) ? 0 :1));
-        table->field[4]->store(base_name, strlen(base_name), cs);
-        table->field[5]->store(key_info->name, strlen(key_info->name), cs);
+        table->field[4]->store(base_name, (uint) strlen(base_name), cs);
+        table->field[5]->store(key_info->name, (uint) strlen(key_info->name), cs);
         table->field[6]->store((longlong) (j+1));
         str=(key_part->field ? key_part->field->field_name :
              "?unknown field?");
-        table->field[7]->store(str, strlen(str), cs);
+        table->field[7]->store(str, (uint) strlen(str), cs);
         if (show_table->file->index_flags(i, j, 0) & HA_READ_ORDER)
         {
           table->field[8]->store(((key_part->key_part_flag &
@@ -2819,9 +2820,9 @@
         }
         uint flags= key_part->field ? key_part->field->flags : 0;
         const char *pos=(char*) ((flags & NOT_NULL_FLAG) ? "" : "YES");
-        table->field[12]->store(pos, strlen(pos), cs);
+        table->field[12]->store(pos, (uint) strlen(pos), cs);
         pos= show_table->file->index_type(i);
-        table->field[13]->store(pos, strlen(pos), cs);
+        table->field[13]->store(pos, (uint) strlen(pos), cs);
         if (!show_table->s->keys_in_use.is_set(i))
           table->field[14]->store("disabled", 8, cs);
         else
@@ -2887,10 +2888,10 @@
 {
   CHARSET_INFO *cs= system_charset_info;
   restore_record(table, s->default_values);
-  table->field[1]->store(db, strlen(db), cs);
+  table->field[1]->store(db, (uint) strlen(db), cs);
   table->field[2]->store(key_name, key_len, cs);
-  table->field[3]->store(db, strlen(db), cs);
-  table->field[4]->store(tname, strlen(tname), cs);
+  table->field[3]->store(db, (uint) strlen(db), cs);
+  table->field[4]->store(tname, (uint) strlen(tname), cs);
   table->field[5]->store(con_type, con_len, cs);
   return schema_table_store_record(thd, table);
 }
@@ -2927,13 +2928,13 @@
       if (i == primary_key && !strcmp(key_info->name, primary_key_name))
       {
         if (store_constraints(thd, table, base_name, file_name, key_info->name,
-                              strlen(key_info->name), "PRIMARY KEY", 11))
+                              (uint) strlen(key_info->name), "PRIMARY KEY", 11))
           DBUG_RETURN(1);
       }
       else if (key_info->flags & HA_NOSAME)
       {
         if (store_constraints(thd, table, base_name, file_name, key_info->name,
-                              strlen(key_info->name), "UNIQUE", 6))
+                              (uint) strlen(key_info->name), "UNIQUE", 6))
           DBUG_RETURN(1);
       }
     }
@@ -2945,7 +2946,7 @@
     {
       if (store_constraints(thd, table, base_name, file_name, 
                             f_key_info->forein_id->str,
-                            strlen(f_key_info->forein_id->str),
+                            (uint) strlen(f_key_info->forein_id->str),
                             "FOREIGN KEY", 11))
         DBUG_RETURN(1);
     }
@@ -2959,10 +2960,10 @@
                             const char *con_type, uint con_len, longlong idx)
 {
   CHARSET_INFO *cs= system_charset_info;
-  table->field[1]->store(db, strlen(db), cs);
+  table->field[1]->store(db, (uint) strlen(db), cs);
   table->field[2]->store(key_name, key_len, cs);
-  table->field[4]->store(db, strlen(db), cs);
-  table->field[5]->store(tname, strlen(tname), cs);
+  table->field[4]->store(db, (uint) strlen(db), cs);
+  table->field[5]->store(tname, (uint) strlen(tname), cs);
   table->field[6]->store(con_type, con_len, cs);
   table->field[7]->store((longlong) idx);
 }
@@ -3006,9 +3007,9 @@
           restore_record(table, s->default_values);
           store_key_column_usage(table, base_name, file_name,
                                  key_info->name,
-                                 strlen(key_info->name), 
+                                 (uint) strlen(key_info->name), 
                                  key_part->field->field_name, 
-                                 strlen(key_part->field->field_name),
+                                 (uint) strlen(key_part->field->field_name),
                                  (longlong) f_idx);
           if (schema_table_store_record(thd, table))
             DBUG_RETURN(1);
@@ -3071,8 +3072,8 @@
   for (; open_list ; open_list=open_list->next)
   {
     restore_record(table, s->default_values);
-    table->field[0]->store(open_list->db, strlen(open_list->db), cs);
-    table->field[1]->store(open_list->table, strlen(open_list->table), cs);
+    table->field[0]->store(open_list->db, (uint) strlen(open_list->db), cs);
+    table->field[1]->store(open_list->table, (uint) strlen(open_list->table), cs);
     table->field[2]->store((longlong) open_list->in_use);
     table->field[3]->store((longlong)  open_list->locked);
     if (schema_table_store_record(thd, table))
@@ -3197,7 +3198,7 @@
       }
       item->max_length= fields_info->field_length * cs->mbmaxlen;
       item->set_name(fields_info->field_name,
-                     strlen(fields_info->field_name), cs);
+                     (uint) strlen(fields_info->field_name), cs);
       break;
     }
     field_list.push_back(item);
@@ -3213,7 +3214,7 @@
   SELECT_LEX *select_lex= thd->lex->current_select;
   if (!(table= create_tmp_table(thd, tmp_table_param,
                                 field_list, (ORDER*) 0, 0, 0, 
-                                (select_lex->options | thd->options |
+                                ulong (select_lex->options | thd->options |
                                  TMP_TABLE_ALL_COLUMNS),
                                 HA_POS_ERROR, table_list->alias)))
     DBUG_RETURN(0);
@@ -3248,7 +3249,7 @@
       if (field)
       {
         field->set_name(field_info->old_name,
-                        strlen(field_info->old_name),
+                        (uint) strlen(field_info->old_name),
                         system_charset_info);
         if (add_item_to_list(thd, field))
           return 1;
@@ -3313,7 +3314,7 @@
     field= new Item_field(NullS, NullS, field_info->field_name);
     if (add_item_to_list(thd, field))
       return 1;
-    field->set_name(field_info->old_name, strlen(field_info->old_name),
+    field->set_name(field_info->old_name, (uint) strlen(field_info->old_name),
                     system_charset_info);
   }
   return 0;
@@ -3336,7 +3337,7 @@
     if (field)
     {
       field->set_name(field_info->old_name,
-                      strlen(field_info->old_name),
+                      (uint) strlen(field_info->old_name),
                       system_charset_info);
       if (add_item_to_list(thd, field))
         return 1;
@@ -3358,7 +3359,7 @@
     if (field)
     {
       field->set_name(field_info->old_name,
-                      strlen(field_info->old_name),
+                      (uint) strlen(field_info->old_name),
                       system_charset_info);
       if (add_item_to_list(thd, field))
         return 1;
@@ -3380,7 +3381,7 @@
     if (field)
     {
       field->set_name(field_info->old_name,
-                      strlen(field_info->old_name),
+                      (uint) strlen(field_info->old_name),
                       system_charset_info);
       if (add_item_to_list(thd, field))
         return 1;
@@ -3426,7 +3427,7 @@
                                           table_list->schema_table_name,
                                           table_list->alias);
   table_list->table_name= (char*) table->s->table_name;
-  table_list->table_name_length= strlen(table->s->table_name);
+  table_list->table_name_length= (uint) strlen(table->s->table_name);
   table_list->table= table;
   table->next= thd->derived_tables;
   thd->derived_tables= table;
@@ -3502,7 +3503,7 @@
   make_lex_string(thd, &db, information_schema_name.str,
                   information_schema_name.length, 0);
   make_lex_string(thd, &table, schema_table->table_name,
-                  strlen(schema_table->table_name), 0);
+                  (uint) strlen(schema_table->table_name), 0);
   if (schema_table->old_format(thd, schema_table) ||      /* Handle old syntax */
       !sel->add_table_to_list(thd, new Table_ident(thd, db, table, 0),
                               0, 0, TL_READ, (List<String> *) 0,

--- 1.123/sql/sql_prepare.cc	2005-06-16 23:58:26 +02:00
+++ 1.124/sql/sql_prepare.cc	2005-06-17 15:36:03 +02:00
@@ -609,13 +609,13 @@
     Item_param *param= *it;
     if (param->state != Item_param::LONG_DATA_VALUE)
     {
-      if (is_param_null(null_array, it - begin))
+      if (is_param_null(null_array, (ulong) (it - begin)))
         param->set_null();
       else
       {
         if (read_pos >= data_end)
           DBUG_RETURN(1);
-        param->set_param_func(param, &read_pos, data_end - read_pos);
+        param->set_param_func(param, &read_pos, (ulong) (data_end - read_pos));
       }
     }
     res= param->query_val_str(&str);
@@ -645,13 +645,13 @@
     Item_param *param= *it;
     if (param->state != Item_param::LONG_DATA_VALUE)
     {
-      if (is_param_null(null_array, it - begin))
+      if (is_param_null(null_array, (ulong) (it - begin)))
         param->set_null();
       else
       {
         if (read_pos >= data_end)
           DBUG_RETURN(1);
-        param->set_param_func(param, &read_pos, data_end - read_pos);
+        param->set_param_func(param, &read_pos, (ulong) (data_end - read_pos));
       }
     }
     if (param->convert_str_value(stmt->thd))
@@ -861,7 +861,7 @@
       buf.length(0);
       if (buf.reserve(entry->name.length*2+3))
         DBUG_RETURN(1);
-
+  
       begin= ptr= buf.c_ptr_quick();
       *ptr++= '@';
       *ptr++= '\'';
@@ -869,12 +869,12 @@
                                     ptr, 0, entry->name.str,
                                     entry->name.length);
       *ptr++= '\'';
-      buf.length(ptr - begin);
+      buf.length((uint32) (ptr - begin));
       val= &buf;
     }
     else
       val= &my_null_string;
-
+  
     if (param->convert_str_value(stmt->thd))
       DBUG_RETURN(1);                           /* out of memory */
 
Thread
bk commit into 5.0 tree (georg:1.1962)Georg Richter17 Jun