From 92db6e9af9fdfb0988fff56b50ef035ac38044ec Mon Sep 17 00:00:00 2001 From: Sunanda Menon <sunanda.menon@oracle.com> Date: Fri, 19 Nov 2010 10:34:22 +0100 Subject: [PATCH 1/9] Bug #58227 improve error message "aio is required on Linux" --- cmake/build_configurations/mysql_release.cmake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/cmake/build_configurations/mysql_release.cmake b/cmake/build_configurations/mysql_release.cmake index 48d3765ea67..b28af926bd5 100644 --- a/cmake/build_configurations/mysql_release.cmake +++ b/cmake/build_configurations/mysql_release.cmake @@ -120,7 +120,13 @@ IF(UNIX) CHECK_INCLUDE_FILES(libaio.h HAVE_LIBAIO_H) CHECK_LIBRARY_EXISTS(aio io_queue_init "" HAVE_LIBAIO) IF(NOT HAVE_LIBAIO_H OR NOT HAVE_LIBAIO) - MESSAGE(FATAL_ERROR "aio is required on Linux") + MESSAGE(FATAL_ERROR " + aio is required on Linux, you need to install the required library: + + Debian/Ubuntu: apt-get install libaio-dev + RedHat/Fedora/Oracle Linux: yum install libaio-devel + SuSE: zypper install libaio-devel + ") ENDIF() ENDIF() From af67d8ae02d024d2d2de41584e0befc87518f3fd Mon Sep 17 00:00:00 2001 From: Davi Arnaut <davi.arnaut@oracle.com> Date: Sat, 20 Nov 2010 20:56:09 -0200 Subject: [PATCH 2/9] WL#5665: Removal of the autotools-based build system Remove some more leftovers from the initial removal: o Update relevant mentions of configure.in throughout the source code. o Remove win/configure.js, which at this point just duplicates logic already present in CMake based build system. o Remove support files which relied on the autotools build system. In any case, MySQL is no longer officially supported on SCO. o Remove files which are no longer part of the build. --- BUILD/compile-amd64-valgrind-max | 15 - BUILD/compile-pentium-valgrind-max | 15 - BUILD/compile-pentium-valgrind-max-no-ndb | 15 - BUILD/compile-pentium64-valgrind-max | 15 - cmake/mysql_version.cmake | 2 +- include/m_string.h | 15 - include/mysql.h | 7 +- mysys/my_rdtsc.c | 10 +- strings/bfill.c | 41 --- strings/bmove.c | 48 --- strings/longlong2str-x86.s | 216 ----------- strings/longlong2str_asm.c | 33 -- strings/my_strtoll10-x86.s | 418 ---------------------- strings/str_test.c | 275 -------------- strings/strings-x86.s | 393 -------------------- strings/strstr.c | 52 --- strings/strto.c | 209 ----------- strings/strtol.c | 28 -- strings/strtoll.c | 33 -- strings/strtoul.c | 29 -- strings/strtoull.c | 34 -- support-files/SCO/INSTALL.sh | 29 -- support-files/SCO/compile.sh | 102 ------ support-files/SCO/doc.sh | 17 - support-files/SCO/mkpkg.sh | 47 --- support-files/SCO/patch | 96 ----- support-files/SCO/pkginfo.ini | 8 - support-files/SCO/postinstall | 30 -- support-files/SCO/preinstall | 21 -- support-files/SCO/preremove | 25 -- support-files/SCO/prototype.ini | 4 - support-files/SCO/version | 1 - win/configure.js | 320 ----------------- 33 files changed, 6 insertions(+), 2597 deletions(-) delete mode 100644 strings/bfill.c delete mode 100644 strings/bmove.c delete mode 100644 strings/longlong2str-x86.s delete mode 100644 strings/longlong2str_asm.c delete mode 100644 strings/my_strtoll10-x86.s delete mode 100644 strings/str_test.c delete mode 100644 strings/strings-x86.s delete mode 100644 strings/strstr.c delete mode 100644 strings/strto.c delete mode 100644 strings/strtol.c delete mode 100644 strings/strtoll.c delete mode 100644 strings/strtoul.c delete mode 100644 strings/strtoull.c delete mode 100755 support-files/SCO/INSTALL.sh delete mode 100644 support-files/SCO/compile.sh delete mode 100644 support-files/SCO/doc.sh delete mode 100644 support-files/SCO/mkpkg.sh delete mode 100644 support-files/SCO/patch delete mode 100644 support-files/SCO/pkginfo.ini delete mode 100644 support-files/SCO/postinstall delete mode 100644 support-files/SCO/preinstall delete mode 100644 support-files/SCO/preremove delete mode 100644 support-files/SCO/prototype.ini delete mode 100644 support-files/SCO/version delete mode 100644 win/configure.js diff --git a/BUILD/compile-amd64-valgrind-max b/BUILD/compile-amd64-valgrind-max index fb8dce38df3..d9072ef56dd 100755 --- a/BUILD/compile-amd64-valgrind-max +++ b/BUILD/compile-amd64-valgrind-max @@ -7,18 +7,3 @@ extra_flags="$amd64_cflags $debug_cflags $valgrind_flags" extra_configs="$amd64_configs $debug_configs $valgrind_configs $max_configs" . "$path/FINISH.sh" - -if test -z "$just_print" -then - set +v +x - echo "\ -****************************************************************************** -Note that by default BUILD/compile-pentium-valgrind-max calls 'configure' with ---enable-assembler. When Valgrind detects an error involving an assembly -function (for example an uninitialized value used as an argument of an -assembly function), Valgrind will not print the stacktrace and 'valgrind ---gdb-attach=yes' will not work either. If you need a stacktrace in those -cases, you have to run BUILD/compile-pentium-valgrind-max with the ---disable-assembler argument. -******************************************************************************" -fi diff --git a/BUILD/compile-pentium-valgrind-max b/BUILD/compile-pentium-valgrind-max index 8ef47bfbc17..9b58c4321c9 100755 --- a/BUILD/compile-pentium-valgrind-max +++ b/BUILD/compile-pentium-valgrind-max @@ -7,18 +7,3 @@ extra_flags="$pentium_cflags $debug_cflags $valgrind_flags" extra_configs="$pentium_configs $debug_configs $valgrind_configs $max_configs" . "$path/FINISH.sh" - -if test -z "$just_print" -then - set +v +x - echo "\ -****************************************************************************** -Note that by default BUILD/compile-pentium-valgrind-max calls 'configure' with ---enable-assembler. When Valgrind detects an error involving an assembly -function (for example an uninitialized value used as an argument of an -assembly function), Valgrind will not print the stacktrace and 'valgrind ---gdb-attach=yes' will not work either. If you need a stacktrace in those -cases, you have to run BUILD/compile-pentium-valgrind-max with the ---disable-assembler argument. -******************************************************************************" -fi diff --git a/BUILD/compile-pentium-valgrind-max-no-ndb b/BUILD/compile-pentium-valgrind-max-no-ndb index f480f83ebf7..b78303fb136 100755 --- a/BUILD/compile-pentium-valgrind-max-no-ndb +++ b/BUILD/compile-pentium-valgrind-max-no-ndb @@ -7,18 +7,3 @@ extra_flags="$pentium_cflags $debug_cflags $valgrind_flags" extra_configs="$pentium_configs $debug_configs $valgrind_configs $max_no_ndb_configs" . "$path/FINISH.sh" - -if test -z "$just_print" -then - set +v +x - echo "\ -****************************************************************************** -Note that by default BUILD/compile-pentium-valgrind-max calls 'configure' with ---enable-assembler. When Valgrind detects an error involving an assembly -function (for example an uninitialized value used as an argument of an -assembly function), Valgrind will not print the stacktrace and 'valgrind ---gdb-attach=yes' will not work either. If you need a stacktrace in those -cases, you have to run BUILD/compile-pentium-valgrind-max with the ---disable-assembler argument. -******************************************************************************" -fi diff --git a/BUILD/compile-pentium64-valgrind-max b/BUILD/compile-pentium64-valgrind-max index eb3d20c874d..ebc7fc68b88 100755 --- a/BUILD/compile-pentium64-valgrind-max +++ b/BUILD/compile-pentium64-valgrind-max @@ -7,18 +7,3 @@ extra_flags="$pentium64_cflags $debug_cflags $valgrind_flags" extra_configs="$pentium_configs $debug_configs $valgrind_configs $max_configs" . "$path/FINISH.sh" - -if test -z "$just_print" -then - set +v +x - echo "\ -****************************************************************************** -Note that by default BUILD/compile-pentium-valgrind-max calls 'configure' with ---enable-assembler. When Valgrind detects an error involving an assembly -function (for example an uninitialized value used as an argument of an -assembly function), Valgrind will not print the stacktrace and 'valgrind ---gdb-attach=yes' will not work either. If you need a stacktrace in those -cases, you have to run BUILD/compile-pentium-valgrind-max with the ---disable-assembler argument. -******************************************************************************" -fi diff --git a/cmake/mysql_version.cmake b/cmake/mysql_version.cmake index e981e58c292..b4be85ff657 100644 --- a/cmake/mysql_version.cmake +++ b/cmake/mysql_version.cmake @@ -21,7 +21,7 @@ SET(SHARED_LIB_MAJOR_VERSION "16") SET(PROTOCOL_VERSION "10") SET(DOT_FRM_VERSION "6") -# Read value for a variable from configure.in +# Read value for a variable from VERSION. MACRO(MYSQL_GET_CONFIG_VALUE keyword var) IF(NOT ${var}) diff --git a/include/m_string.h b/include/m_string.h index 77ec603464f..d2194858589 100644 --- a/include/m_string.h +++ b/include/m_string.h @@ -52,8 +52,6 @@ # define memmove(d, s, n) bmove ((d), (s), (n)) #elif defined(HAVE_MEMMOVE) # define bmove(d, s, n) memmove((d), (s), (n)) -#else -# define memmove(d, s, n) bmove((d), (s), (n)) /* our bmove */ #endif /* Unixware 7 */ @@ -96,14 +94,6 @@ extern char _dig_vec_lower[]; /* Prototypes for string functions */ -#if !defined(bfill) && !defined(HAVE_BFILL) -extern void bfill(uchar *dst,size_t len,pchar fill); -#endif - -#if !defined(HAVE_BMOVE) && !defined(bmove) -extern void bmove(uuchar *dst, const uchar *src,size_t len); -#endif - extern void bmove_upp(uchar *dst,const uchar *src,size_t len); extern void bchange(uchar *dst,size_t old_len,const uchar *src, size_t new_len,size_t tot_len); @@ -128,11 +118,6 @@ extern char *strxnmov(char *dst, size_t len, const char *src, ...); extern size_t strnlen(const char *s, size_t n); #endif -#if !defined(__cplusplus) -#ifndef HAVE_STRSTR -extern char *strstr(const char *, const char *); -#endif -#endif extern int is_prefix(const char *, const char *); /* Conversion routines */ diff --git a/include/mysql.h b/include/mysql.h index b52235b484e..d3b24f0198a 100644 --- a/include/mysql.h +++ b/include/mysql.h @@ -17,11 +17,10 @@ This file defines the client API to MySQL and also the ABI of the dynamically linked libmysqlclient. - The ABI should never be changed in a released product of MySQL + The ABI should never be changed in a released product of MySQL, thus you need to take great care when changing the file. In case - the file is changed so the ABI is broken, you must also - update the SHAREDLIB_MAJOR_VERSION in configure.in . - + the file is changed so the ABI is broken, you must also update + the SHARED_LIB_MAJOR_VERSION in cmake/mysql_version.cmake */ #ifndef _mysql_h diff --git a/mysys/my_rdtsc.c b/mysys/my_rdtsc.c index c8ef38efbdc..2afe3ec31dd 100644 --- a/mysys/my_rdtsc.c +++ b/mysys/my_rdtsc.c @@ -868,14 +868,8 @@ void my_timer_init(MY_TIMER_INFO *mti) clock() -- We don't use because it would overflow frequently. - clock_gettime() -- Often we don't use this even when it exists. - In configure.in, we use AC_CHECK_FUNCS(clock_gettime). Not - AC_CHECK_LIB(rc,clock_gettime) - AC_CHECK_FUNCS(clock_gettime) - If we had the above lines in configure.in, we'd have to use - /usr/lib/librt.so or /usr/lib64/librt.so when linking, and - the size of librt.so is 40KB. In tests, clock_gettime often - had resolution = 1000. + clock_gettime() -- In tests, clock_gettime often had + resolution = 1000. ftime() -- A "man ftime" says: "This function is obsolete. Don't use it." On every platform that we tested, if ftime() diff --git a/strings/bfill.c b/strings/bfill.c deleted file mode 100644 index ccc063f59e3..00000000000 --- a/strings/bfill.c +++ /dev/null @@ -1,41 +0,0 @@ -/* Copyright (C) 2002 MySQL AB - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; version 2 - of the License. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - MA 02111-1307, USA */ - -/* File : bfill.c - Author : Richard A. O'Keefe. - Michael Widenius; ifdef MC68000 - Updated: 23 April 1984 - Defines: bfill() - - bfill(dst, len, fill) moves "len" fill characters to "dst". - Thus to set a buffer to 80 spaces, do bfill(buff, 80, ' '). -*/ - -#include <my_global.h> -#include "m_string.h" - -#if !defined(bfill) && !defined(HAVE_BFILL) - -void bfill(dst, len, fill) -register byte *dst; -register uint len; -register pchar fill; -{ - while (len-- != 0) *dst++ = fill; -} - -#endif diff --git a/strings/bmove.c b/strings/bmove.c deleted file mode 100644 index 0aa825558ca..00000000000 --- a/strings/bmove.c +++ /dev/null @@ -1,48 +0,0 @@ -/* Copyright (C) 2002 MySQL AB - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; version 2 - of the License. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - MA 02111-1307, USA */ - -/* File : bmove.c - Author : Richard A. O'Keefe. - Michael Widenius; ifdef MC68000 - Updated: 23 April 1984 - Defines: bmove() - - bmove(dst, src, len) moves exactly "len" bytes from the source "src" - to the destination "dst". It does not check for NUL characters as - strncpy() and strnmov() do. Thus if your C compiler doesn't support - structure assignment, you can simulate it with - bmove(&to, &from, sizeof from); - The standard 4.2bsd routine for this purpose is bcopy. But as bcopy - has its first two arguments the other way around you may find this a - bit easier to get right. - No value is returned. -*/ - -#include <my_global.h> -#include "m_string.h" - -#if !defined(HAVE_BMOVE) && !defined(bmove) - -void bmove(dst, src, len) -register char *dst; -register const char *src; -register uint len; -{ - while (len-- != 0) *dst++ = *src++; -} - -#endif diff --git a/strings/longlong2str-x86.s b/strings/longlong2str-x86.s deleted file mode 100644 index 3de43a96e78..00000000000 --- a/strings/longlong2str-x86.s +++ /dev/null @@ -1,216 +0,0 @@ -# Copyright (C) 2000 MySQL AB -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -# Optimized longlong2str function for Intel 80x86 (gcc/gas syntax) -# Some set sequences are optimized for pentuimpro II - - .file "longlong2str-x86.s" - .version "1.02" - -.text - .align 4 - -.globl longlong2str_with_dig_vector - .type longlong2str_with_dig_vector,@function - -longlong2str_with_dig_vector: - subl $80,%esp # Temporary buffer for up to 64 radix-2 digits - pushl %ebp - pushl %esi - pushl %edi - pushl %ebx - movl 100(%esp),%esi # esi = Lower part of val - movl 112(%esp),%ebx # ebx = Radix - movl 104(%esp),%ebp # ebp = Higher part of val - movl 108(%esp),%edi # edi = dst - - testl %ebx,%ebx - jge .L144 # Radix was positive - negl %ebx # Change radix to positive - testl %ebp,%ebp # Test if given value is negative - jge .L144 - movb $45,(%edi) # Add sign - incl %edi # Change sign of val - negl %esi - adcl $0,%ebp - negl %ebp - -.L144: # Test that radix is between 2 and 36 - movl %ebx, %eax - addl $-2,%eax # Test that radix is between 2 and 36 - cmpl $34,%eax - ja .Lerror # Radix was not in range - - leal 92(%esp),%ecx # End of buffer - movl %edi, 108(%esp) # Store possible modified dest - movl 116(%esp), %edi # dig_vec_upper - testl %ebp,%ebp # Test if value > 0xFFFFFFFF - jne .Llongdiv - cmpl %ebx, %esi # Test if <= radix, for easy loop - movl %esi, %eax # Value in eax (for Llow) - jae .Llow - - # Value is one digit (negative or positive) - movb (%eax,%edi),%bl - movl 108(%esp),%edi # get dst - movb %bl,(%edi) - incl %edi # End null here - jmp .L10_end - -.Llongdiv: - # Value in ebp:esi. div the high part by the radix, - # then div remainder + low part by the radix. - movl %ebp,%eax # edx=0,eax=high(from ebp) - xorl %edx,%edx - decl %ecx - divl %ebx - movl %eax,%ebp # edx=result of last, eax=low(from esi) - movl %esi,%eax - divl %ebx - movl %eax,%esi # ebp:esi = quotient - movb (%edx,%edi),%dl # Store result number in temporary buffer - testl %ebp,%ebp - movb %dl,(%ecx) # store value in buff - ja .Llongdiv # (Higher part of val still > 0) - - .align 4 -.Llow: # Do rest with integer precision - # Value in 0:eax. div 0 + low part by the radix. - xorl %edx,%edx - decl %ecx - divl %ebx - movb (%edx,%edi),%dl # bh is always zero as ebx=radix < 36 - testl %eax,%eax - movb %dl,(%ecx) - jne .Llow - -.L160: - movl 108(%esp),%edi # get dst - -.Lcopy_end: - leal 92(%esp),%esi # End of buffer -.Lmov: # mov temporary buffer to result (%ecx -> %edi) - movb (%ecx), %al - movb %al, (%edi) - incl %ecx - incl %edi - cmpl %ecx,%esi - jne .Lmov - -.L10_end: - movl %edi,%eax # Pointer to end null - movb $0,(%edi) # Store the end null - -.L165: - popl %ebx - popl %edi - popl %esi - popl %ebp - addl $80,%esp - ret - -.Lerror: - xorl %eax,%eax # Wrong radix - jmp .L165 - -.Lfe3: - .size longlong2str_with_dig_vector,.Lfe3-longlong2str_with_dig_vector - -# -# This is almost equal to the above, except that we can do the final -# loop much more efficient -# - - .align 4 - -.globl longlong10_to_str - .type longlong10_to_str,@function -longlong10_to_str: - subl $80,%esp - pushl %ebp - pushl %esi - pushl %edi - pushl %ebx - movl 100(%esp),%esi # Lower part of val - movl 104(%esp),%ebp # Higher part of val - movl 108(%esp),%edi # get dst - movl 112(%esp),%ebx # Radix (10 or -10) - testl %ebx,%ebx - jge .L10_10 # Positive radix - - negl %ebx # Change radix to positive (= 10) - - testl %ebp,%ebp # Test if negative value - jge .L10_10 - movb $45,(%edi) # Add sign - incl %edi - negl %esi # Change sign of val (ebp:esi) - adcl $0,%ebp - negl %ebp - -.L10_10: - leal 92(%esp),%ecx # End of buffer - testl %ebp,%ebp # Test if value > 0xFFFFFFFF - jne .L10_longdiv - cmpl $10, %esi # Test if <= radix, for easy loop - movl %esi, %ebx # Value in eax (for L10_low) - jae .L10_low - - # Value is one digit (negative or positive) - addb $48, %bl - movb %bl,(%edi) - incl %edi - jmp .L10_end - .align 4 - -.L10_longdiv: - # val is stored in in ebp:esi - movl %ebp,%eax # High part of value - xorl %edx,%edx - divl %ebx # Divide by 10 - movl %eax,%ebp - movl %esi,%eax - divl %ebx # Divide by 10 - decl %ecx - movl %eax,%esi # quotent in ebp:esi - addl $48,%edx # Convert to ascii - movb %dl,(%ecx) # store value in buff - -.L10_30: - testl %ebp,%ebp - ja .L10_longdiv - movl %esi,%ebx # Move val to %ebx - -.L10_low: - # The following code uses some tricks to change division by 10 to - # multiplication and shifts - movl $0xcccccccd,%esi - -.L10_40: # Divide %ebx with 10 - movl %ebx,%eax - mull %esi - decl %ecx - shrl $3,%edx - leal (%edx,%edx,4),%eax - addl %eax,%eax - subb %al,%bl # %bl now contains val % 10 - addb $48,%bl - movb %bl,(%ecx) - movl %edx,%ebx - testl %ebx,%ebx - jne .L10_40 - jmp .Lcopy_end # Shared end with longlong2str - -.L10end: - .size longlong10_to_str,.L10end-longlong10_to_str diff --git a/strings/longlong2str_asm.c b/strings/longlong2str_asm.c deleted file mode 100644 index e5628043da6..00000000000 --- a/strings/longlong2str_asm.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - Wrapper for longlong2str.s - - We need this because the assembler code can't access the local variable - _dig_vector in a portable manner. -*/ - -#include <my_global.h> -#include "m_string.h" - -extern char *longlong2str_with_dig_vector(longlong val,char *dst,int radix, - const char *dig_vector); - -char *ll2str(longlong val,char *dst,int radix, int upcase) -{ - return longlong2str_with_dig_vector(val, dst, radix, - upcase ? _dig_vec_upper : _dig_vec_lower); -} diff --git a/strings/my_strtoll10-x86.s b/strings/my_strtoll10-x86.s deleted file mode 100644 index f73428de7de..00000000000 --- a/strings/my_strtoll10-x86.s +++ /dev/null @@ -1,418 +0,0 @@ -# Copyright (C) 2003 MySQL AB -# -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -# Implemention of my_strtoll(): Converting a string to a 64 bit integer. -# For documentation, check my_strtoll.c - - .file "my_strtoll10-x86.s" - .version "01.02" - -.text - .align 4 - -.globl my_strtoll10 - .type my_strtoll10,@function - - - # Used stack variables - # ebp-4 dummy for storing endptr if endptr = 0 - # ebp-8 First 9 digits of return values - # ebp-12 Pointer to first digit of second part - # ebp-16 Store lowest 2 digits - # ebp-20 != 0 if value was negative - # ebp-24 High max value - # ebp-28 Middle max value - # ebp-32 Low max value - # ebp-36 Temp value - - # esi Pointer to input string - # ebx End of string - -my_strtoll10: - pushl %ebp - movl %esp,%ebp - subl $48,%esp - pushl %esi - pushl %edi - pushl %ebx - movl 8(%ebp),%esi # esi= nptr - movl 16(%ebp),%ecx # ecx= error (Will be overwritten later) - movl 12(%ebp),%eax # eax= endptr - cmpl $0,%eax # if (endptr) - je .L110 - -# Fixed length string - movl (%eax),%ebx # bx= end-of-string - .p2align 4,,7 -.L100: - cmpl %ebx,%esi - je .Lno_conv - movb (%esi), %al # al= next byte - incl %esi - cmpb $32,%al # Skip space - je .L100 - cmpb $9,%al # Skip tab - je .L100 - jmp .L130 - -# String that ends with \0 - -.L110: - leal -4(%ebp),%edi - movl %edi,12(%ebp) # endptr= &dummy, for easier end check - .p2align 4,,7 -.L120: - movb (%esi), %al # al= next byte - incl %esi - cmpb $32,%al - je .L120 - cmpb $9,%al - je .L120 - testb %al,%al # Test if we found end \0 - je .Lno_conv - leal 65535(%esi),%ebx # ebx = end-of-string - -.L130: - cmpb $45,%al # Test if '-' - jne .Lpositive - - # negative number - movl $-1,(%ecx) # error = -1 (mark that number is negative) - movl $1,-20(%ebp) # negative= 1 - movl $92233720,-24(%ebp) - movl $368547758,-28(%ebp) - movl $8,-32(%ebp) - jmp .L460 - - .p2align 4,,7 -.Lpositive: - movl $0,(%ecx) # error=0 - movl $0,-20(%ebp) # negative= 0 - movl $184467440,-24(%ebp) - movl $737095516,-28(%ebp) - movl $15,-32(%ebp) - cmpb $43,%al # Check if '+' - jne .L462 - -.L460: - cmpl %ebx,%esi # Check if overflow - je .Lno_conv - movb (%esi), %al # al= next byte after sign - incl %esi - - # Remove pre zero to be able to handle a lot of pre-zero -.L462: - cmpb $48,%al - jne .L475 # Number doesn't start with 0 - decl %esi - .p2align 4,,7 - - # Skip pre zeros -.L481: - incl %esi # Skip processed byte - cmpl %ebx,%esi - je .Lms_return_zero - cmpb (%esi),%al # Test if next byte is also zero - je .L481 - leal 9(%esi),%ecx # ecx = end-of-current-part - xorl %edi,%edi # Store first 9 digits in edi - jmp .L482 - .p2align 4,,7 - - # Check if first char is a valid number -.L475: - addb $-48,%al - cmpb $9,%al - ja .Lno_conv -.L477: - movzbl %al,%edi # edi = first digit - leal 8(%esi),%ecx # ecx = end-of-current-part - - # Handle first 8/9 digits and store them in edi -.L482: - cmpl %ebx,%ecx - jbe .L522 - movl %ebx,%ecx # ecx = min(end-of-current-part, end-of-string) - jmp .L522 - - .p2align 4,,7 -.L488: - movb (%esi), %al # al= next byte - incl %esi - addb $-48,%al - cmpb $9,%al - ja .Lend_i_dec_esi - - # Calculate edi= edi*10 + al - leal (%edi,%edi,4),%edx - movzbl %al,%eax - leal (%eax,%edx,2),%edi -.L522: - cmpl %ecx,%esi # If more digits at this level - jne .L488 - cmpl %ebx,%esi # If end of string - je .Lend_i - - movl %edi,-8(%ebp) # Store first 9 digits - movl %esi,-12(%ebp) # store pos to first digit of second part - - # Calculate next 9 digits and store them in edi - - xorl %edi,%edi - leal 9(%esi),%ecx # ecx= end-of-current-part - movl %ecx,-36(%ebp) # Store max length - cmpl %ebx,%ecx - jbe .L498 - movl %ebx,%ecx # ecx = min(end-of-current-part, end-of-string) - - .p2align 4,,7 -.L498: - movb (%esi), %al # al= next byte - incl %esi - addb $-48,%al - cmpb $9,%al - ja .Lend_i_and_j_decl_esi - - # Calculate edi= edi*10 + al - leal (%edi,%edi,4),%edx - movzbl %al,%eax - leal (%eax,%edx,2),%edi - - cmpl %ecx,%esi # If end of current part - jne .L498 - cmpl %ebx,%esi # If end of string - jne .L500 - cmpl -36(%ebp),%esi # Test if string is less than 18 digits - jne .Lend_i_and_j -.L499: - movl $1000000000,%eax - jmp .Lgot_factor # 18 digit string - - # Handle the possible next to last digit and store in ecx -.L500: - movb (%esi),%al - addb $-48,%al - cmpb $9,%al - ja .L499 # 18 digit string - - incl %esi - movzbl %al,%ecx - cmpl %ebx,%esi # If end of string - je .Lend4 - - movb (%esi),%al # Read last digit - addb $-48,%al - cmpb $9,%al - ja .Lend4 - - # ecx= ecx*10 + al - leal (%ecx,%ecx,4),%edx - movzbl %al,%eax - leal (%eax,%edx,2),%ecx - - movl 12(%ebp),%eax # eax = endptr - incl %esi - movl %esi,(%eax) # *endptr = end-of-string - cmpl %ebx,%esi - je .L505 # At end of string - - movb (%esi),%al # check if extra digits - addb $-48,%al - cmpb $9,%al - jbe .Loverflow - - # At this point we have: - # -8(%ebp) First 9 digits - # edi Next 9 digits - # ecx Last 2 digits - # *endpos end-of-string - -.L505: # Check that we are not going to get overflow for unsigned long long - movl -8(%ebp),%eax # First 9 digits - cmpl -24(%ebp),%eax - ja .Loverflow - jne .L507 - cmpl -28(%ebp),%edi - ja .Loverflow - jne .L507 - cmpl -32(%ebp),%ecx - ja .Loverflow - -.L507: - movl %edi,-4(%ebp) # Save middle bytes - movl %ecx,%esi # esi = 2 last digits - movl $1215752192,%ecx # %ecx= lower_32_bits(100000000000) - mull %ecx - imull $23,-8(%ebp),%ecx - movl $0,-36(%ebp) - movl %eax,%ebx - imull $1215752192,-36(%ebp),%eax - movl %edx,%edi - addl %ecx,%edi - addl %eax,%edi # Temp in edi:ebx - - movl $100,%eax # j= j*100 - mull -4(%ebp) - addl %ebx,%eax # edx:eax+= edi:ebx - adcl %edi,%edx - addl %esi,%eax - adcl $0,%edx - jmp .Lms_return - -.Loverflow: - # When we come here, *endptr is already updated - - movl 16(%ebp),%edx # edx= error - movl $34,(%edx) # *error = 34 - movl $-1,%eax - movl %eax,%edx - cmpl $0,-20(%ebp) # If negative - je .Lms_return - xor %eax,%eax # edx:eax = LONGLONG_LMIN - movl $-2147483648,%edx - jmp .Lms_return - - # Return value that is in %edi as long long - .p2align 4,,7 -.Lend_i_dec_esi: - decl %esi # Fix so that it points at last digit -.Lend_i: - xorl %edx,%edx - movl %edi,%eax - cmpl $0,-20(%ebp) - je .Lreturn_save_endptr # Positive number - negl %eax - cltd # Neg result in edx:eax - jmp .Lreturn_save_endptr - - # Return value (%ebp-8) * lfactor[(uint) (edx-start)] + edi - .p2align 4,,7 -.Lend_i_and_j_decl_esi: - decl %esi # Fix so that it points at last digit -.Lend_i_and_j: - movl %esi,%ecx - subl -12(%ebp),%ecx # ecx= number of digits in second part - - # Calculate %eax= 10 ** %cl, where %cl <= 8 - # With an array one could do this with: - # movl 10_factor_table(,%ecx,4),%eax - # We calculate the table here to avoid problems in - # position independent code (gcc -pic) - - cmpb $3,%cl - ja .L4_to_8 - movl $1000, %eax - je .Lgot_factor # %cl=3, eax= 1000 - movl $10, %eax - cmpb $1,%cl # %cl is here 0 - 2 - je .Lgot_factor # %cl=1, eax= 10 - movl $100, %eax - ja .Lgot_factor # %cl=2, eax=100 - movl $1, %eax - jmp .Lgot_factor # %cl=0, eax=1 - -.L4_to_8: # %cl is here 4-8 - cmpb $5,%cl - movl $100000, %eax - je .Lgot_factor # %cl=5, eax=100000 - movl $10000, %eax - jbe .Lgot_factor # %cl=4, eax=10000 - movl $10000000, %eax - cmpb $7,%cl - je .Lgot_factor # %cl=7, eax=10000000 - movl $100000000, %eax - ja .Lgot_factor # %cl=8, eax=100000000 - movl $1000000, %eax # %cl=6, eax=1000000 - - # Return -8(%ebp) * %eax + edi - .p2align 4,,7 -.Lgot_factor: - mull -8(%ebp) - addl %edi,%eax - adcl $0,%edx - cmpl $0,-20(%ebp) # if negative - je .Lreturn_save_endptr - negl %eax # Neg edx:%eax - adcl $0,%edx - negl %edx - jmp .Lreturn_save_endptr - - # Return -8(%ebp) * $10000000000 + edi*10 + ecx - .p2align 4,,7 -.Lend4: - movl %ecx,-16(%ebp) # store lowest digits - movl 12(%ebp),%ebx - movl %esi,(%ebx) # *endpos = end-of-string - movl -8(%ebp),%eax # First 9 digits - movl $1410065408,%ecx # ecx= lower_32_bits(10000000000) - mull %ecx - movl $0,-36(%ebp) - movl %eax,%ebx # Store lowest 32 byte from multiplication - imull $1410065408,-36(%ebp),%eax - movl -8(%ebp),%ecx # First 9 digits - movl %edx,%esi - addl %ecx,%ecx - addl %ecx,%esi - addl %eax,%esi # %esi:%ebx now has -8(%ebp) * $10000000000 - - movl $10,%eax # Calc edi*10 - mull %edi - addl %ebx,%eax # And add to result - adcl %esi,%edx - addl -16(%ebp),%eax # Add lowest digit - adcl $0,%edx - cmpl $0,-20(%ebp) # if negative - je .Lms_return - - cmpl $-2147483648,%edx # Test if too big signed integer - ja .Loverflow - jne .L516 - testl %eax,%eax - ja .Loverflow - -.L516: - negl %eax - adcl $0,%edx - negl %edx - jmp .Lms_return - - .p2align 4,,7 -.Lno_conv: # Not a legal number - movl 16(%ebp),%eax - movl $33,(%eax) # error= edom - -.Lms_return_zero: - xorl %eax,%eax # Return zero - xorl %edx,%edx - - .p2align 4,,7 -.Lreturn_save_endptr: - movl 12(%ebp),%ecx # endptr= end-of-string - movl %esi,(%ecx) # *endptr= end-of-string - -.Lms_return: - popl %ebx - popl %edi - popl %esi - movl %ebp,%esp - popl %ebp - ret - -.my_strtoll10_end: - .size my_strtoll10,.my_strtoll10_end-my_strtoll10 - .comm res,240,32 - .comm end_ptr,120,32 - .comm error,120,32 - .ident "Monty" diff --git a/strings/str_test.c b/strings/str_test.c deleted file mode 100644 index 7e304fbd10a..00000000000 --- a/strings/str_test.c +++ /dev/null @@ -1,275 +0,0 @@ -/* Copyright (C) 2000-2003 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* Test of all stringfunktions that is coded in assembler */ - -#include <my_global.h> -#include <stdarg.h> -#include "m_string.h" - -#define F_LEN 8 -#define F_CHAR 'A' -#define F_FILL 'B' -#define T_LEN 15 -#define T_CHAR 'D' -#define T_FILL 'E' -#define F_PREFILL '0' -#define T_PREFILL '1' - -static char from_buff[100],to_buff[100]; -static char * from, *to; -static int errors,tests; -static int test_strarg(const char *name,...); -static void init_strings (void); /* Init from and to */ -void test_arg (const char *message,long func_value,long value); -int compare_buff(const char *message,char * b1,char * b2,int length, - pchar fill, pchar prefill); - -static int my_test(int a) -{ - return a ? 1 : 0; -} - -int main(void) -{ - static char v1[]="Monty",v2[]="on",v3[]="Montys",v4[]="ty",v5[]="gr", - v6[]="hohohoo",v7[]="hohoo",v8[]="hohooo",v9[]="t", - cont[]="qwet"; - errors=tests=0; - init_strings(); - - test_arg("memcmp(from,to,5)",(long) my_test(memcmp(from,to,5)),1L); - test_arg("memcmp(from,from,5)",(long) memcmp(from,from,5),0L); - - test_arg("memcmp(from,to,0)",(long) memcmp(from,to,0),0L); - test_arg("strend(from)",(long) strend(from),(long) from+F_LEN); - test_arg("strchr(v1,'M')",(long) strchr(v1,'M'),(long) v1); - test_arg("strchr(v1,'y')",(long) strchr(v1,'y'),(long) v1+4); - test_arg("strchr(v1,'x')",(long) strchr(v1,'x'),0L); - test_arg("strcont(v1,cont)",(long) strcont(v1,cont),(long) v1+3); - test_arg("strcont(v1,v2)",(long) strcont(v1,v2),(long) v1+1); - test_arg("strcont(v1,v5)",(long) strcont(v1,v5),0L); - test_arg("is_prefix(v3,v1)",(long) is_prefix(v3,v1),1L); - test_arg("is_prefix(v1,v3)",(long) is_prefix(v1,v3),0L); - test_arg("is_prefix(v3,v4)",(long) is_prefix(v3,v4),0L); - test_arg("strstr(v1,v1)",(long) strstr(v1,v1),(long) v1); - test_arg("strstr(v1,v2)",(long) strstr(v1,v2),(long) v1+1); - test_arg("strstr(v1,v4)",(long) strstr(v1,v4),(long) v1+3); - test_arg("strstr(v6,v7)",(long) strstr(v6,v7),(long) v6+2); - test_arg("strstr(v1,v9)",(long) strstr(v1,v9),(long) v1+3); - test_arg("strstr(v1,v3)",(long) strstr(v1,v3),0L); - test_arg("strstr(v1,v5)",(long) strstr(v1,v5),0L); - test_arg("strstr(v6,v8)",(long) strstr(v6,v8),0L); - - test_arg("strlen(from)",(long) strlen(from),(long) F_LEN); - test_arg("strlen(\"\")",(long) strlen(""),0L); -#ifdef HAVE_STRNLEN - test_arg("strnlen(from,3)",(long) strnlen(from,3),3L); - test_arg("strnlen(from,0)",(long) strnlen(from,0),0L); - test_arg("strnlen(from,1000)",(long) strnlen(from,1000),(long) F_LEN); -#endif - - test_strarg("bfill(to,4,' ')",(bfill(to,4,' '),0L),INT_MAX32,4,' ',0,0); - test_strarg("bfill(from,0,' ')",(bfill(from,0,' '),0L),INT_MAX32,0,0); - test_strarg("bzero(to,3)",(bzero(to,3),0L),INT_MAX32,3,0,0,0); - test_strarg("bzero(to,0)",(bzero(to,0),0L),INT_MAX32,0,0); - test_strarg("bmove(to,from,4)",(bmove(to,from,4),0L),INT_MAX32,4,F_CHAR, - 0,0); - test_strarg("bmove(to,from,0)",(bmove(to,from,0),0L),INT_MAX32,0,0); - test_strarg("bmove_upp(to+6,from+6,3)",(bmove_upp(to+6,from+6,3),0L),INT_MAX32, - 3,T_CHAR,3,F_CHAR,0,0); - test_strarg("bmove_upp(to,from,0)",(bmove_upp(to,from,0),0L),INT_MAX32,0,0); - test_strarg("memcpy(to,from,8)",(memcpy(to,from,8),0L),INT_MAX32, - 8,F_CHAR,0,0); - test_strarg("strappend(to,3,' ')",(strappend(to,3,' '),0L),INT_MAX32, - 3,T_CHAR,1,0,T_LEN-4,T_CHAR,1,0,0,0); - test_strarg("strappend(to,T_LEN+5,' ')",(strappend(to,T_LEN+5,' '),0L),INT_MAX32, - T_LEN,T_CHAR,5,' ',1,0,0,0); - test_strarg("strcat(to,from)",strcat(to,from),to,T_LEN,T_CHAR, - F_LEN,F_CHAR,1,0,0,0); - test_strarg("strcat(to,\"\")",strcat(to,""),INT_MAX32,0,0); - test_strarg("strfill(to,4,' ')",strfill(to,4,' '),to+4,4,' ',1,0,0,0); - test_strarg("strfill(from,0,' ')",strfill(from,0,' '),from,0,1,0,0); - test_strarg("strmake(to,from,4)",strmake(to,from,4),to+4,4,F_CHAR, - 1,0,0,0); - test_strarg("strmake(to,from,0)",strmake(to,from,0),to+0,1,0,0,0); - test_strarg("strmov(to,from)",strmov(to,from),to+F_LEN,F_LEN,F_CHAR,0,0); - test_strarg("strmov(to,\"\")",strmov(to,""),to,1,0,0,0); - test_strarg("strnmov(to,from,2)",strnmov(to,from,2),to+2,2,F_CHAR,0,0); - test_strarg("strnmov(to,from,F_LEN+5)",strnmov(to,from,F_LEN+5),to+F_LEN, - F_LEN,F_CHAR,1,0,0,0); - test_strarg("strnmov(to,\"\",2)",strnmov(to,"",2),to,1,0,0,0); - test_strarg("strxmov(to,from,\"!!\",NullS)",strxmov(to,from,"!!",NullS),to+F_LEN+2,F_LEN,F_CHAR,2,'!',0,0,0); - test_strarg("strxmov(to,NullS)",strxmov(to,NullS),to,1,0,0,0); - test_strarg("strxmov(to,from,from,from,from,from,'!!',from,NullS)",strxmov(to,from,from,from,from,from,"!!",from,NullS),to+F_LEN*6+2,F_LEN,F_CHAR,F_LEN,F_CHAR,F_LEN,F_CHAR,F_LEN,F_CHAR,F_LEN,F_CHAR,2,'!',F_LEN,F_CHAR,1,0,0,0); - - test_strarg("strxnmov(to,100,from,\"!!\",NullS)",strxnmov(to,100,from,"!!",NullS),to+F_LEN+2,F_LEN,F_CHAR,2,'!',0,0,0); - test_strarg("strxnmov(to,2,NullS)",strxnmov(to,2,NullS),to,1,0,0,0); - test_strarg("strxnmov(to,100,from,from,from,from,from,'!!',from,NullS)",strxnmov(to,100,from,from,from,from,from,"!!",from,NullS),to+F_LEN*6+2,F_LEN,F_CHAR,F_LEN,F_CHAR,F_LEN,F_CHAR,F_LEN,F_CHAR,F_LEN,F_CHAR,2,'!',F_LEN,F_CHAR,1,0,0,0); - test_strarg("strxnmov(to,2,\"!!!\",NullS)",strxnmov(to,2,"!!!",NullS),to+2,2,'!',0,0,0); - test_strarg("strxnmov(to,2,\"!!\",NullS)",strxnmov(to,2,"!!","xx",NullS),to+2,2,'!',0,0,0); - test_strarg("strxnmov(to,2,\"!\",\"x\",\"y\",NullS)",strxnmov(to,2,"!","x","y",NullS),to+2,1,'!',1,'x',0,0,0); - - test_strarg("bchange(to,2,from,4,6)",(bchange(to,2,from,4,6),0L),INT_MAX32, - 4,F_CHAR,2,T_CHAR,0,0); - - printf("tests: %d errors: %d\n",tests,errors); - if (errors) - fputs("--- Some functions doesn't work!! Fix them\n",stderr); - return(errors > 0); -} /* main */ - - - /* Init strings */ - -void init_strings(void) -{ - reg1 int i; - reg2 char *pos; - - from=from_buff+3; to=to_buff+3; - - pos=from_buff; *pos++= F_FILL; *pos++=F_FILL; *pos++=F_PREFILL; - for (i=0 ; i < F_LEN ; i++) - *pos++=F_CHAR; - *pos++=0; - for (i=0; i<50 ; i++) - *pos++= F_FILL; - - pos=to_buff; *pos++= T_FILL; *pos++=T_FILL; *pos++=T_PREFILL; - for (i=0 ; i < T_LEN ; i++) - *pos++=T_CHAR; - *pos++=0; - for (i=0; i<50 ; i++) - *pos++= T_FILL; -} /* init_strings */ - - - /* Test that function return rigth value */ - -void test_arg(const char *message, long int func_value, long int value) -{ - tests++; - printf("testing '%s'\n",message); - if (func_value != value) - { - printf("func: '%s' = %ld Should be: %ld\n",message,func_value,value); - errors++; - } -} /* test_arg */ - - /* Test function return value and from and to arrays */ - -static int test_strarg(const char *message,...) -{ - long func_value,value; - int error,length; - char chr,cmp_buff[100],*pos,*pos2; - va_list pvar; - - tests++; - va_start(pvar,message); - func_value=va_arg(pvar,long); - value=va_arg(pvar,long); - - printf("testing '%s'\n",message); - if (func_value != value && value != INT_MAX32) - { - printf("func: '%s' = %ld Should be: %ld\n",message,func_value,value); - errors++; - } - pos= cmp_buff; - while ((length = va_arg(pvar, int)) != 0) - { - chr= (char) (va_arg(pvar, int)); - while (length--) - *pos++=chr; - } - pos2=to+ (int)(pos-cmp_buff); - while (pos <= cmp_buff+T_LEN) - *pos++= *pos2++; - if (compare_buff(message,to,cmp_buff,(int) (pos-cmp_buff),T_FILL,T_PREFILL)) - { - init_strings(); - va_end(pvar); - return 1; - } - - pos= cmp_buff; - while ((length = va_arg(pvar, int)) != 0) - { - chr= (char) (va_arg(pvar, int)); - while (length--) - *pos++=chr; - } - pos2=from+ (int)(pos-cmp_buff); - while (pos <= cmp_buff+F_LEN) - *pos++= *pos2++; - error=compare_buff(message,from,cmp_buff,(int) (pos-cmp_buff),F_FILL,F_PREFILL); - init_strings(); - va_end(pvar); - return (error != 0); -} /* test_strarg */ - - - /* test if function made right value */ - -int compare_buff(const char *message, char * b1, char * b2, int length, - pchar fill, pchar prefill) -{ - int i,error=0; - - if (memcmp(b1,b2,length)) - { - errors++; - printf("func: '%s' Buffers differ\nIs: ",message); - for (i=0 ; i<length ; i++) - printf("%3d ",b1[i]); - printf("\nShould be: "); - for (i=0 ; i<length ; i++) - printf("%3d ",b2[i]); - puts(""); - } - else if (b1[-1] != prefill || b1[-2] != fill || b1[-3] != fill) - { - printf("func: '%s' Chars before buffer is changed\n",message); - errors++; - error=1; - } - else if (b1[length] != fill || b1[length+1] != fill) - { - printf("func: '%s' Chars after buffer is changed\n",message); - errors++; - error=1; - } - return error; -} /* compare_buff */ - - /* These are here to be loaded and examined */ - -extern void dummy_functions(void); - -void dummy_functions(void) -{ - (void) memchr(from,'a',5); - (void) memcmp(from,to,5); - (void) memcpy(from,to,5); - (void) memset(from,' ',5); - (void) strcmp(from,to); - (void) strcpy(from,to); - (void) strstr(from,to); - (void) strrchr(from,'a'); - return; -} diff --git a/strings/strings-x86.s b/strings/strings-x86.s deleted file mode 100644 index 4872c566685..00000000000 --- a/strings/strings-x86.s +++ /dev/null @@ -1,393 +0,0 @@ -# Copyright (C) 2000 MySQL AB -# This program is free software; you can redistribute it and/or modify -# it under the terms of the GNU General Public License as published by -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, write to the Free Software -# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - -# Optimized string functions Intel 80x86 (gcc/gas syntax) - - .file "strings.s" - .version "1.00" - -.text - -# Move a alligned, not overlapped, by (long) divided memory area -# Args: to,from,length - -.globl bmove_align - .type bmove_align,@function -bmove_align: - movl %edi,%edx - push %esi - movl 4(%esp),%edi # to - movl 8(%esp),%esi # from - movl 12(%esp),%ecx # length - addw $3,%cx # fix if not divisible with long - shrw $2,%cx - jz .ba_20 - .p2align 4,,7 -.ba_10: - movl -4(%esi,%ecx),%eax - movl %eax,-4(%edi,%ecx) - decl %ecx - jnz .ba_10 -.ba_20: pop %esi - movl %edx,%edi - ret - -.bmove_align_end: - .size bmove_align,.bmove_align_end-bmove_align - - # Move a string from higher to lower - # Arg from_end+1,to_end+1,length - -.globl bmove_upp - .type bmove_upp,@function -bmove_upp: - movl %edi,%edx # Remember %edi - push %esi - movl 8(%esp),%edi # dst - movl 16(%esp),%ecx # length - movl 12(%esp),%esi # source - test %ecx,%ecx - jz .bu_20 - subl %ecx,%esi # To start of strings - subl %ecx,%edi - - .p2align 4,,7 -.bu_10: movb -1(%esi,%ecx),%al - movb %al,-1(%edi,%ecx) - decl %ecx - jnz .bu_10 -.bu_20: pop %esi - movl %edx,%edi - ret - -.bmove_upp_end: - .size bmove_upp,.bmove_upp_end-bmove_upp - - # Append fillchars to string - # Args: dest,len,fill - -.globl strappend - .type strappend,@function -strappend: - pushl %edi - movl 8(%esp),%edi # Memory pointer - movl 12(%esp),%ecx # Length - clrl %eax # Find end of string - repne - scasb - jnz sa_99 # String to long, shorten it - movzb 16(%esp),%eax # Fillchar - decl %edi # Point at end null - incl %ecx # rep made one dec for null-char - - movb %al,%ah # (2) Set up a 32 bit pattern. - movw %ax,%dx # (2) - shll $16,%eax # (3) - movw %dx,%ax # (2) %eax has the 32 bit pattern. - - movl %ecx,%edx # (2) Save the count of bytes. - shrl $2,%ecx # (2) Number of dwords. - rep - stosl # (5 + 5n) - movb $3,%cl # (2) - and %edx,%ecx # (2) Fill in the odd bytes - rep - stosb # Move last bytes if any - -sa_99: movb $0,(%edi) # End of string - popl %edi - ret -.strappend_end: - .size strappend,.strappend_end-strappend - - # Find if string contains any char in another string - # Arg: str,set - # Ret: Pointer to first found char in str - -.globl strcont - .type strcont,@function -strcont: - movl %edi,%edx - pushl %esi - movl 8(%esp),%esi # str - movl 12(%esp),%ecx # set - clrb %ah # For endtest - jmp sc_60 - -sc_10: scasb - jz sc_fo # Found char -sc_20: cmp (%edi),%ah # Test if null - jnz sc_10 # Not end of set yet - incl %esi # Next char in str -sc_60: movl %ecx,%edi # %edi = Set - movb (%esi),%al # Test if this char exist - andb %al,%al - jnz sc_20 # Not end of string - clrl %esi # Return Null -sc_fo: movl %esi,%eax # Char found here - movl %edx,%edi # Restore - popl %esi - ret -.strcont_end: - .size strcont,.strcont_end-strcont - - # Find end of string - # Arg: str - # ret: Pointer to end null - -.globl strend - .type strend,@function -strend: - movl %edi,%edx # Save - movl 4(%esp),%edi # str - clrl %eax # Find end of string - movl %eax,%ecx - decl %ecx # ECX = -1 - repne - scasb - movl %edi,%eax - decl %eax # End of string - movl %edx,%edi # Restore - ret -.strend_end: - .size strend,.strend_end-strend - - # Make a string with len fill-chars and endnull - # Args: dest,len,fill - # Ret: dest+len - -.globl strfill - .type strfill,@function -strfill: - pushl %edi - movl 8(%esp),%edi # Memory pointer - movl 12(%esp),%ecx # Length - movzb 16(%esp),%eax # Fill - - movb %al,%ah # (2) Set up a 32 bit pattern - movw %ax,%dx # (2) - shll $16,%eax # (3) - movw %dx,%ax # (2) %eax has the 32 bit pattern. - - movl %ecx,%edx # (2) Save the count of bytes. - shrl $2,%ecx # (2) Number of dwords. - rep - stosl # (5 + 5n) - movb $3,%cl # (2) - and %edx,%ecx # (2) Fill in the odd bytes - rep - stosb # Move last bytes if any - - movb %cl,(%edi) # End NULL - movl %edi,%eax # End i %eax - popl %edi - ret -.strfill_end: - .size strfill,.strfill_end-strfill - - - # Find a char in or end of a string - # Arg: str,char - # Ret: pointer to found char or NullS - -.globl strcend - .type strcend,@function -strcend: - movl %edi,%edx - movl 4(%esp),%edi # str - movb 8(%esp),%ah # search - clrb %al # for scasb to find end - -se_10: cmpb (%edi),%ah - jz se_20 # Found char - scasb - jnz se_10 # Not end - dec %edi # Not found, point at end of string -se_20: movl %edi,%eax - movl %edx,%edi # Restore - ret -.strcend_end: - .size strcend,.strcend_end-strcend - - # Test if string has a given suffix - -.globl is_prefix - .type is_prefix,@function -is_prefix: - movl %edi,%edx # Save %edi - pushl %esi # and %esi - movl 12(%esp),%esi # get suffix - movl 8(%esp),%edi # s1 - movl $1,%eax # Ok and zero-test -ip_10: cmpb (%esi),%ah - jz suf_ok # End of string/ found suffix - cmpsb # Compare strings - jz ip_10 # Same, possible prefix - xor %eax,%eax # Not suffix -suf_ok: popl %esi - movl %edx,%edi - ret -.is_prefix_end: - .size is_prefix,.is_prefix_end-is_prefix - - # Find a substring in string - # Arg: str,search - -.globl strstr - .type strstr,@function - -strstr: - pushl %edi - pushl %esi - movl 12(%esp),%esi # str - movl 16(%esp),%edi # search - movl %edi,%ecx - incl %ecx # %ecx = search+1 - movb (%edi),%ah # %ah = First char in search - jmp sf_10 - -sf_00: movl %edx,%esi # si = Current str-pos -sf_10: movb (%esi),%al # Test if this char exist - andb %al,%al - jz sf_90 # End of string, didn't find search - incl %esi - cmpb %al,%ah - jnz sf_10 # Didn't find first char, continue - movl %esi,%edx # Save str-pos in %edx - movl %ecx,%edi -sf_20: cmpb $0,(%edi) - jz sf_fo # Found substring - cmpsb - jz sf_20 # Char ok - jmp sf_00 # Next str-pos - -sf_90: movl $1,%edx # Return Null -sf_fo: movl %edx,%eax # Char found here - decl %eax # Pointed one after - popl %esi - popl %edi - ret -.strstr_end: - .size strstr,.strstr_end-strstr - - # Make a string of len length from another string - # Arg: dst,src,length - # ret: end of dst - -.globl strmake - .type strmake,@function - -strmake: - pushl %edi - pushl %esi - mov 12(%esp),%edi # dst - movl $0,%edx - movl 20(%esp),%ecx # length - movl 16(%esp),%esi # src - cmpl %edx,%ecx - jz sm_90 -sm_00: movb (%esi,%edx),%al - cmpb $0,%al - jz sm_90 - movb %al,(%edi,%edx) - incl %edx - cmpl %edx,%ecx - jnz sm_00 -sm_90: movb $0,(%edi,%edx) -sm_99: lea (%edi,%edx),%eax # Return pointer to end null - pop %esi - pop %edi - ret -.strmake_end: - .size strmake,.strmake_end-strmake - - # Move a string with max len chars - # arg: dst,src,len - # ret: pos to first null or dst+len - -.globl strnmov - .type strnmov,@function -strnmov: - pushl %edi - pushl %esi - movl 12(%esp),%edi # dst - movl 16(%esp),%esi # src - movl 20(%esp),%ecx # Length of memory-area - jecxz snm_99 # Nothing to do - clrb %al # For test of end-null - -snm_10: cmpb (%esi),%al # Next char to move - movsb # move arg - jz snm_20 # last char, fill with null - loop snm_10 # Continue moving - incl %edi # Point two after last -snm_20: decl %edi # Point at first null (or last+1) -snm_99: movl %edi,%eax # Pointer at last char - popl %esi - popl %edi - ret -.strnmov_end: - .size strnmov,.strnmov_end-strnmov - - -.globl strmov - .type strmov,@function -strmov: - movl %esi,%ecx # Save old %esi and %edi - movl %edi,%edx - movl 8(%esp),%esi # get source pointer (s2) - movl 4(%esp),%edi # %edi -> s1 -smo_10: movb (%esi),%al - movsb # move arg - andb %al,%al - jnz smo_10 # Not last - movl %edi,%eax - dec %eax - movl %ecx,%esi # Restore - movl %edx,%edi - ret -.strmov_end: - .size strmov,.strmov_end-strmov - -.globl strxmov - .type strxmov,@function -strxmov: - movl %ebx,%edx # Save %ebx, %esi and %edi - mov %esi,%ecx - push %edi - leal 8(%esp),%ebx # Get destination - movl (%ebx),%edi - xorb %al,%al - jmp next_str # Handle source ebx+4 - -start_str: - movsb - cmpb -1(%edi),%al - jne start_str - decl %edi # Don't copy last null - -next_str: - addl $4,%ebx - movl (%ebx),%esi - orl %esi,%esi - jne start_str - movb %al,0(%edi) # Force last to ASCII 0 - - movl %edi,%eax # Return ptr to ASCII 0 - pop %edi # Restore registers - movl %ecx,%esi - movl %edx,%ebx - ret -.strxmov_end: - .size strxmov,.strxmov_end-strxmov diff --git a/strings/strstr.c b/strings/strstr.c deleted file mode 100644 index a5b50d12043..00000000000 --- a/strings/strstr.c +++ /dev/null @@ -1,52 +0,0 @@ -/* Copyright (C) 2002 MySQL AB - - This library is free software; you can redistribute it and/or - modify it under the terms of the GNU Library General Public - License as published by the Free Software Foundation; version 2 - of the License. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Library General Public License for more details. - - You should have received a copy of the GNU Library General Public - License along with this library; if not, write to the Free - Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, - MA 02111-1307, USA */ - -/* File : strstr.c - Author : Monty - Updated: 1986.11.24 - Defines: strstr() - - strstr(src, pat) looks for an instance of pat in src. pat is not a - regex(3) pattern, it is a literal string which must be matched exactly. - The result is a pointer to the first character of the located instance, - or NullS if pat does not occur in src. - -*/ - -#include <my_global.h> -#include "m_string.h" - -#ifndef HAVE_STRSTR - -char *strstr(register const char *str,const char *search) -{ - register char *i,*j; - register char first= *search; - -skip: - while (*str != '\0') { - if (*str++ == first) { - i=(char*) str; j=(char*) search+1; - while (*j) - if (*i++ != *j++) goto skip; - return ((char*) str-1); - } - } - return ((char*) 0); -} /* strstr */ - -#endif diff --git a/strings/strto.c b/strings/strto.c deleted file mode 100644 index fcb0d800b81..00000000000 --- a/strings/strto.c +++ /dev/null @@ -1,209 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* - strtol,strtoul,strtoll,strtoull - convert string to long, unsigned long, long long or unsigned long long. - strtoxx(char *src,char **ptr,int base) - converts the string pointed to by src to an long of appropriate long and - returnes it. It skips leading spaces and tabs (but not newlines, formfeeds, - backspaces), then it accepts an optional sign and a sequence of digits - in the specified radix. - If the value of ptr is not (char **)NULL, a pointer to the character - terminating the scan is returned in the location pointed to by ptr. - Trailing spaces will NOT be skipped. - - If an error is detected, the result will be LONG_MIN, 0 or LONG_MAX, - (or LONGLONG..) and errno will be set to - EDOM if there are no digits - ERANGE if the result would overflow. - the ptr will be set to src. - This file is based on the strtol from the the GNU C Library. - it can be compiled with the UNSIGNED and/or LONGLONG flag set -*/ - - -#if !defined(_global_h) || !defined(_m_string_h) -# error Calling file must include 'my_global.h' and 'm_string.h' - /* see 'strtoll.c' and 'strtoull.c' for the reasons */ -#endif - -#include "m_ctype.h" -#include "my_sys.h" /* defines errno */ -#include <errno.h> - -#undef strtoull -#undef strtoll -#undef strtoul -#undef strtol -#ifdef USE_LONGLONG -#define UTYPE_MAX (~(ulonglong) 0) -#define TYPE_MIN LONGLONG_MIN -#define TYPE_MAX LONGLONG_MAX -#define longtype longlong -#define ulongtype ulonglong -#ifdef USE_UNSIGNED -#define function ulongtype strtoull -#else -#define function longtype strtoll -#endif -#else -#define UTYPE_MAX (ulong) ~0L -#define TYPE_MIN LONG_MIN -#define TYPE_MAX LONG_MAX -#define longtype long -#define ulongtype unsigned long -#ifdef USE_UNSIGNED -#define function ulongtype strtoul -#else -#define function longtype strtol -#endif -#endif - - -/* Convert NPTR to an `unsigned long int' or `long int' in base BASE. - If BASE is 0 the base is determined by the presence of a leading - zero, indicating octal or a leading "0x" or "0X", indicating hexadecimal. - If BASE is < 2 or > 36, it is reset to 10. - If ENDPTR is not NULL, a pointer to the character after the last - one converted is stored in *ENDPTR. */ - - -function (const char *nptr,char **endptr,int base) -{ - int negative; - register ulongtype cutoff; - register unsigned int cutlim; - register ulongtype i; - register const char *s; - register uchar c; - const char *save; - int overflow; - - if (base < 0 || base == 1 || base > 36) - base = 10; - - s = nptr; - - /* Skip white space. */ - while (my_isspace(&my_charset_latin1, *s)) - ++s; - if (*s == '\0') - { - goto noconv; - } - - /* Check for a sign. */ - negative= 0; - if (*s == '-') - { - negative = 1; - ++s; - } - else if (*s == '+') - { - ++s; - } - - - if (base == 16 && s[0] == '0' && my_toupper (&my_charset_latin1, s[1]) == 'X') - s += 2; - - /* If BASE is zero, figure it out ourselves. */ - if (base == 0) - { - if (*s == '0') - { - if (my_toupper (&my_charset_latin1, s[1]) == 'X') - { - s += 2; - base = 16; - } - else - base = 8; - } - else - base = 10; - } - - /* Save the pointer so we can check later if anything happened. */ - save = s; - - cutoff = UTYPE_MAX / (unsigned long int) base; - cutlim = (uint) (UTYPE_MAX % (unsigned long int) base); - - overflow = 0; - i = 0; - for (c = *s; c != '\0'; c = *++s) - { - if (my_isdigit (&my_charset_latin1, c)) - c -= '0'; - else if (my_isalpha (&my_charset_latin1, c)) - c = my_toupper (&my_charset_latin1, c) - 'A' + 10; - else - break; - if (c >= base) - break; - /* Check for overflow. */ - if (i > cutoff || (i == cutoff && c > cutlim)) - overflow = 1; - else - { - i *= (ulongtype) base; - i += c; - } - } - - /* Check if anything actually happened. */ - if (s == save) - goto noconv; - - /* Store in ENDPTR the address of one character - past the last character we converted. */ - if (endptr != NULL) - *endptr = (char *) s; - -#ifndef USE_UNSIGNED - /* Check for a value that is within the range of - `unsigned long int', but outside the range of `long int'. */ - if (negative) - { - if (i > (ulongtype) TYPE_MIN) - overflow = 1; - } - else if (i > (ulongtype) TYPE_MAX) - overflow = 1; -#endif - - if (overflow) - { - my_errno=ERANGE; -#ifdef USE_UNSIGNED - return UTYPE_MAX; -#else - return negative ? TYPE_MIN : TYPE_MAX; -#endif - } - - /* Return the result of the appropriate sign. */ - return (negative ? -((longtype) i) : (longtype) i); - -noconv: - /* There was no number to convert. */ - my_errno=EDOM; - if (endptr != NULL) - *endptr = (char *) nptr; - return 0L; -} diff --git a/strings/strtol.c b/strings/strtol.c deleted file mode 100644 index 2f0a5286ee9..00000000000 --- a/strings/strtol.c +++ /dev/null @@ -1,28 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* This implements strtol() if needed */ - -/* - These includes are mandatory because they check for type sizes and - functions, especially they handle tricks for Tru64 where 'long' is - 64 bit already and our 'longlong' is just a 'long'. - */ -#include <my_global.h> -#include <m_string.h> - -#if !defined(HAVE_STRTOL) && !defined(__WIN__) -#include "strto.c" -#endif diff --git a/strings/strtoll.c b/strings/strtoll.c deleted file mode 100644 index cfb6fbd75ee..00000000000 --- a/strings/strtoll.c +++ /dev/null @@ -1,33 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* This implements strtoll() if needed */ - - -/* - These includes are mandatory because they check for type sizes and - functions, especially they handle tricks for Tru64 where 'long' is - 64 bit already and our 'longlong' is just a 'long'. - This solves a problem on Tru64 where the C99 compiler has a prototype - for 'strtoll()' but no implementation, see "6.1 New C99 library functions" - in file '/usr/share/doclib/cc.dtk/release_notes.txt'. - */ -#include <my_global.h> -#include <m_string.h> - -#if !defined(HAVE_STRTOLL) && defined(HAVE_LONG_LONG) -#define USE_LONGLONG -#include "strto.c" -#endif diff --git a/strings/strtoul.c b/strings/strtoul.c deleted file mode 100644 index df5c46c220f..00000000000 --- a/strings/strtoul.c +++ /dev/null @@ -1,29 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* This implements strtol() if needed */ - -/* - These includes are mandatory because they check for type sizes and - functions, especially they handle tricks for Tru64 where 'long' is - 64 bit already and our 'longlong' is just a 'long'. - */ -#include <my_global.h> -#include <m_string.h> - -#if !defined(HAVE_STRTOUL) -#define USE_UNSIGNED -#include "strto.c" -#endif diff --git a/strings/strtoull.c b/strings/strtoull.c deleted file mode 100644 index 94bf6904f8d..00000000000 --- a/strings/strtoull.c +++ /dev/null @@ -1,34 +0,0 @@ -/* Copyright (C) 2000 MySQL AB - - This program is free software; you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation; version 2 of the License. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ - -/* This implements strtoull() if needed */ - - -/* - These includes are mandatory because they check for type sizes and - functions, especially they handle tricks for Tru64 where 'long' is - 64 bit already and our 'longlong' is just a 'long'. - This solves a problem on Tru64 where the C99 compiler has a prototype - for 'strtoull()' but no implementation, see "6.1 New C99 library functions" - in file '/usr/share/doclib/cc.dtk/release_notes.txt'. - */ -#include <my_global.h> -#include <m_string.h> - -#if !defined(HAVE_STRTOULL) && defined(HAVE_LONG_LONG) -#define USE_UNSIGNED -#define USE_LONGLONG -#include "strto.c" -#endif diff --git a/support-files/SCO/INSTALL.sh b/support-files/SCO/INSTALL.sh deleted file mode 100755 index 979f33f3f06..00000000000 --- a/support-files/SCO/INSTALL.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/sh - -# search & check GNU patch -PATCH="gpatch" -$PATCH --version || PATCH="patch" -$PATCH --version || exit - - -if /usr/bin/test ! -e PKG/stamp-pre ; then - grep VERSION configure | head -1 | sed 's/VERSION=//' > ./PKG/version - touch PKG/stamp-pre -fi - -if /usr/bin/test ! -e PKG/stamp-patch ; then - ${PATCH} -p0 < ./PKG/patch - touch PKG/stamp-patch -fi - -if /usr/bin/test ! -e PKG/stamp-compile ; then -sh ./PKG/compile.sh ujis -touch PKG/stamp-compile - -sh ./PKG/doc.sh ujis - -fi - - -cd PKG -sh mkpkg.sh ujis diff --git a/support-files/SCO/compile.sh b/support-files/SCO/compile.sh deleted file mode 100644 index 5281ccde02d..00000000000 --- a/support-files/SCO/compile.sh +++ /dev/null @@ -1,102 +0,0 @@ -#!/bin/sh -# GNU ncurses - -# search & check GNU make -GMAKE="gmake" -$GMAKE --version || GMAKE="make" -$GMAKE --version || exit - -MAKE=$GMAKE -export MAKE - -CC=gcc -CFLAGS="-O6 -fomit-frame-pointer" -CXX=gcc -CXXFLAGS="-O6 -fomit-frame-pointer -felide-constructors -fno-exceptions -fno-rtti" -# LDFLAGS="-static" -LD=gcc - -export CC -export CXX -export LD -export CFLAGS -export CXXFLAGS -# export LDFLAGS -# Solaris don't have libpthread.a. - -if [ "x$1" = "x" ]; then - echo " please set character set" - exit -fi - -CHAR="$1" -case "$1" in - [uU]*) - CHAR=ujis - ;; - [sS]*) - CHAR=sjis - ;; -esac - -#--------------- -P=`pwd` - -if [ -f Makefile ] ; then - ${GMAKE} distclean -fi - -for i in bin sbin include man share/doc/mysql mysql-data -do - /usr/bin/mkdir -p PKG/tmp-${CHAR}/usr/local/${i} -done -/usr/bin/mkdir -p PKG/tmp-${CHAR}/etc/init.d - -#---------------------------- -./configure \ - --prefix=/usr/local \ - --libexecdir=/usr/local/sbin \ - --sbindir=/usr/local/sbin \ - --localstatedir=/usr/local/mysql-data \ - --with-charset=${CHAR} \ - --with-extra-charsets=all \ - --with-raid \ - --without-docs \ - --without-bench \ - --without-perl \ - --with-gcc \ - --with-mysqld-ldflags="-static" \ - --with-client-ldflags="-static" \ - --with-named-curses-libs=/usr/local/lib/libncurses.a \ - --with-mysqld-user=mysql - -# --with-berkeley-db-includes=/usr/local/include/db3 \ -# --with-berkeley-db-libs=/usr/local/lib/libdb3.a \ -# --with-low-memory - -${GMAKE} -${GMAKE} install DESTDIR=${P}/PKG/tmp-${CHAR} - -v=`grep '^SHARED_LIB_VERSION' configure.in | sed 's@SHARED_LIB_VERSION@@' | sed -e 's@=@@' -e 's@:@ @g' | awk '{print $1}'` -km="libmysqlclient.so.$v" -export km - -(cd ${P}/PKG/tmp-${CHAR}/usr/local/lib/mysql/ ; \ - for i in libmysqlclient* ; do \ - if /usr/bin/test ! -L $i ; then \ - mv $i ../ ; ln -sf ../$i ; \ - fi ; \ - done ; \ - k=`ls libmysqlclient.so.*.*.*` ; \ - cd .. ; \ - if /usr/bin/test ! -z libmysqlclient.so ; then \ - ln -sf $k libmysqlclient.so ; - fi ; \ - if /usr/bin/test ! -z $km ; then \ - ln -sf $k $km ; - fi ; \ -) - -# -(cd ${P}/PKG/tmp-${CHAR}/usr/local/bin ; strip * ) -(cd ${P}/PKG/tmp-${CHAR}/usr/local/sbin ; strip * ) diff --git a/support-files/SCO/doc.sh b/support-files/SCO/doc.sh deleted file mode 100644 index 9ef17166a6f..00000000000 --- a/support-files/SCO/doc.sh +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/sh - -CHAR="$1" -case "$1" in - [uU]*) - CHAR=ujis - ;; - [sS]*) - CHAR=sjis - ;; -esac - -cp -r Docs/* PKG/tmp-${CHAR}/usr/local/share/doc/mysql/ -cp INSTALL-SOURCE* COPYING* MIRRORS README* PKG/tmp-${CHAR}/usr/local/share/doc/mysql/ - -cd PKG/tmp-${CHAR}/usr/local/share/doc/mysql/ -gzip *.txt *.texi *.info *.pdf diff --git a/support-files/SCO/mkpkg.sh b/support-files/SCO/mkpkg.sh deleted file mode 100644 index 5a38113138d..00000000000 --- a/support-files/SCO/mkpkg.sh +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/sh - -if [ "x$1" = "x" ]; then - echo " please set charset" - exit -fi - -CHAR="$1" -case "$1" in - [uU]*) - CHAR=ujis ; CH=uj - ;; - [sS]*) - CHAR=sjis ; CH=sj - ;; -esac - -#------------------- -DIR=`pwd` - -VERSION=`cat version` - -T=`uname -p` - -sed -e "s/@CHAR1@/${CH}/" \ - -e "s/@CHAR2@/${CHAR}/" \ - -e "s/@VERSION@/${VERSION}/" \ - -e "s/@TYPE@/${T}/" \ - pkginfo.ini > pkginfo.${CHAR} - -sed -e "s,@DIR@,${DIR},g" \ - -e "s,@PKGINFO@,${DIR}/pkginfo.${CHAR}," \ - prototype.ini > prototype.${CHAR} - -INIT="tmp-${CHAR}/etc/init.d/mysql" -cp ../support-files/mysql.server $INIT -chmod 755 $INIT - -(cd tmp-${CHAR}; \ -chown root etc usr ; \ -chgrp sys etc usr ;\ -chmod 755 usr etc; \ -chgrp sys etc/init.d ; \ -chmod 755 etc/init.d ; \ -find . -print|pkgproto >> ../prototype.${CHAR}) - -pkgmk -o -f prototype.${CHAR} -r ${DIR}/tmp-${CHAR} diff --git a/support-files/SCO/patch b/support-files/SCO/patch deleted file mode 100644 index 373eb8518c6..00000000000 --- a/support-files/SCO/patch +++ /dev/null @@ -1,96 +0,0 @@ ---- scripts/safe_mysqld.sh.orig Sat Sep 2 17:28:26 2000 -+++ scripts/safe_mysqld.sh Sat Sep 2 17:31:19 2000 -@@ -89,10 +89,10 @@ - - - NOHUP_NICENESS=`nohup nice` --if test $? -ne 0 || test x"$NOHUP_NICENESS" = x0 || test ! nice --1 echo foo > /dev/null 2>&1; then -+if test $? -ne 0 || test x"$NOHUP_NICENESS" = x0 || test ! nice -1 echo foo > /dev/null 2>&1; then - NOHUP_NICENESS="nohup" - else -- NOHUP_NICENESS="nice --$NOHUP_NICENESS nohup" -+ NOHUP_NICENESS="nice -$NOHUP_NICENESS nohup" - fi - - export MYSQL_UNIX_PORT -@@ -163,7 +163,8 @@ - # The only thing is ps x => redhat 5 gives warnings when using ps -x. - # kill -9 is used or the process won't react on the kill. - numofproces=`ps xa | grep -v "grep" | grep -c $ledir/mysqld` -- echo -e "\nNumber of processes running now: $numofproces" | tee -a $err_log -+ echo | tee -a $err_log -+ echo "Number of processes running now: $numofproces" | tee -a $err_log - I=1 - while test "$I" -le "$numofproces" - do -@@ -185,4 +186,6 @@ - echo "`date +'%y%m%d %H:%M:%S mysqld restarted'`" | tee -a $err_log - done - --echo -e "`date +'%y%m%d %H:%M:%S mysqld ended\n'`" | tee -a $err_log -+echo | tee -a $err_log -+echo "`date +'%y%m%d %H:%M:%S mysqld ended'`" | tee -a $err_log -+echo | tee -a $err_log ---- support-files/mysql.server.sh.orig Sat Sep 2 17:35:56 2000 -+++ support-files/mysql.server.sh Sat Sep 2 17:36:35 2000 -@@ -23,6 +23,9 @@ - mysql_daemon_user=@MYSQLD_USER@ - export PATH - -+## your options... -+OPT="" -+ - mode=$1 - - if test -w / # determine if we should look at the root config file -@@ -82,8 +85,9 @@ - then - # Give extra arguments to mysqld with the my.cnf file. This script may - # be overwritten at next upgrade. -- $bindir/safe_mysqld \ -- --user=$mysql_daemon_user --datadir=$datadir --pid-file=$pid_file --log=$log_file & -+ $bindir/safe_mysqld $OPT \ -+ --user=$mysql_daemon_user --datadir=$datadir --pid-file=$pid_file & -+# --log=$log_file & - else - echo "Can't execute $bindir/safe_mysqld" - fi ---- configure.orig Sat Sep 2 17:54:03 2000 -+++ configure Sat Sep 2 17:54:18 2000 -@@ -202,7 +202,7 @@ - --with-charset=CHARSET use CHARSET by default (one of: big5 cp1251 cp1257 - croat czech danish dec8 dos estonia euc_kr gb2312 gbk - german1 greek hebrew hp8 hungarian koi8_ru koi8_ukr -- latin1 latin2 swe7 usa7 win1250 win1251 win1251ukr -+ latin1 latin2 swe7 usa7 win1250 win1251ukr - ujis sjis tis620; default is latin1)" - ac_help="$ac_help - --with-extra-charsets=cs1,cs2 -@@ -8843,7 +8843,7 @@ - - # Choose a character set - --CHARSETS_AVAILABLE="big5 cp1251 cp1257 croat czech danish dec8 dos estonia euc_kr gb2312 gbk german1 greek hebrew hp8 hungarian koi8_ru koi8_ukr latin1 latin2 swe7 usa7 win1250 win1251 win1251ukr ujis sjis tis620" -+CHARSETS_AVAILABLE="big5 cp1251 cp1257 croat czech danish dec8 dos estonia euc_kr gb2312 gbk german1 greek hebrew hp8 hungarian koi8_ru koi8_ukr latin1 latin2 swe7 usa7 win1250 win1251ukr ujis sjis tis620" - DEFAULT_CHARSET=latin1 - - # Check whether --with-charset or --without-charset was given. ---- configure.in.orig Sat Sep 2 17:53:57 2000 -+++ configure.in Sat Sep 2 17:54:36 2000 -@@ -1517,14 +1517,14 @@ - dnl or other special handling, you must also create - dnl strings/ctype-$charset_name.c - --CHARSETS_AVAILABLE="big5 cp1251 cp1257 croat czech danish dec8 dos estonia euc_kr gb2312 gbk german1 greek hebrew hp8 hungarian koi8_ru koi8_ukr latin1 latin2 swe7 usa7 win1250 win1251 win1251ukr ujis sjis tis620" -+CHARSETS_AVAILABLE="big5 cp1251 cp1257 croat czech danish dec8 dos estonia euc_kr gb2312 gbk german1 greek hebrew hp8 hungarian koi8_ru koi8_ukr latin1 latin2 swe7 usa7 win1250 win1251ukr ujis sjis tis620" - DEFAULT_CHARSET=latin1 - - AC_ARG_WITH(charset, - [ --with-charset=CHARSET use CHARSET by default (one of: big5 cp1251 cp1257 - croat czech danish dec8 dos estonia euc_kr gb2312 gbk - german1 greek hebrew hp8 hungarian koi8_ru koi8_ukr -- latin1 latin2 swe7 usa7 win1250 win1251 win1251ukr -+ latin1 latin2 swe7 usa7 win1250 win1251ukr - ujis sjis tis620; default is latin1)], - [default_charset="$withval"], - [default_charset="$DEFAULT_CHARSET"]) diff --git a/support-files/SCO/pkginfo.ini b/support-files/SCO/pkginfo.ini deleted file mode 100644 index 13b8b6adb09..00000000000 --- a/support-files/SCO/pkginfo.ini +++ /dev/null @@ -1,8 +0,0 @@ -PKG=MySQL -NAME=MySQL -ARCH=@TYPE@ -VERSION=@VERSION@ -CATEGORY=utility -VENDOR=TcX DataKonsult AB, Detron HB and MySQL AB -BASEDIR=/ -CLASSES=none diff --git a/support-files/SCO/postinstall b/support-files/SCO/postinstall deleted file mode 100644 index 2e199b9af82..00000000000 --- a/support-files/SCO/postinstall +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/sh - -PATH=/usr/local/sbin:/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb:/usr/ccs/bin -LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib -export PATH -export LD_LIBRARY_PATH - -D0="/usr/local/mysql-data" -D="${D0}/mysql" - -DOFIX=0 - -if /usr/bin/test ! -f ${D}/tables_priv.frm -a -d ${D} ; then - DOFIX=1 -fi - -if [ ! -d ${D} ]; then - DOFIX=2 - /usr/local/bin/mysql_install_db -fi - - chown -R mysql $D0 - chgrp -R mysql $D0 - -if /usr/bin/test $DOFIX -eq 1 ; then - /etc/init.d/mysql start - /usr/local/bin/mysql_fix_privilege_tables -else - /etc/init.d/mysql start || true -fi diff --git a/support-files/SCO/preinstall b/support-files/SCO/preinstall deleted file mode 100644 index c1175561a99..00000000000 --- a/support-files/SCO/preinstall +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh - -PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb:/usr/ccs/bin -LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib -export PATH -export LD_LIBRARY_PATH - -if /usr/bin/test -x /etc/init.d/mysql ; then - /etc/init.d/mysql stop || true -fi - -#----- user check -P=`grep mysql /etc/passwd` -G=`grep mysql /etc/group` - -if /usr/bin/test "x$G" = "x" ; then - /usr/sbin/groupadd mysql -fi -if /usr/bin/test "x$P" = "x" ; then - /usr/sbin/useradd -g mysql -d /usr/local/mysql-data -s /bin/false mysql -fi diff --git a/support-files/SCO/preremove b/support-files/SCO/preremove deleted file mode 100644 index a89648431c1..00000000000 --- a/support-files/SCO/preremove +++ /dev/null @@ -1,25 +0,0 @@ -#!/bin/sh - -PATH=/usr/local/sbin:/usr/local/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/ucb:/usr/ccs/bin -LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib -export PATH -export LD_LIBRARY_PATH - -pid=`/usr/bin/ps -e | /usr/bin/grep mysqld | /usr/bin/sed -e 's/^ *//' -e 's/ .*//'` -[ "$pid" != "" ] && /usr/local/bin/mysqladmin shutdown - -#--- -#/usr/ucb/echo -n "Remove DATA Directory (All data expire) [Y/N]? " -#read I -I=No - -case "$I" in -Y*|y*) - /usr/ucb/echo -n "Removing MySQL DATA ALL..." - rm -rf /usr/local/mysql-data - echo "done." - ;; -*) - echo "not purge DATA directory" - ;; -esac; diff --git a/support-files/SCO/prototype.ini b/support-files/SCO/prototype.ini deleted file mode 100644 index ca88bb67a90..00000000000 --- a/support-files/SCO/prototype.ini +++ /dev/null @@ -1,4 +0,0 @@ -i pkginfo=@PKGINFO@ -i postinstall=@DIR@/postinstall -i preinstall=@DIR@/preinstall -i preremove=@DIR@/preremove diff --git a/support-files/SCO/version b/support-files/SCO/version deleted file mode 100644 index f9dc296b71b..00000000000 --- a/support-files/SCO/version +++ /dev/null @@ -1 +0,0 @@ -3.23.23-beta diff --git a/win/configure.js b/win/configure.js deleted file mode 100644 index 812ff54a09c..00000000000 --- a/win/configure.js +++ /dev/null @@ -1,320 +0,0 @@ -// Configure.js -// -// Copyright (C) 2006 MySQL AB -// -// This program is free software; you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation; version 2 of the License. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program; if not, write to the Free Software -// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - -ForReading = 1; -ForWriting = 2; -ForAppending = 8; - -try -{ - var fso = new ActiveXObject("Scripting.FileSystemObject"); - - var args = WScript.Arguments - - // read in the Unix configure.in file - var configureInTS = fso.OpenTextFile("configure.in", ForReading); - var configureIn = configureInTS.ReadAll(); - configureInTS.Close(); - var default_comment = "Source distribution"; - var default_port = GetValue(configureIn, "MYSQL_TCP_PORT_DEFAULT"); - var actual_port = 0; - - var configfile = fso.CreateTextFile("win\\configure.data", true); - for (i=0; i < args.Count(); i++) - { - var parts = args.Item(i).split('='); - switch (parts[0]) - { - case "CYBOZU": - case "EMBED_MANIFESTS": - case "EXTRA_DEBUG": - case "WITH_EMBEDDED_SERVER": - case "WITHOUT_ATOMICS": - configfile.WriteLine("SET (" + args.Item(i) + " TRUE CACHE BOOL \"\")"); - break; - case "MYSQL_SERVER_SUFFIX": - case "MYSQLD_EXE_SUFFIX": - configfile.WriteLine("SET (" + parts[0] + " \"" - + parts[1] + "\" CACHE STRING \"\")"); - break; - case "COMPILATION_COMMENT": - default_comment = parts[1]; - break; - case "MYSQL_TCP_PORT": - actual_port = parts[1]; - break; - } - } - - if (actual_port == 0) - { - // if we actually defaulted (as opposed to the pathological case of - // --with-tcp-port=<MYSQL_TCP_PORT_DEFAULT> which might in theory - // happen if whole batch of servers was built from a script), set - // the default to zero to indicate that; we don't lose information - // that way, because 0 obviously indicates that we can get the - // default value from MYSQL_TCP_PORT. this seems really evil, but - // testing for MYSQL_TCP_PORT==MYSQL_TCP_PORT_DEFAULT would make a - // a port of MYSQL_TCP_PORT_DEFAULT magic even if the builder did not - // intend it to mean "use the default, in fact, look up a good default - // from /etc/services if you can", but really, really meant 3306 when - // they passed in 3306. When they pass in a specific value, let them - // have it; don't second guess user and think we know better, this will - // just make people cross. this makes the the logic work like this - // (which is complicated enough): - // - // - if a port was set during build, use that as a default. - // - // - otherwise, try to look up a port in /etc/services; if that fails, - // use MYSQL_TCP_PORT_DEFAULT (at the time of this writing 3306) - // - // - allow the MYSQL_TCP_PORT environment variable to override that. - // - // - allow command-line parameters to override all of the above. - // - // the top-most MYSQL_TCP_PORT_DEFAULT is read from win/configure.js, - // so don't mess with that. - actual_port = default_port; - default_port = 0; - } - - configfile.WriteLine("SET (COMPILATION_COMMENT \"" + - default_comment + "\" CACHE STRING \"\" )"); - - configfile.WriteLine("SET (PROTOCOL_VERSION \"" + - GetValue(configureIn, "PROTOCOL_VERSION") + "\" CACHE STRING \"\")"); - configfile.WriteLine("SET (DOT_FRM_VERSION \"" + - GetValue(configureIn, "DOT_FRM_VERSION") + "\" CACHE STRING \"\")"); - configfile.WriteLine("SET (MYSQL_TCP_PORT_DEFAULT \"" + default_port + "\" CACHE STRING \"\")"); - configfile.WriteLine("SET (MYSQL_TCP_PORT \"" + actual_port + "\" CACHE STRING \"\")"); - configfile.WriteLine("SET (MYSQL_UNIX_ADDR \"MySQL\" CACHE STRING \"\")"); - var version = GetVersion(configureIn); - configfile.WriteLine("SET (VERSION \"" + version + "\" CACHE STRING \"\")"); - configfile.WriteLine("SET (MYSQL_BASE_VERSION \"" + - GetBaseVersion(version) + "\" CACHE STRING \"\")"); - configfile.WriteLine("SET (MYSQL_VERSION_ID \"" + - GetVersionId(version) + "\" CACHE STRING \"\")"); - var engineOptions = ParsePlugins(); - for (option in engineOptions) - { - configfile.WriteLine("SET(" + engineOptions[option] + " TRUE CACHE BOOL \"\")"); - } - configfile.Close(); - - fso = null; - - WScript.Echo("done!"); -} -catch (e) -{ - WScript.Echo("Error: " + e.description); -} - -function GetValue(str, key) -{ - var pos = str.indexOf(key+'='); - if (pos == -1) return null; - pos += key.length + 1; - var end = str.indexOf("\n", pos); - if (str.charAt(pos) == "\"") - pos++; - if (str.charAt(end-1) == "\"") - end--; - return str.substring(pos, end); -} - -function GetVersion(str) -{ - var key = "AC_INIT([MySQL Server], ["; - var pos = str.indexOf(key); - if (pos == -1) return null; - pos += key.length; - var end = str.indexOf("]", pos); - if (end == -1) return null; - return str.substring(pos, end); -} - -function GetBaseVersion(version) -{ - var dot = version.indexOf("."); - if (dot == -1) return null; - dot = version.indexOf(".", dot+1); - if (dot == -1) dot = version.length; - return version.substring(0, dot); -} - -function GetVersionId(version) -{ - var dot = version.indexOf("."); - if (dot == -1) return null; - var major = parseInt(version.substring(0, dot), 10); - - dot++; - var nextdot = version.indexOf(".", dot); - if (nextdot == -1) return null; - var minor = parseInt(version.substring(dot, nextdot), 10); - dot = nextdot+1; - - var stop = version.indexOf("-", dot); - if (stop == -1) stop = version.length; - var build = parseInt(version.substring(dot, stop), 10); - - var id = major; - if (minor < 10) - id += '0'; - id += minor; - if (build < 10) - id += '0'; - id += build; - return id; -} - -function PluginConfig(isGroup, include) -{ - this.isGroup = isGroup; - this.include = include; -} - - -// Parse command line arguments specific to plugins (aka storage engines). -// -// --with-plugin-PLUGIN, --with-plugins=group, --with-plugins=PLUGIN[,PLUGIN...] -// --without-plugin-PLUGIN is supported. -// -// Legacy option WITH_<PLUGIN>_STORAGE_ENGINE is supported as well. -// The function returns string array with elements like WITH_SOME_STORAGE_ENGINE -// or WITHOUT_SOME_STORAGE_ENGINE. -// -// This function handles groups, for example effect of specifying --with-plugins=max -// is the same as --with-plugins==archive,federated,falcon,innobase... - -function ParsePlugins() -{ - - var config = new Array(); - - config["DEFAULT"] = new PluginConfig(true,true); - - // Parse command line parameters - for (i=0; i< WScript.Arguments.length;i++) - { - var option = WScript.Arguments.Item(i); - var match = /WITH_(\w+)_STORAGE_ENGINE/.exec(option); - if (match == null) - match = /--with-plugin-(\w+)/.exec(option); - if (match != null) - { - config[match[1].toUpperCase()] = new PluginConfig(false,true); - continue; - } - - match = /WITHOUT_(\w+)_STORAGE_ENGINE/.exec(option); - if (match == null) - match = /--without-plugin-(\w+)/.exec(option); - - if (match != null) - { - config[match[1].toUpperCase()] = - new PluginConfig(false,false); - continue; - } - - match = /--with-plugins=([\w,\-_]+)/.exec(option); - if(match != null) - { - - var plugins = match[1].split(","); - for(var key in plugins) - { - config[plugins[key].toUpperCase()] = - new PluginConfig(null,true); - } - continue; - } - match = /--without-plugins=([\w,\-_]+)/.exec(option); - if(match != null) - { - var plugins = match[1].split(","); - for(var key in plugins) - config[plugins[key].toUpperCase()] = - new PluginConfig(null, false); - continue; - } - } - - // Read plugin definitions, find out groups plugins belong to. - var fc = new Enumerator(fso.GetFolder("storage").SubFolders); - for (;!fc.atEnd(); fc.moveNext()) - { - var subfolder = fc.item(); - var name = subfolder.name.toUpperCase(); - - // Handle case where storage engine was already specified by name in - // --with-plugins or --without-plugins. - if (config[name] != undefined) - { - config[name].isGroup = false; - continue; - } - config[name] = new PluginConfig(false,null); - - // Handle groups. For each plugin, find out which group it belongs to - // If this group was specified on command line for inclusion/exclusion, - // then include/exclude the plugin. - filename = subfolder +"\\plug.in"; - if (fso.FileExists(filename)) - { - var content = fso.OpenTextFile(filename, ForReading).ReadAll(); - var match = - /MYSQL_STORAGE_ENGINE([ ]*)[\(]([^\)]+)[\)]/.exec(content); - if (match== null) - continue; - match = /\[[\w,\-_]+\][\s]?\)/.exec(match[0]); - if (match == null) - continue; - groups = match[0].split(/[\,\(\)\[\] ]/); - for (var key in groups) - { - var group = groups[key].toUpperCase(); - if (config[group] != undefined) - { - config[group].isGroup = true; - if (config[group].include != null) - { - config[name].include = config[group].include; - break; - } - } - } - } - } - - var arr = new Array(); - for(key in config) - { - var eng = config[key]; - if(eng.isGroup != undefined && !eng.isGroup && eng.include != undefined) - { - if (fso.FolderExists("storage\\"+key) || key=="PARTITION") - { - arr[arr.length] = eng.include? - "WITH_"+key+"_STORAGE_ENGINE":"WITHOUT_"+key+"_STORAGE_ENGINE"; - } - } - } - return arr; -} From 96b0404940f7b704c4f8dd599455d4d2f013a297 Mon Sep 17 00:00:00 2001 From: Guilhem Bichot <guilhem@mysql.com> Date: Mon, 22 Nov 2010 09:57:59 +0100 Subject: [PATCH 3/9] Fix for Bug#56138 "valgrind errors about overlapping memory when double-assigning same variable", and related small fixes. mysql-test/t/user_var.test: test for bug sql/field_conv.cc: From the C standard, memcpy() has undefined behaviour if to->ptr==from->ptr sql/item_func.cc: In the case of BUG#56138, entry->value==ptr in which case memcpy() has undefined results per the C standard. sql/sql_select.cc: Work around a bug in old gcc --- mysql-test/r/user_var.result | 3 +++ mysql-test/t/user_var.test | 7 +++++++ sql/field_conv.cc | 7 ++----- sql/item_func.cc | 2 +- sql/sql_select.cc | 8 ++++++-- 5 files changed, 19 insertions(+), 8 deletions(-) diff --git a/mysql-test/r/user_var.result b/mysql-test/r/user_var.result index 56266a46e20..cf82a18ea83 100644 --- a/mysql-test/r/user_var.result +++ b/mysql-test/r/user_var.result @@ -447,4 +447,7 @@ IF( count(*), 1) 1 DROP TABLE t1; +select @v:=@v:=sum(1) from dual; +@v:=@v:=sum(1) +1 End of 5.1 tests diff --git a/mysql-test/t/user_var.test b/mysql-test/t/user_var.test index 4f27866de23..56217fe67d5 100644 --- a/mysql-test/t/user_var.test +++ b/mysql-test/t/user_var.test @@ -346,4 +346,11 @@ FROM t1 GROUP BY a LIMIT 1; DROP TABLE t1; +# +# BUG#56138 "valgrind errors about overlapping memory when +# double-assigning same variable" +# + +select @v:=@v:=sum(1) from dual; + --echo End of 5.1 tests diff --git a/sql/field_conv.cc b/sql/field_conv.cc index 0bffde9671a..a4fca6f8ad7 100644 --- a/sql/field_conv.cc +++ b/sql/field_conv.cc @@ -786,11 +786,8 @@ int field_conv(Field *to,Field *from) ((Field_varstring*)from)->length_bytes == ((Field_varstring*)to)->length_bytes)) { // Identical fields -#ifdef HAVE_purify - /* This may happen if one does 'UPDATE ... SET x=x' */ - if (to->ptr != from->ptr) -#endif - memcpy(to->ptr,from->ptr,to->pack_length()); + // to->ptr==from->ptr may happen if one does 'UPDATE ... SET x=x' + memmove(to->ptr, from->ptr, to->pack_length()); return 0; } } diff --git a/sql/item_func.cc b/sql/item_func.cc index d8b5d46938e..b7afd3a624f 100644 --- a/sql/item_func.cc +++ b/sql/item_func.cc @@ -3920,7 +3920,7 @@ update_hash(user_var_entry *entry, bool set_null, void *ptr, uint length, length--; // Fix length change above entry->value[length]= 0; // Store end \0 } - memcpy(entry->value,ptr,length); + memmove(entry->value, ptr, length); if (type == DECIMAL_RESULT) ((my_decimal*)entry->value)->fix_buffer_pointer(); entry->length= length; diff --git a/sql/sql_select.cc b/sql/sql_select.cc index 77d4447fd0f..748071986b1 100644 --- a/sql/sql_select.cc +++ b/sql/sql_select.cc @@ -4034,8 +4034,12 @@ update_ref_and_keys(THD *thd, DYNAMIC_ARRAY *keyuse,JOIN_TAB *join_tab, continue; } -#ifdef HAVE_purify - /* Valgrind complains about overlapped memcpy when save_pos==use. */ +#if defined(__GNUC__) && !MY_GNUC_PREREQ(4,4) + /* + Old gcc used a memcpy(), which is undefined if save_pos==use: + http://gcc.gnu.org/bugzilla/show_bug.cgi?id=19410 + http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39480 + */ if (save_pos != use) #endif *save_pos= *use; From 4901b37e8dfdf5836dc9862176a8c86014a55cdb Mon Sep 17 00:00:00 2001 From: Davi Arnaut <davi.arnaut@oracle.com> Date: Mon, 22 Nov 2010 08:43:36 -0200 Subject: [PATCH 4/9] WL#5665: Removal of the autotools-based build system Remove some more files which are unused. win/README: This information is dated and does not apply anymore. win/create_manifest.js: Unused. win/mysql_manifest.cmake: Unused. --- win/README | 8 ---- win/create_manifest.js | 96 ---------------------------------------- win/mysql_manifest.cmake | 21 --------- 3 files changed, 125 deletions(-) delete mode 100644 win/README delete mode 100755 win/create_manifest.js delete mode 100644 win/mysql_manifest.cmake diff --git a/win/README b/win/README deleted file mode 100644 index e5363cf8c8d..00000000000 --- a/win/README +++ /dev/null @@ -1,8 +0,0 @@ -Windows building readme -====================================== - -The Windows build system uses a tool named CMake to generate build files for -a variety of project systems. This tool is combined with a set of jscript -files to enable building of MySQL for Windows directly out of a bzr clone. -For relevant information and/or for building binaries from source distribution, -please refer to http://forge.mysql.com/wiki/CMake diff --git a/win/create_manifest.js b/win/create_manifest.js deleted file mode 100755 index dbdd83588c5..00000000000 --- a/win/create_manifest.js +++ /dev/null @@ -1,96 +0,0 @@ -/* - manifest.js - Writes a custom XML manifest for each executable/library - 5 command line options must be supplied: - name - Name of the executable/library into which the mainfest will be - embedded. - version - Version of the executable - arch - Architecture intended. - exe_level - Application execution level. - [asInvoker|highestAvailable|requireAdministrator] - outfile - Final destination where mainfest will be written. - - Example: - cscript manifest.js name=mysql version=5.0.32 arch=X86 type=win32 - exe_level=asInvoker outfile=out.xml -*/ - -try -{ - var args = WScript.Arguments - for (i=0; i < args.Count(); i++) - { - var parts = args.Item(i).split('='); - switch (parts[0]) - { - case "name": - var app_name= parts[1]; - break; - case "version": - var supp_version= parts[1]; - // Clean up the supplied version string. - var end= supp_version.indexOf("-"); - if (end == -1) end= supp_version.length; - var app_version= supp_version.substring(0, end); - var fourth_element= 0; - if(app_version.match(/[a-z]$/)) { - fourth_element+= (1 + app_version.charCodeAt(end-1) - "a".charCodeAt(0)); - app_version= app_version.substring(0,--end); - } - if(app_version.match(/sp[1-9]$/)) { - fourth_element+= 100*(app_version.charCodeAt(end-1) - "0".charCodeAt(0)); - app_version= app_version.substring(0, end-3); - end-= 3; - } - app_version+= "." + fourth_element; - break; - case "arch": - var app_arch= parts[1]; - break; - case "exe_level": - var app_exe_level= parts[1]; - break; - case "outfile": - var manifest_file= parts[1]; - break; - default: - WScript.echo("Invalid argument supplied."); - } - } - if (i != 5) - throw new Error(1, "Incorrect number of arguments."); - - var manifest_xml= "<?xml version=\'1.0\' encoding=\'UTF-8\' standalone=\'yes\'?>\r\n"; - manifest_xml+= "<assembly xmlns=\'urn:schemas-microsoft-com:asm.v1\'"; - manifest_xml+= " manifestVersion=\'1.0\'>\r\n"; - // Application Information - manifest_xml+= "\t<assemblyIdentity name=\'" + app_name + "\'"; - manifest_xml+= " version=\'" + app_version + "\'"; - manifest_xml+= " processorArchitecture=\'" + app_arch + "\'"; - manifest_xml+= " publicKeyToken=\'02ad33b422233ae3\'"; - manifest_xml+= " type=\'win32\' />\r\n"; - // Identify the application security requirements. - manifest_xml+= "\t<trustInfo xmlns=\'urn:schemas-microsoft-com:asm.v2\'>\r\n"; - manifest_xml+= "\t\t<security>\r\n\t\t\t<requestedPrivileges>\r\n\t\t\t\t"; - manifest_xml+= "<requestedExecutionLevel level=\'" + app_exe_level + "\'"; - manifest_xml+= " uiAccess=\'false\'/>\r\n"; - manifest_xml+= "\t\t\t</requestedPrivileges>\r\n\t\t</security>\r\n"; - manifest_xml+= "\t</trustInfo>\r\n</assembly>\r\n"; - - // Write the valid XML to it's final destination. - var outfileXML = WScript.CreateObject("Msxml2.DOMDocument.3.0"); - outfileXML.async = false; - if (!outfileXML.loadXML(manifest_xml)) - { - WScript.Echo(manifest_xml); - throw new Error(2, "Invalid XML"); - } - outfileXML.save(manifest_file); - - WScript.Echo("Success, created custom manifest!"); - WScript.Quit(0); -} -catch (e) -{ - WScript.Echo("Error: " + e.description); - WScript.Quit(1); -} diff --git a/win/mysql_manifest.cmake b/win/mysql_manifest.cmake deleted file mode 100644 index 611553d68ac..00000000000 --- a/win/mysql_manifest.cmake +++ /dev/null @@ -1,21 +0,0 @@ - -# - MYSQL_EMBED_MANIFEST(target_name required_privs) -# Create a manifest for target_name. Set the execution level to require_privs -# -# NOTE. PROCESSOR_ARCH must be defined before this MACRO is called. - -MACRO(MYSQL_EMBED_MANIFEST _target_name _required_privs) - ADD_CUSTOM_COMMAND( - TARGET ${_target_name} - PRE_LINK - COMMAND cscript.exe - ARGS "${PROJECT_SOURCE_DIR}/win/create_manifest.js" name=$(TargetName) version=${VERSION} arch=${PROCESSOR_ARCH} exe_level=${_required_privs} outfile=$(IntDir)\\$(TargetFileName).intermediate.manifest - COMMENT "Generates the contents of the manifest contents.") - ADD_CUSTOM_COMMAND( - TARGET ${_target_name} - POST_BUILD - COMMAND mt.exe ARGS -nologo -hashupdate -makecdfs -manifest $(IntDir)\\$(TargetFileName).intermediate.manifest -outputresource:$(TargetPath) - COMMAND makecat.exe ARGS $(IntDir)\\$(TargetFileName).intermediate.manifest.cdf - COMMAND signtool.exe ARGS sign /a /t http://timestamp.verisign.com/scripts/timstamp.dll $(TargetPath) - COMMENT "Embeds the manifest contents, creates a cryptographic catalog, signs the target with Authenticode certificate.") -ENDMACRO(MYSQL_EMBED_MANIFEST) From 6cae1bb971e52b9acffc64fad2f514983a0ea291 Mon Sep 17 00:00:00 2001 From: Jon Olav Hauglid <jon.hauglid@oracle.com> Date: Mon, 22 Nov 2010 11:50:20 +0100 Subject: [PATCH 5/9] This patch fixes the bug which caused the funcs_1.storedproc test case to give valgrind warnings. The problem was that when comparing two MDL key buffers using memcmp(), 1 was added to the buffer length. However, this was no longer needed since the buffer length already included the '\0' terminator. --- sql/mdl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sql/mdl.h b/sql/mdl.h index ff30746e739..4a9397fe215 100644 --- a/sql/mdl.h +++ b/sql/mdl.h @@ -252,7 +252,7 @@ public: character set is utf-8, we can safely assume that no character starts with a zero byte. */ - return memcmp(m_ptr, rhs->m_ptr, min(m_length, rhs->m_length)+1); + return memcmp(m_ptr, rhs->m_ptr, min(m_length, rhs->m_length)); } MDL_key(const MDL_key *rhs) From c913f5bd3f99f7085bfe2d3145c8875b6a228248 Mon Sep 17 00:00:00 2001 From: Alexander Nozdrin <alexander.nozdrin@oracle.com> Date: Mon, 22 Nov 2010 16:25:50 +0300 Subject: [PATCH 6/9] Patch for Bug#58339 (Replace Server GPL README file). --- README | 2337 +++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 2302 insertions(+), 35 deletions(-) diff --git a/README b/README index b7aa5f6b3bd..a73ec2b7437 100644 --- a/README +++ b/README @@ -1,35 +1,2302 @@ -This is a release of MySQL, a dual-license SQL DBMS. -MySQL is brought to you by the MySQL team at Oracle Corporation. - -License information can be found in these files: -- For GPL (free) distributions, see the COPYING file and - the EXCEPTIONS-CLIENT file. -- For commercial distributions, see the LICENSE.mysql file. - - -For further information about MySQL or additional documentation, see: -- The latest information about MySQL: http://www.mysql.com -- The current MySQL documentation: http://dev.mysql.com/doc - -Some manual sections of special interest: - -- If you are migrating from an older version of MySQL, please read the - "Upgrading from..." section first! -- To see what MySQL can do, take a look at the features section. -- For installation instructions, see the Installing and Upgrading chapter. -- For the new features/bugfix history, see the Change History appendix. -- For the currently known bugs/misfeatures (known errors) see the Problems - and Common Errors appendix. -- For a list of developers and other contributors, see the Credits - appendix. - -A local copy of the MySQL Reference Manual can be found in the Docs -directory in GNU Info format. You can also browse the manual online or -download it in any of several formats at the URL given earlier in this -file. - -************************************************************ - -IMPORTANT: - -Bug or error reports should be sent to http://bugs.mysql.com. +MySQL Server + +This is a release of MySQL, a dual-license SQL database server. +For the avoidance of doubt, this particular copy of the software +is released under the version 2 of the GNU General Public License. +MySQL is brought to you by the MySQL team at Oracle. + +Copyright (c) 2000, 2010, Oracle and/or its affiliates. All rights reserved. + +License information can be found in the COPYING file. + +This distribution may include materials developed by third +parties. For license and attribution notices for these +materials, please refer to the documentation that accompanies +this distribution (see the Licenses for Third-Party Components +appendix). A copy of the license/notices is also reproduced +below. + +GPLv2 Disclaimer +For the avoidance of doubt, except that if any license choice +other than GPL or LGPL is available it will apply instead, +Oracle elects to use only the General Public License version 2 +(GPLv2) at this time for any software where a choice of GPL +license versions is made available with the language indicating +that GPLv2 or any later version may be used, or where a choice +of which version of the GPL is applied is otherwise unspecified. + +For further information about MySQL or additional documentation, +see: +- The latest information about MySQL: http://www.mysql.com +- The current MySQL documentation: http://dev.mysql.com/doc + +Some Reference Manual sections of special interest: +- If you are migrating from an older version of MySQL, please + read the "Upgrading from..." section. +- To see what MySQL can do, take a look at the features section. +- For installation instructions, see the Installing and Upgrading + chapter. +- For the new features/bugfix history, see the MySQL Change History + appendix. +- For currently known bugs, see the Errors and Common Problems + appendix. + +You can browse the MySQL Reference Manual online or download it +in any of several formats at the URL given earlier in this file. +Source distributions include a local copy of the manual in the +Docs directory. + +******************************************************************** + +Third-Party Component Notices + +********************************************************************* + +%%The following software may be included in this product: +FindGTest.cmake (part of CMake 2.8.0) + +Use of any of this software is governed by the terms of the license below: + +# Copyright 2009 Kitware, Inc. +# Copyright 2009 Philip Lowman +# Copyright 2009 Daniel Blezek +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#=========================================================================== +== +# (To distributed this file outside of CMake, substitute the full +# License text for the above reference.) +# +# Thanks to Daniel Blezek for the GTEST_ADD_TESTS code + + +Text of Copyright.txt mentioned above: + +CMake - Cross Platform Makefile Generator +Copyright 2000-2009 Kitware, Inc., Insight Software Consortium +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: + +* Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + +* Neither the names of Kitware, Inc., the Insight Software Consortium, + nor the names of their contributors may be used to endorse or promote + products derived from this software without specific prior written + permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +*************************************************************************** + +%%The following software may be included in this product: +Cmake + +Use of any of this software is governed by the terms of the license below: + +CMake is distributed under BSD License + + Copyright (c) 2008, Kitware, Inc. + All rights reserved. + + Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + + * Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + * Redistributions in binary form must reproduce the above copyright +notice, this list of conditions and the following disclaimer in the +documentation and/or other materials provided with the distribution. + * Neither the name of Kitware, Inc. nor the names of its contributors +may be used to endorse or promote products derived from this software without +specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY Kitware, Inc. "AS IS" AND ANY EXPRESS OR +IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT +SHALL Kitware Inc. BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT +OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING +IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY +OF SUCH DAMAGE. + +Additional License(s) + +cmake-2.4.8/Utilities/cmtar/compat/gethostname.c: + gethostname.c: minimal substitute for missing gethostname() function + created 2000-Mar-02 jmk + requires SVR4 uname() and -lc + + by Jim Knoble + Copyright ? 2000 Jim Knoble + + Permission to use, copy, modify, distribute, and sell this software + and its documentation for any purpose is hereby granted without fee, + provided that the above copyright notice appear in all copies and + that both that copyright notice and this permission notice appear in + supporting documentation. + + This software is provided "as is", without warranty of any kind, + express or implied, including but not limited to the warranties of + merchantability, fitness for a particular purpose and + noninfringement. In no event shall the author(s) be liable for any + claim, damages or other liability, whether in an action of contract, + tort or otherwise, arising from, out of or in connection with the + software or the use or other dealings in the software. + +---------------------------------- + +* Originally written by Steven M. Bellovin while +* at the University of North Carolina at Chapel Hill. Later tweaked by +* a couple of people on Usenet. Completely overhauled by Rich $alz +* and Jim Berets in August, 1990. +* +* This code is in the public domain and has no copyright. + +------------------------------- + + THIS CODE IS SPECIFICALLY EXEMPTED FROM THE NCURSES PACKAGE COPYRIGHT. + You may freely copy it for use as a template for your own field types. + If you develop a field type that might be of general use, please send + it back to the ncurses maintainers for inclusion in the next version. + +************************************************************************** + + * + Author : Per Foreby, perf@efd.lth.se + * + Author : Juergen Pfeifer, juergen.pfeifer@gmx.net + * + + * +************************************************************************** + +---------------------------------------- + + Copyright (c) 2002 Insight Consortium. All rights reserved. + See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for +details. + + This software is distributed WITHOUT ANY WARRANTY; without even + the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR + PURPOSE. See the above copyright notices for more information. + +-------------------------------------------- + + Skeleton parser for Yacc-like parsing with Bison, + Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002, 2003 Free +Software Foundati +on, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin Street, Fifth Floor, + Boston, MA 02110-1301, USA. + + As a special exception, when this file is copied by Bison into a + Bison output file, you may use that output file without restriction. + This special exception was added by the Free Software Foundation + in version 1.24 of Bison. + +--------------------------------------------------- + +cmake-2.4.8/Utilities/cmzlib/zlib.h: + zlib.h -- interface of the 'zlib' general purpose compression library + version 1.1.4, March 11th, 2002 + + Copyright (C) 1995-2002 Jean-loup Gailly and Mark Adler + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must +not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source +distribution. + + Jean-loup Gailly Mark Adler + +---------------------------------------------- + + This source code was modified by Martin Hedenfalk + for + use in Curl. His latest changes were done 2000-09-18. + + It has since been patched away like a madman by Daniel Stenberg + to make it better applied to curl conditions, and to +make + it not use globals, pollute name space and more. This source code +awaits a + rewrite to work around the paragraph 2 in the BSD licenses as explained + below. + + Copyright (c) 1995, 1996, 1997, 1998, 1999 Kungliga Tekniska Hgskolan + It has since been patched and modified a lot by Daniel Stenberg + to make it better applied to curl conditions, and to +make + it not use globals, pollute name space and more. This source code +awaits a + rewrite to work around the paragraph 2 in the BSD licenses as explained + below. + + Copyright (c) 1998, 1999 Kungliga Tekniska Hgskolan + (Royal Institute of Technology, Stockholm, Sweden). + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + 3. Neither the name of the Institute nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE +LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + +--------------------------------------------- + + Permission to use, copy, modify, and distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED + WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF + MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND + CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. + +-------------------------------------------------- + +cmake-2.4.8/Utilities/cmcurl/inet_pton.c, +cmake-2.4.8/Source/CTest/Curl/inet_pto +n.c: + This is from the BIND 4.9.4 release, modified to compile by itself + + Copyright (c) 1996 by Internet Software Consortium. + + Permission to use, copy, modify, and distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM +DISCLAIMS + ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED +WARRANTIES + OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE + CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS + ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE +OF THIS + SOFTWARE. + +------------------------------------------------------- + +* Copyright (C) 2001 by Eric Kidd. All rights reserved. +* Copyright (C) 2001 by Luke Howard. All rights reserved. +* Copyright (C) 2002 Ximian, Inc. +* +* Redistribution and use in source and binary forms, with or without +* modification, are permitted provided that the following conditions +* are met: +* 1. Redistributions of source code must retain the above copyright +* notice, this list of conditions and the following disclaimer. +* 2. Redistributions in binary form must reproduce the above copyright +* notice, this list of conditions and the following disclaimer in the +* documentation and/or other materials provided with the distribution. +* 3. The name of the author may not be used to endorse or promote products +* derived from this software without specific prior written +permission. +* +* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE +* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL +* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT +* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN +ANY WAY +* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +** SUCH DAMAGE. + +--------------------------------------------------- + + Copyright (c) 1994 + The Regents of the University of California. All rights reserved. + + This code is derived from software contributed to Berkeley by + Chuck Karish of Mindcraft, Inc. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. Neither the name of the University nor the names of its contributors + Copyright (c) 1985, 1986 The Regents of the University of California. + All rights reserved. + + This code is derived from software contributed to Berkeley by + James A. Woods, derived from original work by Spencer Thomas + and Joseph Orost. + +------------------------------------------------ + + Copyright (c) 1989, 1993, 1994 + The Regents of the University of California. All rights reserved. + + This code is derived from software contributed to Berkeley by + Guido van Rossum. + + Copyright (c) 1990 The Regents of the University of California. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. All advertising materials mentioning features or use of this software + must display the following acknowledgement: + This product includes software developed by the University of + California, Berkeley and its contributors. + 4. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + + THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + +------------------------------------------------------ + + Project ___| | | | _ \| | + / __| | | | |_) | | + | (__| |_| | _ <| |___ + \___|\___/|_| \_\_____| + + Copyright (C) 1998 - 2004, Daniel Stenberg, , et al. + + Copyright (C) 2004, Daniel Stenberg, , et al. + + This software is licensed as described in the file COPYING, which + you should have received as part of this distribution. The terms + are also available at http://curl.haxx.se/docs/copyright.html. + + You may opt to use, copy, modify, merge, publish, distribute and/or sell + copies of the Software, and permit persons to whom the Software is + furnished to do so, under the terms of the COPYING file. + + This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + KIND, either express or implied. + +------------------------------------------------------------ + +*************************************************************************** + Copyright (c) 1998 Free Software Foundation, Inc. + * + Copyright (c) 1998,2000 Free Software Foundation, Inc. + * + + * + Permission is hereby granted, free of charge, to any person obtaining +a * + copy of this software and associated documentation files (the + * + "Software"), to deal in the Software without restriction, including + * + without limitation the rights to use, copy, modify, merge, publish, + * + distribute, distribute with modifications, sublicense, and/or sell + * + copies of the Software, and to permit persons to whom the Software is + * + furnished to do so, subject to the following conditions: + * + + * + The above copyright notice and this permission notice shall be +included * + in all copies or substantial portions of the Software. + * + + * + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, +EXPRESS * + OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF + * + MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND +NONINFRINGEMENT. * + IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY +CLAIM, * + DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR + * + OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR + * + THE USE OR OTHER DEALINGS IN THE SOFTWARE. + * + + * + + * + Except as contained in this notice, the name(s) of the above +copyright * + holders shall not be used in advertising or otherwise to promote the + * + sale, use or other dealings in this Software without prior written + * + authorization. + * + *************************************************************************** + +------------------------------------------------------ + + Copyright (c) 1997 Todd C. Miller + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 3. The name of the author may not be used to endorse or promote products + derived from this software without specific prior written permission. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED +WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL + THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, + EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, + PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR +PROFITS; + OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, + WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR + OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF + ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + + THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, +STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + +*************************************************************************** + +%%The following software may be included in this product: +Fred Fish's Dbug Library + +Use of any of this software is governed by the terms of the license below: + +* + * N O T I C E * + * * + * Copyright Abandoned, 1987, Fred Fish * + * * + * * + * This previously copyrighted work has been placed into the public * + * domain by the author and may be freely used for any purpose, * + * private or commercial. * + * * + * Because of the number of inquiries I was receiving about the use * + * of this product in commercially developed works I have decided to * + * simply make it public domain to further its unrestricted use. I * + * specifically would be most happy to see this material become a * + * part of the standard Unix distributions by AT&T and the Berkeley * + * Computer Science Research Group, and a standard part of the GNU * + * system from the Free Software Foundation. * + * * + * I would appreciate it, as a courtesy, if this notice is left in * + * all copies and derivative works. Thank you. * + * * + * The author makes no warranty of any kind with respect to this * + * product and explicitly disclaims any implied warranties of mer- * + * chantability or fitness for any particular purpose. * + * + +*************************************************************************** + +%%The following software may be included in this product: +dbug_analyze.c (part of Fred Fish's Dbug Library) + +Use of any of this software is governed by the terms of the license below: + +* * +* Copyright Abandoned, 1987, Fred Fish * +* * +* * +* This previously copyrighted work has been placed into the public * +* domain by the author and may be freely used for any purpose, * +* private or commercial. * +* * +* Because of the number of inquiries I was receiving about the use * +* of this product in commercially developed works I have decided to * +* simply make it public domain to further its unrestricted use. I * +* specifically would be most happy to see this material become a * +* part of the standard Unix distributions by AT&T and the Berkeley * +* Computer Science Research Group, and a standard part of the GNU * +* system from the Free Software Foundation. * +* * +* I would appreciate it, as a courtesy, if this notice is left in * +* all copies and derivative works. Thank you. * +* * +* The author makes no warranty of any kind with respect to this * +* product and explicitly disclaims any implied warranties of mer- * +* chantability or fitness for any particular purpose. + +*************************************************************************** + +%%The following software may be included in this product: +GNU Libtool, only ltmain.sh, libtool, auto-gen fil + +Use of any of this software is governed by the terms of the license below: + +ltmain.sh inclusion: +# ltmain.sh - Provide generalized library-building support services. +# NOTE: Changing this file will not affect anything until you rerun configure. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, +# 2007 Free Software Foundation, Inc. +# Originally by Gordon Matzigkeit , 1996 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +libtool inclusion: +# libtoolT - Provide generalized library-building support services. +# Generated automatically by (GNU mysql 5.1.30) +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, +# 2006, 2007 Free Software Foundation, Inc. +# +# This file is part of GNU Libtool: +# Originally by Gordon Matzigkeit , 1996 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + + +Auto-generated files: +# `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building +# support services. +# Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) +# NOTE: Changes made to this file will be lost: look at ltmain.sh. +# +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, +# 2004, 2005, 2006, 2007 Free Software Foundation, Inc. +# +# This file is part of GNU Libtool: +# Originally by Gordon Matzigkeit , 1996 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, but +# WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +Additional License(s) + +# As a special exception to the GNU General Public License, if you +# distribute this file as part of a program that contains a +# configuration script generated by Autoconf, you may include it under +# the same distribution terms that you use for the rest of that program. + +*************************************************************************** + +%%The following software may be included in this product: +innochecksum.c + +Use of any of this software is governed by the terms of the license below: + +GNU GENERAL PUBLIC LICENSE + +Version 2, June 1991 + +Copyright (C) 1989, 1991 Free Software Foundation, Inc. +51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA + +Everyone is permitted to copy and distribute verbatim copies +of this license document, but changing it is not allowed. + +Preamble + +The licenses for most software are designed to take away your freedom to share +and change it. By contrast, the GNU General Public License is intended to +guarantee your freedom to share and change free software--to make sure the +software is free for all its users. This General Public License applies to most +of the Free Software Foundation's software and to any other program whose +authors commit to using it. (Some other Free Software Foundation software is +covered by the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + +When we speak of free software, we are referring to freedom, not price. Our +General Public Licenses are designed to make sure that you have the freedom to +distribute copies of free software (and charge for this service if you wish), +that you receive source code or can get it if you want it, that you can change +the software or use pieces of it in new free programs; and that you know you can +do these things. + +To protect your rights, we need to make restrictions that forbid anyone to deny +you these rights or to ask you to surrender the rights. These restrictions +translate to certain responsibilities for you if you distribute copies of the +software, or if you modify it. + +For example, if you distribute copies of such a program, whether gratis or for a +fee, you must give the recipients all the rights that you have. You must make +sure that they, too, receive or can get the source code. And you must show them +these terms so they know their rights. + +We protect your rights with two steps: (1) copyright the software, and (2) offer +you this license which gives you legal permission to copy, distribute and/or +modify the software. + +Also, for each author's protection and ours, we want to make certain that +everyone understands that there is no warranty for this free software. If the +software is modified by someone else and passed on, we want its recipients to +know that what they have is not the original, so that any problems introduced by +others will not reflect on the original authors' reputations. + +Finally, any free program is threatened constantly by software patents. We wish +to avoid the danger that redistributors of a free program will individually +obtain patent licenses, in effect making the program proprietary. To prevent +this, we have made it clear that any patent must be licensed for everyone's free +use or not licensed at all. + +The precise terms and conditions for copying, distribution and modification follow. +TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + +0. This License applies to any program or other work which contains a notice +placed by the copyright holder saying it may be distributed under the terms of +this General Public License. The "Program", below, refers to any such program or +work, and a "work based on the Program" means either the Program or any +derivative work under copyright law: that is to say, a work containing the +Program or a portion of it, either verbatim or with modifications and/or +translated into another language. (Hereinafter, translation is included without +limitation in the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not covered by +this License; they are outside its scope. The act of running the Program is not +restricted, and the output from the Program is covered only if its contents +constitute a work based on the Program (independent of having been made by +running the Program). Whether that is true depends on what the Program does. + +1. You may copy and distribute verbatim copies of the Program's source code as +you receive it, in any medium, provided that you conspicuously and appropriately +publish on each copy an appropriate copyright notice and disclaimer of warranty; +keep intact all the notices that refer to this License and to the absence of any +warranty; and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and you may at +your option offer warranty protection in exchange for a fee. + +2. You may modify your copy or copies of the Program or any portion of it, thus +forming a work based on the Program, and copy and distribute such modifications +or work under the terms of Section 1 above, provided that you also meet all of +these conditions: + + a) You must cause the modified files to carry prominent notices stating that +you changed the files and the date of any change. + b) You must cause any work that you distribute or publish, that in whole or +in part contains or is derived from the Program or any part thereof, to be +licensed as a whole at no charge to all third parties under the terms of this +License. + c) If the modified program normally reads commands interactively when run, +you must cause it, when started running for such interactive use in the most +ordinary way, to print or display an announcement including an appropriate +copyright notice and a notice that there is no warranty (or else, saying that +you provide a warranty) and that users may redistribute the program under these +conditions, and telling the user how to view a copy of this License. (Exception: +if the Program itself is interactive but does not normally print such an +announcement, your work based on the Program is not required to print an +announcement.) + +These requirements apply to the modified work as a whole. If identifiable +sections of that work are not derived from the Program, and can be reasonably +considered independent and separate works in themselves, then this License, and +its terms, do not apply to those sections when you distribute them as separate +works. But when you distribute the same sections as part of a whole which is a +work based on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the entire whole, +and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest your +rights to work written entirely by you; rather, the intent is to exercise the +right to control the distribution of derivative or collective works based on the +Program. + +In addition, mere aggregation of another work not based on the Program with the +Program (or with a work based on the Program) on a volume of a storage or +distribution medium does not bring the other work under the scope of this License. + +3. You may copy and distribute the Program (or a work based on it, under Section +2) in object code or executable form under the terms of Sections 1 and 2 above +provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable source +code, which must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange; or, + b) Accompany it with a written offer, valid for at least three years, to +give any third party, for a charge no more than your cost of physically +performing source distribution, a complete machine-readable copy of the +corresponding source code, to be distributed under the terms of Sections 1 and 2 +above on a medium customarily used for software interchange; or, + c) Accompany it with the information you received as to the offer to +distribute corresponding source code. (This alternative is allowed only for +noncommercial distribution and only if you received the program in object code +or executable form with such an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for making +modifications to it. For an executable work, complete source code means all the +source code for all modules it contains, plus any associated interface +definition files, plus the scripts used to control compilation and installation +of the executable. However, as a special exception, the source code distributed +need not include anything that is normally distributed (in either source or +binary form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component itself +accompanies the executable. + +If distribution of executable or object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the source code +from the same place counts as distribution of the source code, even though third +parties are not compelled to copy the source along with the object code. + +4. You may not copy, modify, sublicense, or distribute the Program except as +expressly provided under this License. Any attempt otherwise to copy, modify, +sublicense or distribute the Program is void, and will automatically terminate +your rights under this License. However, parties who have received copies, or +rights, from you under this License will not have their licenses terminated so +long as such parties remain in full compliance. + +5. You are not required to accept this License, since you have not signed it. +However, nothing else grants you permission to modify or distribute the Program +or its derivative works. These actions are prohibited by law if you do not +accept this License. Therefore, by modifying or distributing the Program (or any +work based on the Program), you indicate your acceptance of this License to do +so, and all its terms and conditions for copying, distributing or modifying the +Program or works based on it. + +6. Each time you redistribute the Program (or any work based on the Program), +the recipient automatically receives a license from the original licensor to +copy, distribute or modify the Program subject to these terms and conditions. +You may not impose any further restrictions on the recipients' exercise of the +rights granted herein. You are not responsible for enforcing compliance by third +parties to this License. + +7. If, as a consequence of a court judgment or allegation of patent infringement +or for any other reason (not limited to patent issues), conditions are imposed +on you (whether by court order, agreement or otherwise) that contradict the +conditions of this License, they do not excuse you from the conditions of this +License. If you cannot distribute so as to satisfy simultaneously your +obligations under this License and any other pertinent obligations, then as a +consequence you may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by all those +who receive copies directly or indirectly through you, then the only way you +could satisfy both it and this License would be to refrain entirely from +distribution of the Program. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply and the +section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any patents or +other property right claims or to contest validity of any such claims; this +section has the sole purpose of protecting the integrity of the free software +distribution system, which is implemented by public license practices. Many +people have made generous contributions to the wide range of software +distributed through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing to +distribute software through any other system and a licensee cannot impose that +choice. + +This section is intended to make thoroughly clear what is believed to be a +consequence of the rest of this License. + +8. If the distribution and/or use of the Program is restricted in certain +countries either by patents or by copyrighted interfaces, the original copyright +holder who places the Program under this License may add an explicit +geographical distribution limitation excluding those countries, so that +distribution is permitted only in or among countries not thus excluded. In such +case, this License incorporates the limitation as if written in the body of this +License. + +9. The Free Software Foundation may publish revised and/or new versions of the +General Public License from time to time. Such new versions will be similar in +spirit to the present version, but may differ in detail to address new problems +or concerns. + +Each version is given a distinguishing version number. If the Program specifies +a version number of this License which applies to it and "any later version", +you have the option of following the terms and conditions either of that version +or of any later version published by the Free Software Foundation. If the +Program does not specify a version number of this License, you may choose any +version ever published by the Free Software Foundation. + +10. If you wish to incorporate parts of the Program into other free programs +whose distribution conditions are different, write to the author to ask for +permission. For software which is copyrighted by the Free Software Foundation, +write to the Free Software Foundation; we sometimes make exceptions for this. +Our decision will be guided by the two goals of preserving the free status of +all derivatives of our free software and of promoting the sharing and reuse of +software generally. + +NO WARRANTY + +11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE +PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED +IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS +IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT +NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A +PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + +12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL +ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE +PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, +SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY +TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF +THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER +PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. +END OF TERMS AND CONDITIONS +How to Apply These Terms to Your New Programs + +If you develop a new program, and you want it to be of the greatest possible use +to the public, the best way to achieve this is to make it free software which +everyone can redistribute and change under these terms. + +To do so, attach the following notices to the program. It is safest to attach +them to the start of each source file to most effectively convey the exclusion +of warranty; and each file should have at least the "copyright" line and a +pointer to where the full notice is found. + +one line to give the program's name and an idea of what it does. +Copyright (C) yyyy name of author + +This program is free software; you can redistribute it and/or +modify it under the terms of the GNU General Public License +as published by the Free Software Foundation; either version 2 +of the License, or (at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this when it +starts in an interactive mode: + +Gnomovision version 69, Copyright (C) year name of author +Gnomovision comes with ABSOLUTELY NO WARRANTY; for details +type `show w'. This is free software, and you are welcome +to redistribute it under certain conditions; type `show c' +for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may be +called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your school, +if any, to sign a "copyright disclaimer" for the program, if necessary. Here is +a sample; alter the names: + +Yoyodyne, Inc., hereby disclaims all copyright +interest in the program `Gnomovision' +(which makes passes at compilers) written +by James Hacker. + +signature of Ty Coon, 1 April 1989 +Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may consider +it more useful to permit linking proprietary applications with the library. If +this is what you want to do, use the GNU Lesser General Public License instead +of this License. + +Additional Documentation License(s) + +innochecksum.c is documented in the MySQL Reference +Manual at http://dev.mysql.com/doc/refman/5.1/en/innochecksum.html +The Reference Manual is not licensed under the GPL; rather, it +is offered under normal copyright, but with permission to +copy/redistribute electronically. + +*************************************************************************** + +%%The following software may be included in this product: +lib_sql.cc + +Use of any of this software is governed by the terms of the license below: + +/* + * Copyright (c) 2000 + * SWsoft company + * + * This material is provided "as is", with absolutely no warranty expressed + * or implied. Any use is at your own risk. + * + * Permission to use or copy this software for any purpose is hereby granted + * without fee, provided the above notices are retained on all copies. + * Permission to modify the code and to distribute modified code is granted, + * provided the above notices are retained, and a notice that the code was + * modified is included with the above copyright notice. + * + + This code was modified by the MySQL team +*/ + +*************************************************************************** + +%%The following software may be included in this product: +libevent + +Use of any of this software is governed by the terms of the license below: + +/* + * Copyright (c) 2000-2004 Niels Provos + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +Additional License(s) + +http://creativecommons.org/licenses/publicdomain + +*************************************************************************** + +%%The following software may be included in this product: +Async DNS Library + +Use of any of this software is governed by the terms of the license below: + +/* Async DNS Library + * Adam Langley + * http://www.imperialviolet.org/eventdns.html + * Public Domain code + * + * This software is Public Domain. To view a copy of the public domain dedication, + * visit http://creativecommons.org/licenses/publicdomain/ or send a letter to + * Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA. + * + * I ask and expect, but do not require, that all derivative works contain an + * attribution similar to: + * Parts developed by Adam Langley + * + * You may wish to replace the word "Parts" with something else depending on + * the amount of original code. + * + * (Derivative works does not include programs which link against, run or include + * the source verbatim in their source distributions) + * + * Version: 0.1b + */ + +*************************************************************************** + +%%The following software may be included in this product: +log.c + +Use of any of this software is governed by the terms of the license below: + +/* $OpenBSD: err.c,v 1.2 2002/06/25 15:50:15 mickey Exp $ */ + +/* + * log.c + * + * Based on err.c, which was adapted from OpenBSD libc *err* *warn* code. + * + * Copyright (c) 2005 Nick Mathewson + * + * Copyright (c) 2000 Dug Song + * + * Copyright (c) 1993 + * The Regents of the University of California. All rights +reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +*************************************************************************** + +%%The following software may be included in this product: +min_heap.h + +Use of any of this software is governed by the terms of the license below: + +/* + * Copyright (c) 2006 Maxim Yegorushkin + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +*************************************************************************** + +%%The following software may be included in this product: +win32.c + +Use of any of this software is governed by the terms of the license below: + +/* + * Copyright 2000-2002 Niels Provos + * Copyright 2003 Michael A. Davis + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. The name of the author may not be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +*************************************************************************** + +%%The following software may be included in this product: +regex++ + +Use of any of this software is governed by the terms of the license below: + +Copyright 1992, 1993, 1994 Henry Spencer. All rights reserved. +This software is not subject to any license of the American Telephone +and Telegraph Company or of the Regents of the University of California. + +Permission is granted to anyone to use this software for any purpose on +any computer system, and to alter it and redistribute it, subject +to the following restrictions: + +1. The author is not responsible for the consequences of use of this + software, no matter how awful, even if they arise from flaws in it. + +2. The origin of this software must not be misrepresented, either by + explicit claim or by omission. Since few users ever read sources, + credits must appear in the documentation. + +3. Altered versions must be plainly marked as such, and must not be + misrepresented as being the original software. Since few users + ever read sources, credits must appear in the documentation. + +4. This notice may not be removed or altered. + +=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= +/*- + * Copyright (c) 1994 + * The Regents of the University of California. All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * @(#)COPYRIGHT 8.1 (Berkeley) 3/16/94 + */ + +*************************************************************************** + +%%The following software may be included in this product: +Richard A. O'Keefe strings package + +Use of any of this software is governed by the terms of the license below: + +These files are in the public domain. This includes getopt.c, which +is the work of Henry Spencer, University of Toronto Zoology, who says of +it "None of this software is derived from Bell software. I had no access +to the source for Bell's versions at the time I wrote it. This software +is hereby explicitly placed in the public domain. It may be used for +any purpose on any machine by anyone." I would greatly prefer it if *my* +material received no military use. + +*************************************************************************** + +%%The following software may be included in this product: +t_ctype.h + +Use of any of this software is governed by the terms of the license below: + +http://bioinfo.mbb.yale.edu/genome/yeast/cluster/database/mysql/include/t_ctype.h + +/* + Copyright (C) 1998, 1999 by Pruet Boonma, all rights reserved. + Copyright (C) 1998 by Theppitak Karoonboonyanan, all rights reserved. + Permission to use, copy, modify, distribute and sell this software + and its documentation for any purpose is hereby granted without fee, + provided that the above copyright notice appear in all copies. + Smaphan Raruenrom and Pruet Boonma makes no representations about + the suitability of this software for any purpose. It is provided + "as is" without express or implied warranty. +*/ + +*************************************************************************** + +%%The following software may be included in this product: +SHA-1 in C + +Use of any of this software is governed by the terms of the license below: + + SHA-1 in C + By Steve Reid + 100% Public Domain + +Additional License(s) + +100% Public Domain + +*************************************************************************** + +%%The following software may be included in this product: +TCMalloc (part of google-perftools) + +Use of any of this software is governed by the terms of the license below: + +# Copyright (c) 1998-2006, Google Inc. +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions are +# met: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following disclaimer +# in the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived from +# this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +Additional License(s) + +*** File src/tests/ptmalloc/thread-m.h contains this GPLv2 (or later) +text: + +/* Basic platform-independent macro definitions for mutexes and + thread-specific data. + Copyright (C) 1996, 1997, 1998 Free Software Foundation, Inc. + This file is part of the GNU C Library. + Contributed by Wolfram Gloger , 1996. + + The GNU C Library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + The GNU C Library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If +not, + write to the Free Software Foundation, Inc., 59 Temple Place - +Suite 330, + Boston, MA 02111-1307, USA. */ + + + +*** File src/tests/ptmalloc/malloc-machine.h contains this BSD like text: + +/* Basic platform-independent macro definitions for mutexes, + thread-specific data and parameters for malloc. + Posix threads (pthreads) version. + Copyright (C) 2004 Wolfram Gloger . + +Permission to use, copy, modify, distribute, and sell this software +and its documentation for any purpose is hereby granted without fee, +provided that (i) the above copyright notices and this permission +notice appear in all copies of the software and related documentation, +and (ii) the name of Wolfram Gloger may not be used in any advertising +or publicity relating to the software. + +THE SOFTWARE IS PROVIDED "AS-IS" AND WITHOUT WARRANTY OF ANY KIND, +EXPRESS, IMPLIED OR OTHERWISE, INCLUDING WITHOUT LIMITATION, ANY +WARRANTY OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. + +IN NO EVENT SHALL WOLFRAM GLOGER BE LIABLE FOR ANY SPECIAL, +INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY KIND, OR ANY +DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER OR NOT ADVISED OF THE POSSIBILITY OF DAMAGE, AND ON ANY THEORY +OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE USE OR +PERFORMANCE OF THIS SOFTWARE. +*/ + +*************************************************************************** + +%%The following software may be included in this product: +The tz database + +Use of any of this software is governed by the terms of the license below: + +Sources for Time Zone and Daylight Saving Time Data +@(#)tz-link.htm 7.54 + +Please send corrections to this web page to the time zone mailing list. +The tz database + +The public-domain time zone database contains code and data that represent the +history of local time for many representative locations around the globe. It is +updated periodically to reflect changes made by political bodies to time zone +boundaries, UTC offsets, and daylight-saving rules. This database (often called +tz or zoneinfo) is used by several implementations, including the GNU C Library +used in GNU/Linux, FreeBSD, NetBSD, OpenBSD, Cygwin, DJGPP, HP-UX, IRIX, Mac OS +X, OpenVMS, Solaris, Tru64, and UnixWare. + +Each location in the database represents a national region where all clocks +keeping local time have agreed since 1970. Locations are identified by continent +or ocean and then by the name of the location, which is typically the largest +city within the region. For example, America/New_York represents most of the US +eastern time zone; America/Phoenix represents most of Arizona, which uses +mountain time without daylight saving time (DST); America/Detroit represents +most of Michigan, which uses eastern time but with different DST rules in 1975; +and other entries represent smaller regions like Starke County, Indiana, which +switched from central to eastern time in 1991 and switched back in 2006. To use +the database on an extended POSIX implementation set the TZ environment variable +to the location's full name, e.g., TZ="America/New_York". + +In the tz database's FTP distribution the code is in the file tzcodeC.tar.gz, +where C is the code's version; similarly, the data are in tzdataD.tar.gz, where +D is the data's version. The following shell commands download these files to a +GNU/Linux or similar host; see the downloaded README file for what to do next. + +wget 'ftp://elsie.nci.nih.gov/pub/tz*.tar.gz' +gzip -dc tzcode*.tar.gz | tar -xf - +gzip -dc tzdata*.tar.gz | tar -xf - + +The code lets you compile the tz source files into machine-readable binary +files, one for each location. It also lets you read a tz binary file and +interpret time stamps for that location. + +The data are by no means authoritative. If you find errors, please send changes +to the time zone mailing list. You can also subscribe to the mailing list, +retrieve the archive of old messages (in gzip compressed format), or retrieve +archived older versions of code and data; there is also a smaller HTTP mirror. + +*************************************************************************** + +%%The following software may be included in this product: +UnicodeData.txt + +Use of any of this software is governed by the terms of the license below: + +Unicode Terms of Use + + For the general privacy policy governing access to this site, see the +Unicode Privacy Policy. For trademark usage, see the Unicode Consortium� +Trademarks and Logo Policy. + Notice to End User: Terms of Use + Carefully read the following legal agreement ("Agreement"). Use or copying +of the software and/or codes provided with this agreement (The "Software") +constitutes your acceptance of these terms + + 1. Unicode Copyright. + 1. Copyright � 1991-2008 Unicode, Inc. All rights reserved. + 2. Certain documents and files on this website contain a legend +indicating that "Modification is permitted." Any person is hereby authorized, +without fee, to modify such documents and files to create derivative works +conforming to the Unicode� Standard, subject to Terms and Conditions herein. + 3. Any person is hereby authorized, without fee, to view, use, +reproduce, and distribute all documents and files solely for informational +purposes in the creation of products supporting the Unicode Standard, subject to +the Terms and Conditions herein. + 4. Further specifications of rights and restrictions pertaining to +the use of the particular set of data files known as the "Unicode Character +Database" can be found in Exhibit 1. + 5. Each version of the Unicode Standard has further specifications +of rights and restrictions of use. For the book editions, these are found on the +back of the title page. For the online edition, certain files (such as the PDF +files for book chapters and code charts) carry specific restrictions. All other +files are covered under these general Terms of Use. To request a permission to +reproduce any part of the Unicode Standard, please contact the Unicode Consortium. + 6. No license is granted to "mirror" the Unicode website where a +fee is charged for access to the "mirror" site. + 7. Modification is not permitted with respect to this document. All +copies of this document must be verbatim. + 2. Restricted Rights Legend. Any technical data or software which is +licensed to the United States of America, its agencies and/or instrumentalities +under this Agreement is commercial technical data or commercial computer +software developed exclusively at private expense as defined in FAR 2.101, or +DFARS 252.227-7014 (June 1995), as applicable. For technical data, use, +duplication, or disclosure by the Government is subject to restrictions as set +forth in DFARS 202.227-7015 Technical Data, Commercial and Items (Nov 1995) and +this Agreement. For Software, in accordance with FAR 12-212 or DFARS 227-7202, +as applicable, use, duplication or disclosure by the Government is subject to +the restrictions set forth in this Agreement. + 3. Warranties and Disclaimers. + 1. This publication and/or website may include technical or +typographical errors or other inaccuracies . Changes are periodically added to +the information herein; these changes will be incorporated in new editions of +the publication and/or website. Unicode may make improvements and/or changes in +the product(s) and/or program(s) described in this publication and/or website at +any time. + 2. If this file has been purchased on magnetic or optical media +from Unicode, Inc. the sole and exclusive remedy for any claim will be exchange +of the defective media within ninety (90) days of original purchase. + 3. EXCEPT AS PROVIDED IN SECTION C.2, THIS PUBLICATION AND/OR +SOFTWARE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND EITHER EXPRESS, +IMPLIED, OR STATUTORY, INCLUDING, BUT NOT LIMITED TO, ANY WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. UNICODE +AND ITS LICENSORS ASSUME NO RESPONSIBILITY FOR ERRORS OR OMISSIONS IN THIS +PUBLICATION AND/OR SOFTWARE OR OTHER DOCUMENTS WHICH ARE REFERENCED BY OR LINKED +TO THIS PUBLICATION OR THE UNICODE WEBSITE. + 4. Waiver of Damages. In no event shall Unicode or its licensors be +liable for any special, incidental, indirect or consequential damages of any +kind, or any damages whatsoever, whether or not Unicode was advised of the +possibility of the damage, including, without limitation, those resulting from +the following: loss of use, data or profits, in connection with the use, +modification or distribution of this information or its derivatives. + 5. Trademarks. + 1. Unicode and the Unicode logo are registered trademarks of +Unicode, Inc. + 2. This site contains product names and corporate names of other +companies. All product names and company names and logos mentioned herein are +the trademarks or registered trademarks of their respective owners. Other +products and corporate names mentioned herein which are trademarks of a third +party are used only for explanation and for the owners' benefit and with no +intent to infringe. + 3. Use of third party products or information referred to herein is +at the user�s risk. + 6. Miscellaneous. + 1. Jurisdiction and Venue. This server is operated from a location +in the State of California, United States of America. Unicode makes no +representation that the materials are appropriate for use in other locations. If +you access this server from other locations, you are responsible for compliance +with local laws. This Agreement, all use of this site and any claims and damages +resulting from use of this site are governed solely by the laws of the State of +California without regard to any principles which would apply the laws of a +different jurisdiction. The user agrees that any disputes regarding this site +shall be resolved solely in the courts located in Santa Clara County, +California. The user agrees said courts have personal jurisdiction and agree to +waive any right to transfer the dispute to any other forum. + 2. Modification by Unicode Unicode shall have the right to modify +this Agreement at any time by posting it to this site. The user may not assign +any part of this Agreement without Unicode�s prior written consent. + 3. Taxes. The user agrees to pay any taxes arising from access to +this website or use of the information herein, except for those based on +Unicode�s net income. + 4. Severability. If any provision of this Agreement is declared +invalid or unenforceable, the remaining provisions of this Agreement shall +remain in effect. + 5. Entire Agreement. This Agreement constitutes the entire +agreement between the parties. + +EXHIBIT 1 +UNICODE, INC. LICENSE AGREEMENT - DATA FILES AND SOFTWARE + + Unicode Data Files include all data files under the directories +http://www.unicode.org/Public/, http://www.unicode.org/reports/, and +http://www.unicode.org/cldr/data/ . Unicode Software includes any source code +published in the Unicode Standard or under the directories +http://www.unicode.org/Public/, http://www.unicode.org/reports/, and +http://www.unicode.org/cldr/data/. + + NOTICE TO USER: Carefully read the following legal agreement. BY +DOWNLOADING, INSTALLING, COPYING OR OTHERWISE USING UNICODE INC.'S DATA FILES +("DATA FILES"), AND/OR SOFTWARE ("SOFTWARE"), YOU UNEQUIVOCALLY ACCEPT, AND +AGREE TO BE BOUND BY, ALL OF THE TERMS AND CONDITIONS OF THIS AGREEMENT. IF YOU +DO NOT AGREE, DO NOT DOWNLOAD, INSTALL, COPY, DISTRIBUTE OR USE THE DATA FILES +OR SOFTWARE. + + COPYRIGHT AND PERMISSION NOTICE + + Copyright � 1991-2008 Unicode, Inc. All rights reserved. Distributed under +the Terms of Use in http://www.unicode.org/copyright.html. + + Permission is hereby granted, free of charge, to any person obtaining a copy +of the Unicode data files and any associated documentation (the "Data Files") or +Unicode software and any associated documentation (the "Software") to deal in +the Data Files or Software without restriction, including without limitation the +rights to use, copy, modify, merge, publish, distribute, and/or sell copies of +the Data Files or Software, and to permit persons to whom the Data Files or +Software are furnished to do so, provided that (a) the above copyright notice(s) +and this permission notice appear with all copies of the Data Files or Software, +(b) both the above copyright notice(s) and this permission notice appear in +associated documentation, and (c) there is clear notice in each modified Data +File or in the Software as well as in the documentation associated with the Data +File(s) or Software that the data or software has been modified. + + THE DATA FILES AND SOFTWARE ARE PROVIDED "AS IS", WITHOUT WARRANTY OF ANY +KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF +MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD +PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS INCLUDED IN THIS +NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT OR CONSEQUENTIAL +DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, +WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING +OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THE DATA FILES OR SOFTWARE. + + Except as contained in this notice, the name of a copyright holder shall not +be used in advertising or otherwise to promote the sale, use or other dealings +in these Data Files or Software without prior written authorization of the +copyright holder. + + Unicode and the Unicode logo are trademarks of Unicode, Inc., and may be +registered in some jurisdictions. All other trademarks and registered trademarks +mentioned herein are the property of their respective owners. + +*************************************************************************** + +%%The following software may be included in this product: +zlib + +Use of any of this software is governed by the terms of the license below: + +/* zlib.h -- interface of the 'zlib' general purpose compression library + version 1.2.3, July 18th, 2005 + + Copyright (C) 1995-2005 Jean-loup Gailly and Mark Adler + + This software is provided 'as-is', without any express or implied + warranty. In no event will the authors be held liable for any damages + arising from the use of this software. + + Permission is granted to anyone to use this software for any purpose, + including commercial applications, and to alter it and redistribute it + freely, subject to the following restrictions: + + 1. The origin of this software must not be misrepresented; you must not + claim that you wrote the original software. If you use this software + in a product, an acknowledgment in the product documentation would be + appreciated but is not required. + 2. Altered source versions must be plainly marked as such, and must not be + misrepresented as being the original software. + 3. This notice may not be removed or altered from any source distribution. + + Jean-loup Gailly jloup@gzip.org + Mark Adler madler@alumni.caltech.edu + +*/ + +*************************************************************************** + +%%The following software may be included in this product: +dtoa.c + +Use of any of this software is governed by the terms of the license below: + +/**************************************************************** + + This file incorporates work covered by the following copyright and + permission notice: + + The author of this software is David M. Gay. + + Copyright (c) 1991, 2000, 2001 by Lucent Technologies. + + Permission to use, copy, modify, and distribute this software for any + purpose without fee is hereby granted, provided that this entire + notice is included in all copies of any software which is or includes a copy + or modification of this software and in all copies of the supporting + documentation for such software. + + THIS SOFTWARE IS BEING PROVIDED "AS IS", WITHOUT ANY EXPRESS OR IMPLIED + WARRANTY. IN PARTICULAR, NEITHER THE AUTHOR NOR LUCENT MAKES ANY + REPRESENTATION OR WARRANTY OF ANY KIND CONCERNING THE MERCHANTABILITY + OF THIS SOFTWARE OR ITS FITNESS FOR ANY PARTICULAR PURPOSE. + + ***************************************************************/ + +*************************************************************************** + +%%The following software may be included in this product: +getarg.{c,h} + +Use of any of this software is governed by the terms of the license below: + +/* Copyright (C) 2003 MySQL AB + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 of the License. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +/* + * Copyright (c) 1997, 1999 Kungliga Tekniska H366gskolan + * (Royal Institute of Technology, Stockholm, Sweden). + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * 3. Neither the name of the Institute nor the names of its contributors + * may be used to endorse or promote products derived from this software + * without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE INSTITUTE AND CONTRIBUTORS ``AS IS'' AND + * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE INSTITUTE OR CONTRIBUTORS BE LIABLE + * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + */ + +*************************************************************************** + +%%The following software may be included in this product: +MD5 message-digest algorithm (md5_hash.cpp) + +Use of any of this software is governed by the terms of the license below: + +/* + * This code implements the MD5 message-digest algorithm. + * The algorithm is due to Ron Rivest. This code was + * written by Colin Plumb in 1993, no copyright is claimed. + * This code is in the public domain; do with it what you wish. + * + * Equivalent code is available from RSA Data Security, Inc. + * This code has been tested against that, and is equivalent, + * except that you don't need to include two pages of legalese + * with every copy. + * + * The code has been modified by Mikael Ronstroem to handle + * calculating a hash value of a key that is always a multiple + * of 4 bytes long. Word 0 of the calculated 4-word hash value + * is returned as the hash value. + */ + +*************************************************************************** + +%%The following software may be included in this product: +nt_servc.{cc,h} + +Use of any of this software is governed by the terms of the license below: + +/** + @file + + @brief + Windows NT Service class library. + + Copyright Abandoned 1998 Irena Pancirov - Irnet Snc + This file is public domain and comes with NO WARRANTY of any kind +*/ + +*************************************************************************** + +%%The following software may be included in this product: +GNU Readline + +Use of any of this software is governed by the terms of the license below: + +GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. + +*************************************************************************** + +%%The following software may be included in this product: +pstack (part of GNU Binutils) + +Use of any of this software is governed by the terms of the license below: + +pstack is comprised of various .c and .h files; all begin like this: + +/* bucomm.h -- binutils common include file. + Copyright (C) 1992, 93, 94, 95, 96, 1997 Free Software Foundation, Inc. + +This file is part of GNU Binutils. + +This program is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program; if not, write to the Free Software +Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +02111-1307, USA. */ + +*************************************************************************** + +%%The following software may be included in this product: +libiberty.h (part of pstack GNU Binutils) + +Use of any of this software is governed by the terms of the license below: + +See +http://www.koders.com/c/fid99F596804BBE22C076522B848D5575F142079064.aspx + +/* Function declarations for libiberty. + Written by Cygnus Support, 1994. + + The libiberty library provides a number of functions which are + missing on some operating systems. We do not declare those here, + to avoid conflicts with the system header files on operating + systems that do support those functions. In this file we only + declare those functions which are specific to libiberty. */ + +*************************************************************************** + +%%The following software may be included in this product: +ieee.h (part of pstack GNU Binutils) + +Use of any of this software is governed by the terms of the license below: + +See +http://src.opensolaris.org/source/xref//sfw/usr/src/cmd/gdb/gdb-6.3/include/ieee.h + + +/* IEEE Standard 695-1980 "Universal Format for Object Modules" +header file + Contributed by Cygnus Support. */ + +*************************************************************************** + +%%The following software may be included in this product: +pstack.c (part of pstack GNU Binutils) + +Use of any of this software is governed by the terms of the license below: + +/* + pstack.c -- asynchronous stack trace of a running process + Copyright (c) 1999 Ross Thompson + Author: Ross Thompson + Critical bug fix: Tim Waugh +*/ + +/* + This file is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +02111-1307, USA. +*/ + +********************************************************************** \ No newline at end of file From e9cb14694ef9b4682114b91f76c179aad17bb598 Mon Sep 17 00:00:00 2001 From: Alexander Nozdrin <alexander.nozdrin@oracle.com> Date: Mon, 22 Nov 2010 16:27:49 +0300 Subject: [PATCH 7/9] Patch for Bug#58340 (Remove Server GPL EXCEPTIONS-CLIENT file). --- EXCEPTIONS-CLIENT | 119 ---------------------------------------------- 1 file changed, 119 deletions(-) delete mode 100644 EXCEPTIONS-CLIENT diff --git a/EXCEPTIONS-CLIENT b/EXCEPTIONS-CLIENT deleted file mode 100644 index c570ff7ba24..00000000000 --- a/EXCEPTIONS-CLIENT +++ /dev/null @@ -1,119 +0,0 @@ -MySQL FLOSS License Exception - -The MySQL AB Exception for Free/Libre and Open Source -Software-only Applications Using MySQL Client Libraries (the -"FLOSS Exception"). - -Version 0.6, 7 March 2007 - -Exception Intent - -We want specified Free/Libre and Open Source Software (``FLOSS'') -applications to be able to use specified GPL-licensed MySQL client -libraries (the ``Program'') despite the fact that not all FLOSS -licenses are compatible with version 2 of the GNU General Public -License (the ``GPL''). - -Legal Terms and Conditions - -As a special exception to the terms and conditions of version 2.0 -of the GPL: - - 1. You are free to distribute a Derivative Work that is formed - entirely from the Program and one or more works (each, a - "FLOSS Work") licensed under one or more of the licenses - listed below in section 1, as long as: - a. You obey the GPL in all respects for the Program and the - Derivative Work, except for identifiable sections of the - Derivative Work which are not derived from the Program, - and which can reasonably be considered independent and - separate works in themselves, - b. all identifiable sections of the Derivative Work which - are not derived from the Program, and which can - reasonably be considered independent and separate works - in themselves, - i. are distributed subject to one of the FLOSS licenses - listed below, and - ii. the object code or executable form of those sections - are accompanied by the complete corresponding - machine-readable source code for those sections on - the same medium and under the same FLOSS license as - the corresponding object code or executable forms of - those sections, and - c. any works which are aggregated with the Program or with a - Derivative Work on a volume of a storage or distribution - medium in accordance with the GPL, can reasonably be - considered independent and separate works in themselves - which are not derivatives of either the Program, a - Derivative Work or a FLOSS Work. - If the above conditions are not met, then the Program may only - be copied, modified, distributed or used under the terms and - conditions of the GPL or another valid licensing option from - MySQL AB. - - 2. FLOSS License List - -License name Version(s)/Copyright Date -Academic Free License 2.0 -Apache Software License 1.0/1.1/2.0 -Apple Public Source License 2.0 -Artistic license From Perl 5.8.0 -BSD license "July 22 1999" -Common Development and Distribution License (CDDL) 1.0 -Common Public License 1.0 -Eclipse Public License 1.0 -GNU Library or "Lesser" General Public License (LGPL) 2.0/2.1 -Jabber Open Source License 1.0 -MIT license (As listed in file MIT-License.txt) --- -Mozilla Public License (MPL) 1.0/1.1 -Open Software License 2.0 -OpenSSL license (with original SSLeay license) "2003" ("1998") -PHP License 3.0 -Python license (CNRI Python License) --- -Python Software Foundation License 2.1.1 -Sleepycat License "1999" -University of Illinois/NCSA Open Source License --- -W3C License "2001" -X11 License "2001" -Zlib/libpng License --- -Zope Public License 2.0 - - Due to the many variants of some of the above licenses, we - require that any version follow the 2003 version of the Free - Software Foundation's Free Software Definition - (http://www.gnu.org/philosophy/free-sw.html) or version 1.9 of - the Open Source Definition by the Open Source Initiative - (http://www.opensource.org/docs/definition.php). - - 3. Definitions - - a. Terms used, but not defined, herein shall have the - meaning provided in the GPL. - b. Derivative Work means a derivative work under copyright - law. - - 4. Applicability: This FLOSS Exception applies to all Programs - that contain a notice placed by MySQL AB saying that the - Program may be distributed under the terms of this FLOSS - Exception. If you create or distribute a work which is a - Derivative Work of both the Program and any other work - licensed under the GPL, then this FLOSS Exception is not - available for that work; thus, you must remove the FLOSS - Exception notice from that work and comply with the GPL in all - respects, including by retaining all GPL notices. You may - choose to redistribute a copy of the Program exclusively under - the terms of the GPL by removing the FLOSS Exception notice - from that copy of the Program, provided that the copy has - never been modified by you or any third party. - -Appendix A. Qualified Libraries and Packages - -The following is a non-exhaustive list of libraries and packages -which are covered by the FLOSS License Exception. Please note that -this appendix is provided merely as an additional service to -specific FLOSS projects wishing to simplify licensing information -for their users. Compliance with one of the licenses noted under -the "FLOSS license list" section remains a prerequisite. - -Package Name Qualifying License and Version -Apache Portable Runtime (APR) Apache Software License 2.0 From 2d1d7b1323df809313016f03c36ec52807b64e6c Mon Sep 17 00:00:00 2001 From: Davi Arnaut <davi.arnaut@oracle.com> Date: Mon, 22 Nov 2010 14:10:44 -0200 Subject: [PATCH 8/9] Assorted fixes for test failures. mysql-test/suite/sys_vars/t/shared_memory_base_name_basic.test: The server shared memory name is located in the server's temporary directory, not in the mysqltest one. sql/sql_show.cc: */ ends a comment, add space to avoid problems. --- .../sys_vars/r/shared_memory_base_name_basic.result | 10 +++++----- .../sys_vars/t/shared_memory_base_name_basic.test | 10 +++++----- sql/sql_show.cc | 8 ++++---- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/mysql-test/suite/sys_vars/r/shared_memory_base_name_basic.result b/mysql-test/suite/sys_vars/r/shared_memory_base_name_basic.result index a94a906e121..356b3c9e879 100644 --- a/mysql-test/suite/sys_vars/r/shared_memory_base_name_basic.result +++ b/mysql-test/suite/sys_vars/r/shared_memory_base_name_basic.result @@ -1,20 +1,20 @@ select @@global.shared_memory_base_name; @@global.shared_memory_base_name -MYSQLTEST_VARDIR/tmp/mysqld.1.sock +MYSQL_TMP_DIR/mysqld.1.sock select @@session.shared_memory_base_name; ERROR HY000: Variable 'shared_memory_base_name' is a GLOBAL variable show global variables like 'shared_memory_base_name'; Variable_name Value -shared_memory_base_name MYSQLTEST_VARDIR/tmp/mysqld.1.sock +shared_memory_base_name MYSQL_TMP_DIR/mysqld.1.sock show session variables like 'shared_memory_base_name'; Variable_name Value -shared_memory_base_name MYSQLTEST_VARDIR/tmp/mysqld.1.sock +shared_memory_base_name MYSQL_TMP_DIR/mysqld.1.sock select * from information_schema.global_variables where variable_name='shared_memory_base_name'; VARIABLE_NAME VARIABLE_VALUE -SHARED_MEMORY_BASE_NAME MYSQLTEST_VARDIR/tmp/mysqld.1.sock +SHARED_MEMORY_BASE_NAME MYSQL_TMP_DIR/mysqld.1.sock select * from information_schema.session_variables where variable_name='shared_memory_base_name'; VARIABLE_NAME VARIABLE_VALUE -SHARED_MEMORY_BASE_NAME MYSQLTEST_VARDIR/tmp/mysqld.1.sock +SHARED_MEMORY_BASE_NAME MYSQL_TMP_DIR/mysqld.1.sock set global shared_memory_base_name=1; ERROR HY000: Variable 'shared_memory_base_name' is a read only variable set session shared_memory_base_name=1; diff --git a/mysql-test/suite/sys_vars/t/shared_memory_base_name_basic.test b/mysql-test/suite/sys_vars/t/shared_memory_base_name_basic.test index 24418a78687..da165564791 100644 --- a/mysql-test/suite/sys_vars/t/shared_memory_base_name_basic.test +++ b/mysql-test/suite/sys_vars/t/shared_memory_base_name_basic.test @@ -3,17 +3,17 @@ # # only global # ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR select @@global.shared_memory_base_name; --error ER_INCORRECT_GLOBAL_LOCAL_VAR select @@session.shared_memory_base_name; ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR show global variables like 'shared_memory_base_name'; ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR show session variables like 'shared_memory_base_name'; ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR select * from information_schema.global_variables where variable_name='shared_memory_base_name'; ---replace_result $MYSQLTEST_VARDIR MYSQLTEST_VARDIR +--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR select * from information_schema.session_variables where variable_name='shared_memory_base_name'; # diff --git a/sql/sql_show.cc b/sql/sql_show.cc index ec147a99553..f8853611b39 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -596,11 +596,11 @@ public: return m_view_access_denied_message_ptr; } - bool handle_condition(THD *thd, uint sql_errno, const char */* sqlstate */, + bool handle_condition(THD *thd, uint sql_errno, const char * /* sqlstate */, MYSQL_ERROR::enum_warning_level level, - const char *message, MYSQL_ERROR **/* cond_hdl */) + const char *message, MYSQL_ERROR ** /* cond_hdl */) { - /* + /* The handler does not handle the errors raised by itself. At this point we know if top_view is really a view. */ @@ -610,7 +610,7 @@ public: m_handling= TRUE; bool is_handled; - + switch (sql_errno) { case ER_TABLEACCESS_DENIED_ERROR: From cf0cc723aaa08bf6929c3b0bb0ccd3fdca626af0 Mon Sep 17 00:00:00 2001 From: Sergey Glukhov <sergey.glukhov@oracle.com> Date: Tue, 23 Nov 2010 13:18:47 +0300 Subject: [PATCH 9/9] Bug#56862 Execution of a query that uses index merge returns a wrong result In case of low memory sort buffer QUICK_INDEX_MERGE_SELECT creates temporary file where is stores row ids which meet QUICK_SELECT ranges except of clustered pk range, clustered range is processed separately. In init_read_record we check if temporary file is used and choose appropriate record access method. It does not take into account that temporary file contains partial result in case of QUICK_INDEX_MERGE_SELECT with clustered pk range. The fix is always to use rr_quick if QUICK_INDEX_MERGE_SELECT with clustered pk range is used. mysql-test/suite/innodb/r/innodb_mysql.result: test case mysql-test/suite/innodb/t/innodb_mysql.test: test case mysql-test/suite/innodb_plugin/r/innodb_mysql.result: test case mysql-test/suite/innodb_plugin/t/innodb_mysql.test: test case sql/opt_range.h: added new method sql/records.cc: The fix is always to use rr_quick if QUICK_INDEX_MERGE_SELECT with clustered pk range is used. --- mysql-test/suite/innodb/r/innodb_mysql.result | 40 +++++++++++++++++ mysql-test/suite/innodb/t/innodb_mysql.test | 42 ++++++++++++++++++ .../suite/innodb_plugin/r/innodb_mysql.result | 38 ++++++++++++++++ .../suite/innodb_plugin/t/innodb_mysql.test | 43 +++++++++++++++++++ sql/opt_range.h | 3 ++ sql/records.cc | 9 ++++ 6 files changed, 175 insertions(+) diff --git a/mysql-test/suite/innodb/r/innodb_mysql.result b/mysql-test/suite/innodb/r/innodb_mysql.result index 6ac3e8e6302..fa26b8b1d01 100644 --- a/mysql-test/suite/innodb/r/innodb_mysql.result +++ b/mysql-test/suite/innodb/r/innodb_mysql.result @@ -2599,6 +2599,46 @@ rows 3 Extra Using index DROP TABLE t1; # +# Bug#56862 Execution of a query that uses index merge returns a wrong result +# +CREATE TABLE t1 ( +pk int NOT NULL AUTO_INCREMENT PRIMARY KEY, +a int, +b int, +INDEX idx(a)) +ENGINE=INNODB; +INSERT INTO t1(a,b) VALUES +(11, 1100), (2, 200), (1, 100), (14, 1400), (5, 500), +(3, 300), (17, 1700), (4, 400), (12, 1200), (8, 800), +(6, 600), (18, 1800), (9, 900), (10, 1000), (7, 700), +(13, 1300), (15, 1500), (19, 1900), (16, 1600), (20, 2000); +INSERT INTO t1(a,b) SELECT a+20, b+2000 FROM t1; +INSERT INTO t1(a,b) SELECT a+40, b+4000 FROM t1; +INSERT INTO t1(a,b) SELECT a+80, b+8000 FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1 VALUES (1000000, 0, 0); +SET SESSION sort_buffer_size = 1024*36; +EXPLAIN +SELECT COUNT(*) FROM +(SELECT * FROM t1 FORCE INDEX (idx,PRIMARY) +WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away +2 DERIVED t1 index_merge PRIMARY,idx idx,PRIMARY 5,4 NULL 3537 Using sort_union(idx,PRIMARY); Using where +SELECT COUNT(*) FROM +(SELECT * FROM t1 FORCE INDEX (idx,PRIMARY) +WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t; +COUNT(*) +1537 +SET SESSION sort_buffer_size = DEFAULT; +DROP TABLE t1; End of 5.1 tests # # Test for bug #39932 "create table fails if column for FK is in different diff --git a/mysql-test/suite/innodb/t/innodb_mysql.test b/mysql-test/suite/innodb/t/innodb_mysql.test index e99c3c27673..cb6082be0d0 100644 --- a/mysql-test/suite/innodb/t/innodb_mysql.test +++ b/mysql-test/suite/innodb/t/innodb_mysql.test @@ -824,6 +824,48 @@ CREATE INDEX b ON t1(a,b,c,d); DROP TABLE t1; --echo # +--echo # Bug#56862 Execution of a query that uses index merge returns a wrong result +--echo # + +CREATE TABLE t1 ( + pk int NOT NULL AUTO_INCREMENT PRIMARY KEY, + a int, + b int, + INDEX idx(a)) +ENGINE=INNODB; + +INSERT INTO t1(a,b) VALUES + (11, 1100), (2, 200), (1, 100), (14, 1400), (5, 500), + (3, 300), (17, 1700), (4, 400), (12, 1200), (8, 800), + (6, 600), (18, 1800), (9, 900), (10, 1000), (7, 700), + (13, 1300), (15, 1500), (19, 1900), (16, 1600), (20, 2000); +INSERT INTO t1(a,b) SELECT a+20, b+2000 FROM t1; +INSERT INTO t1(a,b) SELECT a+40, b+4000 FROM t1; +INSERT INTO t1(a,b) SELECT a+80, b+8000 FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1 VALUES (1000000, 0, 0); + +SET SESSION sort_buffer_size = 1024*36; + +EXPLAIN +SELECT COUNT(*) FROM + (SELECT * FROM t1 FORCE INDEX (idx,PRIMARY) + WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t; + +SELECT COUNT(*) FROM + (SELECT * FROM t1 FORCE INDEX (idx,PRIMARY) + WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t; + +SET SESSION sort_buffer_size = DEFAULT; + +DROP TABLE t1; --echo End of 5.1 tests diff --git a/mysql-test/suite/innodb_plugin/r/innodb_mysql.result b/mysql-test/suite/innodb_plugin/r/innodb_mysql.result index 54a8854ecaf..448bf54ce51 100644 --- a/mysql-test/suite/innodb_plugin/r/innodb_mysql.result +++ b/mysql-test/suite/innodb_plugin/r/innodb_mysql.result @@ -2400,4 +2400,42 @@ PACK_KEYS=0; CREATE INDEX a ON t1 (a); CREATE INDEX c on t1 (c); DROP TABLE t1; +CREATE TABLE t1 ( +pk int NOT NULL AUTO_INCREMENT PRIMARY KEY, +a int, +b int, +INDEX idx(a)) +ENGINE=INNODB; +INSERT INTO t1(a,b) VALUES +(11, 1100), (2, 200), (1, 100), (14, 1400), (5, 500), +(3, 300), (17, 1700), (4, 400), (12, 1200), (8, 800), +(6, 600), (18, 1800), (9, 900), (10, 1000), (7, 700), +(13, 1300), (15, 1500), (19, 1900), (16, 1600), (20, 2000); +INSERT INTO t1(a,b) SELECT a+20, b+2000 FROM t1; +INSERT INTO t1(a,b) SELECT a+40, b+4000 FROM t1; +INSERT INTO t1(a,b) SELECT a+80, b+8000 FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1 VALUES (1000000, 0, 0); +SET SESSION sort_buffer_size = 1024*36; +EXPLAIN +SELECT COUNT(*) FROM +(SELECT * FROM t1 FORCE INDEX (idx,PRIMARY) +WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t; +id select_type table type possible_keys key key_len ref rows Extra +1 PRIMARY NULL NULL NULL NULL NULL NULL NULL Select tables optimized away +2 DERIVED t1 index_merge PRIMARY,idx idx,PRIMARY 5,4 NULL 3537 Using sort_union(idx,PRIMARY); Using where +SELECT COUNT(*) FROM +(SELECT * FROM t1 FORCE INDEX (idx,PRIMARY) +WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t; +COUNT(*) +1537 +SET SESSION sort_buffer_size = DEFAULT; +DROP TABLE t1; End of 5.1 tests diff --git a/mysql-test/suite/innodb_plugin/t/innodb_mysql.test b/mysql-test/suite/innodb_plugin/t/innodb_mysql.test index 3d078062d43..08d77ba448a 100644 --- a/mysql-test/suite/innodb_plugin/t/innodb_mysql.test +++ b/mysql-test/suite/innodb_plugin/t/innodb_mysql.test @@ -645,5 +645,48 @@ CREATE INDEX c on t1 (c); DROP TABLE t1; +# +# Bug#56862 Execution of a query that uses index merge returns a wrong result +# + +CREATE TABLE t1 ( + pk int NOT NULL AUTO_INCREMENT PRIMARY KEY, + a int, + b int, + INDEX idx(a)) +ENGINE=INNODB; + +INSERT INTO t1(a,b) VALUES + (11, 1100), (2, 200), (1, 100), (14, 1400), (5, 500), + (3, 300), (17, 1700), (4, 400), (12, 1200), (8, 800), + (6, 600), (18, 1800), (9, 900), (10, 1000), (7, 700), + (13, 1300), (15, 1500), (19, 1900), (16, 1600), (20, 2000); +INSERT INTO t1(a,b) SELECT a+20, b+2000 FROM t1; +INSERT INTO t1(a,b) SELECT a+40, b+4000 FROM t1; +INSERT INTO t1(a,b) SELECT a+80, b+8000 FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1(a,b) SELECT a,b FROM t1; +INSERT INTO t1 VALUES (1000000, 0, 0); + +SET SESSION sort_buffer_size = 1024*36; + +EXPLAIN +SELECT COUNT(*) FROM + (SELECT * FROM t1 FORCE INDEX (idx,PRIMARY) + WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t; + +SELECT COUNT(*) FROM + (SELECT * FROM t1 FORCE INDEX (idx,PRIMARY) + WHERE a BETWEEN 2 AND 7 OR pk=1000000) AS t; + +SET SESSION sort_buffer_size = DEFAULT; + +DROP TABLE t1; --echo End of 5.1 tests diff --git a/sql/opt_range.h b/sql/opt_range.h index c6e488cf14c..5f7a4fd3a2a 100644 --- a/sql/opt_range.h +++ b/sql/opt_range.h @@ -265,6 +265,7 @@ public: virtual bool reverse_sorted() = 0; virtual bool unique_key_range() { return false; } + virtual bool clustered_pk_range() { return false; } enum { QS_TYPE_RANGE = 0, @@ -533,6 +534,8 @@ public: THD *thd; int read_keys_and_merge(); + bool clustered_pk_range() { return test(pk_quick_select); } + /* used to get rows collected in Unique */ READ_RECORD read_record; }; diff --git a/sql/records.cc b/sql/records.cc index b6faf0227f9..b809bcf1b91 100644 --- a/sql/records.cc +++ b/sql/records.cc @@ -194,6 +194,15 @@ void init_read_record(READ_RECORD *info,THD *thd, TABLE *table, if (select && my_b_inited(&select->file)) tempfile= &select->file; + else if (select && select->quick && select->quick->clustered_pk_range()) + { + /* + In case of QUICK_INDEX_MERGE_SELECT with clustered pk range we have to + use its own access method(i.e QUICK_INDEX_MERGE_SELECT::get_next()) as + sort file does not contain rowids which satisfy clustered pk range. + */ + tempfile= 0; + } else tempfile= table->sort.io_cache; if (tempfile && my_b_inited(tempfile)) // Test if ref-records was used