Commit 72340d67 authored by unknown's avatar unknown
Browse files

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.
parent e42572f5
Loading
Loading
Loading
Loading
+10 −9
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@
#include <stdarg.h>
#include <sys/stat.h>
#include <violite.h>
#include <regex.h>                        /* Our own version of lib */
#include "my_regex.h"                     /* Our own version of lib */
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif
@@ -188,7 +188,7 @@ static int got_end_timer= FALSE;
static void timer_output(void);
static ulonglong timer_now(void);

static regex_t ps_re; /* Holds precompiled re for valid PS statements */
static my_regex_t ps_re; /* Holds precompiled re for valid PS statements */
static void ps_init_re(void);
static int ps_match_re(char *);
static char *ps_eprint(int);
@@ -3585,12 +3585,13 @@ static void ps_init_re(void)
    "[[:space:]]*UPDATE[[:space:]]+MULTI[[:space:]]|"
    "[[:space:]]*INSERT[[:space:]]+SELECT[[:space:]])";

  int err= regcomp(&ps_re, ps_re_str, (REG_EXTENDED | REG_ICASE | REG_NOSUB),
  int err= my_regcomp(&ps_re, ps_re_str,
                      (REG_EXTENDED | REG_ICASE | REG_NOSUB),
                      &my_charset_latin1);
  if (err)
  {
    char erbuf[100];
    int len= regerror(err, &ps_re, erbuf, sizeof(erbuf));
    int len= my_regerror(err, &ps_re, erbuf, sizeof(erbuf));
    fprintf(stderr, "error %s, %d/%d `%s'\n",
            ps_eprint(err), len, (int)sizeof(erbuf), erbuf);
    exit(1);
@@ -3600,7 +3601,7 @@ static void ps_init_re(void)

static int ps_match_re(char *stmt_str)
{
  int err= regexec(&ps_re, stmt_str, (size_t)0, NULL, 0);
  int err= my_regexec(&ps_re, stmt_str, (size_t)0, NULL, 0);

  if (err == 0)
    return 1;
@@ -3609,7 +3610,7 @@ static int ps_match_re(char *stmt_str)
  else
  {
    char erbuf[100];
    int len= regerror(err, &ps_re, erbuf, sizeof(erbuf));
    int len= my_regerror(err, &ps_re, erbuf, sizeof(erbuf));
    fprintf(stderr, "error %s, %d/%d `%s'\n",
            ps_eprint(err), len, (int)sizeof(erbuf), erbuf);
    exit(1);
@@ -3619,7 +3620,7 @@ static int ps_match_re(char *stmt_str)
static char *ps_eprint(int err)
{
  static char epbuf[100];
  size_t len= regerror(REG_ITOA|err, (regex_t *)NULL, epbuf, sizeof(epbuf));
  size_t len= my_regerror(REG_ITOA|err, (my_regex_t *)NULL, epbuf, sizeof(epbuf));
  assert(len <= sizeof(epbuf));
  return(epbuf);
}
@@ -3627,7 +3628,7 @@ static char *ps_eprint(int err)

static void ps_free_reg(void)
{
  regfree(&ps_re);
  my_regfree(&ps_re);
}

/****************************************************************************/
+2 −2
Original line number Diff line number Diff line
@@ -12,7 +12,7 @@ group client_global_pch =
            'm_ctype.h', 'mysqld_error.h',
            'my_list.h', 'my_sys.h', 'my_net.h',
            'myisam.h', 'myisampack.h', '.\myisam\myisamdef.h',
            '.\regex\regex.h'
            '.\regex\my_regex.h'

group server_global_pch =
            'os2.h',
@@ -38,7 +38,7 @@ group server_global_pch =
            'my_tree.h', '..\mysys\my_static.h', 'netdb.h',
            'thr_alarm.h', 'heap.h', '..\myisam\fulltext.h',
            '..\myisam\ftdefs.h', 'myisammrg.h',
            '.\regex\regex.h'
            '.\regex\my_regex.h'

group server_pch =
            'ha_heap.h', 'ha_myisammrg.h', 'opt_ft.h',
+1 −1
Original line number Diff line number Diff line
@@ -19,7 +19,7 @@ INCLUDES = @MT_INCLUDES@ \
			-I$(top_builddir)/include -I$(top_srcdir)/include
noinst_LIBRARIES =	libregex.a
LDADD=			libregex.a $(top_builddir)/strings/libmystrings.a
noinst_HEADERS =	cclass.h cname.h regex2.h utils.h engine.c regex.h
noinst_HEADERS =	cclass.h cname.h regex2.h utils.h engine.c my_regex.h
libregex_a_SOURCES =	regerror.c regcomp.c regexec.c regfree.c reginit.c
noinst_PROGRAMS =	re
re_SOURCES =		split.c debug.c main.c
+3 −2
Original line number Diff line number Diff line
@@ -2,7 +2,8 @@
#include <m_ctype.h>
#include <m_string.h>
#include <sys/types.h>
#include <regex.h>

#include "my_regex.h"
#include "utils.h"
#include "regex2.h"
#include "debug.ih"
@@ -15,7 +16,7 @@
 */
void
regprint(r, d)
regex_t *r;
my_regex_t *r;
FILE *d;
{
	register struct re_guts *g = r->re_g;
+1 −1
Original line number Diff line number Diff line
@@ -4,7 +4,7 @@ extern "C" {
#endif

/* === debug.c === */
void regprint(regex_t *r, FILE *d);
void regprint(my_regex_t *r, FILE *d);
static void s_print(CHARSET_INFO *charset, register struct re_guts *g, FILE *d);
static char *regchar(CHARSET_INFO *charset, int ch,char *buf);

Loading