diff options
author | unknown <monty@donna.mysql.com> | 2000-08-23 15:02:27 +0300 |
---|---|---|
committer | unknown <monty@donna.mysql.com> | 2000-08-23 15:02:27 +0300 |
commit | 844c92364e04fb17371c4a71dee52f179f8ad253 (patch) | |
tree | b3128ac4cfef425d026d95cd4fd1a55830ef7658 /sql | |
parent | 11f402b3108b0c6ef5744bd13164607dd9fba3c0 (diff) | |
download | mariadb-git-844c92364e04fb17371c4a71dee52f179f8ad253.tar.gz |
Fixes for Ia64
Docs/manual.texi:
Updated thread safe client chapter + new links
client/sql_string.cc:
Update for Ia64
client/sql_string.h:
Update for Ia64
extra/replace.c:
Update for Ia64
include/config-win.h:
Update for PHP
include/global.h:
Update for PHP
isam/create.c:
Update for Ia64
isam/delete.c:
Update for Ia64
isam/write.c:
Update for Ia64
libmysql/Makefile.shared:
new file
libmysql/libmysql.c:
Update for Ia64
libmysql/net.c:
Update for Ia64
myisam/mi_delete.c:
Update for Ia64
myisam/mi_search.c:
Update for Ia64
sql/field.cc:
Update for Ia64
sql/field.h:
Update for Ia64
sql/item.h:
Update for Ia64
sql/item_strfunc.cc:
Update for Ia64
sql/lock.cc:
Update for Ia64
sql/log.cc:
Update for Ia64
sql/log_event.h:
Update for Ia64
sql/net_serv.cc:
Update for Ia64
sql/sql_list.h:
Update for Ia64
sql/sql_parse.cc:
Update for Ia64
sql/sql_rename.cc:
Update for Ia64
sql/sql_select.cc:
Update for Ia64
sql/sql_show.cc:
Update for Ia64
sql/sql_string.cc:
Update for Ia64
sql/sql_string.h:
Update for Ia64
sql/time.cc:
Update for Ia64
Diffstat (limited to 'sql')
-rw-r--r-- | sql/field.cc | 2 | ||||
-rw-r--r-- | sql/field.h | 2 | ||||
-rw-r--r-- | sql/item.h | 4 | ||||
-rw-r--r-- | sql/item_strfunc.cc | 6 | ||||
-rw-r--r-- | sql/lock.cc | 2 | ||||
-rw-r--r-- | sql/log.cc | 2 | ||||
-rw-r--r-- | sql/log_event.h | 4 | ||||
-rw-r--r-- | sql/net_serv.cc | 2 | ||||
-rw-r--r-- | sql/sql_list.h | 2 | ||||
-rw-r--r-- | sql/sql_parse.cc | 2 | ||||
-rw-r--r-- | sql/sql_rename.cc | 3 | ||||
-rw-r--r-- | sql/sql_select.cc | 4 | ||||
-rw-r--r-- | sql/sql_show.cc | 5 | ||||
-rw-r--r-- | sql/sql_string.cc | 33 | ||||
-rw-r--r-- | sql/sql_string.h | 23 | ||||
-rw-r--r-- | sql/time.cc | 2 |
16 files changed, 50 insertions, 48 deletions
diff --git a/sql/field.cc b/sql/field.cc index 0ac2b0c841e..5afa314b835 100644 --- a/sql/field.cc +++ b/sql/field.cc @@ -799,7 +799,7 @@ String *Field_tiny::val_str(String *val_buffer, if (unsigned_flag) length= (uint) (int10_to_str((long) *((uchar*) ptr),to,10)-to); else - length=(int10_to_str((long) *((signed char*) ptr),to,-10)-to); + length= (uint) (int10_to_str((long) *((signed char*) ptr),to,-10)-to); val_buffer->length(length); if (zerofill) prepend_zeros(val_buffer); diff --git a/sql/field.h b/sql/field.h index 1d819231bd2..12a4a48562f 100644 --- a/sql/field.h +++ b/sql/field.h @@ -33,7 +33,7 @@ class Field { Field(const Item &); /* Prevent use of theese */ void operator=(Field &); public: - static void *operator new(size_t size) {return (void*) sql_alloc(size); } + static void *operator new(size_t size) {return (void*) sql_alloc((uint) size); } static void operator delete(void *ptr_arg, size_t size) {} /*lint -e715 */ enum utype { NONE,DATE,SHIELD,NOEMPTY,CASEUP,PNR,BGNR,PGNR,YES,NO,REL, diff --git a/sql/item.h b/sql/item.h index bce9c6600ef..f7cc296a4b3 100644 --- a/sql/item.h +++ b/sql/item.h @@ -26,7 +26,7 @@ class Item { Item(const Item &); /* Prevent use of theese */ void operator=(Item &); public: - static void *operator new(size_t size) {return (void*) sql_alloc(size); } + static void *operator new(size_t size) {return (void*) sql_alloc((uint) size); } static void operator delete(void *ptr,size_t size) {} /*lint -e715 */ enum Type {FIELD_ITEM,FUNC_ITEM,SUM_FUNC_ITEM,STRING_ITEM, @@ -167,7 +167,7 @@ public: Item_int(const char *str_arg) : value(str_arg[0] == '-' ? strtoll(str_arg,(char**) 0,10) : (longlong) strtoull(str_arg,(char**) 0,10)) - { max_length=strlen(str_arg); name=(char*) str_arg;} + { max_length= (uint) strlen(str_arg); name=(char*) str_arg;} enum Type type() const { return INT_ITEM; } virtual enum Item_result result_type () const { return INT_RESULT; } longlong val_int() { return value; } diff --git a/sql/item_strfunc.cc b/sql/item_strfunc.cc index c839065eb45..b3494f7c81d 100644 --- a/sql/item_strfunc.cc +++ b/sql/item_strfunc.cc @@ -418,7 +418,7 @@ redo: i=(char*) ptr+1; j=(char*) search+1; while (j != search_end) if (*i++ != *j++) goto skipp; - offset=ptr-res->ptr(); + offset= (int) (ptr-res->ptr()); if (res->length()-from_length + to_length > max_allowed_packet) goto null; if (!alloced) @@ -740,12 +740,12 @@ String *Item_func_substr_index::val_str(String *str) if (c) return res; /* Not found, return original string */ if (count>0) /* return left part */ { - tmp_value.set(*res,0,ptr-res->ptr()); + tmp_value.set(*res,0,(ulong) (ptr-res->ptr())); } else /* return right part */ { ptr+=delimeter_length; - tmp_value.set(*res,ptr-res->ptr(),strend-ptr); + tmp_value.set(*res,(ulong) (ptr-res->ptr()), (ulong) (strend-ptr)); } } } diff --git a/sql/lock.cc b/sql/lock.cc index 228dff6b058..a2e4daa4590 100644 --- a/sql/lock.cc +++ b/sql/lock.cc @@ -262,7 +262,7 @@ void mysql_lock_remove(THD *thd, MYSQL_LOCK *locked,TABLE *table) if (locked->locks[i]->type != TL_UNLOCK) *prev++ = locked->locks[i]; } - locked->lock_count=(prev - locked->locks); + locked->lock_count=(uint) (prev - locked->locks); } } diff --git a/sql/log.cc b/sql/log.cc index e73f0c802a5..29ca0247a1b 100644 --- a/sql/log.cc +++ b/sql/log.cc @@ -51,7 +51,7 @@ static int find_uniq_filename(char *name) length=dirname_part(buff,name); char *start=name+length,*end=strend(start); *end='.'; - length=end-start+1; + length= (uint) (end-start+1); if (!(dir_info = my_dir(buff,MYF(MY_DONT_SORT)))) { // This shouldn't happen diff --git a/sql/log_event.h b/sql/log_event.h index 13472938975..549f3831a60 100644 --- a/sql/log_event.h +++ b/sql/log_event.h @@ -99,7 +99,7 @@ public: { time_t end_time; time(&end_time); - exec_time = end_time - thd->start_time; + exec_time = (ulong) (end_time - thd->start_time); valid_exec_time = 1; db_len = (db) ? (uint) strlen(db) : 0; } @@ -187,7 +187,7 @@ public: { time_t end_time; time(&end_time); - exec_time = end_time - thd->start_time; + exec_time = (ulong) (end_time - thd->start_time); valid_exec_time = 1; db_len = (db) ? (uint) strlen(db) : 0; table_name_len = (table_name) ? (uint) strlen(table_name) : 0; diff --git a/sql/net_serv.cc b/sql/net_serv.cc index 643b5e031cf..dac1fe0bd68 100644 --- a/sql/net_serv.cc +++ b/sql/net_serv.cc @@ -326,7 +326,7 @@ net_real_write(NET *net,const char *packet,ulong len) pos=(char*) packet; end=pos+len; while (pos != end) { - if ((int) (length=vio_write(net->vio,pos,(size_t) (end-pos))) <= 0) + if ((int) (length=vio_write(net->vio,pos,(int) (end-pos))) <= 0) { my_bool interrupted = vio_should_retry(net->vio); #if (!defined(__WIN__) && !defined(__EMX__)) diff --git a/sql/sql_list.h b/sql/sql_list.h index 725d506e62a..965d1ff9308 100644 --- a/sql/sql_list.h +++ b/sql/sql_list.h @@ -25,7 +25,7 @@ class Sql_alloc { public: - static void *operator new(size_t size) {return (void*) sql_alloc(size); } + static void *operator new(size_t size) {return (void*) sql_alloc((uint) size); } static void operator delete(void *ptr, size_t size) {} /*lint -e715 */ inline Sql_alloc() {}; inline ~Sql_alloc() {}; diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index b4f16bbe201..8b7e16709c0 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -323,7 +323,7 @@ pthread_handler_decl(handle_one_connection,arg) { THD *thd=(THD*) arg; uint launch_time = - (thd->thr_create_time = time(NULL)) - thd->connect_time; + (uint) ((thd->thr_create_time = time(NULL)) - thd->connect_time); if (launch_time >= slow_launch_time) statistic_increment(slow_launch_threads,&LOCK_status ); diff --git a/sql/sql_rename.cc b/sql/sql_rename.cc index ee6771d4b25..e1be78ada1c 100644 --- a/sql/sql_rename.cc +++ b/sql/sql_rename.cc @@ -32,8 +32,7 @@ static TABLE_LIST *rename_tables(THD *thd, TABLE_LIST *table_list, bool mysql_rename_tables(THD *thd, TABLE_LIST *table_list) { bool error=1,got_all_locks=1; - db_type table_type; - TABLE_LIST *lock_table,*ren_table=0,*new_table; + TABLE_LIST *lock_table,*ren_table=0; DBUG_ENTER("mysql_rename_tables"); /* Avoid problems with a rename on a table that we have locked or diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 9c509484b3c..c779b9f555a 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -2606,7 +2606,7 @@ static void clear_tables(JOIN *join) class COND_CMP :public ilink { public: - static void *operator new(size_t size) {return (void*) sql_alloc(size); } + static void *operator new(size_t size) {return (void*) sql_alloc((uint) size); } static void operator delete(void *ptr __attribute__((unused)), size_t size __attribute__((unused))) {} /*lint -e715 */ @@ -3229,7 +3229,7 @@ create_tmp_table(THD *thd,TMP_TABLE_PARAM *param,List<Item> &fields, *(reg_field++) =new_field; } } - field_count=reg_field - table->field; + field_count= (uint) (reg_field - table->field); /* If result table is small; use a heap */ if (blob_count || using_unique_constraint || diff --git a/sql/sql_show.cc b/sql/sql_show.cc index 695c815a500..66141a8591c 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -818,11 +818,12 @@ store_create_info(THD *thd, TABLE *table, String* packet) class thread_info :public ilink { public: - static void *operator new(size_t size) {return (void*) sql_alloc(size); } + static void *operator new(size_t size) {return (void*) sql_alloc((uint) size); } static void operator delete(void *ptr __attribute__((unused)), size_t size __attribute__((unused))) {} /*lint -e715 */ - ulong thread_id,start_time; + ulong thread_id; + time_t start_time; uint command; const char *user,*host,*db,*proc_info,*state_info; char *query; diff --git a/sql/sql_string.cc b/sql/sql_string.cc index 83b21af87f5..67ce0f6ff54 100644 --- a/sql/sql_string.cc +++ b/sql/sql_string.cc @@ -1,18 +1,19 @@ /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. + This program file is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + MA 02111-1307, USA */ /* This file is originally from the mysql distribution. Coded by monty */ @@ -126,7 +127,7 @@ bool String::set(double num,uint decimals) if (decimals >= NOT_FIXED_DEC) { sprintf(buff,"%.14g",num); // Enough for a DATETIME - return copy(buff,(uint) strlen(buff)); + return copy(buff, (uint32) strlen(buff)); } #ifdef HAVE_FCONVERT int decpt,sign; @@ -141,7 +142,7 @@ bool String::set(double num,uint decimals) buff[0]='-'; pos=buff; } - return copy(pos,(uint) strlen(pos)); + return copy(pos,(uint32) strlen(pos)); } if (alloc((uint32) ((uint32) decpt+3+decimals))) return TRUE; @@ -191,7 +192,7 @@ end: #else sprintf(buff,"%.*f",(int) decimals,num); #endif - return copy(buff,(uint) strlen(buff)); + return copy(buff,(uint32) strlen(buff)); #endif } @@ -260,7 +261,7 @@ bool String::append(const String &s) bool String::append(const char *s,uint32 arg_length) { if (!arg_length) // Default argument - arg_length=(uint) strlen(s); + arg_length= (uint32) strlen(s); if (realloc(str_length+arg_length)) return TRUE; memcpy(Ptr+str_length,s,arg_length); @@ -318,7 +319,7 @@ int String::charpos(int i,uint32 offset) if ( INT_MAX32-i <= (int) (mbstr-Ptr-offset)) return INT_MAX32; else - return (mbstr-Ptr-offset)+i; + return (int) ((mbstr-Ptr-offset)+i); } else #endif @@ -330,7 +331,7 @@ int String::strstr(const String &s,uint32 offset) if (s.length()+offset <= str_length) { if (!s.length()) - return offset; // Empty string is always found + return ((int) offset); // Empty string is always found register const char *str = Ptr+offset; register const char *search=s.ptr(); diff --git a/sql/sql_string.h b/sql/sql_string.h index d421261f9e4..8711cf314ad 100644 --- a/sql/sql_string.h +++ b/sql/sql_string.h @@ -1,18 +1,19 @@ /* Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or - (at your option) any later version. + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. - This program is distributed in the hope that it will be useful, + This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, + MA 02111-1307, USA */ /* This file is originally from the mysql distribution. Coded by monty */ @@ -44,7 +45,7 @@ public: { Ptr=str.Ptr ; str_length=str.str_length ; Alloced_length=str.Alloced_length; alloced=0; } - static void *operator new(size_t size) { return (void*) sql_alloc(size); } + static void *operator new(size_t size) { return (void*) sql_alloc((uint) size); } static void operator delete(void *ptr_arg,size_t size) /*lint -e715 */ { sql_element_free(ptr_arg); } ~String() { free(); } diff --git a/sql/time.cc b/sql/time.cc index 5cf7d0ee074..17603d93dd4 100644 --- a/sql/time.cc +++ b/sql/time.cc @@ -113,7 +113,7 @@ long my_gmt_sec(TIME *t) if ((my_time_zone >=0 ? my_time_zone: -my_time_zone) > 3600L*12) my_time_zone=0; /* Wrong date */ pthread_mutex_unlock(&LOCK_timezone); - return tmp; + return (long) tmp; } /* my_gmt_sec */ |