diff options
author | unknown <monty@hundin.mysql.fi> | 2001-08-23 00:55:48 +0300 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2001-08-23 00:55:48 +0300 |
commit | 29ebdeb11ccbf43c5b0a3179bed602828eb36149 (patch) | |
tree | f6e213bc452d9b3c37cd161c3099c3e079f9c9d4 | |
parent | 6bf6d4b8a583d3b7b745cd882a07ad1bd93977e7 (diff) | |
download | mariadb-git-29ebdeb11ccbf43c5b0a3179bed602828eb36149.tar.gz |
Portability fixes
Docs/manual.texi:
Small changes because of user request.
heap/heapdef.h:
Portability fix
include/global.h:
Portability fix
myisam/myisamlog.c:
Portability fix
sql/mini_client.cc:
Fix for windows
sql/sql_repl.cc:
Fix for windows
sql/violite.c:
Fix for windows
-rw-r--r-- | Docs/manual.texi | 15 | ||||
-rw-r--r-- | heap/heapdef.h | 4 | ||||
-rw-r--r-- | include/global.h | 13 | ||||
-rw-r--r-- | myisam/myisamlog.c | 3 | ||||
-rw-r--r-- | sql/mini_client.cc | 19 | ||||
-rw-r--r-- | sql/sql_repl.cc | 3 | ||||
-rw-r--r-- | sql/violite.c | 14 |
7 files changed, 47 insertions, 24 deletions
diff --git a/Docs/manual.texi b/Docs/manual.texi index 246a3747576..322cf80104e 100644 --- a/Docs/manual.texi +++ b/Docs/manual.texi @@ -1129,6 +1129,9 @@ values). @node MySQL-Books, General-SQL, MySQL Information Sources, MySQL Information Sources @subsection Books About MySQL +For the latest book information, with user comments, please visit +@uref{http://www.mysql.com/portal/books/html/index.html}. + While this manual is still the right place for up to date technical information, its primary goal is to contain everything there is to know about MySQL. It is sometimes nice to have a bound book to read @@ -36066,7 +36069,7 @@ installing a binary version of MySQL. @xref{Installing binary}. @xref{mysqld-max, , @code{mysqld-max}}. To compile MySQL with InnoDB support, download MySQL-3.23.37 or newer -and configure @code{MySQL} with the @code{--with-innodb} option. +and configure MySQL with the @code{--with-innodb} option. @xref{Installing source}. @example @@ -36074,6 +36077,16 @@ cd /path/to/source/of/mysql-3.23.37 ./configure --with-innodb @end example +To get InnoDB to work you have to specify where the data for InnoDB +tables should be stored by specifying the @code{innodb_data_file_path} +option on the command line or in an MySQL option file. @xref{InnoDB +start}. If you have configured MySQL for InnoDB but you have not +specified the above option, @code{mysqld} will print at start: + +@example +Can't initialize InnoDB as 'innodb_data_file_path' is not set +@end example + InnoDB provides MySQL with a transaction-safe table handler with commit, rollback, and crash recovery capabilities. InnoDB does locking on row level, and also provides an Oracle-style consistent diff --git a/heap/heapdef.h b/heap/heapdef.h index 19c3b7d7792..938cb55c0eb 100644 --- a/heap/heapdef.h +++ b/heap/heapdef.h @@ -34,9 +34,9 @@ if (!(info->update & HA_STATE_AKTIV))\ /* Find pos for record and update it in info->current_ptr */ #define _hp_find_record(info,pos) (info)->current_ptr= _hp_find_block(&(info)->s->block,pos) -typedef struct st_hash_info +typedef struct st_hp_hash_info { - struct st_hash_info *next_key; + struct st_hp_hash_info *next_key; byte *ptr_to_rec; } HASH_INFO; diff --git a/include/global.h b/include/global.h index d6a46e1b187..f10411af0aa 100644 --- a/include/global.h +++ b/include/global.h @@ -644,13 +644,18 @@ typedef off_t os_off_t; #endif #if defined(__WIN__) -#define socket_errno WSAGetLastError() +#define socket_errno WSAGetLastError() +#define SOCKET_EINTR WSAEINTR +#define SOCKET_EAGAIN WSAEINPROGRESS #elif defined(OS2) -#define socket_errno sock_errno() +#define socket_errno sock_errno() #define closesocket(A) soclose(A) -#else +#else /* Unix */ #define socket_errno errno -#define closesocket(A) close(A) +#define closesocket(A) close(A) +#define SOCKET_EINTR EINTR +#define SOCKET_EAGAIN EAGAIN +#define SOCKET_EWOULDBLOCK EWOULDBLOCK #endif typedef uint8 int7; /* Most effective integer 0 <= x <= 127 */ diff --git a/myisam/myisamlog.c b/myisam/myisamlog.c index a6094cfd489..ddfafb91430 100644 --- a/myisam/myisamlog.c +++ b/myisam/myisamlog.c @@ -488,8 +488,7 @@ static int examine_log(my_string file_name, char **table_names) command_name[command], (int) extra_command,result); if (update && curr_file_info && !curr_file_info->closed) { - if (mi_extra(curr_file_info->isam, - (int) extra_command) != (int) result) + if (mi_extra(curr_file_info->isam, extra_command) != (int) result) { fflush(stdout); VOID(fprintf(stderr, diff --git a/sql/mini_client.cc b/sql/mini_client.cc index 88a02e227a3..3a2305aa69c 100644 --- a/sql/mini_client.cc +++ b/sql/mini_client.cc @@ -23,10 +23,23 @@ */ #define DONT_USE_RAID -#if defined(__WIN__) || defined(WIN32) +#if defined(__WIN__) #include <winsock.h> #include <odbcinst.h> +/* Disable alarms */ +typedef my_bool ALARM; +#define thr_alarm_init(A) (*(A))=0 +#define thr_alarm_in_use(A) (*(A)) +#define thr_end_alarm(A) +#define thr_alarm(A,B,C) local_thr_alarm((A),(B),(C)) +inline int local_thr_alarm(my_bool *A,int B __attribute__((unused)),ALARM *C __attribute__((unused))) +{ + *A=1; + return 0; +} +#define thr_got_alarm(A) 0 #endif + #include <global.h> #include <my_sys.h> #include <mysys_err.h> @@ -62,7 +75,7 @@ extern "C" { // Because of SCO 3.2V4.2 #ifdef HAVE_SYS_UN_H # include <sys/un.h> #endif -#if defined(THREAD) && !defined(__WIN__) +#if defined(THREAD) #include <my_pthread.h> /* because of signal() */ #include <thr_alarm.h> #endif @@ -486,9 +499,7 @@ mc_mysql_connect(MYSQL *mysql,const char *host, const char *user, uint pkt_length; NET *net= &mysql->net; thr_alarm_t alarmed; -#if !defined(__WIN__) ALARM alarm_buff; -#endif #ifdef __WIN__ HANDLE hPipe=INVALID_HANDLE_VALUE; diff --git a/sql/sql_repl.cc b/sql/sql_repl.cc index 32c4c5c6509..b9ba284ab27 100644 --- a/sql/sql_repl.cc +++ b/sql/sql_repl.cc @@ -620,6 +620,9 @@ int stop_slave(THD* thd, bool net_report ) #ifdef HAVE_TIMESPEC_TS_SEC abstime.ts_sec=time(NULL)+2; abstime.ts_nsec=0; +#elif defined(__WIN__) + abstime.tv_sec=time((time_t*) 0)+2; + abstime.tv_nsec=0; #else struct timeval tv; gettimeofday(&tv,0); diff --git a/sql/violite.c b/sql/violite.c index aff4224e5a3..0d96c71969c 100644 --- a/sql/violite.c +++ b/sql/violite.c @@ -44,18 +44,10 @@ #endif /* defined(__EMX__) */ #if defined(MSDOS) || defined(__WIN__) -#ifdef __WIN__ -#undef errno -#undef EINTR -#undef EAGAIN -#define errno WSAGetLastError() -#define EINTR WSAEINTR -#define EAGAIN WSAEINPROGRESS -#endif /* __WIN__ */ #define O_NONBLOCK 1 /* For emulation of fcntl() */ #endif #ifndef EWOULDBLOCK -#define EWOULDBLOCK EAGAIN +#define SOCKET_EWOULDBLOCK SOCKET_EAGAIN #endif #ifndef __WIN__ @@ -327,8 +319,8 @@ int vio_keepalive(Vio* vio, my_bool set_keep_alive) my_bool vio_should_retry(Vio * vio __attribute__((unused))) { - int en = errno; - return en == EAGAIN || en == EINTR || en == EWOULDBLOCK; + int en = socket_errno; + return en == SOCKET_EAGAIN || en == SOCKET_EINTR || en == SOCKET_EWOULDBLOCK; } |