summaryrefslogtreecommitdiff
path: root/sql/udf_example.cc
diff options
context:
space:
mode:
authorunknown <msvensson@neptunus.(none)>2006-03-10 10:42:42 +0100
committerunknown <msvensson@neptunus.(none)>2006-03-10 10:42:42 +0100
commit26acf8d722c07908486b364b174dbd831aa49eb8 (patch)
treee6e1b13035c2bd4eec01948bbbc419dc0197ce66 /sql/udf_example.cc
parentd1f1c383c651a9affd6eb6d456ad9c392e458ce5 (diff)
parente52ff5557cbf67e678fc0e429b338dee73e7b241 (diff)
downloadmariadb-git-26acf8d722c07908486b364b174dbd831aa49eb8.tar.gz
Merge msvensson@devsrv-b:/space/magnus/bug17261/my50-bug17261
into neptunus.(none):/home/msvensson/mysql/bug11835/my50-bug11835 sql/share/errmsg.txt: Auto merged sql/udf_example.cc: Auto merged
Diffstat (limited to 'sql/udf_example.cc')
-rw-r--r--sql/udf_example.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/sql/udf_example.cc b/sql/udf_example.cc
index c94af5cd6ee..e6d272d9085 100644
--- a/sql/udf_example.cc
+++ b/sql/udf_example.cc
@@ -113,6 +113,8 @@
*/
#ifdef STANDARD
+/* STANDARD is defined, don't use any mysql functions */
+#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#ifdef __WIN__
@@ -125,10 +127,10 @@ typedef long long longlong;
#else
#include <my_global.h>
#include <my_sys.h>
+#include <m_string.h> // To get strmov()
#endif
#include <mysql.h>
-#include <m_ctype.h>
-#include <m_string.h> // To get strmov()
+#include <ctype.h>
static pthread_mutex_t LOCK_hostname;
@@ -290,8 +292,8 @@ char *metaphon(UDF_INIT *initid, UDF_ARGS *args, char *result,
for (n = ntrans + 1, n_end = ntrans + sizeof(ntrans)-2;
word != w_end && n < n_end; word++ )
- if ( my_isalpha ( &my_charset_latin1, *word ))
- *n++ = my_toupper ( &my_charset_latin1, *word );
+ if ( isalpha ( *word ))
+ *n++ = toupper ( *word );
if ( n == ntrans + 1 ) /* return empty string if 0 bytes */
{