Below is the list of changes that have just been committed into a local
5.0 repository of msvensson. When msvensson 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://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet
1.2106 06/04/28 11:37:20 msvensson@shellback.(none) +3 -0
Fix small bug in udf_example.cc, it was processing one char too much and thus returning junk
Add more DBUG_PRINT's in udf_handler::val_str
Enable udf.test
sql/udf_example.cc
1.24 06/04/28 11:37:14 msvensson@shellback.(none) +1 -1
Bug fix, break for loop when "n < n_end"
sql/item_func.cc
1.283 06/04/28 11:37:14 msvensson@shellback.(none) +10 -5
Add DBUG_ printouts for easier debugging of installed udf's
mysql-test/t/disabled.def
1.31 06/04/28 11:37:14 msvensson@shellback.(none) +0 -1
Enable udf.test
# 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: msvensson
# Host: shellback.(none)
# Root: /home/msvensson/mysql/mysql-5.0-maint
--- 1.282/sql/item_func.cc 2006-04-26 20:38:46 +02:00
+++ 1.283/sql/item_func.cc 2006-04-28 11:37:14 +02:00
@@ -2734,9 +2734,10 @@
{
uchar is_null_tmp=0;
ulong res_length;
+ DBUG_ENTER("udf_handler::val_str");
if (get_arguments())
- return 0;
+ DBUG_RETURN(0);
char * (*func)(UDF_INIT *, UDF_ARGS *, char *, ulong *, uchar *, uchar *)=
(char* (*)(UDF_INIT *, UDF_ARGS *, char *, ulong *, uchar *, uchar *))
u_d->func;
@@ -2746,22 +2747,26 @@
if (str->alloc(MAX_FIELD_WIDTH))
{
error=1;
- return 0;
+ DBUG_RETURN(0);
}
}
char *res=func(&initid, &f_args, (char*) str->ptr(), &res_length,
&is_null_tmp, &error);
+ DBUG_PRINT("info", ("udf func returned, res_length: %lu", res_length));
if (is_null_tmp || !res || error) // The !res is for safety
{
- return 0;
+ DBUG_PRINT("info", ("Null or error"));
+ DBUG_RETURN(0);
}
if (res == str->ptr())
{
str->length(res_length);
- return str;
+ DBUG_PRINT("exit", ("str: %s", str->ptr()));
+ DBUG_RETURN(str);
}
save_str->set(res, res_length, str->charset());
- return save_str;
+ DBUG_PRINT("exit", ("save_str: %s", save_str->ptr()));
+ DBUG_RETURN(save_str);
}
--- 1.23/sql/udf_example.cc 2006-04-05 11:20:04 +02:00
+++ 1.24/sql/udf_example.cc 2006-04-28 11:37:14 +02:00
@@ -344,7 +344,7 @@
KSflag = 0; /* state flag for KS translation */
for (metaph_end = result + MAXMETAPH, n_start = n;
- n <= n_end && result < metaph_end; n++ )
+ n < n_end && result < metaph_end; n++ )
{
if ( KSflag )
--- 1.30/mysql-test/t/disabled.def 2006-04-27 22:30:08 +02:00
+++ 1.31/mysql-test/t/disabled.def 2006-04-28 11:37:14 +02:00
@@ -11,4 +11,3 @@
##############################################################################
ndb_load : Bug#17233
-udf : Not yet
| Thread |
|---|
| • bk commit into 5.0 tree (msvensson:1.2106) | msvensson | 28 Apr |