diff options
author | unknown <monty@hundin.mysql.fi> | 2001-10-08 04:58:07 +0300 |
---|---|---|
committer | unknown <monty@hundin.mysql.fi> | 2001-10-08 04:58:07 +0300 |
commit | cef1d752497f81229788e56abaf7fa62c1ab31a9 (patch) | |
tree | f8a3cf3164d5a5550378074ac8d3bf4afe105683 /Docs | |
parent | bd7b4aaa7dac716bb6d54b3d1dd355f78b68f0f2 (diff) | |
download | mariadb-git-cef1d752497f81229788e56abaf7fa62c1ab31a9.tar.gz |
Updated manual about embedded version.
Speed up column-completion in 'mysql'
Don't use ISAM if HAVE_ISAM is not defined
A lot of fixes for the embedded version. All libraries are now included in libmysqld.a
Changed arguments to convert_dirname() to make it more general.
Renamed files in the 'merge' directory to all use a common prefix.
Don't compile both assembler and C functions on x86
BitKeeper/deleted/.del-mf_pack2.c~f07795bbcf57be7:
Delete: mysys/mf_pack2.c
Docs/manual.texi:
Updated chapter about embedded version
acinclude.m4:
Fix for using BDB and InnoDB with embedded
client/completion_hash.cc:
Speed up memory allocation
client/completion_hash.h:
Speed up memory allocation
client/mysql.cc:
Speed up memory allocation
client/mysqldump.c:
Fix to use now convert_dirname
client/mysqltest.c:
Fixed memory allocation bugs.
Added --basedir=#, --compress=#, --server-arg, --server-file.
Fixes for embedded version
Changed silent mode to -s instead of -q
include/my_global.h:
Update to use HAVE_ISAM
include/my_sys.h:
Cleanup of fn_format()
include/mysql.h:
Prepare FIELD struct for 4.1
include/mysql_embed.h:
Don't use ISAM in embedded version
innobase/include/srv0srv.h:
Make InnoDB startup/shutdown silent in embedded version
innobase/log/log0log.c:
Make InnoDB startup/shutdown silent in embedded version
innobase/srv/srv0srv.c:
Make InnoDB startup/shutdown silent in embedded version
innobase/srv/srv0start.c:
Make InnoDB startup/shutdown silent in embedded version
isam/isamlog.c:
new convert_dirname
libmysql/libmysql.c:
Prepare for 4.1
libmysqld/Makefile.am:
Changed to create one libmysqld.a file that includes all other libraries.
libmysqld/examples/Makefile.am:
Changed to use new libmysqld.a
libmysqld/examples/test-run:
Lot's of fixes to get new mysqltest with embedded MySQL to work.
libmysqld/lib_sql.cc:
Changed type of arguments for mysql_server_init() to make code more portable.
libmysqld/libmysqld.c:
Cleanup
merge/Makefile.am:
Rename to use common prefix.
merge/mrg_close.c:
Rename to use common prefix.
merge/mrg_create.c:
Rename to use common prefix.
merge/mrg_def.h:
Rename to use common prefix.
merge/mrg_delete.c:
Rename to use common prefix.
merge/mrg_extra.c:
Rename to use common prefix.
merge/mrg_info.c:
Rename to use common prefix.
merge/mrg_locking.c:
Rename to use common prefix.
merge/mrg_open.c:
Rename to use common prefix.
merge/mrg_panic.c:
Rename to use common prefix.
merge/mrg_rrnd.c:
Rename to use common prefix.
merge/mrg_rsame.c:
Rename to use common prefix.
merge/mrg_static.c:
Rename to use common prefix.
merge/mrg_update.c:
Rename to use common prefix.
myisam/myisamlog.c:
Use new convert_dirname
myisammrg/Makefile.am:
Renamed mymrgdef.h -> myrg_def.h
myisammrg/myrg_close.c:
Renamed mymrgdef.h -> myrg_def.h
myisammrg/myrg_create.c:
Renamed mymrgdef.h -> myrg_def.h
myisammrg/myrg_def.h:
Renamed mymrgdef.h -> myrg_def.h
myisammrg/myrg_delete.c:
Renamed mymrgdef.h -> myrg_def.h
myisammrg/myrg_extra.c:
Renamed mymrgdef.h -> myrg_def.h
myisammrg/myrg_info.c:
Renamed mymrgdef.h -> myrg_def.h
myisammrg/myrg_locking.c:
Renamed mymrgdef.h -> myrg_def.h
myisammrg/myrg_open.c:
Renamed mymrgdef.h -> myrg_def.h
myisammrg/myrg_panic.c:
Renamed mymrgdef.h -> myrg_def.h
myisammrg/myrg_queue.c:
Renamed mymrgdef.h -> myrg_def.h
myisammrg/myrg_rfirst.c:
Renamed mymrgdef.h -> myrg_def.h
myisammrg/myrg_rkey.c:
Renamed mymrgdef.h -> myrg_def.h
myisammrg/myrg_rlast.c:
Renamed mymrgdef.h -> myrg_def.h
myisammrg/myrg_rnext.c:
Renamed mymrgdef.h -> myrg_def.h
myisammrg/myrg_rprev.c:
Renamed mymrgdef.h -> myrg_def.h
myisammrg/myrg_rrnd.c:
Renamed mymrgdef.h -> myrg_def.h
myisammrg/myrg_rsame.c:
Renamed mymrgdef.h -> myrg_def.h
myisammrg/myrg_static.c:
Renamed mymrgdef.h -> myrg_def.h
myisammrg/myrg_update.c:
Renamed mymrgdef.h -> myrg_def.h
myisammrg/myrg_write.c:
Renamed mymrgdef.h -> myrg_def.h
mysql-test/include/master-slave.inc:
Use short filenames for sockets (portability problem on Mac OS X)
mysql-test/mysql-test-run.sh:
cleanup
mysql-test/r/auto_increment.result:
Cleanup of tests for embedded version
mysql-test/r/func_system.result:
Cleanup of tests for embedded version
mysql-test/r/isam.result:
Cleanup of tests for embedded version
mysql-test/r/lock.result:
Cleanup of tests for embedded version
mysql-test/r/show_check.result:
Cleanup of tests for embedded version
mysql-test/t/auto_increment.test:
Cleanup of tests for embedded version
mysql-test/t/backup.test:
Cleanup of tests for embedded version
mysql-test/t/count_distinct2-master.opt:
Cleanup of tests for embedded version
mysql-test/t/count_distinct2.test:
Cleanup of tests for embedded version
mysql-test/t/create.test:
Cleanup of tests for embedded version
mysql-test/t/flush.test:
Cleanup of tests for embedded version
mysql-test/t/func_system.test:
Cleanup of tests for embedded version
mysql-test/t/isam.test:
Cleanup of tests for embedded version
mysql-test/t/kill.test:
Cleanup of tests for embedded version
mysql-test/t/lock.test:
Cleanup of tests for embedded version
mysql-test/t/order_fill_sortbuf-master.opt:
Cleanup of tests for embedded version
mysql-test/t/rpl000015.test:
Use short filenames for sockets (portability problem on Mac OS X)
mysql-test/t/rpl000016.test:
Use short filenames for sockets (portability problem on Mac OS X)
mysql-test/t/rpl000017.test:
Use short filenames for sockets (portability problem on Mac OS X)
mysql-test/t/rpl000018.test:
Use short filenames for sockets (portability problem on Mac OS X)
mysql-test/t/show_check.test:
Move ISAM specific tests to isam.test
mysql-test/t/status.test:
Cleanup of tests for embedded version
mysql-test/t/tablelock.test:
Cleanup
mysys/Makefile.am:
Removed not used mf_pack2.c
mysys/charset.c:
new convert_dirname
mysys/default.c:
new convert_dirname
mysys/mf_dirname.c:
Changed convert_dirname() to be more general
mysys/mf_format.c:
Changed bit flags to fn_format() to defines.
Added handling of relative filenames
BitKeeper/etc/ignore:
Added libmysqld/examples/test-gdbinit scripts/mysql_explain_log to the ignore list
mysys/mf_pack.c:
new convert_dirname
mysys/mf_tempfile.c:
new convert_dirname
scripts/Makefile.am:
Adde mysql_explain_log
scripts/mysql_config.sh:
Added support of --libmysqld-libs
sql/Makefile.am:
Fix to use 'innodb_system_libs'
sql/ha_innobase.cc:
Make InnoDB startup/shutdown silent in embedded version
sql/ha_isam.cc:
Added handling of HAVE_ISAM
sql/ha_isammrg.cc:
Added handling of HAVE_ISAM
sql/ha_myisam.cc:
Handle relative paths; Needed to support BACKUP TABLE in embedded version
sql/ha_myisammrg.cc:
Rename of filenames
sql/handler.cc:
Added handling of HAVE_ISAM
sql/item_func.cc:
Fix for ecc (Intel Compiler)
sql/mysql_priv.h:
Added global variable 'mysql_embedded'
sql/mysqld.cc:
Use HAVE_ISAM
sql/sql_parse.cc:
Use new convert_dirname
sql/sql_select.cc:
Fix for ecc (Intel Compiler)
sql/sql_table.cc:
Added handling of relative filenames
strings/Makefile.am:
Don't compile both assembler and C functions on x86
strings/bchange.c:
cleanup
Diffstat (limited to 'Docs')
-rw-r--r-- | Docs/manual.texi | 205 |
1 files changed, 114 insertions, 91 deletions
diff --git a/Docs/manual.texi b/Docs/manual.texi index cc4a33317fa..252ef455230 100644 --- a/Docs/manual.texi +++ b/Docs/manual.texi @@ -34122,10 +34122,12 @@ detect duplicated @code{UNIQUE} keys. @item By using @code{DATA DIRECTORY="directory"} or @code{INDEX DIRECTORY="directory"} you can specify where the table handler should -put it's table and index files. This only works for @code{MyISAM} tables -in @code{MySQL} 4.0, when you are not using the @code{--skip-symlink} -option. @xref{Symbolic links to tables}. +put it's table and index files. Note that the directory should be a full +path to the directory (not relative path). +This only works for @code{MyISAM} tables in @code{MySQL} 4.0, when you +are not using the @code{--skip-symlink} option. @xref{Symbolic links to +tables}. @end itemize @@ -41933,9 +41935,9 @@ You need to use the following functions when you want to create a threaded client. @xref{Threaded clients}. @menu -* my_init:: @code{my_init()} -* mysql_thread_init:: @code{mysql_thread_init()} -* mysql_thread_end:: @code{mysql_thread_end()} +* my_init:: @code{my_init()} +* mysql_thread_init:: @code{mysql_thread_init()} +* mysql_thread_end:: @code{mysql_thread_end()} @end menu @node my_init, mysql_thread_init, C Thread functions, C Thread functions @@ -42012,7 +42014,7 @@ a stand-alone server without modifying any code. @findex @code{mysql_server_init()} -@code{int mysql_server_init(int argc, const char **argv, const char **groups)} +@code{int mysql_server_init(int argc, char **argv, char **groups)} @subsubheading Description @@ -42032,8 +42034,8 @@ command-line arguments for the server. The @code{NULL}-terminated list of strings in @code{groups} selects which groups in the option files will be active. @xref{Option files}. For convenience, @code{groups} may be -@code{NULL}, in which case the @code{[server]} group will be -active. +@code{NULL}, in which case the @code{[server]} and @code{[emedded]} groups +will be active. @subsubheading Example @@ -42047,6 +42049,7 @@ static char *server_args[] = @{ "--set-variable=key_buffer_size=32M" @}; static char *server_groups[] = @{ + "embedded", "server", "this_program_SERVER", (char *)NULL @@ -42379,6 +42382,9 @@ included the thread libraries on the link/compile line. @menu * libmysqld overview:: Overview of the Embedded MySQL Server Library * libmysqld compiling:: Compiling Programs with @code{libmysqld} +* libmysqld restrictions:: +* libmysqld options:: +* libmysqld TODO:: * libmysqld example:: A Simple Embedded Server Example * libmysqld licensing:: Licensing the Embedded Server @end menu @@ -42391,21 +42397,100 @@ full-featured MySQL server inside the client application. The main benefits are increased speed and more simple management for embedded applications. -@node libmysqld compiling, libmysqld example, libmysqld overview, libmysqld -@subsubsection Compiling Programs with @code{libmysqld} +The API is identical for the embedded MySQL version and MySQL +client/server version. To change an old threaded application to use the +embedded library, on normall only have to add calls to the following +functions: + +@multitable @columnfractions .25 .7 +@item @code{mysql_server_init()} @tab Should be called before any other other MySQL function is called, preferably early in the @code{main()} function. +@item @code{mysql_server_end()} @tab Should be called before doing an exit of your program. +@item @code{mysql_thread_init()} @tab Should be called in all threads you are created that will access MySQL. +@item @code{mysql_thread_end()} @tab Should be called before calling @code{pthread_exit()} +@end multitable + +and link your code with @code{libmysqld.a} instead of @code{libmysqlclient.a}. + +The above @code{mysql_server_xxx} functions are also included in +@code{libmysqld.a} to allow you to change between the embedded and the +client/server version by just linking your application with the right +library. @xref{mysql_server_init}. -Currently, all of the support libraries must be explicitly -listed when linking with @code{-lmysqld}. In the future, -@code{mysql_config --libmysqld-libs} will name the libraries to -make this easier. Also, all of the supporting libraries will -probably be incorporated into libmysqld at some time to simplify -this even more. +@node libmysqld compiling, libmysqld restrictions, libmysqld overview, libmysqld +@subsubsection Compiling Programs with @code{libmysqld} + +When you link your program with @code{libmysqld}, you must also include +the system specific @code{pthread} libraries and some libraries that +@code{mysqld} uses. You can get the full list of libraries by executing +@code{mysql_config --libmysqld-libs}. + The correct flags for compiling and linking a threaded program must be used, even if you do not directly call any thread functions in your code. -@node libmysqld example, libmysqld licensing, libmysqld compiling, libmysqld +@node libmysqld restrictions, libmysqld options, libmysqld compiling, libmysqld +@subsubsection Restrictions when using the Embedded MySQL Server + +The embedded server has the following limitations: +(Some of these limitations can be changed by editing the @code{mysql_embed.h} +include files and recompiling MySQL) + +@itemize @bullet +@item +No support for ISAM tables. (This is mainly done to make the library smaller) +@item +No UDF functions. +@item +No stack trace on core dump. +@item +No internal RAID support. +@end itemize + +@node libmysqld options, libmysqld TODO, libmysqld restrictions, libmysqld +@subsubsection Using option files with the embedded server + +The following is the recommended way to use option files to make it easy +to switch between a client/server application and one where MySQL is +embedded. @xref{Option files}. + +@itemize @bullet +@item +Put common options in the @code{[server]} section. These will be read by +both MySQL versions. +@item +Put client/server specific options in the @code{[mysqld]} section. +@item +Put embedded MySQL specific options in the @code{[embedded]} section. +@item +Put application specific options in a @code{[ApplicationName_SERVER]} +section. +@end itemize + +@node libmysqld TODO, libmysqld example, libmysqld options, libmysqld +@subsubsection Things left to do in Embedded Server (TODO) + +@cindex TODO, embedded server + +@itemize @bullet +@item +Currently we only provide a static version of the @code{mysqld} library, +in the future we will also provide a shared library for this. +@item +We are going to provide options to leave out some parts of MySQL to make +the library smaller. +@item +There is still a lot of speed optimization to do. +@item +Errors are written to stderr. We will add an option to specify a +filename for these. +@item +We have to change InnoDB to not be so verbose when using in the embedded +version. +@end itemize + + +@node libmysqld example, libmysqld licensing, libmysqld TODO, libmysqld @subsubsection A Simple Embedded Server Example This example program and makefile should work without any @@ -42449,7 +42534,7 @@ main(int argc, char **argv) /* This must be called before any other mysql functions. * * You can use mysql_server_init(0, NULL, NULL), and it will - * initialize the server using groups = @{ "server", NULL @}. + * initialize the server using groups = @{ "server", "embedded", NULL @}. * * In your $HOME/.my.cnf file, you probably want to put: @@ -42647,79 +42732,9 @@ else LDLIBS += -lpthread endif +# Standard libraries. This example assumes MySQL is in /usr/local/mysql -# Standard libraries - -embed_libs := \ - $m/libmysqld/.libs/libmysqld.a \ - $m/isam/libnisam.a \ - $m/myisam/libmyisam.a \ - $m/heap/libheap.a \ - $m/merge/libmerge.a \ - $m/myisammrg/libmyisammrg.a - - -# Optionally-built libraries - -ifneq (,$(shell test -r $m/innobase/usr/libusr.a && echo "yes")) -embed_libs += \ - $m/innobase/usr/libusr.a \ - $m/innobase/odbc/libodbc.a \ - $m/innobase/srv/libsrv.a \ - $m/innobase/que/libque.a \ - $m/innobase/srv/libsrv.a \ - $m/innobase/dict/libdict.a \ - $m/innobase/ibuf/libibuf.a \ - $m/innobase/row/librow.a \ - $m/innobase/pars/libpars.a \ - $m/innobase/btr/libbtr.a \ - $m/innobase/trx/libtrx.a \ - $m/innobase/read/libread.a \ - $m/innobase/usr/libusr.a \ - $m/innobase/buf/libbuf.a \ - $m/innobase/ibuf/libibuf.a \ - $m/innobase/eval/libeval.a \ - $m/innobase/log/liblog.a \ - $m/innobase/fsp/libfsp.a \ - $m/innobase/fut/libfut.a \ - $m/innobase/fil/libfil.a \ - $m/innobase/lock/liblock.a \ - $m/innobase/mtr/libmtr.a \ - $m/innobase/page/libpage.a \ - $m/innobase/rem/librem.a \ - $m/innobase/thr/libthr.a \ - $m/innobase/com/libcom.a \ - $m/innobase/sync/libsync.a \ - $m/innobase/data/libdata.a \ - $m/innobase/mach/libmach.a \ - $m/innobase/ha/libha.a \ - $m/innobase/dyn/libdyn.a \ - $m/innobase/mem/libmem.a \ - $m/innobase/sync/libsync.a \ - $m/innobase/ut/libut.a \ - $m/innobase/os/libos.a \ - $m/innobase/ut/libut.a -endif - -ifneq (,$(shell test -r $m/bdb/build_unix/libdb.a && echo "yes")) -embed_libs += $m/bdb/build_unix/libdb.a -endif - - -# Support libraries - -embed_libs += \ - $m/mysys/libmysys.a \ - $m/strings/libmystrings.a \ - $m/dbug/libdbug.a \ - $m/regex/libregex.a - - -# Optionally built support libraries - -ifneq (,$(shell test -r $m/readline/libreadline.a && echo "yes")) -embed_libs += $m/readline/libreadline.a -endif +embed_libs := -L/usr/local/mysql/lib/mysql/ -lmysqld # This works for simple one-file test programs sources := $(wildcard *.c) @@ -47449,6 +47464,8 @@ Changed @code{WEEK(#,0)} to match the calender in the USA. @item Speed up all internal list handling. @item +Speed up @code{IS NULL()} and some other internal primitives. +@item Creating full text indexes are now much faster. @item Tree-like cache to speed up bulk inserts and @@ -47496,6 +47513,12 @@ Allow ANSI SQL syntax @code{X'hexadecimal-number'} Cleaned up global lock handling for @code{FLUSH TABLES WITH READ LOCK} @item Fixed problem with @code{DATETIME = constant} in @code{WHERE} optimization. +@item +Added options @code{--master-data} and @code{--no-autocommit} to +@code{mysqldump} (Thanks to Brian Aker for this). +@item +Added script @code{mysql_explain_log.sh} to distribution. +(Thanks to mobile.de). @end itemize |