Loading Docs/manual.texi +24 −8 Original line number Diff line number Diff line Loading @@ -3368,7 +3368,7 @@ encounter per year, but we are always very flexible towards our customers! * Source install system issues:: System-specific issues * Windows:: Windows notes * OS/2:: OS/2 notes * MySQL binaries:: * MySQL binaries:: MySQL binaries * Post-installation:: Post-installation setup and testing * Upgrade:: Is there anything special to do when upgrading/downgrading @strong{MySQL}? @end menu Loading Loading @@ -6020,9 +6020,14 @@ patch could do - use at your own risk. We have also been told by the Linux kernel developers that this problem is fixed in 2.4, although we have not yet done any testing. We have also tested @strong{MySQL} on Linux 2.4 on a 2 CPU machine and @strong{MySQL} scales MUCH better on this! If your plan to set up a dedicated Linux SMP machine to run @code{MySQL} under heavy, we recommend that you give 2.4 a try! The current implementation of mutex in Linuxthreads is also very bad for programs with many threads that only holds the mutex for a short time. We have made a patch availlable for glibc 2.1, We have made a patch available for glibc 2.1, @uref{http://www.mysql.com/Downloads/Linux/linuxthreads-2.1-patch,linuxthreads-2.1-patch} and for glibc 2.2, @uref{http://www.mysql.com/Downloads/Linux/linuxthreads-2.2-patch,linuxthreads-2.2-patch}. Loading Loading @@ -6376,9 +6381,6 @@ Using @code{gcc-2.9-final}: CFLAGS="-O2" CXX=gcc CXXFLAGS="-O2 -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --enable-assembler --with-mysqld-ldflags=-all-static --disable-shared --with-extra-charsets=complex @end example After this you have to edit @file{config.h} and remove the @code{HAVE_ATOMIC_ADD} line. After @code{make} you will get an error that @code{sql/opt_range.cc} will not compile (internal compiler error). To fix this, go to the sql directory and type @code{make} again. Copy the compile line, but change Loading Loading @@ -7540,6 +7542,7 @@ able to mix @code{INSERT} and @code{SELECT}. Currently we use mutexes to emulate @code{pread()}/@code{pwrite()}. We will in the long run replace the file level interface with a virtual interface so that we can use the @code{readfile()}/@code{writefile()} interface on NT to get more speed. @item Blocking read @strong{MySQL} uses a blocking read for each connection. This means that: Loading @@ -7561,7 +7564,8 @@ If a connection ``hangs,'' it's impossible to break it without killing connections. @end itemize We plan to fix this in the near future. We plan to fix this when our windows developers have figured out a nice workaround for this :) @item UDF functions For the moment, @strong{MySQL}-Windows does not support user definable Loading Loading @@ -8072,6 +8076,19 @@ The expected results are shown in the @file{./tests/auto_increment.res} file. @node mysql_install_db, Starting server, Post-installation, Post-installation @subsection Problems running @code{mysql_install_db} The purpose of the @code{mysql_install_db} script is to generate new @strong{MySQL} privilege tables. It will not affect any other data! It will also not do anything if you have already have MySQL privilege tables installed! If you want to recreate your privilege tables, you should take down the mysqld server, if its running, and then do something like: @example mv mysql-data-directory/mysql mysql-data-directory/mysql-old mysql_install_db @end example This section lists problems you might encounter when you run @code{mysql_install_db}: Loading Loading @@ -8153,7 +8170,6 @@ shell> export TMPDIR MYSQL_UNIX_PORT @file{some_tmp_dir} should be the path to some directory for which you have write permission. @xref{Environment variables}. After this you should be able to run @code{mysql_install_db} and start the server with these commands: Loading Loading @@ -11237,7 +11253,7 @@ shell> mysqladmin -u root password new_password Only user with write/update access to the mysql database can change the password for others user. All normal users (not anonymous ones) can only change his own password with either of the above commands or with @code{SET PASSWORD PASSWORD('new password')} @code{SET PASSWORD=PASSWORD('new password')} Note that if you update the password in the @code{user} table directly using the first method, you must tell the server to reread the grant tables (with include/my_tree.h +1 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,7 @@ void init_tree(TREE *tree,uint default_alloc_size, int element_size, qsort_cmp compare, my_bool with_delete, void (*free_element)(void*)); void delete_tree(TREE*); #define is_tree_inited(tree) ((tree)->root != 0) /* Functions on leafs */ TREE_ELEMENT *tree_insert(TREE *tree,void *key,uint key_size); Loading myisam/ft_parser.c +12 −12 Original line number Diff line number Diff line Loading @@ -86,7 +86,7 @@ FT_WORD * ft_linearize(MI_INFO *info, uint keynr, byte *keybuf, TREE *wtree) tree_walk(wtree,(tree_walk_action)&walk_and_copy,&docstat,left_root_right); } delete_tree(wtree); free(wtree); my_free((char*) wtree,MYF(0)); if (wlist==NULL) return NULL; Loading Loading @@ -144,7 +144,7 @@ TREE * ft_parse(TREE *wtree, byte *doc, int doclen) if (!tree_insert(wtree, &w, 0)) { delete_tree(wtree); free(wtree); my_free((char*) wtree,MYF(0)); return NULL; } } Loading myisam/ft_search.c +11 −9 Original line number Diff line number Diff line Loading @@ -185,7 +185,8 @@ FT_DOCLIST * ft_init_search(void *info, uint keynr, byte *key, left_root_right)) goto err; dlist=(FT_DOCLIST *)my_malloc(sizeof(FT_DOCLIST)+sizeof(FT_DOC)*(aio.dtree.elements_in_tree-1),MYF(0)); dlist=(FT_DOCLIST *) my_malloc(sizeof(FT_DOCLIST)+sizeof(FT_DOC)* (aio.dtree.elements_in_tree-1),MYF(0)); if (!dlist) goto err; Loading @@ -194,7 +195,8 @@ FT_DOCLIST * ft_init_search(void *info, uint keynr, byte *key, dlist->info=aio.info; dptr=dlist->doc; tree_walk(&aio.dtree, (tree_walk_action)&walk_and_copy, &dptr, left_root_right); tree_walk(&aio.dtree, (tree_walk_action)&walk_and_copy, &dptr, left_root_right); if (presort) { Loading @@ -205,7 +207,7 @@ FT_DOCLIST * ft_init_search(void *info, uint keynr, byte *key, aio.info->lastpos=saved_lastpos; delete_tree(&aio.dtree); delete_tree(wtree); free(wtree); my_free((char*) wtree,MYF(0)); return dlist; } Loading myisam/ft_update.c +23 −9 Original line number Diff line number Diff line Loading @@ -29,7 +29,8 @@ /* parses a document i.e. calls _mi_ft_parse for every keyseg */ static FT_WORD * _mi_ft_parserecord(MI_INFO *info, uint keynr, byte *keybuf, const byte *record) static FT_WORD * _mi_ft_parserecord(MI_INFO *info, uint keynr, byte *keybuf, const byte *record) { TREE *parsed=NULL; MI_KEYSEG *keyseg; Loading Loading @@ -150,23 +151,36 @@ int _mi_ft_cmp(MI_INFO *info, uint keynr, const byte *rec1, const byte *rec2) } /* adds a document to the collection */ int _mi_ft_add(MI_INFO *info, uint keynr, byte *keybuf, const byte *record, my_off_t pos) int _mi_ft_add(MI_INFO *info, uint keynr, byte *keybuf, const byte *record, my_off_t pos) { int error= -1; FT_WORD *wlist; if(!(wlist=_mi_ft_parserecord(info, keynr, keybuf, record))) return -1; return _mi_ft_store(info,keynr,keybuf,wlist,pos); if ((wlist=_mi_ft_parserecord(info, keynr, keybuf, record))) { error=_mi_ft_store(info,keynr,keybuf,wlist,pos); my_free((char*) wlist,MYF(0)); } return error; } /* removes a document from the collection */ int _mi_ft_del(MI_INFO *info, uint keynr, byte *keybuf, const byte *record, my_off_t pos) int _mi_ft_del(MI_INFO *info, uint keynr, byte *keybuf, const byte *record, my_off_t pos) { int error= -1; FT_WORD *wlist; if(!(wlist=_mi_ft_parserecord(info, keynr, keybuf, record))) return -1; return _mi_ft_erase(info,keynr,keybuf,wlist,pos); if ((wlist=_mi_ft_parserecord(info, keynr, keybuf, record))) { error=_mi_ft_erase(info,keynr,keybuf,wlist,pos); my_free((char*) wlist,MYF(0)); } return error; } uint _ft_make_key(MI_INFO *info, uint keynr, byte *keybuf, FT_WORD *wptr, my_off_t filepos) uint _ft_make_key(MI_INFO *info, uint keynr, byte *keybuf, FT_WORD *wptr, my_off_t filepos) { byte buf[HA_FT_MAXLEN+16]; Loading Loading
Docs/manual.texi +24 −8 Original line number Diff line number Diff line Loading @@ -3368,7 +3368,7 @@ encounter per year, but we are always very flexible towards our customers! * Source install system issues:: System-specific issues * Windows:: Windows notes * OS/2:: OS/2 notes * MySQL binaries:: * MySQL binaries:: MySQL binaries * Post-installation:: Post-installation setup and testing * Upgrade:: Is there anything special to do when upgrading/downgrading @strong{MySQL}? @end menu Loading Loading @@ -6020,9 +6020,14 @@ patch could do - use at your own risk. We have also been told by the Linux kernel developers that this problem is fixed in 2.4, although we have not yet done any testing. We have also tested @strong{MySQL} on Linux 2.4 on a 2 CPU machine and @strong{MySQL} scales MUCH better on this! If your plan to set up a dedicated Linux SMP machine to run @code{MySQL} under heavy, we recommend that you give 2.4 a try! The current implementation of mutex in Linuxthreads is also very bad for programs with many threads that only holds the mutex for a short time. We have made a patch availlable for glibc 2.1, We have made a patch available for glibc 2.1, @uref{http://www.mysql.com/Downloads/Linux/linuxthreads-2.1-patch,linuxthreads-2.1-patch} and for glibc 2.2, @uref{http://www.mysql.com/Downloads/Linux/linuxthreads-2.2-patch,linuxthreads-2.2-patch}. Loading Loading @@ -6376,9 +6381,6 @@ Using @code{gcc-2.9-final}: CFLAGS="-O2" CXX=gcc CXXFLAGS="-O2 -felide-constructors -fno-exceptions -fno-rtti" ./configure --prefix=/usr/local/mysql --enable-assembler --with-mysqld-ldflags=-all-static --disable-shared --with-extra-charsets=complex @end example After this you have to edit @file{config.h} and remove the @code{HAVE_ATOMIC_ADD} line. After @code{make} you will get an error that @code{sql/opt_range.cc} will not compile (internal compiler error). To fix this, go to the sql directory and type @code{make} again. Copy the compile line, but change Loading Loading @@ -7540,6 +7542,7 @@ able to mix @code{INSERT} and @code{SELECT}. Currently we use mutexes to emulate @code{pread()}/@code{pwrite()}. We will in the long run replace the file level interface with a virtual interface so that we can use the @code{readfile()}/@code{writefile()} interface on NT to get more speed. @item Blocking read @strong{MySQL} uses a blocking read for each connection. This means that: Loading @@ -7561,7 +7564,8 @@ If a connection ``hangs,'' it's impossible to break it without killing connections. @end itemize We plan to fix this in the near future. We plan to fix this when our windows developers have figured out a nice workaround for this :) @item UDF functions For the moment, @strong{MySQL}-Windows does not support user definable Loading Loading @@ -8072,6 +8076,19 @@ The expected results are shown in the @file{./tests/auto_increment.res} file. @node mysql_install_db, Starting server, Post-installation, Post-installation @subsection Problems running @code{mysql_install_db} The purpose of the @code{mysql_install_db} script is to generate new @strong{MySQL} privilege tables. It will not affect any other data! It will also not do anything if you have already have MySQL privilege tables installed! If you want to recreate your privilege tables, you should take down the mysqld server, if its running, and then do something like: @example mv mysql-data-directory/mysql mysql-data-directory/mysql-old mysql_install_db @end example This section lists problems you might encounter when you run @code{mysql_install_db}: Loading Loading @@ -8153,7 +8170,6 @@ shell> export TMPDIR MYSQL_UNIX_PORT @file{some_tmp_dir} should be the path to some directory for which you have write permission. @xref{Environment variables}. After this you should be able to run @code{mysql_install_db} and start the server with these commands: Loading Loading @@ -11237,7 +11253,7 @@ shell> mysqladmin -u root password new_password Only user with write/update access to the mysql database can change the password for others user. All normal users (not anonymous ones) can only change his own password with either of the above commands or with @code{SET PASSWORD PASSWORD('new password')} @code{SET PASSWORD=PASSWORD('new password')} Note that if you update the password in the @code{user} table directly using the first method, you must tell the server to reread the grant tables (with
include/my_tree.h +1 −0 Original line number Diff line number Diff line Loading @@ -61,6 +61,7 @@ void init_tree(TREE *tree,uint default_alloc_size, int element_size, qsort_cmp compare, my_bool with_delete, void (*free_element)(void*)); void delete_tree(TREE*); #define is_tree_inited(tree) ((tree)->root != 0) /* Functions on leafs */ TREE_ELEMENT *tree_insert(TREE *tree,void *key,uint key_size); Loading
myisam/ft_parser.c +12 −12 Original line number Diff line number Diff line Loading @@ -86,7 +86,7 @@ FT_WORD * ft_linearize(MI_INFO *info, uint keynr, byte *keybuf, TREE *wtree) tree_walk(wtree,(tree_walk_action)&walk_and_copy,&docstat,left_root_right); } delete_tree(wtree); free(wtree); my_free((char*) wtree,MYF(0)); if (wlist==NULL) return NULL; Loading Loading @@ -144,7 +144,7 @@ TREE * ft_parse(TREE *wtree, byte *doc, int doclen) if (!tree_insert(wtree, &w, 0)) { delete_tree(wtree); free(wtree); my_free((char*) wtree,MYF(0)); return NULL; } } Loading
myisam/ft_search.c +11 −9 Original line number Diff line number Diff line Loading @@ -185,7 +185,8 @@ FT_DOCLIST * ft_init_search(void *info, uint keynr, byte *key, left_root_right)) goto err; dlist=(FT_DOCLIST *)my_malloc(sizeof(FT_DOCLIST)+sizeof(FT_DOC)*(aio.dtree.elements_in_tree-1),MYF(0)); dlist=(FT_DOCLIST *) my_malloc(sizeof(FT_DOCLIST)+sizeof(FT_DOC)* (aio.dtree.elements_in_tree-1),MYF(0)); if (!dlist) goto err; Loading @@ -194,7 +195,8 @@ FT_DOCLIST * ft_init_search(void *info, uint keynr, byte *key, dlist->info=aio.info; dptr=dlist->doc; tree_walk(&aio.dtree, (tree_walk_action)&walk_and_copy, &dptr, left_root_right); tree_walk(&aio.dtree, (tree_walk_action)&walk_and_copy, &dptr, left_root_right); if (presort) { Loading @@ -205,7 +207,7 @@ FT_DOCLIST * ft_init_search(void *info, uint keynr, byte *key, aio.info->lastpos=saved_lastpos; delete_tree(&aio.dtree); delete_tree(wtree); free(wtree); my_free((char*) wtree,MYF(0)); return dlist; } Loading
myisam/ft_update.c +23 −9 Original line number Diff line number Diff line Loading @@ -29,7 +29,8 @@ /* parses a document i.e. calls _mi_ft_parse for every keyseg */ static FT_WORD * _mi_ft_parserecord(MI_INFO *info, uint keynr, byte *keybuf, const byte *record) static FT_WORD * _mi_ft_parserecord(MI_INFO *info, uint keynr, byte *keybuf, const byte *record) { TREE *parsed=NULL; MI_KEYSEG *keyseg; Loading Loading @@ -150,23 +151,36 @@ int _mi_ft_cmp(MI_INFO *info, uint keynr, const byte *rec1, const byte *rec2) } /* adds a document to the collection */ int _mi_ft_add(MI_INFO *info, uint keynr, byte *keybuf, const byte *record, my_off_t pos) int _mi_ft_add(MI_INFO *info, uint keynr, byte *keybuf, const byte *record, my_off_t pos) { int error= -1; FT_WORD *wlist; if(!(wlist=_mi_ft_parserecord(info, keynr, keybuf, record))) return -1; return _mi_ft_store(info,keynr,keybuf,wlist,pos); if ((wlist=_mi_ft_parserecord(info, keynr, keybuf, record))) { error=_mi_ft_store(info,keynr,keybuf,wlist,pos); my_free((char*) wlist,MYF(0)); } return error; } /* removes a document from the collection */ int _mi_ft_del(MI_INFO *info, uint keynr, byte *keybuf, const byte *record, my_off_t pos) int _mi_ft_del(MI_INFO *info, uint keynr, byte *keybuf, const byte *record, my_off_t pos) { int error= -1; FT_WORD *wlist; if(!(wlist=_mi_ft_parserecord(info, keynr, keybuf, record))) return -1; return _mi_ft_erase(info,keynr,keybuf,wlist,pos); if ((wlist=_mi_ft_parserecord(info, keynr, keybuf, record))) { error=_mi_ft_erase(info,keynr,keybuf,wlist,pos); my_free((char*) wlist,MYF(0)); } return error; } uint _ft_make_key(MI_INFO *info, uint keynr, byte *keybuf, FT_WORD *wptr, my_off_t filepos) uint _ft_make_key(MI_INFO *info, uint keynr, byte *keybuf, FT_WORD *wptr, my_off_t filepos) { byte buf[HA_FT_MAXLEN+16]; Loading