Chapter 13: Extending MySQL
849
If this fails, then you should configure MySQL with --with-debug and run mysql-test-run with the --debug option.
If this also fails send the trace file
`var/tmp/master.trace' to ftp://support.mysql.com/pub/mysql/secret so that we can examine it. Please remember to also include a full description of your system, the version of the mysqld binary and how you compiled it.
7 Try also to run mysql-test-run with the --force option to see if there is any other
test that fails.
7 If you have compiled MySQL yourself, check our manual for how to compile MySQL
on your platform or, preferable, use one of the binaries we have compiled for you at http://www.mysql.com/downloads/. All our standard binaries should pass the test suite !
7 If you get an error, like Result length mismatch or Result content mismatch it
means that the output of the test didn't match exactly the expected output. This could be a bug in MySQL or that your mysqld version produces slight different results under some circumstances. Failed test results are put in a file with the same base name as the result file with the .reject extension. If your test case is failing, you should do a diff on the two files. If you cannot see how they are different, examine both with od -c and also check their lengths.
7 If a test fails totally, you should check the logs file in the mysql-test/var/log directory
for hints of what went wrong.
7 If you have compiled MySQL with debugging you can try to debug this by running
mysql-test-run with the --gdb and/or --debug options. See Section E.1.2 [Making trace files], page 1026. If you have not compiled MySQL for debugging you should probably do that. Just specify the --with-debug options to configure! See Section 2.3 [Installing source], page 89.
13.2 Adding New Functions to MySQL
There are two ways to add new functions to MySQL:
7 You can add the function through the user-definable function (UDF) interface. User-
definable functions are added and removed dynamically using the CREATE FUNCTION and DROP FUNCTION statements. See Section 13.2.1 [CREATE FUNCTION], page 850.
7 You can add the function as a native (built in) MySQL function. Native functions are
compiled into the mysqld server and become available on a permanent basis.
Each method has advantages and disadvantages:
7 If you write a user-definable function, you must install the object file in addition to the
server itself. If you compile your function into the server, you don't need to do that.
7 You can add UDFs to a binary MySQL distribution. Native functions require you to
modify a source distribution.
7 If you upgrade your MySQL distribution, you can continue to use your previously
installed UDFs. For native functions, you must repeat your modifications each time you upgrade.
|
manual-639.html
manual-640.html
|