Commit 86016aeb authored by unknown's avatar unknown
Browse files

Fixes for windows compilation bugs

(After review of cs georg:1.1800 by Monty)


VC++Files/libmysqld/libmysqld.dsp:
  removed ha_isammrg.cpp (doesn't exist anymore)
VC++Files/mysqldemb/mysqldemb.dsp:
  removed ha_isammrg.cpp (doesn't exist anymore)
extra/comp_err.c:
  renamed DATADIR to DATADIRECTORY (DATADIR is a windows internal
  enumeration type)
innobase/ut/ut0ut.c:
  gettimeofday is not available under Windows. Added conditional define
  which uses GetLocalTime for windows
libmysql/libmysql.c:
  fixed prototype for setup_one_fetch_function which differed from
  function declaration.
  Fixed not supported unsigned __int64 to double conversion
sql/field.h:
  fixed typecast error (windows)
sql/item_sum.cc:
  fixed typecast errors (windows)
sql/key.cc:
  fixed typecast errors (windows)
sql/opt_range.cc:
  fixed not supported unsigned __int64 to double conversion
sql/sql_acl.cc:
  fixed typecast errors (windows)
sql/table.cc:
  fixed typecast errors (windows)
parent 99b8a16e
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -228,10 +228,6 @@ SOURCE=..\sql\ha_innodb.cpp
# End Source File
# Begin Source File

SOURCE=..\sql\ha_isammrg.cpp
# End Source File
# Begin Source File

SOURCE=..\sql\ha_myisam.cpp
# End Source File
# Begin Source File
+0 −4
Original line number Diff line number Diff line
@@ -169,10 +169,6 @@ SOURCE=..\sql\ha_innodb.cpp
# End Source File
# Begin Source File

SOURCE=..\sql\ha_isammrg.cpp
# End Source File
# Begin Source File

SOURCE=..\sql\ha_myisam.cpp
# End Source File
# Begin Source File
+4 −4
Original line number Diff line number Diff line
@@ -41,7 +41,7 @@ static char *HEADERFILE= (char*) "mysqld_error.h";
static char *NAMEFILE= (char*) "mysqld_ername.h";
static char *STATEFILE= (char*) "sql_state.h";
static char *TXTFILE= (char*) "../sql/share/errmsg.txt";
static char *DATADIR= (char*) "../sql/share/";
static char *DATADIRECTORY= (char*) "../sql/share/";
static char *default_dbug_option= (char*) "d:t:O,/tmp/comp_err.trace";

/* Header for errmsg.sys files */
@@ -112,8 +112,8 @@ static struct my_option my_long_options[]=
   0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
  {"in_file", 'F', "Input file", (gptr *) & TXTFILE, (gptr *) & TXTFILE,
   0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
  {"out_dir", 'D', "Output base directory", (gptr *) & DATADIR,
   (gptr *) & DATADIR,
  {"out_dir", 'D', "Output base directory", (gptr *) & DATADIRECTORY,
   (gptr *) & DATADIRECTORY,
   0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
  {"out_file", 'O', "Output filename (errmsg.sys)", (gptr *) & OUTFILE,
   (gptr *) & OUTFILE, 0, GET_STR, REQUIRED_ARG, 0, 0, 0, 0, 0, 0},
@@ -281,7 +281,7 @@ static int create_sys_files(struct languages *lang_head,
      DBUG_RETURN(1);
    }

    outfile_end= strxmov(outfile, DATADIR, 
    outfile_end= strxmov(outfile, DATADIRECTORY, 
                         tmp_lang->lang_long_name, NullS);
    if (!my_stat(outfile, &stat_info,MYF(0)))
    {
+7 −0
Original line number Diff line number Diff line
@@ -82,10 +82,17 @@ ut_usectime(
	ulint*	sec,	/* out: seconds since the Epoch */
	ulint*	ms)	/* out: microseconds since the Epoch+*sec */
{
#ifdef __WIN__
	SYSTEMTIME st;
	GetLocalTime(&st);
	*sec = (ulint) st.wSecond;
	*ms  = (ulint) st.wMilliseconds;
#else
	struct timeval	tv;
	gettimeofday(&tv,NULL);
	*sec = (ulint) tv.tv_sec;
	*ms  = (ulint) tv.tv_usec;
#endif
}

/**************************************************************
+2 −2
Original line number Diff line number Diff line
@@ -1740,7 +1740,7 @@ static int stmt_read_row_no_data(MYSQL_STMT *stmt, unsigned char **row);
  STMT_ATTR_UPDATE_MAX_LENGTH attribute is set.
*/
static void stmt_update_metadata(MYSQL_STMT *stmt, MYSQL_ROWS *data);
static bool setup_one_fetch_function(MYSQL_BIND *bind, MYSQL_FIELD *field);
static my_bool setup_one_fetch_function(MYSQL_BIND *bind, MYSQL_FIELD *field);

/*
  Maximum sizes of MYSQL_TYPE_DATE, MYSQL_TYPE_TIME, MYSQL_TYPE_DATETIME
@@ -3718,7 +3718,7 @@ static void fetch_float_with_conversion(MYSQL_BIND *param, MYSQL_FIELD *field,
      longlongstore(buffer, data);
    }
    *param->error= value != (param->is_unsigned ?
                             (double) (*(ulonglong*) buffer) :
                             ulonglong2double(*(ulonglong*) buffer) :
                             (double) (*(longlong*) buffer));
    break;
  case MYSQL_TYPE_FLOAT:
Loading