diff options
author | monty@mishka.local <> | 2004-12-22 13:54:39 +0200 |
---|---|---|
committer | monty@mishka.local <> | 2004-12-22 13:54:39 +0200 |
commit | 4f4bbfc279800923299df1fefeb2fcd299fcde90 (patch) | |
tree | 8e5f08b17957f896c2d4e931e60b57d99c260ed6 /sql/udf_example.cc | |
parent | 198dc7a8ec6e220c348bb47e59a2ac7532be18b8 (diff) | |
parent | 98f2a83539735f1a69680195290adcf02861f073 (diff) | |
download | mariadb-git-4f4bbfc279800923299df1fefeb2fcd299fcde90.tar.gz |
Merge with 4.1
Diffstat (limited to 'sql/udf_example.cc')
-rw-r--r-- | sql/udf_example.cc | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sql/udf_example.cc b/sql/udf_example.cc index f0f33ed6fd7..a186b4fbf6c 100644 --- a/sql/udf_example.cc +++ b/sql/udf_example.cc @@ -619,10 +619,12 @@ my_bool sequence_init(UDF_INIT *initid, UDF_ARGS *args, char *message) return 1; } bzero(initid->ptr,sizeof(longlong)); - // Fool MySQL to think that this function is a constant - // This will ensure that MySQL only evalutes the function - // when the rows are sent to the client and not before any ORDER BY - // clauses + /* + Fool MySQL to think that this function is a constant + This will ensure that MySQL only evalutes the function + when the rows are sent to the client and not before any ORDER BY + clauses + */ initid->const_item=1; return 0; } @@ -639,9 +641,10 @@ longlong sequence(UDF_INIT *initid, UDF_ARGS *args, char *is_null, ulonglong val=0; if (args->arg_count) val= *((longlong*) args->args[0]); - return ++ *((longlong*) initid->ptr) + val; + return ++*((longlong*) initid->ptr) + val; } + /**************************************************************************** ** Some functions that handles IP and hostname conversions ** The orignal function was from Zeev Suraski. |