diff options
author | Michael Widenius <monty@askmonty.org> | 2010-08-27 17:12:44 +0300 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2010-08-27 17:12:44 +0300 |
commit | ad6d95d3cb420557cfc7efa658181a8d20b4c154 (patch) | |
tree | 984bb45ca187a6cc38c7132a9600d91515df564e /regex | |
parent | 9bc9855c16f815e71223398ef17cd6052becc44e (diff) | |
parent | 7909541953de43c7b7d16513c8d612cfe405af67 (diff) | |
download | mariadb-git-ad6d95d3cb420557cfc7efa658181a8d20b4c154.tar.gz |
Merge with MySQL 5.1.50
- Changed to still use bcmp() in certain cases becasue
- Faster for short unaligneed strings than memcmp()
- Bettern when using valgrind
- Changed to use my_sprintf() instead of sprintf() to get higher portability for old systems
- Changed code to use MariaDB version of select->skip_record()
- Removed -%::SCCS/s.% from Makefile.am:s to remove automake warnings
Diffstat (limited to 'regex')
-rw-r--r-- | regex/Makefile.am | 3 | ||||
-rw-r--r-- | regex/engine.c | 17 | ||||
-rw-r--r-- | regex/regcomp.c | 7 |
3 files changed, 10 insertions, 17 deletions
diff --git a/regex/Makefile.am b/regex/Makefile.am index e2304ff7309..0fd62a777f6 100644 --- a/regex/Makefile.am +++ b/regex/Makefile.am @@ -31,6 +31,3 @@ test: re tests ./re < tests ./re -el < tests ./re -er < tests - -# Don't update the files from bitkeeper -%::SCCS/s.% diff --git a/regex/engine.c b/regex/engine.c index a099cfb891d..5db8df210bd 100644 --- a/regex/engine.c +++ b/regex/engine.c @@ -256,7 +256,6 @@ sopno stopst; register const char *ssp; /* start of string matched by subsubRE */ register const char *sep; /* end of string matched by subsubRE */ register const char *oldssp; /* previous ssp */ - register const char *dp; /* used in debug mode to check asserts */ AT("diss", start, stop, startst, stopst); sp = start; @@ -314,11 +313,9 @@ sopno stopst; ssub = ss + 1; esub = es - 1; /* did innards match? */ - if (slow(charset, m, sp, rest, ssub, esub) != NULL) { - dp = dissect(charset, m, sp, rest, ssub, esub); - assert(dp == rest); - } else /* no */ - assert(sp == rest); + if (slow(charset, m, sp, rest, ssub, esub) != NULL) + sp = dissect(charset, m, sp, rest, ssub, esub); + assert(sp == rest); sp = rest; break; case OPLUS_: @@ -353,8 +350,8 @@ sopno stopst; } assert(sep == rest); /* must exhaust substring */ assert(slow(charset, m, ssp, sep, ssub, esub) == rest); - dp = dissect(charset, m, ssp, sep, ssub, esub); - assert(dp == sep); + sp = dissect(charset, m, ssp, sep, ssub, esub); + assert(sp == sep); sp = rest; break; case OCH_: @@ -388,8 +385,8 @@ sopno stopst; else assert(OP(m->g->strip[esub]) == O_CH); } - dp = dissect(charset, m, sp, rest, ssub, esub); - assert(dp == rest); + sp = dissect(charset, m, sp, rest, ssub, esub); + assert(sp == rest); sp = rest; break; case O_PLUS: diff --git a/regex/regcomp.c b/regex/regcomp.c index b203d4941e1..81c435ed552 100644 --- a/regex/regcomp.c +++ b/regex/regcomp.c @@ -690,7 +690,6 @@ register cset *cs; case '-': SETERROR(REG_ERANGE); return; /* NOTE RETURN */ - break; default: c = '\0'; break; @@ -1564,13 +1563,13 @@ struct parse *p; register struct re_guts *g; { register sop *scan; - sop *start; - register sop *newstart; + sop *UNINIT_VAR(start); + register sop *UNINIT_VAR(newstart); register sopno newlen; register sop s; register char *cp; register sopno i; - LINT_INIT(start); LINT_INIT(newstart); + /* avoid making error situations worse */ if (p->error != 0) return; |