diff options
author | unknown <monty@donna.mysql.fi> | 2001-04-11 20:19:52 +0300 |
---|---|---|
committer | unknown <monty@donna.mysql.fi> | 2001-04-11 20:19:52 +0300 |
commit | 9bf58f4fac22a61190b26a13b7ef6f5ec2b85ff2 (patch) | |
tree | 0c2df4ea1281838e375d4087e0cd217f5de5140d /regex | |
parent | 494a3a0fc74ef5ea5547e54603808b11221ec4c1 (diff) | |
download | mariadb-git-9bf58f4fac22a61190b26a13b7ef6f5ec2b85ff2.tar.gz |
Fixed bug in REGEXP for Linux Alpha
Docs/manual.texi:
Updated MyODBC section
libmysql/conf_to_src.c:
Fixed wrong typecast
mysql-test/r/func_regexp.result:
Added test case for REGEXP bug
mysql-test/t/func_regexp.test:
Added test case for REGEXP bug
regex/engine.c:
Fixed wrong type
regex/regexec.c:
Fixed wrong type
sql/records.cc:
Fixed test of READ lock
sql/slave.cc:
Cleanup
Diffstat (limited to 'regex')
-rw-r--r-- | regex/engine.c | 2 | ||||
-rw-r--r-- | regex/regexec.c | 16 |
2 files changed, 9 insertions, 9 deletions
diff --git a/regex/engine.c b/regex/engine.c index 6453a66d21c..e77fbd7cf89 100644 --- a/regex/engine.c +++ b/regex/engine.c @@ -828,7 +828,7 @@ register states aft; /* states already known reachable after */ register sopno pc; register onestate here; /* note, macros know this name */ register sopno look; - register int i; + register onestate i; /* Changed from int by Monty */ for (pc = start, INIT(here, pc); pc != stop; pc++, INC(here)) { s = g->strip[pc]; diff --git a/regex/regexec.c b/regex/regexec.c index c52a79fd8f5..853bd7aa263 100644 --- a/regex/regexec.c +++ b/regex/regexec.c @@ -22,24 +22,24 @@ static int nope = 0; /* for use in asserts; shuts lint up */ #define states long #define states1 states /* for later use in regexec() decision */ #define CLEAR(v) ((v) = 0) -#define SET0(v, n) ((v) &= ~(1 << (n))) -#define SET1(v, n) ((v) |= 1 << (n)) -#define ISSET(v, n) ((v) & (1 << (n))) +#define SET0(v, n) ((v) &= ~((states) 1 << (n))) +#define SET1(v, n) ((v) |= (states) 1 << (n)) +#define ISSET(v, n) ((v) & ((states) 1 << (n))) #define ASSIGN(d, s) ((d) = (s)) #define EQ(a, b) ((a) == (b)) #define STATEVARS int dummy /* dummy version */ #define STATESETUP(m, n) /* nothing */ #define STATETEARDOWN(m) /* nothing */ #define SETUP(v) ((v) = 0) -#define onestate int -#define INIT(o, n) ((o) = (unsigned)1 << (n)) +#define onestate long /* Changed from int by Monty */ +#define INIT(o, n) ((o) = (unsigned states)1 << (n)) #define INC(o) ((o) <<= 1) #define ISSTATEIN(v, o) ((v) & (o)) /* some abbreviations; note that some of these know variable names! */ /* do "if I'm here, I can also be there" etc without branches */ -#define FWD(dst, src, n) ((dst) |= ((unsigned)(src)&(here)) << (n)) -#define BACK(dst, src, n) ((dst) |= ((unsigned)(src)&(here)) >> (n)) -#define ISSETBACK(v, n) ((v) & ((unsigned)here >> (n))) +#define FWD(dst, src, n) ((dst) |= ((unsigned states)(src)&(here)) << (n)) +#define BACK(dst, src, n) ((dst) |= ((unsigned states)(src)&(here)) >> (n)) +#define ISSETBACK(v, n) ((v) & ((unsigned states)here >> (n))) /* function names */ #define SNAMES /* engine.c looks after details */ |