From 5535fa96fbbee28558bb2fccbc8eecf4872b37ff Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 9 Dec 2004 12:47:20 +0200 Subject: Ensure that we free memory used with --order-by-primary (in mysqldump) Simple, non critical, fix to mysql_fix_privilege_tables client/mysqldump.c: Ensure that we free memory used with --order-by-primary mysql-test/t/system_mysql_db_fix.test: Remove warnings when compiled with support for ISAM scripts/mysql_fix_privilege_tables.sh: Ensure that 'my_print_defaults' is called correctly sql/set_var.cc: Code style cleanups sql/sql_db.cc: Fixed comments sql/udf_example.cc: Fixed comments --- sql/udf_example.cc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'sql/udf_example.cc') diff --git a/sql/udf_example.cc b/sql/udf_example.cc index 7e2ee9113b2..50de0f187fe 100644 --- a/sql/udf_example.cc +++ b/sql/udf_example.cc @@ -615,10 +615,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; } @@ -635,9 +637,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. -- cgit v1.2.1