mysql-test/r/func_misc.result:
Move test that requires query cache from main.func_misc to main.query_cache.
mysql-test/r/mysqltest.result:
Fix test failure due to race.
This test case creates > 300 connections in a tight loop, and depending on thread
scheduling and load, even though each connection is immediately disconnected
before connecting the next one, the server max connections may still be exceeded
due to server not being able to free old connections as fast as new ones are made.
mysql-test/r/query_cache.result:
Move test that requires query cache from main.func_misc to main.query_cache.
Move test that requires query cache from main.variables to main.query_cache.
mysql-test/r/query_cache_notembedded.result:
Move test that requires query cache from main.sp_notembedded to main.query_cache_notembedded.
mysql-test/r/sp_notembedded.result:
Move test that requires query cache from main.sp_notembedded to main.query_cache_notembedded.
mysql-test/r/udf.result:
Move test in main.udf that requires query cache to separate file.
mysql-test/r/udf_query_cache.result:
Move test in main.udf that requires query cache to separate file.
mysql-test/r/variables.result:
Move test that requires query cache from main.variables to main.query_cache.
mysql-test/suite/funcs_1/datadict/processlist_val.inc:
Fix race where result file may show state "cleaning up" in the small window
between setting COMMAND to 'Sleep' and clearing STATE.
mysql-test/suite/rpl/r/rpl_temporary.result:
Fix race with suppression of warning message by fixing the test to not generate the
warning message in the first place.
Problem was a race between creating an anonymous account and resetting the slave.
If the slave reset happens before replicating the account, the subsequest deletion
of the account will fail to replicate correctly due to missing row.
mysql-test/suite/rpl/t/rpl_temporary.test:
Fix race with suppression of warning message by fixing the test to not generate the
warning message in the first place.
Problem was a race between creating an anonymous account and resetting the slave.
If the slave reset happens before replicating the account, the subsequest deletion
of the account will fail to replicate correctly due to missing row.
mysql-test/t/func_misc.test:
Move test that requires query cache from main.func_misc to main.query_cache.
Move test that requires query cache from main.variables to main.query_cache.
mysql-test/t/mysqltest.test:
Fix test failure due to race.
This test case creates > 300 connections in a tight loop, and depending on thread
scheduling and load, even though each connection is immediately disconnected
before connecting the next one, the server max connections may still be exceeded
due to server not being able to free old connections as fast as new ones are made.
mysql-test/t/query_cache.test:
Move test that requires query cache to main.query_cache.
mysql-test/t/query_cache_notembedded.test:
Move test that requires query cache from main.sp_notembedded to main.query_cache_notembedded.
mysql-test/t/sp_notembedded.test:
Move test that requires query cache from main.sp_notembedded to main.query_cache_notembedded.
mysql-test/t/udf.test:
Move test in main.udf that requires query cache to separate file.
mysql-test/t/udf_query_cache-master.opt:
Move test in main.udf that requires query cache to separate file.
mysql-test/t/udf_query_cache.test:
Move test in main.udf that requires query cache to separate file.
mysql-test/t/variables.test:
Move test that requires query cache from main.variables to main.query_cache.
tests/mysql_client_test.c:
In tests that require query cache, skip the test if query cache not available.
Do this dynamically rather than using HAVE_QUERY_CACHE, as there is no guarantee
that the server we run against was compiled with same preprocessor #define as
the mysql_client_test program (and since it is trivial to check dynamically).
The parser rule for expressions in a udf parameter list contains
two hacks:
First, the parser input stream is read verbatim, bypassing
the lexer.
Second, the Item::name field is overwritten. If the argument to a
udf was a field, the field's name as seen by name resolution was
overwritten this way.
If the field name was quoted or escaped, it would appear as e.g. "`field`".
Fixed by not overwriting field names.
mysql-test/r/udf.result:
Bug#46259: Test result.
mysql-test/t/udf.test:
Bug#46259: Test case.
sql/sql_yacc.yy:
Bug#46259: Fix.
into magare.gmz:/home/kgeorge/mysql/work/B30355-5.1-opt
include/mysql_com.h:
Auto merged
mysql-test/r/udf.result:
Auto merged
mysql-test/t/udf.test:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/udf_example.c:
Auto merged
There's currently no way of knowing the determinicity of an UDF.
And the optimizer and the sequence() UDFs were making wrong
assumptions about what the is_const member means.
Plus there was no implementation of update_system_tables()
causing the optimizer to overwrite the information returned by
the <udf>_init function.
Fixed by equating the assumptions about the semantics of
is_const and providing a implementation of update_used_tables().
Added a TODO item for the UDF API change needed to make a better
implementation.
include/mysql_com.h:
Bug #30355: comment added
mysql-test/r/udf.result:
Bug #30355: test case
mysql-test/t/udf.test:
Bug #30355: test case
sql/item_func.cc:
Bug #30355: keep const_item_cache and used_tables_cache in sync
sql/item_func.h:
Bug #30355:
- a better implementation of update_used_tables()
- keep const_item_cache and used_tables_cache in sync
sql/udf_example.c:
Bug #30355: Wrong value for const_item fixed.
during udf initialization. The bug is spotted while working on Bug 12713.
If a user-defined function was used in a SELECT statement, and an
error would occur during UDF initialization, this error would not terminate
execution of the SELECT, but rather would be converted to a warning.
The fix is to use a stack buffer to store the message from udf_init instead
of private my_error() buffer.
mysql-test/r/udf.result:
Update the result to reflect the fix for Bug#32007 select udf_function()
doesn't return an error if error during udf initialization
mysql-test/t/udf.test:
Update the test to reflect the fix for Bug #32007 select udf_function()
doesn't return an error if error during udf initialization
sql/item_func.cc:
A fix for Bug#32007.
net.last_error buffer was used to store the temporary message from udf_init.
Then, when my_error() was called, net.last_error was not empty so
my_error() would conclude that there is already an error in the error stack,
and not "overwrite" it.
However, thd->net.report_error was not set, so the the
SELECT was not aborted.
The fix is to use a stack buffer instead of thd->net.last_error
to store the message from udf_init. The message will end up in
thd->net.last_error anyway after a call to my_error.
Previously, UDF *_init functions were passed constant strings with erroneous lengths. The length came from the containing variable's size, not the length of the value itself.
Now the *_init functions get the constant as a null terminated string with the correct length supplied too.
mysql-test/r/udf.result:
Test case to check constants passed UDFs.
mysql-test/t/udf.test:
Test case to check constants passed UDFs.
sql/item_func.cc:
UDF _init functions are now passed the length of the constants, rather than the max length of the var containing the constant.
sql/udf_example.c:
Added check_const_len functions. The check_const_len_init functions checks that lengths of constants are correctly passed.
sql/udf_example.def:
Add new example functions to windows dll export list.
The root cause of the issue was that the CREATE FUNCTION grammar,
for User Defined Functions, was using the sp_name rule.
The sp_name rule is intended for fully qualified stored procedure names,
like either ident.ident, or just ident but with a default database
implicitly selected.
A UDF does not have a fully qualified name, only a name (ident), and should
not use the sp_name grammar fragment during parsing.
The fix is to re-organize the CREATE FUNCTION grammar, to better separate:
- creating UDF (no definer, can have AGGREGATE, simple ident)
- creating Stored Functions (definer, no AGGREGATE, fully qualified name)
With the test case provided, another issue was exposed which is also fixed:
the DROP FUNCTION statement was using sp_name and also failing when no database
is implicitly selected, when droping UDF functions.
The fix is also to change the grammar so that DROP FUNCTION works with
both the ident.ident syntax (to drop a stored function), or just the ident
syntax (to drop either a UDF or a Stored Function, in the current database)
mysql-test/r/sp-error.result:
Adjust test results
mysql-test/r/udf.result:
Adjust test results
mysql-test/t/sp-error.test:
Adjust test results
mysql-test/t/udf.test:
Adjust test results
sql/sql_parse.cc:
CREATE UDF FUNCTION does not use a fully qualified name.
sql/sql_yacc.yy:
Fix grammar for CREATE / DROP FUNCTION, FOR udf
Improve error messages for select no_such_function()
Bug#29816 Syntactically wrong query fails with misleading error message
The core problem is that an SQL-invoked function name can be a <schema
qualified routine name> that contains no <schema name>, but the mysql
parser insists that all stored procedures (function, procedures and
triggers) must have a <schema name>, which is not true for functions.
This problem is especially visible when trying to create a function
or when a query contains a syntax error after a function call (in the
same query), both will fail with a "No database selected" message if
the session is not attached to a particular schema, but the first
one should succeed and the second fail with a "syntax error" message.
Part of the fix is to revamp the sp name handling so that a schema
name may be omitted for functions -- this means that the internal
function name representation may not have a dot, which represents
that the function doesn't have a schema name. The other part is
to place schema checks after the type (function, trigger or procedure)
of the routine is known.
mysql-test/r/sp-error.result:
Add test case result for Bug#29816
mysql-test/r/udf.result:
Add test case result for Bug#28318
mysql-test/t/sp-error.test:
Add test case for Bug#29816
mysql-test/t/udf.test:
Add test case for Bug#28318
sql/sp.cc:
Copy the (last) nul byte of the stored routine key and move name parsing
code to the sp_name class constructor.
sql/sp_head.cc:
Revamp routine name parsing for when no schema is specified and
omit dot from the qualified name if the routine is not associated
with a scheme name.
sql/sp_head.h:
Name parsing got bigger, uninline by moving to a single unit -- the sp_head.cc
file.
sql/sql_yacc.yy:
Only copy the schema name if one is actually set and check for schema
name presence only where it's necessary.
Previously, UDF *_init functions were passed constant strings with erroneous lengths.
The length came from the containing variable's size, not the length of the value itself.
Now the *_init functions get the constant as a null terminated string with the correct
length supplied.
mysql-test/r/udf.result:
Test case to check constants passed UDFs.
mysql-test/t/udf.test:
Test case to check constants passed UDFs.
sql/item_func.cc:
UDF _init functions are now passed the length of the constants, rather than the max
length of the var containing the constant.
sql/udf_example.c:
Added check_const_len functions. The check_const_len_init functions checks that the
lengths of constants are correctly passed.
into damien-katzs-computer.local:/Users/dkatz/mysql51
mysql-test/r/udf.result:
Auto merged
mysql-test/t/udf.test:
Auto merged
sql/sql_yacc.yy:
This line that marks the expression as unsafe for caching now belongs in the create() methods for builder objects inheriting from Create_func.
Fixed runtime to no longer allow the caching of queries with UDF calls.
mysql-test/r/udf.result:
Added a test that turns on caching and checks that querys calling UDFs don't get cached.
mysql-test/t/udf.test:
Added a test that turns on caching and checks that querys calling UDFs don't get cached.
sql/sql_yacc.yy:
Fixed code to set safe_to_cache_query=0 regardless if the function call is a UDF or SP. Where it was placed previously -- at the very end of the else testing for UDFs -- it only executed the statement if the function call was a stored procedure call.
into recycle.(none):/src/bug23491/my51-bug23491
mysql-test/r/information_schema.result:
Auto merged
mysql-test/r/sp-code.result:
Auto merged
mysql-test/r/udf.result:
Auto merged
mysql-test/t/mysqldump.test:
Auto merged
sql/item_func.cc:
Auto merged
sql/sp.cc:
Auto merged
sql/sp_head.h:
Auto merged
mysql-test/r/mysqldump.result:
Manual Merge.
sql/sql_yacc.yy:
Manual Merge.
- mysqldump executes a SHOW CREATE VIEW statement to generate the text
that it outputs. When the function name is retrieved it's database
name is unconditionally prepended. This change causes the function's
database name to be prepended only when it was used to define the
function.
mysql-test/r/information_schema.result:
Bug#23491 MySQLDump prefix function call in a view by database name
- Updated Results.
mysql-test/r/mysqldump.result:
Bug#23491 MySQLDump prefix function call in a view by database name
- Added new results.
mysql-test/r/sp-code.result:
Bug#23491 MySQLDump prefix function call in a view by database name
- Updated Results.
mysql-test/r/udf.result:
Bug#23491 MySQLDump prefix function call in a view by database name
- Updated Results.
mysql-test/t/mysqldump.test:
Bug#23491 MySQLDump prefix function call in a view by database name
- Added new testcase.
sql/item_func.cc:
Bug#23491 MySQLDump prefix function call in a view by database name
- Use new m_explicit_name member when deciding whether or not to prepend
the db name while building the function name.
sql/sp.cc:
Bug#23491 MySQLDump prefix function call in a view by database name
- Use new sp_name constructor.
sql/sp_head.h:
Bug#23491 MySQLDump prefix function call in a view by database name
- Add m_explicit_name member to sp_name object.
- Redefined sp_name constructor to include new member.
sql/sql_yacc.yy:
Bug#23491 MySQLDump prefix function call in a view by database name
- Use new sp_name constructors.
into mysql.com:/home/gluh/MySQL/Merge/5.1-opt
BitKeeper/etc/ignore:
auto-union
mysql-test/r/func_in.result:
Auto merged
mysql-test/r/range.result:
Auto merged
mysql-test/r/sp-code.result:
Auto merged
mysql-test/r/trigger.result:
Auto merged
mysql-test/r/udf.result:
Auto merged
mysql-test/t/func_in.test:
Auto merged
mysql-test/t/range.test:
Auto merged
mysql-test/t/trigger.test:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
mysql-test/r/select.result:
manual merge
mysql-test/r/view.result:
manual merge
mysql-test/t/select.test:
manual merge
mysql-test/t/view.test:
manual merge
into macbook.gmz:/Users/kgeorge/mysql/work/merge-5.1-opt
mysql-test/r/func_in.result:
Auto merged
mysql-test/r/range.result:
Auto merged
mysql-test/r/select.result:
Auto merged
mysql-test/r/sp-code.result:
Auto merged
mysql-test/r/trigger.result:
Auto merged
mysql-test/r/udf.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/func_in.test:
Auto merged
mysql-test/t/func_str.test:
Auto merged
mysql-test/t/range.test:
Auto merged
mysql-test/t/select.test:
Auto merged
mysql-test/t/trigger.test:
Auto merged
mysql-test/t/udf.test:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/opt_range.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_delete.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_union.cc:
Auto merged
sql/sql_update.cc:
Auto merged
mysql-test/r/func_str.result:
merge 5.0-opt -> 5.1-opt
mysql-test/r/group_by.result:
merge 5.0-opt -> 5.1-opt
mysql-test/r/insert.result:
merge 5.0-opt -> 5.1-opt
mysql-test/r/subselect.result:
merge 5.0-opt -> 5.1-opt
mysql-test/t/group_by.test:
merge 5.0-opt -> 5.1-opt
mysql-test/t/insert.test:
merge 5.0-opt -> 5.1-opt
mysql-test/t/subselect.test:
merge 5.0-opt -> 5.1-opt
mysql-test/t/view.test:
merge 5.0-opt -> 5.1-opt
sql/item_cmpfunc.h:
merge 5.0-opt -> 5.1-opt
sql/item_strfunc.h:
merge 5.0-opt -> 5.1-opt
crashes server
Check for null value is reliable only after calling some of the
val_xxx() methods. If the val_xxx() method is not called
the null_value flag will be set only for certain types of NULL
values (like SQL constant NULLs for example).
This caused a crash while trying to dereference a NULL pointer
that is returned by val_str() for NULL values.
Fixed by swapping the order of val_xxx() and null_value check.
mysql-test/r/udf.result:
Bug #25382: Passing NULL to an UDF called from stored procedures
crashes server
- test case
mysql-test/t/udf.test:
Bug #25382: Passing NULL to an UDF called from stored procedures
crashes server
- test case
sql/item_func.cc:
Bug #25382: Passing NULL to an UDF called from stored procedures
crashes server
- reliably check null_value
into siva.hindu.god:/home/tsmith/m/bk/mrg-jan17/maint/51
BUILD/check-cpu:
Auto merged
configure.in:
Auto merged
include/my_global.h:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/sp.result:
Auto merged
mysql-test/r/type_enum.result:
Auto merged
mysql-test/r/udf.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/mysqladmin.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/t/type_enum.test:
Auto merged
mysql-test/t/view.test:
Auto merged
mysys/my_read.c:
Auto merged
scripts/make_binary_distribution.sh:
Auto merged
server-tools/instance-manager/Makefile.am:
Auto merged
sql/event_queue.cc:
Auto merged
sql/field.h:
Auto merged
sql/item_sum.h:
Auto merged
sql/log_event.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/share/errmsg.txt:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/table.cc:
Auto merged
storage/federated/ha_federated.cc:
Auto merged
server-tools/instance-manager/instance.cc:
Use remote (global 5.1 version)
sql/unireg.cc:
Use remote (5.1 global version)
mysql-test/t/trigger.test:
Manual merge
server-tools/instance-manager/guardian.cc:
Manual merge
into macbook.local:/Users/kgeorge/mysql/work/merge-5.1-opt
mysql-test/r/distinct.result:
Auto merged
mysql-test/r/gis-rtree.result:
Auto merged
mysql-test/r/ps.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/r/udf.result:
Auto merged
mysql-test/t/gis-rtree.test:
Auto merged
mysql-test/t/ps.test:
Auto merged
mysql-test/t/subselect.test:
Auto merged
mysql-test/t/udf.test:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/item_subselect.h:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_select.cc:
Auto merged
storage/myisam/mi_check.c:
Auto merged
sql/sql_udf.cc:
SCCS merged
the UDF
When deleting a user defined function MySQL must remove it from both the
in-memory hash table and the mysql.proc system table.
Finding (and removal therefore) from the internal hash table is case
insensitive (or whatever the default charset is), whereas finding and
removal from the system table is case sensitive.
As a result if you supply a function name that is not in the same character
case to DROP FUNCTION the server will remove the function only from the
in-memory hash table and will keep the row in mysql.proc system table.
This will cause inconsistency between the two structures (that is fixed
only by restarting the server).
Fixed by using the name in the precise case (from the in-memory hash table)
to delete the row in the mysql.proc system table.
mysql-test/r/udf.result:
Bug #15439: UDF name case handling forces DELETE FROM mysql.func to remove
the UDF
- test case
mysql-test/t/udf.test:
Bug #15439: UDF name case handling forces DELETE FROM mysql.func to remove
the UDF
- test case
sql/sql_udf.cc:
Bug #15439: UDF name case handling forces DELETE FROM mysql.func to remove
the UDF
- use the exact function name in deleting from mysql.proc.
into neptunus.(none):/home/msvensson/mysql/mysql-5.1-maint
BitKeeper/etc/collapsed:
auto-union
BitKeeper/etc/ignore:
auto-union
Makefile.am:
Auto merged
client/mysql.cc:
Auto merged
client/mysqltest.c:
Auto merged
configure.in:
Auto merged
extra/yassl/taocrypt/include/algebra.hpp:
Auto merged
include/Makefile.am:
Auto merged
include/my_sys.h:
Auto merged
mysql-test/lib/mtr_io.pl:
Auto merged
mysql-test/lib/mtr_process.pl:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/information_schema.result:
Auto merged
mysql-test/r/parser.result:
Auto merged
mysql-test/r/ps.result:
Auto merged
mysql-test/r/view_grant.result:
Auto merged
mysql-test/t/information_schema.test:
Auto merged
mysql-test/t/parser.test:
Auto merged
mysql-test/t/ps.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/t/system_mysql_db_fix30020.test:
Auto merged
mysql-test/t/udf.test:
Auto merged
mysql-test/t/view_grant.test:
Auto merged
scripts/mysql_fix_privilege_tables.sql:
Auto merged
sql/ha_ndbcluster.cc:
Auto merged
sql/handler.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item_create.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sp.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_handler.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql-common/my_time.c:
Auto merged
sql/sql_yacc.yy:
Auto merged
storage/myisam/myisampack.c:
Auto merged
mysql-test/r/sp.result:
Manual merge
mysql-test/r/udf.result:
Manual merge
mysql-test/t/events_bugs.test:
Manual merge
sql/share/errmsg.txt:
Manual merge
support-files/mysql.spec.sh:
Manual merge
Before this fix, a call to a User Defined Function (UDF) could,
under some circumstances, be interpreted as a call to a Stored function
instead. This occurred if a native function was invoked in the parameters
for the UDF, as in "select my_udf(abs(x))".
The root cause of this defect is the introduction, by the fix for Bug 21809,
of st_select_lex::udf_list, and it's usage in the parser in sql_yacc.yy
in the rule function_call_generic (in 5.1).
While the fix itself for Bug 21809 is correct in 5.0, the code change
merged into the 5.1 release created the issue, because the calls in 5.1 to :
- lex->current_select->udf_list.push_front(udf)
- lex->current_select->udf_list.pop()
are not balanced in case of native functions, causing the udf_list,
which is really a stack, to be out of sync with the internal stack
maintained by the bison parser.
Instead of moving the call to udf_list.pop(), which would have fixed the
symptom, this patch goes further and removes the need for udf_list.
This is motivated by two reasons:
a) Maintaining a stack in the MySQL code in sync with the stack maintained
internally in sql_yacc.cc (not .yy) is extremely dependent of the
implementation of yacc/bison, and extremely difficult to maintain.
It's also totally dependent of the structure of the grammar, and has a risk
to break with regression defects each time the grammar itself is changed.
b) The previous code did report construct like "foo(expr AS name)" as
syntax errors (ER_PARSER_ERROR), which is incorrect, and misleading.
The syntax is perfectly valid, as this expression is valid when "foo" is
a UDF. Whether this syntax is legal or not depends of the semantic of "foo".
With this change:
a) There is only one stack (in bison), and no List<udf_func> to maintain.
b) "foo(expr AS name)", when used incorrectly, is reported as semantic error:
- ER_WRONG_PARAMETERS_TO_NATIVE_FCT (for native functions)
- ER_WRONG_PARAMETERS_TO_STORED_FCT (for stored functions)
This is achieved by the changes implemented in item_create.cc
mysql-test/r/parser.result:
New tests
mysql-test/r/udf.result:
New tests
mysql-test/t/parser.test:
New tests
mysql-test/t/udf.test:
New tests
sql/item_create.cc:
Semantic checks for named parameters, as in "foo(expr AS name)".
sql/share/errmsg.txt:
New error message
sql/sql_lex.cc:
Remove usage of udf_list.
sql/sql_lex.h:
Remove usage of udf_list.
sql/sql_yacc.yy:
Remove usage of udf_list.
into bodhi.local:/opt/local/work/mysql-5.1-runtime-merge
libmysql/libmysql.c:
Auto merged
libmysqld/lib_sql.cc:
Auto merged
mysql-test/r/udf.result:
Auto merged
mysql-test/t/udf.test:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/item_sum.cc:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_yacc.yy:
Auto merged
into shellback.(none):/home/msvensson/mysql/mysql-5.1-maint
BitKeeper/etc/ignore:
auto-union
Makefile.am:
Auto merged
client/mysql.cc:
Auto merged
client/mysql_upgrade.c:
Auto merged
client/mysqltest.c:
Auto merged
extra/yassl/src/ssl.cpp:
Auto merged
mysql-test/lib/mtr_report.pl:
Auto merged
mysql-test/mysql-test-run-shell.sh:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/query_cache.result:
Auto merged
mysql-test/r/udf.result:
Auto merged
mysql-test/t/alter_table.test:
Auto merged
mysql-test/t/disabled.def:
Auto merged
mysql-test/t/limit.test:
Auto merged
mysql-test/t/mysql.test:
Auto merged
mysql-test/t/mysqldump.test:
Auto merged
mysql-test/t/query_cache.test:
Auto merged
mysql-test/t/system_mysql_db_fix30020.test:
Auto merged
mysql-test/t/udf.test:
Auto merged
mysql-test/t/view_grant.test:
Auto merged
mysys/Makefile.am:
Auto merged
scripts/mysql_fix_privilege_tables.sql:
Auto merged
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_handler.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql-common/my_time.c:
Auto merged
sql/sql_table.cc:
Auto merged
extra/yassl/taocrypt/include/algebra.hpp:
Remove fix as it conflicts with "import from yassl" and it's been
fixed there
sql/ha_ndbcluster.cc:
Merge fix of warnings
sql/sql_base.cc:
Merge
into neptunus.(none):/home/msvensson/mysql/mysql-5.0-maint
BitKeeper/etc/collapsed:
auto-union
BitKeeper/etc/ignore:
auto-union
Makefile.am:
Auto merged
client/mysqltest.c:
Auto merged
mysql-test/lib/mtr_report.pl:
Auto merged
mysql-test/mysql-test-run.pl:
Auto merged
mysql-test/r/rpl_deadlock.result:
Auto merged
mysql-test/r/udf.result:
Auto merged
mysql-test/t/limit.test:
Auto merged
mysql-test/t/mysql.test:
Auto merged
mysql-test/t/rpl_deadlock.test:
Auto merged
mysql-test/t/udf.test:
Auto merged
mysql-test/mysql-test-run-shell.sh:
Auto merged
mysql-test/t/view_grant.test:
Auto merged
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/mysqld.cc:
Auto merged
sql-common/my_time.c:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_table.cc:
Auto merged
include/my_sys.h:
Manual merge, my_getpagesize broken out of "#ifdef HAVE_SYS_MMAN_H"
Bug#21025 (misleading error message when creating functions named 'x', or 'y')
Bug#22619 (Spaces considered harmful)
This change contains a fix to report warnings or errors, and multiple tests
cases.
Before this fix, name collisions between:
- Native functions
- User Defined Functions
- Stored Functions
were not systematically reported, leading to confusing behavior.
I) Native / User Defined Function
Before this fix, is was possible to create a UDF named "foo", with the same
name as a native function "foo", but it was impossible to invoke the UDF,
since the syntax "foo()" always refer to the native function.
After this fix, creating a UDF fails with an error if there is a name
collision with a native function.
II) Native / Stored Function
Before this fix, is was possible to create a SF named "db.foo", with the same
name as a native function "foo", but this was confusing since the syntax
"foo()" would refer to the native function. To refer to the Stored Function,
the user had to use the "db.foo()" syntax.
After this fix, creating a Stored Function reports a warning if there is a
name collision with a native function.
III) User Defined Function / Stored Function
Before this fix, creating a User Defined Function "foo" and a Stored Function
"db.foo" are mutually exclusive operations. Whenever the second function is
created, an error is reported. However, the test suite did not cover this
behavior.
After this fix, the behavior is unchanged, and is now covered by test cases.
Note that the code change in this patch depends on the fix for Bug 21114.
mysql-test/r/sp.result:
New test cases.
mysql-test/r/udf.result:
New test cases.
mysql-test/t/sp.test:
New test cases.
mysql-test/t/udf.test:
New test cases.
sql/sql_lex.cc:
Name collisions with native functions.
sql/sql_lex.h:
Name collisions with native functions.
sql/sql_yacc.yy:
Name collisions with native functions.
sql/share/errmsg.txt:
Name collisions with native functions.
mysql-test/r/sp_gis.result:
New test cases.
mysql-test/t/sp_gis.test:
New test cases.
into zippy.cornsilk.net:/home/cmiller/work/mysql/bug18761/my51-bug18761
BitKeeper/etc/collapsed:
auto-union
mysql-test/r/udf.result:
Auto merged
mysql-test/t/udf.test:
Auto merged
sql/item_func.cc:
Auto merged
sql/udf_example.c:
Auto merged
The code that set up data to be passed to user-defined functions was very
old and analyzed the "Type" of the data that was passed into the UDF, when
it really should analyze the "return_type", which is hard-coded for simple
Items and works correctly for complex ones like functions.
---
Added test at Sergei's behest.
mysql-test/r/udf.result:
Verify that various arguments work.
---
Added test at Sergei's behest.
mysql-test/t/udf.test:
Verify that various arguments work.
---
Added test at Sergei's behest.
sql/item_func.cc:
For function-Items, test whether it is constant and set the struct members
for the UDF parameter appropriately.
Replace tabs with spaces in affected code.
sql/udf_example.c:
Include a simple function that is useful in testing.
into mysql.com:/home/hf/work/mysql-5.1.clean
include/my_time.h:
Auto merged
mysql-test/r/func_group.result:
Auto merged
mysql-test/r/gis-rtree.result:
Auto merged
mysql-test/r/order_by.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/r/type_datetime.result:
Auto merged
mysql-test/r/udf.result:
Auto merged
mysql-test/t/func_group.test:
Auto merged
mysql-test/t/gis-rtree.test:
Auto merged
mysql-test/t/type_datetime.test:
Auto merged
mysql-test/t/udf.test:
Auto merged
sql/field.cc:
Auto merged
sql/field.h:
Auto merged
sql/filesort.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/item_subselect.h:
Auto merged
sql/item_sum.cc:
Auto merged
sql/item_sum.h:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/my_decimal.cc:
Auto merged
sql/my_decimal.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/records.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_select.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_table.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql-common/my_time.c:
Auto merged
sql/table.cc:
Auto merged
sql/table.h:
Auto merged
mysql-test/r/type_newdecimal.result:
SCCS merged
mysql-test/t/type_newdecimal.test:
merging
sql/item.cc:
merging
sql/item_subselect.cc:
SCCS merged
sql/item_timefunc.h:
merging
sql/sql_lex.cc:
SCCS merged
sql/sql_select.h:
merging
select OK.
The SQL parser was using Item::name to transfer user defined function attributes
to the user defined function (udf). It was not distinguishing between user defined
function call arguments and stored procedure call arguments. Setting Item::name
was causing Item_ref::print() method to print the argument as quoted identifiers
and caused views that reference aggregate functions as udf call arguments (and
rely on Item::print() for the text of the view to store) to throw an undefined
identifier error.
Overloaded Item_ref::print to print aggregate functions as such when printing
the references to aggregate functions taken out of context by split_sum_func2()
Fixed the parser to properly detect using AS clause in stored procedure arguments
as an error.
Fixed printing the arguments of udf call to print properly the udf attribute.
mysql-test/r/udf.result:
Bug #21809: Error 1356 while selecting from view with grouping though underlying
select OK.
- test cases
mysql-test/t/udf.test:
Bug #21809: Error 1356 while selecting from view with grouping though underlying
select OK.
- test cases
sql/item.cc:
Bug #21809: Error 1356 while selecting from view with grouping though underlying
select OK.
- Don't print the refs to SUM functions as refs.
sql/item_func.cc:
Bug #21809: Error 1356 while selecting from view with grouping though underlying
select OK.
- print the aliases in the udf calls
sql/item_func.h:
Bug #21809: Error 1356 while selecting from view with grouping though underlying
select OK.
- print the aliases in the udf calls
sql/sql_lex.cc:
Bug #21809: Error 1356 while selecting from view with grouping though underlying
select OK.
- disable aliases for arguments in stored routine calls
sql/sql_lex.h:
Bug #21809: Error 1356 while selecting from view with grouping though underlying
select OK.
- disable aliases for arguments in stored routine calls
sql/sql_yacc.yy:
Bug #21809: Error 1356 while selecting from view with grouping though underlying
select OK.
- disable aliases for arguments in stored routine calls
- fix bison duplicate symbol warnings
into bodhi.local:/opt/local/work/mysql-5.1-runtime-merge
BitKeeper/etc/ignore:
auto-union
BitKeeper/deleted/.del-im_options_set.result~59278f56be61d921:
Auto merged
BitKeeper/deleted/.del-mysqld.dsp~ffdbf2d234e23e56:
Auto merged
BitKeeper/deleted/.del-mysys.dsp~32695fee91189326:
Auto merged
BitKeeper/deleted/.del-im_options_set.imtest~b53d9d60e5684833:
Auto merged
BitKeeper/deleted/.del-im_options_unset.imtest~768eb186b51d0048:
Auto merged
BitKeeper/deleted/.del-im_options_unset.result~20a4790cd3c70a4f:
Auto merged
client/mysql.cc:
Auto merged
client/mysqlbinlog.cc:
Auto merged
client/mysqlcheck.c:
Auto merged
client/mysqldump.c:
Auto merged
client/mysqltest.c:
Auto merged
dbug/dbug.c:
Auto merged
extra/perror.c:
Auto merged
extra/yassl/src/yassl_imp.cpp:
Auto merged
extra/yassl/src/yassl_int.cpp:
Auto merged
include/mysql.h:
Auto merged
include/mysql_com.h:
Auto merged
libmysql/libmysql.c:
Auto merged
mysql-test/r/cast.result:
Auto merged
mysql-test/r/date_formats.result:
Auto merged
mysql-test/r/federated.result:
Auto merged
mysql-test/r/func_compress.result:
Auto merged
mysql-test/r/func_group.result:
Auto merged
mysql-test/r/func_time.result:
Auto merged
mysql-test/r/gis-rtree.result:
Auto merged
mysql-test/r/gis.result:
Auto merged
mysql-test/r/im_daemon_life_cycle.result:
Auto merged
mysql-test/r/im_utils.result:
Auto merged
mysql-test/r/join_outer.result:
Auto merged
mysql-test/r/mysqlcheck.result:
Auto merged
mysql-test/r/rpl_sp.result:
Auto merged
mysql-test/r/rpl_trigger.result:
Auto merged
mysql-test/r/sp-code.result:
Auto merged
mysql-test/r/sp-security.result:
Auto merged
mysql-test/r/strict.result:
Auto merged
mysql-test/r/type_blob.result:
Auto merged
mysql-test/r/type_datetime.result:
Auto merged
mysql-test/r/type_ranges.result:
Auto merged
mysql-test/r/udf.result:
Auto merged
mysql-test/r/user_var.result:
Auto merged
mysql-test/t/cast.test:
Auto merged
mysql-test/t/disabled.def:
Auto merged
mysql-test/t/func_group.test:
Auto merged
mysql-test/t/func_time.test:
Auto merged
mysql-test/t/im_daemon_life_cycle.imtest:
Auto merged
mysql-test/t/im_life_cycle.imtest:
Auto merged
mysql-test/t/im_utils.imtest:
Auto merged
mysql-test/t/mysql.test:
Auto merged
mysql-test/t/mysqlbinlog.test:
Auto merged
mysql-test/t/mysqlcheck.test:
Auto merged
mysql-test/t/ps.test:
Auto merged
mysql-test/t/rpl_trigger.test:
Auto merged
mysql-test/t/sp-security.test:
Auto merged
mysql-test/t/strict.test:
Auto merged
mysql-test/t/udf.test:
Auto merged
sql/field.cc:
Auto merged
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_strfunc.h:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/item_sum.h:
Auto merged
sql/item_timefunc.cc:
Auto merged
sql/mysqld.cc:
Auto merged
sql/protocol.cc:
Auto merged
sql/slave.cc:
Auto merged
sql/sp.cc:
Auto merged
sql/sp_head.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.h:
Auto merged
sql/sql_lex.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_prepare.cc:
Auto merged
sql/sql_udf.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/table.cc:
Auto merged
sql-common/client.c:
Auto merged
sql-common/my_time.c:
Auto merged
sql/table.h:
Auto merged
storage/ndb/src/kernel/error/ndbd_exit_codes.c:
Auto merged
storage/ndb/src/mgmsrv/ConfigInfo.cpp:
Auto merged
mysql-test/r/im_life_cycle.result:
e
use local
mysql-test/r/ps.result:
use local
client/Makefile.am:
Manual merge.
client/mysqlimport.c:
Manual merge.
configure.in:
Manual merge.
mysql-test/mysql-test-run.pl:
Manual merge.
mysql-test/r/mysqldump.result:
Manual merge.
mysql-test/r/mysqltest.result:
Manual merge.
mysql-test/r/ndb_basic.result:
Manual merge.
mysql-test/r/rpl_view.result:
Manual merge.
mysql-test/r/show_check.result:
Manual merge.
mysql-test/r/sp-error.result:
Manual merge.
mysql-test/r/sp.result:
Manual merge.
mysql-test/r/union.result:
Manual merge.
mysql-test/t/mysqldump.test:
Manual merge.
mysql-test/t/mysqltest.test:
Manual merge.
mysql-test/t/ndb_basic.test:
Manual merge.
mysql-test/t/rpl_sp.test:
Manual merge.
mysql-test/t/rpl_view.test:
Manual merge.
mysql-test/t/show_check.test:
Manual merge.
mysql-test/t/sp-error.test:
Manual merge.
mysql-test/t/sp.test:
Manual merge.
sql/item_sum.cc:
Manual merge.
sql/mysql_priv.h:
Manual merge.
sql/sp_head.cc:
Manual merge.
sql/sql_db.cc:
Manual merge.
sql/sql_delete.cc:
Manual merge.
sql/sql_lex.h:
Manual merge.
sql/sql_show.cc:
Manual merge.
sql/sql_table.cc:
Manual merge.
sql/sql_trigger.cc:
Manual merge.
sql/sql_yacc.yy:
Manual merge.
tests/mysql_client_test.c:
Manual merge.
into bodhi.local:/opt/local/work/mysql-5.0-runtime-merge
sql/item.cc:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/mysql_priv.h:
Auto merged
sql/sql_lex.h:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_view.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/table.h:
Auto merged
mysql-test/r/sp.result:
Manual merge.
mysql-test/r/udf.result:
Manual merge.
mysql-test/t/sp.test:
Manual merge.
mysql-test/t/udf.test:
Manual merge.
The problem was that the grammar allows to create a function with an optional
definer clause, and define it as a UDF with the SONAME keyword.
Such combination should be reported as an error.
The solution is to not change the grammar itself, and to introduce a
specific check in the yacc actions in 'create_function_tail' for UDF,
that now reports ER_WRONG_USAGE when using both DEFINER and SONAME.
mysql-test/r/udf.result:
Added tests for Bug#21269 (DEFINER-clause is allowed for UDF-functions)
mysql-test/t/udf.test:
Added tests for Bug#21269 (DEFINER-clause is allowed for UDF-functions)
sql/sql_yacc.yy:
Creating a UDF function with a DEFINER clause is now a syntax error.
into sunlight.local:/local_work/tmp_merge-5.1-opt-mysql
client/mysql.cc:
Auto merged
mysql-test/r/date_formats.result:
Auto merged
mysql-test/r/func_gconcat.result:
Auto merged
mysql-test/r/func_group.result:
Auto merged
mysql-test/r/func_str.result:
Auto merged
mysql-test/r/group_min_max.result:
Auto merged
BitKeeper/deleted/.del-make_win_src_distribution.sh~f80d8fca44e4e5f1:
Auto merged
BitKeeper/deleted/.del-mysqld.dsp~ffdbf2d234e23e56:
Auto merged
BitKeeper/deleted/.del-mysqld_ia64.dsp~7f8cf84d81ee04e2:
Auto merged
BitKeeper/deleted/.del-mysqldump.dsp~a8bd23547d3fc27e:
Auto merged
BitKeeper/deleted/.del-mysqldump_ia64.dsp~a2aabe898be35b31:
Auto merged
mysql-test/r/innodb.result:
Auto merged
mysql-test/r/innodb_mysql.result:
Auto merged
mysql-test/r/ps_7ndb.result:
Auto merged
mysql-test/r/type_ranges.result:
Auto merged
mysql-test/r/udf.result:
Auto merged
mysql-test/r/union.result:
Auto merged
mysql-test/r/view.result:
Auto merged
mysql-test/t/date_formats.test:
Auto merged
mysql-test/t/func_gconcat.test:
Auto merged
mysql-test/t/func_group.test:
Auto merged
mysql-test/t/group_min_max.test:
Auto merged
mysql-test/t/innodb.test:
Auto merged
mysql-test/t/innodb_mysql.test:
Auto merged
mysql-test/t/mysql.test:
Auto merged
mysql-test/t/select.test:
Auto merged
mysql-test/t/sp.test:
Auto merged
mysql-test/t/view.test:
Auto merged
sql/field.cc:
Auto merged
sql/item_cmpfunc.cc:
Auto merged
sql/item_cmpfunc.h:
Auto merged
sql/item_func.cc:
Auto merged
sql/item_func.h:
Auto merged
sql/item_strfunc.cc:
Auto merged
sql/item_subselect.cc:
Auto merged
sql/item_subselect.h:
Auto merged
sql/opt_range.h:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_class.cc:
Auto merged
sql/sql_insert.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
sql/sql_show.cc:
Auto merged
sql/sql_yacc.yy:
Auto merged
sql/time.cc:
Auto merged
storage/ndb/test/ndbapi/Makefile.am:
Auto merged
strings/decimal.c:
Auto merged
mysql-test/r/analyse.result:
Manual merge
mysql-test/r/bigint.result:
Manual merge
mysql-test/r/create.result:
Manual merge
mysql-test/r/information_schema.result:
Manual merge
mysql-test/r/ps_2myisam.result:
Manual merge
mysql-test/r/ps_3innodb.result:
Manual merge
mysql-test/r/ps_4heap.result:
Manual merge
mysql-test/r/ps_5merge.result:
Manual merge
mysql-test/r/ps_6bdb.result:
Manual merge
mysql-test/r/rpl_insert_id.result:
Manual merge
mysql-test/r/select.result:
Manual merge
mysql-test/r/sp.result:
Manual merge
mysql-test/r/subselect.result:
Manual merge
mysql-test/t/information_schema.test:
Manual merge
mysql-test/t/rpl_insert_id.test:
Manual merge
sql/field.h:
Manual merge
sql/item.cc:
Manual merge
sql/item.h:
Manual merge
sql/item_strfunc.h:
Manual merge
sql/item_sum.cc:
Manual merge
sql/mysql_priv.h:
Manual merge
sql/share/errmsg.txt:
Manual merge
sql/sql_class.h:
Manual merge
sql/sql_select.cc:
Manual merge
When there is no index defined filesort is used to sort the result of a
query. If there is a function in the select list and the result set should be
ordered by it's value then this function will be evaluated twice. First time to
get the value of the sort key and second time to send its value to a user.
This happens because filesort when sorts a table remembers only values of its
fields but not values of functions.
All functions are affected. But taking into account that SP and UDF functions
can be both expensive and non-deterministic a temporary table should be used
to store their results and then sort it to avoid twice SP evaluation and to
get a correct result.
If an expression referenced in an ORDER clause contains a SP or UDF
function, force the use of a temporary table.
A new Item_processor function called func_type_checker_processor is added
to check whether the expression contains a function of a particular type.
mysql-test/t/udf.test:
Added test case for bug#19862: Sort with filesort by function evaluates function twice
mysql-test/t/sp.test:
Added test case for bug#19862: Sort with filesort by function evaluates function twice
mysql-test/r/sp.result:
Added test case for bug#19862: Sort with filesort by function evaluates function twice
mysql-test/r/udf.result:
Added test case for bug#19862: Sort with filesort by function evaluates function twice
sql/sql_select.cc:
Fixed bug#19862: Sort with filesort by function evaluates function twice
If an expression referenced in an ORDER clause contains a SP or UDF
function, force the use of a temporary table.
sql/item_func.h:
Fixed bug#19862: Sort with filesort by function evaluates function twice
A new Item_processor function called func_type_checker_processor is added
to check whether the expression contains a function of a particular type.
sql/item.h:
Fixed bug#19862: Sort with filesort by function evaluates function twice
A new Item_processor function called func_type_checker_processor is added
to check whether the expression contains a function of a particular type.
sql/item_func.cc:
Fixed bug#19862: Sort with filesort by function evaluates function twice
A new Item_processor function called func_type_checker_processor is added
to check whether the expression contains a function of a particular type.
into zippy.(none):/home/cmiller/work/mysql/merge/mysql-5.1
BitKeeper/etc/ignore:
auto-union
client/mysqldump.c:
Auto merged
mysql-test/r/bdb.result:
Auto merged
mysql-test/r/type_timestamp.result:
Auto merged
mysql-test/r/udf.result:
Auto merged
mysql-test/t/bdb.test:
Auto merged
mysql-test/t/type_timestamp.test:
Auto merged
mysys/my_lib.c:
Auto merged
sql/log_event.cc:
Auto merged
sql/log_event.h:
Auto merged
sql/table.cc:
Auto merged
mysql-test/r/func_time.result:
manual merge
mysql-test/r/mysqldump.result:
manual merge
mysql-test/t/func_time.test:
manual merge
mysql-test/t/mysqldump.test:
manual merge
sql/log.cc:
manual merge
sql/sp_head.cc:
manual merge
sql/sql_table.cc:
manual merge
The is_null value was initialized once and thereafter only set to indicate
NULL, and never unset to indicate not-NULL.
Now set is_null to false, in addition to only setting it to true when the value
in question is null.
mysql-test/r/udf.result:
Add result.
mysql-test/t/udf.test:
Add test.
sql/sql_udf.h:
Initialize is_null to false before trying to use it, so that historical NULLs
don't affect our operation.
into mysql.com:/home/jimw/my/mysql-5.1-clean
BitKeeper/etc/ignore:
auto-union
BitKeeper/deleted/.del-mysql_upgrade.dsp:
Delete: VC++Files/client/mysql_upgrade.dsp
BitKeeper/deleted/.del-mysql_upgrade_ia64.dsp:
Delete: VC++Files/client/mysql_upgrade_ia64.dsp
BitKeeper/deleted/.del-mysql_upgrade.c:
Delete: client/mysql_upgrade.c
VC++Files/mysql.dsw:
Auto merged
VC++Files/mysql.sln:
Auto merged
VC++Files/mysql_ia64.dsw:
Auto merged
client/mysql.cc:
Auto merged
config/ac-macros/zlib.m4:
Auto merged
configure.in:
Auto merged
extra/yassl/Makefile.am:
Auto merged
extra/yassl/taocrypt/Makefile.am:
Auto merged
include/my_global.h:
Auto merged
include/mysql.h:
Auto merged
libmysql/libmysql.def:
Auto merged
libmysqld/libmysqld.def:
Auto merged
mysql-test/r/grant2.result:
Auto merged
mysql-test/r/sp-security.result:
Auto merged
mysql-test/r/subselect.result:
Auto merged
mysql-test/r/trigger.result:
Auto merged
mysql-test/r/udf.result:
Auto merged
mysql-test/t/grant2.test:
Auto merged
mysql-test/t/rpl_openssl.test:
Auto merged
mysql-test/t/rpl_rotate_logs.test:
Auto merged
mysql-test/t/sp-security.test:
Auto merged
mysql-test/t/trigger.test:
Auto merged
sql/item.cc:
Auto merged
sql/item.h:
Auto merged
sql/item_subselect.cc:
Auto merged
sql-common/client.c:
Auto merged
sql/mysqld.cc:
Auto merged
sql/sql_base.cc:
Auto merged
sql/sql_parse.cc:
Auto merged
client/Makefile.am:
Resolve conflict
config/ac-macros/yassl.m4:
Resolve conflict
mysql-test/include/have_udf.inc:
Resolve conflict
mysql-test/lib/mtr_process.pl:
Resolve conflict
mysql-test/mysql-test-run.pl:
Resolve conflict
mysql-test/r/have_udf.require:
Resolve conflict
mysql-test/r/rpl_openssl.result:
Resolve conflict
mysql-test/t/disabled.def:
Resolve conflict
mysql-test/t/information_schema.test:
Resolve conflict
server-tools/instance-manager/instance_options.cc:
Resolve conflict
sql/mysql_priv.h:
Resolve conflict
sql/set_var.cc:
Resolve conflict
support-files/mysql.spec.sh:
Resolve conflict
Then check in have_udf if that variable is set. Finally use tahe variable when loading the shared library.
mysql-test/include/have_udf.inc:
Add check if udf_example.so(or similar) is available
mysql-test/lib/mtr_misc.pl:
Add funcion "mtr_file_exist" to search for files
mysql-test/mysql-test-run.pl:
Add checks to find the udf_example.so library
mysql-test/r/udf.result:
Update result
mysql-test/t/disabled.def:
Remove udf.test from disabled tests
mysql-test/t/udf.test:
Use variable UDF_EXAMPLE_LIB when looking for shared library to load
mysql-test/r/have_udf_example.require:
New BitKeeper file ``mysql-test/r/have_udf_example.require''
- Update for 5.1
- Add "have_dlopen"
- Remove requirement to load udf's only in "opt_plugin_dir"
include/my_global.h:
Remove duplicate defines
mysql-test/include/have_udf.inc:
Use "have_dlopen" to check if we "have udf"
mysql-test/r/have_udf.require:
Use "have_dlopen" to check if we "have udf"
mysql-test/r/udf.result:
Update for new error message "function"->"symbol"
sql/item_func.cc:
Remove "evil" dbug printour that checks args[0] even if arg_count is 0
sql/mysql_priv.h:
Add "have_dlopen"
sql/mysqld.cc:
Add "have_dlopen"
Move HAVE_DLOPEN defined to only surround "udf_free" and "udf_init"
sql/set_var.cc:
Add "have_dlopen"
sql/sql_plugin.cc:
Surround 'dlclose' with HAVE_DLOPEN
sql/sql_udf.cc:
Remove the requirement to load udf's only from "opt_plugin_dir".
Fix spelling error
Remove STANDARD define when compile udf_example.so
mysql-test/r/udf.result:
Update results
mysql-test/t/udf.test:
Update test try to create, use and drop a non existing function
Disable the result from "reverse_lookup" as it is config dependent
sql/Makefile.am:
Remove the "STANDARD" define when compiling udf_example.so
- Update of test toolsand Makefiles to make it possible to test always test udf's as part
of the mysql test suite
mysql-test/mysql-test-run.pl:
Add the path where mysqld will udf_example.so used by the udf test
mysql-test/r/udf.result:
Update test results
mysql-test/t/udf.test:
Update tests
The "--error 0" directives should actually be changed to the correct error number returned but that error number is lost. W e do however get the right error message and that is checked in
the .result file.
sql/Makefile.am:
Build shared library udf_example.so
sql/share/errmsg.txt:
Update the max length of %s string from 64 to 128
sql/sql_udf.cc:
Add DBUG_PRINT just before dl_open
sql/udf_example.cc:
Use isalpha instade of my_isalpha
- Pass "buffers[i]" to val_str() in udf_handler::fix_fields insteead of NULL.
- Add testcase for UDF that will load and run the udf_example functions
if available
sql/item_func.cc:
Instead of passing a NULL pointer into val_str, use the "buffers" array to provide a temp string buffer.
sql/udf_example.cc:
Spelling error"on"->"one"
mysql-test/include/have_udf.inc:
New BitKeeper file ``mysql-test/include/have_udf.inc''
mysql-test/r/have_udf.require:
New BitKeeper file ``mysql-test/r/have_udf.require''
mysql-test/r/udf.result:
New BitKeeper file ``mysql-test/r/udf.result''
mysql-test/t/udf.test:
New BitKeeper file ``mysql-test/t/udf.test''