double
longlong Item_func_newname::val_int()
String
If you inherit your object from any of the standard items (like Item_num_func), you probably only
have to define one of these functions and let the parent object take care of the other functions. For
example, the
returned by ::str().
5. If the function is nondeterministic, include the following statement in the item constructor to indicate
that function results should not be cached:
current_thd->lex->safe_to_cache_query=0;
A function is nondeterministic if, given fixed values for its arguments, it can return different results
for different invocations.
6. You should probably also define the following object function:
void Item_func_newname::fix_length_and_dec()
This function should at least calculate
is the maximum number of characters the function may return. This function should also set
maybe_null = 0
any of the function arguments can return
Look at
All functions must be thread-safe. In other words, do not use any global or static variables in the
functions without protecting them with mutexes.
If you want to return
to 1 and return 0.
For
::str()
• The
String *str
information about the
• The
::str()
NULL.
• All current string functions try to avoid allocating any memory unless absolutely necessary!
21.3. Debugging and Porting MySQL
This appendix helps you port MySQL to other operating systems. Do check the list of currently
supported operating systems first. See
Community
here and on our Web site (http://www.mysql.com/), recommending it to other users.
A working POSIX thread library is needed for the server.
Both the server and the client need a working C++ compiler. We use
compilers that are known to work are Sun Studio, HP-UX aCC, IBM AIX xlC_r), Intel ecc/icc. With
previous versions on the respective platforms, we also used Irix
Debugging and Porting MySQL
Item_func_newname::val()
*Item_func_newname::Str(String *str)
Item_str_func
if the main function can't return a
Item_func_mod::fix_length_and_dec
from ::val(), ::val_int(), or ::str(), you should set
NULL
object functions, there are additional considerations to be aware of:
argument provides a string buffer that may be used to hold the result. (For more
type, take a look at the
String
function should return the string that holds the result, or
Server". If you have created a new port of MySQL, please let us know so that we can list it
Note
If you create a new port of MySQL, you are free to copy and distribute it under
the GPL license, but it does not make you a copyright holder of MySQL.
class defines a
val()
based on the given arguments.
max_length
NULL
by checking the arguments'
NULL
for a typical example of how to do this.
sql_string.h
Section 2.4.2, "Operating Systems Supported by MySQL
2820
function that executes
value. The function can check whether
maybe_null
file.)
(char*) 0
on many platforms. Other
gcc
and Compaq cxx.
cc
on the value
atof()
max_length
variable.
null_value
if the result is
Need help?
Do you have a question about the 5.0 and is the answer not in the manual?
Questions and answers