diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2009-07-06 01:10:00 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2009-07-06 01:11:45 -0700 |
commit | 89dbf609d084eb353c048afa499aba953949f102 (patch) | |
tree | e064822e109ee3a077a475a647900a09ce3aa5b3 /02010_all_query-logging-bypass-5.1.7.patch | |
parent | Fix bug #271475, #elif not valid without an argument. Use #else instead. (diff) | |
download | mysql-extras-89dbf609d084eb353c048afa499aba953949f102.tar.gz mysql-extras-89dbf609d084eb353c048afa499aba953949f102.tar.bz2 mysql-extras-89dbf609d084eb353c048afa499aba953949f102.zip |
Need to use 5 digits of numbering now. LOTS of patches to track.
Diffstat (limited to '02010_all_query-logging-bypass-5.1.7.patch')
-rw-r--r-- | 02010_all_query-logging-bypass-5.1.7.patch | 214 |
1 files changed, 214 insertions, 0 deletions
diff --git a/02010_all_query-logging-bypass-5.1.7.patch b/02010_all_query-logging-bypass-5.1.7.patch new file mode 100644 index 0000000..c706da7 --- /dev/null +++ b/02010_all_query-logging-bypass-5.1.7.patch @@ -0,0 +1,214 @@ +diff -Naur mysql-5.1.7-beta.a/include/my_sys.h mysql-5.1.7-beta.b/include/my_sys.h +--- mysql-5.1.7-beta.a/include/my_sys.h 2006-02-27 21:25:08.000000000 +0000 ++++ mysql-5.1.7-beta.b/include/my_sys.h 2006-04-12 16:43:44.000000000 +0000 +@@ -601,6 +601,11 @@ + const char *sFile, uint uLine, + myf MyFlag); + ++/* implemented in my_memmem.c */ ++extern void *my_memmem(const void *haystack, size_t haystacklen, ++ const void *needle, size_t needlelen); ++ ++ + #ifdef __WIN__ + extern int my_access(const char *path, int amode); + extern File my_sopen(const char *path, int oflag, int shflag, int pmode); +diff -Naur mysql-5.1.7-beta.a/mysql-test/t/mysql_client_test.opt mysql-5.1.7-beta.b/mysql-test/t/mysql_client_test.opt +--- mysql-5.1.7-beta.a/mysql-test/t/mysql_client_test.opt 1970-01-01 00:00:00.000000000 +0000 ++++ mysql-5.1.7-beta.b/mysql-test/t/mysql_client_test.opt 2006-04-12 16:43:44.000000000 +0000 +@@ -0,0 +1 @@ ++--log +diff -Naur mysql-5.1.7-beta.a/mysys/Makefile.am mysql-5.1.7-beta.b/mysys/Makefile.am +--- mysql-5.1.7-beta.a/mysys/Makefile.am 2006-02-27 21:25:08.000000000 +0000 ++++ mysql-5.1.7-beta.b/mysys/Makefile.am 2006-04-12 16:43:44.000000000 +0000 +@@ -56,6 +56,7 @@ + charset.c charset-def.c my_bitmap.c my_bit.c md5.c \ + my_gethostbyname.c rijndael.c my_aes.c sha1.c \ + my_handler.c my_netware.c my_largepage.c \ ++ my_memmem.c \ + my_windac.c my_access.c base64.c + EXTRA_DIST = thr_alarm.c thr_lock.c my_pthread.c my_thr_init.c \ + thr_mutex.c thr_rwlock.c +diff -Naur mysql-5.1.7-beta.a/mysys/Makefile.in mysql-5.1.7-beta.b/mysys/Makefile.in +--- mysql-5.1.7-beta.a/mysys/Makefile.in 2006-02-27 21:26:51.000000000 +0000 ++++ mysql-5.1.7-beta.b/mysys/Makefile.in 2006-04-12 16:43:44.000000000 +0000 +@@ -515,6 +515,7 @@ + charset.c charset-def.c my_bitmap.c my_bit.c md5.c \ + my_gethostbyname.c rijndael.c my_aes.c sha1.c \ + my_handler.c my_netware.c my_largepage.c \ ++ my_memmem.c \ + my_windac.c my_access.c base64.c + + EXTRA_DIST = thr_alarm.c thr_lock.c my_pthread.c my_thr_init.c \ +diff -Naur mysql-5.1.7-beta.a/mysys/mf_iocache2.c mysql-5.1.7-beta.b/mysys/mf_iocache2.c +--- mysql-5.1.7-beta.a/mysys/mf_iocache2.c 2006-02-27 21:24:53.000000000 +0000 ++++ mysql-5.1.7-beta.b/mysys/mf_iocache2.c 2006-04-12 16:43:44.000000000 +0000 +@@ -252,6 +252,10 @@ + uint my_b_vprintf(IO_CACHE *info, const char* fmt, va_list args) + { + uint out_length=0; ++ uint minimum_width; /* as yet unimplemented */ ++ uint minimum_width_sign; ++ uint precision; /* as yet unimplemented for anything but %b */ ++ const char* backtrack; + + for (; *fmt ; fmt++) + { +@@ -272,17 +276,53 @@ + fmt++; + /* Found one '%' */ + } ++ backtrack= fmt; ++ ++ minimum_width= 0; ++ precision= 0; ++ minimum_width_sign= 1; + /* Skip if max size is used (to be compatible with printf) */ +- while (my_isdigit(&my_charset_latin1, *fmt) || *fmt == '.' || *fmt == '-') ++ while (*fmt == '-') { fmt++; minimum_width_sign= -1; } ++ if (*fmt == '*') { ++ precision= (int) va_arg(args, int); ++ fmt++; ++ } else { ++ while (my_isdigit(&my_charset_latin1, *fmt)) { ++ minimum_width=(minimum_width * 10) + (*fmt - '0'); ++ fmt++; ++ } ++ } ++ minimum_width*= minimum_width_sign; ++ ++ if (*fmt == '.') { + fmt++; ++ if (*fmt == '*') { ++ precision= (int) va_arg(args, int); ++ fmt++; ++ } else { ++ while (my_isdigit(&my_charset_latin1, *fmt)) { ++ precision=(precision * 10) + (*fmt - '0'); ++ fmt++; ++ } ++ } ++ } ++ + if (*fmt == 's') /* String parameter */ + { + reg2 char *par = va_arg(args, char *); + uint length = (uint) strlen(par); ++ /* TODO: implement minimum width and precision */ + out_length+=length; + if (my_b_write(info, par, length)) + goto err; + } ++ else if (*fmt == 'b') /* Sized buffer parameter, only precision makes sense */ ++ { ++ reg2 char *par = va_arg(args, char *); ++ out_length+=precision; ++ if (my_b_write(info, par, precision)) ++ goto err; ++ } + else if (*fmt == 'd' || *fmt == 'u') /* Integer parameter */ + { + register int iarg; +@@ -320,6 +360,9 @@ + if (my_b_write(info, "%", 1)) + goto err; + out_length++; ++ if (my_b_write(info, backtrack, fmt-backtrack)) ++ goto err; ++ out_length+= fmt-backtrack; + } + } + return out_length; +diff -Naur mysql-5.1.7-beta.a/mysys/my_memmem.c mysql-5.1.7-beta.b/mysys/my_memmem.c +--- mysql-5.1.7-beta.a/mysys/my_memmem.c 1970-01-01 00:00:00.000000000 +0000 ++++ mysql-5.1.7-beta.b/mysys/my_memmem.c 2006-04-12 16:43:44.000000000 +0000 +@@ -0,0 +1,21 @@ ++#include "my_base.h" ++ ++/* ++ * my_memmem, port of a GNU extension. ++ * ++ * Returns a pointer to the beginning of the substring, needle, or NULL if the ++ * substring is not found in haystack. ++ * */ ++void *my_memmem(const void *haystack, size_t haystacklen, ++ const void *needle, size_t needlelen) ++{ ++ const void *cursor; ++ const void *end_of_search_beginning = haystack + haystacklen - needlelen; ++ ++ for (cursor = haystack; cursor <= end_of_search_beginning; cursor++) { ++ if (memcmp(needle, cursor, needlelen) == 0) { ++ return((void *) cursor); ++ } ++ } ++ return(NULL); ++} +diff -Naur mysql-5.1.7-beta.a/strings/my_vsnprintf.c mysql-5.1.7-beta.b/strings/my_vsnprintf.c +--- mysql-5.1.7-beta.a/strings/my_vsnprintf.c 2006-02-27 21:24:52.000000000 +0000 ++++ mysql-5.1.7-beta.b/strings/my_vsnprintf.c 2006-04-12 16:43:44.000000000 +0000 +@@ -27,6 +27,7 @@ + %#[l]d + %#[l]u + %#[l]x ++ %#.#b Local format; note first # is ignored and second is REQUIRED + %#.#s Note first # is ignored + + RETURN +@@ -38,9 +39,18 @@ + char *start=to, *end=to+n-1; + uint length, width, pre_zero, have_long; + ++ const char *backtrack; ++ /* ++ For the special case when we discover that we shouldn't have been ++ interpreting a percent-format. ++ ++ This is here so we can be forgiving about our special local formats. ++ */ ++ + for (; *fmt ; fmt++) + { +- if (fmt[0] != '%') ++ backtrack = fmt; ++ if (*fmt != '%') + { + if (to == end) /* End of buffer */ + break; +@@ -95,6 +105,12 @@ + to=strnmov(to,par,plen); + continue; + } ++ else if (*fmt == 'b') /* Buffer parameter */ ++ { ++ reg2 char *par = va_arg(ap, char *); ++ to=memmove(to, par, abs(width)); ++ continue; ++ } + else if (*fmt == 'd' || *fmt == 'u'|| *fmt== 'x') /* Integer parameter */ + { + register long larg; +diff -Naur mysql-5.1.7-beta.a/tests/Makefile.am mysql-5.1.7-beta.b/tests/Makefile.am +--- mysql-5.1.7-beta.a/tests/Makefile.am 2006-02-27 21:24:57.000000000 +0000 ++++ mysql-5.1.7-beta.b/tests/Makefile.am 2006-04-12 16:43:44.000000000 +0000 +@@ -42,7 +42,7 @@ + LIBS = @CLIENT_LIBS@ + LDADD = @CLIENT_EXTRA_LDFLAGS@ \ + $(top_builddir)/libmysql/libmysqlclient.la +-mysql_client_test_LDADD= $(LDADD) $(CXXLDFLAGS) ++mysql_client_test_LDADD= $(LDADD) $(CXXLDFLAGS) -lmysys -L../mysys + mysql_client_test_SOURCES= mysql_client_test.c $(yassl_dummy_link_fix) + insert_test_SOURCES= insert_test.c $(yassl_dummy_link_fix) + select_test_SOURCES= select_test.c $(yassl_dummy_link_fix) +diff -Naur mysql-5.1.7-beta.a/tests/Makefile.in mysql-5.1.7-beta.b/tests/Makefile.in +--- mysql-5.1.7-beta.a/tests/Makefile.in 2006-02-27 21:27:19.000000000 +0000 ++++ mysql-5.1.7-beta.b/tests/Makefile.in 2006-04-12 16:43:44.000000000 +0000 +@@ -420,7 +420,7 @@ + LDADD = @CLIENT_EXTRA_LDFLAGS@ \ + $(top_builddir)/libmysql/libmysqlclient.la + +-mysql_client_test_LDADD = $(LDADD) $(CXXLDFLAGS) ++mysql_client_test_LDADD = $(LDADD) $(CXXLDFLAGS) -lmysys -L../mysys + mysql_client_test_SOURCES = mysql_client_test.c $(yassl_dummy_link_fix) + insert_test_SOURCES = insert_test.c $(yassl_dummy_link_fix) + select_test_SOURCES = select_test.c $(yassl_dummy_link_fix) |