Loading Docs/manual.texi +30 −5 Original line number Diff line number Diff line Loading @@ -677,6 +677,7 @@ MySQL ODBC Support Using MySQL with Some Common Programs * Apache:: Using @strong{MySQL} with Apache * Borland C++:: Problems and Common Errors Loading Loading @@ -18682,7 +18683,7 @@ TRUNCATE table_name Is in 3.23 and the same thing as @code{DELETE FROM table_name}. @xref{DELETE}. The differences are: @table @bullet @itemize @bullet @item Implemented as a drop and re-create of the table, which makes this much faster when deleting many rows. Loading @@ -18695,7 +18696,7 @@ Doesn't return the number of deleted rows. As long as the table definition file @file{table_name.frm} is valid, the table can be re-created this way, even if the data or index files have become corrupted. @end table @end itemize @findex SELECT @node SELECT, JOIN, TRUNCATE, Reference Loading Loading @@ -32332,10 +32333,11 @@ likely it is that we can fix the problem! @menu * Apache:: Using @strong{MySQL} with Apache * Borland C++:: @end menu @cindex Apache @node Apache, , Common programs, Common programs @node Apache, Borland C++, Common programs, Common programs @section Using MySQL with Apache The contrib section includes programs that let you authenticate your Loading @@ -32358,6 +32360,29 @@ LOAD DATA INFILE '/local/access_log' INTO TABLE table_name FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' ESCAPED BY '\\' @end example @cindex Borland C++ compiler @node Borland C++, , Apache, Common programs @section Borland C++ You can compile the @strong{MySQL} windows source with Borland C++ 5.02. (The windows source includes only projects for Microsoft VC++, for Borland C++ you have to do the project files yourself). One known problem with Borland C++ is that it uses a different structure alignment than VC++. This means that you will run into problems if you try to use the default @code{libmysql.dll} libraries (that was compiled with VC++) with Borland C++. You can do one of the following to avoid this problem. @itemize @bullet @item You can use the static @strong{MySQL} libraries for Borland C++ that you can find on @uref{http://www.mysql.net/downloads/os-win32.html}. @item Only call @code{mysql_init()} with @code{NULL} as an argument, not a pre-allocated MYSQL struct. @end itemize @cindex problems, common errors @cindex errors, common @node Problems, Common problems, Common programs, Top Loading Loading @@ -37108,7 +37133,7 @@ This will create a thread-safe client library @code{libmysqlclient_r}. connection. You can let two threads share the same connection as long as you do the following: @table @bullet @itemize @bullet @item Two threads can't send a query to the @strong{MySQL} at the same time on the same connection. In particular, you have to ensure that between a Loading @@ -37132,7 +37157,7 @@ threads may query the same connection. If you program with POSIX threads, you can use @code{pthread_mutex_lock()} and @code{pthread_mutex_unlock()} to establish and release a mutex lock. @end table @end itemize You may get some errors because of undefined symbols when linking your client with @code{mysqlclient_r}. In most cases this is because you haven't myisam/mi_open.c +16 −7 Original line number Diff line number Diff line Loading @@ -185,6 +185,22 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags) HA_ERR_CRASHED_ON_REPAIR : HA_ERR_CRASHED_ON_USAGE); goto err; } /* sanity check */ if (share->base.keystart > 65535 || share->base.rec_reflength > 8) { my_errno=HA_ERR_CRASHED; goto err; } if (share->base.max_key_length > MI_MAX_KEY_BUFF || keys > MI_MAX_KEY || key_parts >= MI_MAX_KEY * MI_MAX_KEY_SEG) { DBUG_PRINT("error",("Wrong key info: Max_key_length: %d keys: %d key_parts: %d", share->base.max_key_length, keys, key_parts)); my_errno=HA_ERR_UNSUPPORTED; goto err; } /* Correct max_file_length based on length of sizeof_t */ max_data_file_length= (share->options & (HA_OPTION_PACK_RECORD | HA_OPTION_COMPRESS_RECORD)) ? Loading Loading @@ -220,13 +236,6 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags) share->base.max_data_file_length=(my_off_t) max_data_file_length; share->base.max_key_file_length=(my_off_t) max_key_file_length; if (share->base.max_key_length > MI_MAX_KEY_BUFF || keys > MI_MAX_KEY || key_parts >= MI_MAX_KEY * MI_MAX_KEY_SEG) { DBUG_PRINT("error",("Wrong key info: Max_key_length: %d keys: %d key_parts: %d", share->base.max_key_length, keys, key_parts)); my_errno=HA_ERR_UNSUPPORTED; goto err; } if (share->options & HA_OPTION_COMPRESS_RECORD) share->base.max_key_length+=2; /* For safety */ Loading myisam/myisamchk.c +7 −4 Original line number Diff line number Diff line Loading @@ -200,7 +200,7 @@ static struct option long_options[] = static void print_version(void) { printf("%s Ver 1.40 for %s at %s\n",my_progname,SYSTEM_TYPE, printf("%s Ver 1.41 for %s at %s\n",my_progname,SYSTEM_TYPE, MACHINE_TYPE); } Loading Loading @@ -506,6 +506,8 @@ static int myisamchk(MI_CHECK *param, my_string filename) param->error_printed=1; switch (my_errno) { case HA_ERR_CRASHED: mi_check_print_error(param,"'%s' doesn't have a correct index definition. You need to recreate it before you can do a repair",filename); break; case HA_ERR_WRONG_TABLE_DEF: mi_check_print_error(param,"'%s' is not a MyISAM-table",filename); break; Loading Loading @@ -1205,6 +1207,7 @@ static int mi_sort_records(MI_CHECK *param, param->temp_filename); goto err; } if (share->pack.header_length) if (filecopy(param,new_file,info->dfile,0L,share->pack.header_length, "datafile-header")) goto err; Loading mysys/my_chsize.c +5 −2 Original line number Diff line number Diff line Loading @@ -44,8 +44,8 @@ int my_chsize(File fd, my_off_t newlength, myf MyFlags) my_off_t oldsize; char buff[IO_SIZE]; bzero(buff,IO_SIZE); oldsize = my_seek(fd, 0L, MY_SEEK_END, MYF(MY_WME+MY_FAE)); DBUG_PRINT("info",("old_size: %ld", (ulong) oldsize)); #ifdef HAVE_FTRUNCATE if (oldsize > newlength) Loading @@ -64,9 +64,12 @@ int my_chsize(File fd, my_off_t newlength, myf MyFlags) if (oldsize > newlength) { /* Fill diff with null */ VOID(my_seek(fd, newlength, MY_SEEK_SET, MYF(MY_WME+MY_FAE))); swap(long, newlength, oldsize); swap(my_off_t, newlength, oldsize); } #endif /* Full file with 0 until it's as big as requested */ bzero(buff,IO_SIZE); my_seek(fd, old_length, MY_SEEK_SET, MYF(MY_WME+MY_FAE)); while (newlength-oldsize > IO_SIZE) { if (my_write(fd,(byte*) buff,IO_SIZE,MYF(MY_NABP))) Loading mysys/my_seek.c +2 −2 Original line number Diff line number Diff line Loading @@ -24,8 +24,8 @@ my_off_t my_seek(File fd, my_off_t pos, int whence, myf MyFlags) { reg1 os_off_t newpos; DBUG_ENTER("my_seek"); DBUG_PRINT("my",("Fd: %d Pos: %lu Whence: %d MyFlags: %d", fd, (ulong) pos, whence, MyFlags)); DBUG_PRINT("my",("Fd: %d Hpos: %lu Pos: %lu Whence: %d MyFlags: %d", fd, ((ulonglong) pos) >> 32, (ulong) pos, whence, MyFlags)); newpos=lseek(fd, pos, whence); if (newpos == (os_off_t) -1) { Loading Loading
Docs/manual.texi +30 −5 Original line number Diff line number Diff line Loading @@ -677,6 +677,7 @@ MySQL ODBC Support Using MySQL with Some Common Programs * Apache:: Using @strong{MySQL} with Apache * Borland C++:: Problems and Common Errors Loading Loading @@ -18682,7 +18683,7 @@ TRUNCATE table_name Is in 3.23 and the same thing as @code{DELETE FROM table_name}. @xref{DELETE}. The differences are: @table @bullet @itemize @bullet @item Implemented as a drop and re-create of the table, which makes this much faster when deleting many rows. Loading @@ -18695,7 +18696,7 @@ Doesn't return the number of deleted rows. As long as the table definition file @file{table_name.frm} is valid, the table can be re-created this way, even if the data or index files have become corrupted. @end table @end itemize @findex SELECT @node SELECT, JOIN, TRUNCATE, Reference Loading Loading @@ -32332,10 +32333,11 @@ likely it is that we can fix the problem! @menu * Apache:: Using @strong{MySQL} with Apache * Borland C++:: @end menu @cindex Apache @node Apache, , Common programs, Common programs @node Apache, Borland C++, Common programs, Common programs @section Using MySQL with Apache The contrib section includes programs that let you authenticate your Loading @@ -32358,6 +32360,29 @@ LOAD DATA INFILE '/local/access_log' INTO TABLE table_name FIELDS TERMINATED BY ',' OPTIONALLY ENCLOSED BY '"' ESCAPED BY '\\' @end example @cindex Borland C++ compiler @node Borland C++, , Apache, Common programs @section Borland C++ You can compile the @strong{MySQL} windows source with Borland C++ 5.02. (The windows source includes only projects for Microsoft VC++, for Borland C++ you have to do the project files yourself). One known problem with Borland C++ is that it uses a different structure alignment than VC++. This means that you will run into problems if you try to use the default @code{libmysql.dll} libraries (that was compiled with VC++) with Borland C++. You can do one of the following to avoid this problem. @itemize @bullet @item You can use the static @strong{MySQL} libraries for Borland C++ that you can find on @uref{http://www.mysql.net/downloads/os-win32.html}. @item Only call @code{mysql_init()} with @code{NULL} as an argument, not a pre-allocated MYSQL struct. @end itemize @cindex problems, common errors @cindex errors, common @node Problems, Common problems, Common programs, Top Loading Loading @@ -37108,7 +37133,7 @@ This will create a thread-safe client library @code{libmysqlclient_r}. connection. You can let two threads share the same connection as long as you do the following: @table @bullet @itemize @bullet @item Two threads can't send a query to the @strong{MySQL} at the same time on the same connection. In particular, you have to ensure that between a Loading @@ -37132,7 +37157,7 @@ threads may query the same connection. If you program with POSIX threads, you can use @code{pthread_mutex_lock()} and @code{pthread_mutex_unlock()} to establish and release a mutex lock. @end table @end itemize You may get some errors because of undefined symbols when linking your client with @code{mysqlclient_r}. In most cases this is because you haven't
myisam/mi_open.c +16 −7 Original line number Diff line number Diff line Loading @@ -185,6 +185,22 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags) HA_ERR_CRASHED_ON_REPAIR : HA_ERR_CRASHED_ON_USAGE); goto err; } /* sanity check */ if (share->base.keystart > 65535 || share->base.rec_reflength > 8) { my_errno=HA_ERR_CRASHED; goto err; } if (share->base.max_key_length > MI_MAX_KEY_BUFF || keys > MI_MAX_KEY || key_parts >= MI_MAX_KEY * MI_MAX_KEY_SEG) { DBUG_PRINT("error",("Wrong key info: Max_key_length: %d keys: %d key_parts: %d", share->base.max_key_length, keys, key_parts)); my_errno=HA_ERR_UNSUPPORTED; goto err; } /* Correct max_file_length based on length of sizeof_t */ max_data_file_length= (share->options & (HA_OPTION_PACK_RECORD | HA_OPTION_COMPRESS_RECORD)) ? Loading Loading @@ -220,13 +236,6 @@ MI_INFO *mi_open(const char *name, int mode, uint open_flags) share->base.max_data_file_length=(my_off_t) max_data_file_length; share->base.max_key_file_length=(my_off_t) max_key_file_length; if (share->base.max_key_length > MI_MAX_KEY_BUFF || keys > MI_MAX_KEY || key_parts >= MI_MAX_KEY * MI_MAX_KEY_SEG) { DBUG_PRINT("error",("Wrong key info: Max_key_length: %d keys: %d key_parts: %d", share->base.max_key_length, keys, key_parts)); my_errno=HA_ERR_UNSUPPORTED; goto err; } if (share->options & HA_OPTION_COMPRESS_RECORD) share->base.max_key_length+=2; /* For safety */ Loading
myisam/myisamchk.c +7 −4 Original line number Diff line number Diff line Loading @@ -200,7 +200,7 @@ static struct option long_options[] = static void print_version(void) { printf("%s Ver 1.40 for %s at %s\n",my_progname,SYSTEM_TYPE, printf("%s Ver 1.41 for %s at %s\n",my_progname,SYSTEM_TYPE, MACHINE_TYPE); } Loading Loading @@ -506,6 +506,8 @@ static int myisamchk(MI_CHECK *param, my_string filename) param->error_printed=1; switch (my_errno) { case HA_ERR_CRASHED: mi_check_print_error(param,"'%s' doesn't have a correct index definition. You need to recreate it before you can do a repair",filename); break; case HA_ERR_WRONG_TABLE_DEF: mi_check_print_error(param,"'%s' is not a MyISAM-table",filename); break; Loading Loading @@ -1205,6 +1207,7 @@ static int mi_sort_records(MI_CHECK *param, param->temp_filename); goto err; } if (share->pack.header_length) if (filecopy(param,new_file,info->dfile,0L,share->pack.header_length, "datafile-header")) goto err; Loading
mysys/my_chsize.c +5 −2 Original line number Diff line number Diff line Loading @@ -44,8 +44,8 @@ int my_chsize(File fd, my_off_t newlength, myf MyFlags) my_off_t oldsize; char buff[IO_SIZE]; bzero(buff,IO_SIZE); oldsize = my_seek(fd, 0L, MY_SEEK_END, MYF(MY_WME+MY_FAE)); DBUG_PRINT("info",("old_size: %ld", (ulong) oldsize)); #ifdef HAVE_FTRUNCATE if (oldsize > newlength) Loading @@ -64,9 +64,12 @@ int my_chsize(File fd, my_off_t newlength, myf MyFlags) if (oldsize > newlength) { /* Fill diff with null */ VOID(my_seek(fd, newlength, MY_SEEK_SET, MYF(MY_WME+MY_FAE))); swap(long, newlength, oldsize); swap(my_off_t, newlength, oldsize); } #endif /* Full file with 0 until it's as big as requested */ bzero(buff,IO_SIZE); my_seek(fd, old_length, MY_SEEK_SET, MYF(MY_WME+MY_FAE)); while (newlength-oldsize > IO_SIZE) { if (my_write(fd,(byte*) buff,IO_SIZE,MYF(MY_NABP))) Loading
mysys/my_seek.c +2 −2 Original line number Diff line number Diff line Loading @@ -24,8 +24,8 @@ my_off_t my_seek(File fd, my_off_t pos, int whence, myf MyFlags) { reg1 os_off_t newpos; DBUG_ENTER("my_seek"); DBUG_PRINT("my",("Fd: %d Pos: %lu Whence: %d MyFlags: %d", fd, (ulong) pos, whence, MyFlags)); DBUG_PRINT("my",("Fd: %d Hpos: %lu Pos: %lu Whence: %d MyFlags: %d", fd, ((ulonglong) pos) >> 32, (ulong) pos, whence, MyFlags)); newpos=lseek(fd, pos, whence); if (newpos == (os_off_t) -1) { Loading