diff options
author | unknown <msvensson@pilot.blaudden> | 2007-02-22 16:44:37 +0100 |
---|---|---|
committer | unknown <msvensson@pilot.blaudden> | 2007-02-22 16:44:37 +0100 |
commit | 16f0c9f606ca2ea27fabf97b85fe3e7a15380892 (patch) | |
tree | ac14e101c8a457a45f577f647be94c3deb699d52 /extra | |
parent | 56dd63a7ac63f8d65dcc023cde1b5b910b474508 (diff) | |
parent | c36e2c23323fb2d8afe9ac08a08c3fd7ec041886 (diff) | |
download | mariadb-git-16f0c9f606ca2ea27fabf97b85fe3e7a15380892.tar.gz |
Merge pilot.blaudden:/home/msvensson/mysql/comp_err_checksum/my50-comp_err_checksum
into pilot.blaudden:/home/msvensson/mysql/comp_err_checksum/my51-comp_err_checksum
extra/Makefile.am:
Auto merged
sql/share/errmsg.txt:
Use local errmsg.txt
extra/comp_err.c:
Manual merge
Diffstat (limited to 'extra')
-rw-r--r-- | extra/Makefile.am | 3 | ||||
-rw-r--r-- | extra/comp_err.c | 15 |
2 files changed, 9 insertions, 9 deletions
diff --git a/extra/Makefile.am b/extra/Makefile.am index 1ea0b7ddb38..b2d504cfb62 100644 --- a/extra/Makefile.am +++ b/extra/Makefile.am @@ -16,7 +16,8 @@ INCLUDES = -I$(top_builddir)/include -I$(top_srcdir)/include \ -I$(top_srcdir)/sql LDADD = @CLIENT_EXTRA_LDFLAGS@ ../mysys/libmysys.a \ - ../dbug/libdbug.a ../strings/libmystrings.a + ../dbug/libdbug.a ../strings/libmystrings.a \ + $(ZLIB_LIBS) BUILT_SOURCES= $(top_builddir)/include/mysqld_error.h \ $(top_builddir)/include/sql_state.h \ $(top_builddir)/include/mysqld_ername.h diff --git a/extra/comp_err.c b/extra/comp_err.c index 85d1c932d9b..28772b4c3c5 100644 --- a/extra/comp_err.c +++ b/extra/comp_err.c @@ -637,27 +637,26 @@ static char checksum_format_specifier(const char* msg) { char chksum= 0; const char* p= msg; - int is_format_specifier= 0; + const char* start= 0; int num_format_specifiers= 0; while (*p) { if (*p == '%') { - is_format_specifier= 1; /* Entering format specifier */ + start= p+1; /* Entering format specifier */ num_format_specifiers++; } - - if (is_format_specifier) + else if (start) { - chksum^= *p; switch(*p) { case 'd': case 'u': case 'x': case 's': - is_format_specifier= 0; /* Not in format specifier anymore */ + chksum= my_checksum(chksum, start, p-start); + start= 0; /* Not in format specifier anymore */ break; default: @@ -668,13 +667,13 @@ static char checksum_format_specifier(const char* msg) p++; } - if (is_format_specifier) + if (start) { /* Still inside a format specifier after end of string */ fprintf(stderr, "Still inside formatspecifier after end of string" " in'%s'\n", msg); - DBUG_ASSERT(is_format_specifier==0); + DBUG_ASSERT(start==0); } /* Add number of format specifiers to checksum as extra safeguard */ |