summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <kent@mysql.com>2005-09-29 02:08:24 +0200
committerunknown <kent@mysql.com>2005-09-29 02:08:24 +0200
commit72340d672d573d21871b385b8ca5edd29e839a9b (patch)
tree0554bc5de920ea134de4402fe122a1df5624513c /sql
parente42572f5f85364b8c4e87f73a2a724723e12168b (diff)
downloadmariadb-git-72340d672d573d21871b385b8ca5edd29e839a9b.tar.gz
Many files:
Prefix regex functions/types with "my_" as our library is not compatible with normal regex lib. my_regex.h: Rename: regex/regex.h -> regex/my_regex.h client/mysqltest.c: Prefix regex functions/types with "my_" as our library is not compatible with normal regex lib. os2/MySQL-Source.icc: Prefix regex functions/types with "my_" as our library is not compatible with normal regex lib. regex/Makefile.am: Prefix regex functions/types with "my_" as our library is not compatible with normal regex lib. regex/debug.c: Prefix regex functions/types with "my_" as our library is not compatible with normal regex lib. regex/debug.ih: Prefix regex functions/types with "my_" as our library is not compatible with normal regex lib. regex/engine.c: Prefix regex functions/types with "my_" as our library is not compatible with normal regex lib. regex/engine.ih: Prefix regex functions/types with "my_" as our library is not compatible with normal regex lib. regex/main.c: Prefix regex functions/types with "my_" as our library is not compatible with normal regex lib. regex/main.ih: Prefix regex functions/types with "my_" as our library is not compatible with normal regex lib. regex/regcomp.c: Prefix regex functions/types with "my_" as our library is not compatible with normal regex lib. regex/regerror.c: Prefix regex functions/types with "my_" as our library is not compatible with normal regex lib. regex/regerror.ih: Prefix regex functions/types with "my_" as our library is not compatible with normal regex lib. regex/my_regex.h: Prefix regex functions/types with "my_" as our library is not compatible with normal regex lib. regex/regexec.c: Prefix regex functions/types with "my_" as our library is not compatible with normal regex lib. regex/regfree.c: Prefix regex functions/types with "my_" as our library is not compatible with normal regex lib. regex/reginit.c: Prefix regex functions/types with "my_" as our library is not compatible with normal regex lib. sql/item_cmpfunc.cc: Prefix regex functions/types with "my_" as our library is not compatible with normal regex lib. sql/item_cmpfunc.h: Prefix regex functions/types with "my_" as our library is not compatible with normal regex lib. sql/mysqld.cc: Prefix regex functions/types with "my_" as our library is not compatible with normal regex lib.
Diffstat (limited to 'sql')
-rw-r--r--sql/item_cmpfunc.cc32
-rw-r--r--sql/item_cmpfunc.h4
-rw-r--r--sql/mysqld.cc8
3 files changed, 22 insertions, 22 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index 74eed7fa41a..f3ba276ec04 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -2556,14 +2556,14 @@ Item_func_regex::fix_fields(THD *thd, TABLE_LIST *tables, Item **ref)
return 0;
}
int error;
- if ((error= regcomp(&preg,res->c_ptr(),
- ((cmp_collation.collation->state &
- (MY_CS_BINSORT | MY_CS_CSSORT)) ?
- REG_EXTENDED | REG_NOSUB :
- REG_EXTENDED | REG_NOSUB | REG_ICASE),
- cmp_collation.collation)))
+ if ((error= my_regcomp(&preg,res->c_ptr(),
+ ((cmp_collation.collation->state &
+ (MY_CS_BINSORT | MY_CS_CSSORT)) ?
+ REG_EXTENDED | REG_NOSUB :
+ REG_EXTENDED | REG_NOSUB | REG_ICASE),
+ cmp_collation.collation)))
{
- (void) regerror(error,&preg,buff,sizeof(buff));
+ (void) my_regerror(error,&preg,buff,sizeof(buff));
my_printf_error(ER_REGEXP_ERROR,ER(ER_REGEXP_ERROR),MYF(0),buff);
return 1;
}
@@ -2605,15 +2605,15 @@ longlong Item_func_regex::val_int()
prev_regexp.copy(*res2);
if (regex_compiled)
{
- regfree(&preg);
+ my_regfree(&preg);
regex_compiled=0;
}
- if (regcomp(&preg,res2->c_ptr(),
- ((cmp_collation.collation->state &
- (MY_CS_BINSORT | MY_CS_CSSORT)) ?
- REG_EXTENDED | REG_NOSUB :
- REG_EXTENDED | REG_NOSUB | REG_ICASE),
- cmp_collation.collation))
+ if (my_regcomp(&preg,res2->c_ptr(),
+ ((cmp_collation.collation->state &
+ (MY_CS_BINSORT | MY_CS_CSSORT)) ?
+ REG_EXTENDED | REG_NOSUB :
+ REG_EXTENDED | REG_NOSUB | REG_ICASE),
+ cmp_collation.collation))
{
null_value=1;
return 0;
@@ -2622,7 +2622,7 @@ longlong Item_func_regex::val_int()
}
}
null_value=0;
- return regexec(&preg,res->c_ptr(),0,(regmatch_t*) 0,0) ? 0 : 1;
+ return my_regexec(&preg,res->c_ptr(),0,(my_regmatch_t*) 0,0) ? 0 : 1;
}
@@ -2632,7 +2632,7 @@ void Item_func_regex::cleanup()
Item_bool_func::cleanup();
if (regex_compiled)
{
- regfree(&preg);
+ my_regfree(&preg);
regex_compiled=0;
}
DBUG_VOID_RETURN;
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h
index 741ae90108a..045566a46d5 100644
--- a/sql/item_cmpfunc.h
+++ b/sql/item_cmpfunc.h
@@ -915,11 +915,11 @@ public:
#ifdef USE_REGEX
-#include <regex.h>
+#include "my_regex.h"
class Item_func_regex :public Item_bool_func
{
- regex_t preg;
+ my_regex_t preg;
bool regex_compiled;
bool regex_is_const;
String prev_regexp;
diff --git a/sql/mysqld.cc b/sql/mysqld.cc
index 1b931b25647..a6a91ac32ee 100644
--- a/sql/mysqld.cc
+++ b/sql/mysqld.cc
@@ -1028,7 +1028,7 @@ void clean_up(bool print_message)
my_free((gptr) ssl_acceptor_fd, MYF(MY_ALLOW_ZERO_PTR));
#endif /* HAVE_OPENSSL */
#ifdef USE_REGEX
- regex_end();
+ my_regex_end();
#endif
if (print_message && errmesg)
@@ -2529,7 +2529,7 @@ static int init_common_variables(const char *conf_file_name, int argc,
set_var_init();
mysys_uses_curses=0;
#ifdef USE_REGEX
- regex_init(&my_charset_latin1);
+ my_regex_init(&my_charset_latin1);
#endif
if (!(default_charset_info= get_charset_by_csname(default_character_set_name,
MY_CS_PRIMARY,
@@ -5879,7 +5879,7 @@ static void mysql_init_variables(void)
#else
have_openssl=SHOW_OPTION_NO;
#endif
-#ifdef HAVE_BROKEN_REALPATH
+#if !defined(HAVE_REALPATH) || defined(HAVE_BROKEN_REALPATH)
have_symlink=SHOW_OPTION_NO;
#else
have_symlink=SHOW_OPTION_YES;
@@ -6550,7 +6550,7 @@ static void get_options(int argc,char **argv)
usage();
exit(0);
}
-#if defined(HAVE_BROKEN_REALPATH)
+#if !defined(HAVE_REALPATH) || defined(HAVE_BROKEN_REALPATH)
my_use_symdir=0;
my_disable_symlinks=1;
have_symlink=SHOW_OPTION_NO;