Below is the list of changes that have just been committed into a local
mysqldoc repository of paul. When paul does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://www.mysql.com/doc/I/n/Installing_source_tree.html
ChangeSet
1.2641 05/03/05 13:47:38 paul@stripped +1 -0
manual.texi:
Fixups.
Docs/manual.texi
1.2460 05/03/05 13:47:27 paul@stripped +16 -25
Fixups.
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: paul
# Host: frost.snake.net
# Root: /Volumes/frost2/MySQL/bk/mysqldoc
--- 1.2459/Docs/manual.texi 2005-03-05 13:04:59 -06:00
+++ 1.2460/Docs/manual.texi 2005-03-05 13:47:27 -06:00
@@ -91873,17 +91873,15 @@
distribution includes a file @file{sql/udf_example.cc} that defines 5 new
functions. Consult this file to see how UDF calling conventions work.
-@c TODO: check if "you can load" should be "you cannot load"...
-
-For @command{mysqld} to be able to use user-defined functions, you should
-configure MySQL with @code{--with-mysqld-ldflags=-rdynamic}. The reason is
-that, on many platforms (including Linux) you can load a dynamic library
-(with @code{dlopen()}) from a static linked program, which you would get if
-you are using @code{--with-mysqld-ldflags=-all-static}. If you want to use
-a UDF that needs to access symbols from @command{mysqld} (like the
-@code{metaphone} example in @file{sql/udf_example.cc} that uses
-@code{default_charset_info}), you must link the program with
-@code{-rdynamic} (see @code{man dlopen}).
+To be able to use UDFs, you need to link @command{mysqld} dynamically.
+Don't configure MySQL using @code{--with-mysqld-ldflags=-all-static}. If
+you want to use a UDF that needs to access symbols from @command{mysqld}
+(for example, the @code{metaphone} function in @file{sql/udf_example.cc}
+that uses @code{default_charset_info}), you must link the program with
+@code{-rdynamic} (see @code{man dlopen}). If you plan to use UDFs, the rule
+of thumb is to configure configure MySQL with
+@code{--with-mysqld-ldflags=-rdynamic} unless you have a very good reason
+not to.
If you to use a precompiled distribution of MySQL, use MySQL-Max, which
contains a dynamically linked server that supports dynamic loading.
@@ -91979,13 +91977,11 @@
Call @code{xxx_deinit()} to let the UDF free any memory it has allocated.
@end enumerate
-@c TODO: Check whether next para also applies to _reset/_clear/_add as
-@c well. (Presumably it does, but they are not mentioned.)
-
All functions must be thread-safe. This includes not just the main function,
-but the initialization and deinitialization functions as well. A consequence
-of this requirement is that you are not allowed to allocate any global or
-static variables that change! If you need memory, you should allocate it in
+but the initialization and deinitialization functions as well, and also the
+additional functions required by aggregate functions. A consequence of this
+requirement is that you are not allowed to allocate any global or static
+variables that change! If you need memory, you should allocate it in
@code{xxx_init()} and free it in @code{xxx_deinit()}.
@@ -92122,9 +92118,6 @@
char *xxx_clear(UDF_INIT *initid, char *is_null, char *error);
@end example
-@c TODO: Following wording doesn't seem correct. is_null doesn't point to 0,
-@c the variable to which is_null points is set to 0?
-
@code{is_null} is set to point to @code{CHAR(0)} before calling
@code{xxx_clear()}.
@@ -92316,11 +92309,9 @@
*length = 13;
@end example
-@c TODO: What is the "calc function". The main xxx() function?
-
-The @code{result} buffer that is passed to the calc function is 255 bytes
-long. If your result fits in this, you don't have to worry about memory
-allocation for results.
+The @code{result} buffer that is passed to the @code{xxx()} function is 255
+bytes long. If your result fits in this, you don't have to worry about
+memory allocation for results.
If your string function needs to return a string longer than 255 bytes,
you must allocate the space for it with @code{malloc()} in your
| Thread |
|---|
| • bk commit - mysqldoc tree (paul:1.2641) | paul | 5 Mar |