List:Commits« Previous MessageNext Message »
From:Ole John Aske Date:December 1 2010 10:00pm
Subject:bzr commit into mysql-5.1-telco-7.0-spj-scan-vs-scan branch
(ole.john.aske:3383)
View as plain text  
#At file:///home/oleja/mysql/mysql-5.1-telco-7.0-spj-scan-scan/ based on revid:ole.john.aske@stripped

 3383 Ole John Aske	2010-12-01 [merge]
      Merge from telco-7.0

    removed:
      EXCEPTIONS-CLIENT
      storage/ndb/config/type_ndbapi.cmake
      storage/ndb/src/common/util/filetest/
      storage/ndb/src/common/util/filetest/FileUnitTest.cpp
      storage/ndb/src/common/util/filetest/FileUnitTest.hpp
      storage/ndb/src/common/util/filetest/Makefile
      storage/ndb/src/kernel/blocks/dbdih/printSysfile/
      storage/ndb/src/kernel/blocks/dbdih/printSysfile/Makefile
      storage/ndb/src/kernel/blocks/dbdih/printSysfile/printSysfile.cpp
    added:
      storage/ndb/src/common/util/Vector.cpp
    modified:
      .bzrignore
      Makefile.am
      README
      libmysql/Makefile.am
      libmysql/Makefile.shared
      libmysql/conf_to_src.c
      libmysql/dll.c
      libmysql/errmsg.c
      libmysql/get_password.c
      libmysql/libmysql.c
      libmysql/manager.c
      libmysql_r/Makefile.am
      mysql-test/suite/ndb/r/ndb_condition_pushdown.result
      mysql-test/suite/ndb/r/ndb_dd_alter.result
      mysql-test/suite/ndb/r/ndb_update_no_read.result
      mysql-test/suite/ndb/t/ndb_condition_pushdown.test
      mysql-test/suite/ndb/t/ndb_dd_alter.test
      mysql-test/suite/ndb/t/ndb_update_no_read.test
      scripts/make_binary_distribution.sh
      scripts/make_win_bin_dist
      sql/ha_ndbcluster.cc
      sql/ha_ndbcluster_glue.h
      storage/ndb/CMakeLists.txt
      storage/ndb/config/type_kernel.cmake
      storage/ndb/include/ndb_config.h.in
      storage/ndb/include/ndb_global.h
      storage/ndb/include/portlib/NdbDir.hpp
      storage/ndb/include/util/ndb_opts.h
      storage/ndb/ndb_configure.cmake
      storage/ndb/src/common/debugger/CMakeLists.txt
      storage/ndb/src/common/debugger/signaldata/CMakeLists.txt
      storage/ndb/src/common/logger/CMakeLists.txt
      storage/ndb/src/common/mgmcommon/CMakeLists.txt
      storage/ndb/src/common/portlib/CMakeLists.txt
      storage/ndb/src/common/portlib/NdbDir.cpp
      storage/ndb/src/common/portlib/NdbThread.c
      storage/ndb/src/common/portlib/ndb_daemon.cc
      storage/ndb/src/common/util/BaseString.cpp
      storage/ndb/src/common/util/CMakeLists.txt
      storage/ndb/src/common/util/File.cpp
      storage/ndb/src/common/util/Makefile.am
      storage/ndb/src/common/util/SparseBitmask.cpp
      storage/ndb/src/common/util/ndb_opts.c
      storage/ndb/src/cw/cpcd/CMakeLists.txt
      storage/ndb/src/cw/cpcd/CPCD.cpp
      storage/ndb/src/cw/cpcd/Process.cpp
      storage/ndb/src/kernel/blocks/Makefile.am
      storage/ndb/src/kernel/blocks/backup/CMakeLists.txt
      storage/ndb/src/kernel/blocks/dbdict/CMakeLists.txt
      storage/ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp
      storage/ndb/src/kernel/blocks/dbdih/CMakeLists.txt
      storage/ndb/src/kernel/blocks/dbdih/printSysfile.cpp
      storage/ndb/src/kernel/blocks/dblqh/CMakeLists.txt
      storage/ndb/src/kernel/blocks/dbtup/tuppage.cpp
      storage/ndb/src/kernel/blocks/ndbfs/PosixAsyncFile.cpp
      storage/ndb/src/kernel/blocks/print_file.cpp
      storage/ndb/src/kernel/main.cpp
      storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp
      storage/ndb/src/mgmapi/mgmapi.cpp
      storage/ndb/src/mgmclient/CommandInterpreter.cpp
      storage/ndb/src/mgmsrv/MgmtSrvr.cpp
      storage/ndb/src/mgmsrv/MgmtSrvr.hpp
      storage/ndb/src/mgmsrv/Services.cpp
      storage/ndb/src/mgmsrv/testConfig.cpp
      storage/ndb/src/ndbapi/CMakeLists.txt
      storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp
      storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp
      storage/ndb/test/ndbapi/testBasic.cpp
      storage/ndb/test/ndbapi/testBitfield.cpp
      storage/ndb/test/ndbapi/testMgm.cpp
      storage/ndb/test/run-test/CMakeLists.txt
      storage/ndb/test/run-test/atrt.hpp
      storage/ndb/test/run-test/main.cpp
      storage/ndb/test/run-test/setup.cpp
      storage/ndb/tools/restore/Restore.cpp
      support-files/mysql.spec.sh
=== modified file '.bzrignore'
--- a/.bzrignore	2010-02-24 14:30:56 +0000
+++ b/.bzrignore	2010-11-28 12:27:13 +0000
@@ -2806,6 +2806,7 @@ storage/ndb/test/ndbapi/testLimits
 storage/ndb/test/ndbapi/testMgm
 storage/ndb/test/ndbapi/testMgmd
 storage/ndb/test/ndbapi/testNDBT
+storage/ndb/test/ndbapi/testNativeDefault
 storage/ndb/test/ndbapi/testNdbApi
 storage/ndb/test/ndbapi/testNdbinfo
 storage/ndb/test/ndbapi/testNodeRestart
@@ -2817,8 +2818,9 @@ storage/ndb/test/ndbapi/testReconnect
 storage/ndb/test/ndbapi/testRestartGci
 storage/ndb/test/ndbapi/testSRBank
 storage/ndb/test/ndbapi/testScan
-storage/ndb/test/ndbapi/testScanFilter
 storage/ndb/test/ndbapi/testScan.dsp
+storage/ndb/test/ndbapi/testScanFilter
+storage/ndb/test/ndbapi/testScanFilter
 storage/ndb/test/ndbapi/testScanInterpreter
 storage/ndb/test/ndbapi/testScanPerf
 storage/ndb/test/ndbapi/testSingleUserMode

=== removed file 'EXCEPTIONS-CLIENT'
--- a/EXCEPTIONS-CLIENT	2007-03-14 17:28:16 +0000
+++ b/EXCEPTIONS-CLIENT	1970-01-01 00:00:00 +0000
@@ -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

=== modified file 'Makefile.am'
--- a/Makefile.am	2010-11-09 14:33:15 +0000
+++ b/Makefile.am	2010-11-26 14:24:03 +0000
@@ -20,7 +20,7 @@ AUTOMAKE_OPTIONS =	foreign
 
 # These are built from source in the Docs directory
 EXTRA_DIST =		INSTALL-SOURCE INSTALL-WIN-SOURCE \
-			README COPYING EXCEPTIONS-CLIENT CMakeLists.txt
+			README COPYING CMakeLists.txt
 
 SUBDIRS =		. include @docs_dirs@ @zlib_dir@ \
 			@readline_topdir@ sql-common scripts \

=== modified file 'README'
--- a/README	2010-10-06 10:06:47 +0000
+++ b/README	2010-11-26 13:52:58 +0000
@@ -1,1288 +1,2254 @@
-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.
-
-GPLv2 Disclaimer
-For the avoidance of doubt, except that if any license choice
-other than GPL or LGPL is available it will apply instead, Sun
-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 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.
-
-
-***************************************************************************
-
-%%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:
-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:
-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:
-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@stripped
-  Mark Adler madler@stripped
-
-*/
-
-***************************************************************************
-
-%%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.
-*/
-
-***************************************************************************
+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@stripped                               
+    * Author : Juergen Pfeifer, juergen.pfeifer@stripped                  
+
+**************************************************************************
+
+----------------------------------------
+
+  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
+   Foundation, 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_pton.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 (R) 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 (c) 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 (R) 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 (c) 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@stripped
+  Mark Adler madler@stripped
+
+*/
+
+***************************************************************************
+
+%%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.
+*/
+
+**********************************************************************

=== modified file 'libmysql/Makefile.am'
--- a/libmysql/Makefile.am	2009-08-25 19:44:04 +0000
+++ b/libmysql/Makefile.am	2010-11-29 10:12:31 +0000
@@ -1,23 +1,21 @@
 # Copyright (C) 2000-2004 MySQL AB
-#  All rights reserved. Use is subject to license terms.
-#
+# 
 # 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.
+# it under the terms of version 2 GNU General Public License as
+# published by the Free Software Foundation.
 #
-# This program is distributed in the hope that it will be useful,
+# There are special exceptions to the terms and conditions of the GPL as it
+# is applied to this software.
+# 
+# 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 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
-#
-#
-#
-#
-# The lines above are intentionally left blank
+# 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
 #
 # This file is public domain and comes with NO WARRANTY of any kind
 

=== modified file 'libmysql/Makefile.shared'
--- a/libmysql/Makefile.shared	2010-10-06 10:06:47 +0000
+++ b/libmysql/Makefile.shared	2010-11-29 10:12:31 +0000
@@ -1,23 +1,21 @@
 # Copyright (C) 2000-2004 MySQL AB
-#  All rights reserved. Use is subject to license terms.
-#
+# 
 # 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.
+# it under the terms of version 2 GNU General Public License as
+# published by the Free Software Foundation.
 #
-# This program is distributed in the hope that it will be useful,
+# There are special exceptions to the terms and conditions of the GPL as it
+# is applied to this software.
+# 
+# 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 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
-#
-#
-#
-#
-# The lines above are intentionally left blank
+# 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
 #
 # This file is public domain and comes with NO WARRANTY of any kind
 

=== modified file 'libmysql/conf_to_src.c'
--- a/libmysql/conf_to_src.c	2009-05-26 18:53:34 +0000
+++ b/libmysql/conf_to_src.c	2010-11-29 10:12:31 +0000
@@ -1,10 +1,11 @@
-/*
-   Copyright (C) 2000-2004 MySQL AB
-    All rights reserved. Use is subject to license terms.
+/* Copyright (C) 2000-2004 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.
+   the Free Software Foundation.
+
+   There are special exceptions to the terms and conditions of the GPL as it
+   is applied to this software.
 
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -13,10 +14,7 @@
 
    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
-
-
-*/
+   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
 /* can't use -lmysys because this prog is used to create -lstrings */
 

=== modified file 'libmysql/dll.c'
--- a/libmysql/dll.c	2009-05-26 18:53:34 +0000
+++ b/libmysql/dll.c	2010-11-29 10:12:31 +0000
@@ -1,10 +1,11 @@
-/*
-   Copyright (C) 2000-2004 MySQL AB
-    All rights reserved. Use is subject to license terms.
+/* Copyright (C) 2000-2004 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.
+   the Free Software Foundation.
+
+   There are special exceptions to the terms and conditions of the GPL as it
+   is applied to this software.
 
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -13,10 +14,7 @@
 
    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
-
-
-*/
+   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
 /*
 ** Handling initialization of the dll library

=== modified file 'libmysql/errmsg.c'
--- a/libmysql/errmsg.c	2009-05-26 18:53:34 +0000
+++ b/libmysql/errmsg.c	2010-11-29 10:12:31 +0000
@@ -1,10 +1,11 @@
-/*
-   Copyright (C) 2000-2004 MySQL AB
-    All rights reserved. Use is subject to license terms.
+/* Copyright (C) 2000-2004 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.
+   the Free Software Foundation.
+
+   There are special exceptions to the terms and conditions of the GPL as it
+   is applied to this software.
 
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -13,10 +14,7 @@
 
    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
-
-
-*/
+   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
 /* Error messages for MySQL clients */
 /* (Error messages for the daemon are in share/language/errmsg.sys) */

=== modified file 'libmysql/get_password.c'
--- a/libmysql/get_password.c	2009-05-26 18:53:34 +0000
+++ b/libmysql/get_password.c	2010-11-29 10:12:31 +0000
@@ -1,10 +1,11 @@
-/*
-   Copyright (C) 2000-2004 MySQL AB
-    All rights reserved. Use is subject to license terms.
+/* Copyright (C) 2000-2004 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.
+   the Free Software Foundation.
+
+   There are special exceptions to the terms and conditions of the GPL as it
+   is applied to this software.
 
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -13,10 +14,7 @@
 
    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
-
-
-*/
+   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
 /*
 ** Ask for a password from tty

=== modified file 'libmysql/libmysql.c'
--- a/libmysql/libmysql.c	2010-10-06 10:06:47 +0000
+++ b/libmysql/libmysql.c	2010-11-29 10:12:31 +0000
@@ -1,10 +1,11 @@
-/*
-   Copyright (C) 2000-2004 MySQL AB
-    All rights reserved. Use is subject to license terms.
+/* Copyright (C) 2000-2004 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.
+   the Free Software Foundation.
+
+   There are special exceptions to the terms and conditions of the GPL as it
+   is applied to this software.
 
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
@@ -13,10 +14,7 @@
 
    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
-
-
-*/
+   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA */
 
 #include <my_global.h>
 #include <my_sys.h>

=== modified file 'libmysql/manager.c'
--- a/libmysql/manager.c	2010-04-13 16:01:38 +0000
+++ b/libmysql/manager.c	2010-11-29 12:32:45 +0000
@@ -5,8 +5,7 @@
    the Free Software Foundation.
 
    There are special exceptions to the terms and conditions of the GPL as it
-   is applied to this software. View the full text of the exception in file
-   EXCEPTIONS-CLIENT in the directory of this software distribution.
+   is applied to this software.
 
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of

=== modified file 'libmysql_r/Makefile.am'
--- a/libmysql_r/Makefile.am	2009-05-26 18:53:34 +0000
+++ b/libmysql_r/Makefile.am	2010-11-29 10:12:31 +0000
@@ -1,23 +1,21 @@
 # Copyright (C) 2000-2004 MySQL AB
-#  All rights reserved. Use is subject to license terms.
-#
+# 
 # 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.
+# it under the terms of version 2 GNU General Public License as
+# published by the Free Software Foundation.
 #
-# This program is distributed in the hope that it will be useful,
+# There are special exceptions to the terms and conditions of the GPL as it
+# is applied to this software.
+# 
+# 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 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
-#
-#
-#
-#
-# The lines above are intentionally left blank
+# 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
 #
 # This file is public domain and comes with NO WARRANTY of any kind
 

=== modified file 'mysql-test/suite/ndb/r/ndb_condition_pushdown.result'
--- a/mysql-test/suite/ndb/r/ndb_condition_pushdown.result	2010-11-19 10:51:30 +0000
+++ b/mysql-test/suite/ndb/r/ndb_condition_pushdown.result	2010-12-01 22:00:42 +0000
@@ -2224,5 +2224,60 @@ select * from t where exists
 pk	i
 1	3
 drop table t,subq;
+create table tx (
+a int not null,
+b int not null,
+c int not null,
+d int not null,
+primary key (`a`,`b`)
+) engine = ndb;
+explain extended select * from tx join tx as t2 on tx.c=1 where t2.c=1;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
+1	SIMPLE	tx	ALL	NULL	NULL	NULL	NULL	0	0.00	Using where with pushed condition: (`test`.`tx`.`c` = 1)
+1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	0	0.00	Using where with pushed condition: (`test`.`t2`.`c` = 1); Using join buffer
+Warnings:
+Note	1003	select `test`.`tx`.`a` AS `a`,`test`.`tx`.`b` AS `b`,`test`.`tx`.`c` AS `c`,`test`.`tx`.`d` AS `d`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`tx` join `test`.`tx` `t2` where ((`test`.`tx`.`c` = 1) and (`test`.`t2`.`c` = 1))
+explain extended
+select straight_join *
+from tx
+join tx as t2 on t2.a = tx.a and t2.b = tx.b
+join tx as t3 on t3.a = tx.c and t3.b = tx.d
+join tx as t4 on t4.a = t3.b and t4.b = t2.c;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
+1	SIMPLE	tx	ALL	PRIMARY	NULL	NULL	NULL	0	0.00	
+1	SIMPLE	t2	eq_ref	PRIMARY	PRIMARY	8	test.tx.a,test.tx.b	1	100.00	
+1	SIMPLE	t3	eq_ref	PRIMARY	PRIMARY	8	test.tx.c,test.tx.d	1	100.00	
+1	SIMPLE	t4	eq_ref	PRIMARY	PRIMARY	8	test.tx.d,test.t2.c	1	100.00	
+Warnings:
+Note	1003	select straight_join `test`.`tx`.`a` AS `a`,`test`.`tx`.`b` AS `b`,`test`.`tx`.`c` AS `c`,`test`.`tx`.`d` AS `d`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d`,`test`.`t3`.`a` AS `a`,`test`.`t3`.`b` AS `b`,`test`.`t3`.`c` AS `c`,`test`.`t3`.`d` AS `d`,`test`.`t4`.`a` AS `a`,`test`.`t4`.`b` AS `b`,`test`.`t4`.`c` AS `c`,`test`.`t4`.`d` AS `d` from `test`.`tx` join `test`.`tx` `t2` join `test`.`tx` `t3` join `test`.`tx` `t4` where ((`test`.`t2`.`b` = `test`.`tx`.`b`) and (`test`.`t2`.`a` = `test`.`tx`.`a`) and (`test`.`t3`.`a` = `test`.`tx`.`c`) and (`test`.`t4`.`b` = `test`.`t2`.`c`) and (`test`.`t3`.`b` = `test`.`tx`.`d`) and (`test`.`t4`.`a` = `test`.`tx`.`d`))
+explain extended
+select t2.c, count(distinct t2.a)
+from tx
+join tx as t2 on tx.a = t2.c and tx.b = t2.d
+where t2.a = 4
+group by t2.c;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
+1	SIMPLE	t2	ref	PRIMARY	PRIMARY	4	const	10	100.00	Using where; Using filesort
+1	SIMPLE	tx	eq_ref	PRIMARY	PRIMARY	8	test.t2.c,test.t2.d	1	100.00	
+Warnings:
+Note	1003	select `test`.`t2`.`c` AS `c`,count(distinct `test`.`t2`.`a`) AS `count(distinct t2.a)` from `test`.`tx` join `test`.`tx` `t2` where ((`test`.`tx`.`b` = `test`.`t2`.`d`) and (`test`.`tx`.`a` = `test`.`t2`.`c`) and (`test`.`t2`.`a` = 4)) group by `test`.`t2`.`c`
+explain extended select * from tx join tx as t2 on tx.c=1 where t2.c=1;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
+1	SIMPLE	tx	ALL	NULL	NULL	NULL	NULL	0	0.00	Using where with pushed condition: (`test`.`tx`.`c` = 1)
+1	SIMPLE	t2	ALL	NULL	NULL	NULL	NULL	0	0.00	Using where with pushed condition: (`test`.`t2`.`c` = 1); Using join buffer
+Warnings:
+Note	1003	select `test`.`tx`.`a` AS `a`,`test`.`tx`.`b` AS `b`,`test`.`tx`.`c` AS `c`,`test`.`tx`.`d` AS `d`,`test`.`t2`.`a` AS `a`,`test`.`t2`.`b` AS `b`,`test`.`t2`.`c` AS `c`,`test`.`t2`.`d` AS `d` from `test`.`tx` join `test`.`tx` `t2` where ((`test`.`tx`.`c` = 1) and (`test`.`t2`.`c` = 1))
+explain extended
+select t2.c, count(distinct t2.a)
+from tx
+join tx as t2 on tx.a = t2.c and tx.b = t2.d
+where t2.a = 4
+group by t2.c;
+id	select_type	table	type	possible_keys	key	key_len	ref	rows	filtered	Extra
+1	SIMPLE	t2	ref	PRIMARY	PRIMARY	4	const	10	100.00	Using where; Using filesort
+1	SIMPLE	tx	eq_ref	PRIMARY	PRIMARY	8	test.t2.c,test.t2.d	1	100.00	
+Warnings:
+Note	1003	select `test`.`t2`.`c` AS `c`,count(distinct `test`.`t2`.`a`) AS `count(distinct t2.a)` from `test`.`tx` join `test`.`tx` `t2` where ((`test`.`tx`.`b` = `test`.`t2`.`d`) and (`test`.`tx`.`a` = `test`.`t2`.`c`) and (`test`.`t2`.`a` = 4)) group by `test`.`t2`.`c`
+drop table tx;
 set engine_condition_pushdown = @old_ecpd;
 DROP TABLE t1,t2,t3,t4,t5;

=== modified file 'mysql-test/suite/ndb/r/ndb_dd_alter.result'
--- a/mysql-test/suite/ndb/r/ndb_dd_alter.result	2010-02-22 12:18:59 +0000
+++ b/mysql-test/suite/ndb/r/ndb_dd_alter.result	2010-11-30 10:35:37 +0000
@@ -496,7 +496,7 @@ t1	CREATE TABLE `t1` (
 ) /*!50100 TABLESPACE ts STORAGE DISK */ ENGINE=ndbcluster DEFAULT CHARSET=latin1
 Attributes:
 a1 Int PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY
-a2 Float NULL AT=FIXED ST=DISK
+a2 Float NULL AT=FIXED ST=MEMORY
 a3 Double NULL AT=FIXED ST=MEMORY
 a4 Bit(1) NULL AT=FIXED ST=DISK
 a5 Tinyint NULL AT=FIXED ST=DISK
@@ -573,6 +573,12 @@ a4 Bit(1) NULL AT=FIXED ST=DISK
 a5 Tinyint NULL AT=FIXED ST=DISK
 $PK Bigunsigned PRIMARY KEY DISTRIBUTION KEY AT=FIXED ST=MEMORY AUTO_INCR
 DROP TABLE test.t1;
+create table t1 (a int primary key, b int, c int, index bc (b,c))
+storage disk tablespace ts engine = ndb;
+alter online table t1 drop index bc;
+alter online table t1 add index b (b);
+alter online table t1 drop index b;
+drop table t1;
 ALTER TABLESPACE ts
 DROP DATAFILE './table_space/datafile.dat'
  ENGINE NDB;

=== modified file 'mysql-test/suite/ndb/r/ndb_update_no_read.result'
--- a/mysql-test/suite/ndb/r/ndb_update_no_read.result	2008-12-05 09:46:39 +0000
+++ b/mysql-test/suite/ndb/r/ndb_update_no_read.result	2010-12-01 12:04:27 +0000
@@ -400,3 +400,81 @@ affected rows: 1
 affected rows: 1
 drop table t1;
 affected rows: 0
+create table t1
+(a int not null primary key auto_increment, b int, c varchar(256))
+engine = ndb;
+affected rows: 0
+insert into t1(b,c) values (1,'this is a test'),
+(2,'this is a test'),(3,'this is a test'),
+(4,'this is a test'),(5,'this is a test'),(6,'this is a test'),
+(7,'this is a test'),(8,'this is a test'),(9,'this is a test');
+affected rows: 9
+info: Records: 9  Duplicates: 0  Warnings: 0
+insert into t1(b,c) select b,c from t1;
+affected rows: 9
+info: Records: 9  Duplicates: 0  Warnings: 0
+insert into t1(b,c) select b,c from t1;
+affected rows: 18
+info: Records: 18  Duplicates: 0  Warnings: 0
+insert into t1(b,c) select b,c from t1;
+affected rows: 36
+info: Records: 36  Duplicates: 0  Warnings: 0
+insert into t1(b,c) select b,c from t1;
+affected rows: 72
+info: Records: 72  Duplicates: 0  Warnings: 0
+insert into t1(b,c) select b,c from t1;
+affected rows: 144
+info: Records: 144  Duplicates: 0  Warnings: 0
+insert into t1(b,c) select b,c from t1;
+affected rows: 288
+info: Records: 288  Duplicates: 0  Warnings: 0
+insert into t1(b,c) select b,c from t1;
+affected rows: 576
+info: Records: 576  Duplicates: 0  Warnings: 0
+insert into t1(b,c) select b,c from t1;
+affected rows: 1152
+info: Records: 1152  Duplicates: 0  Warnings: 0
+insert into t1(b,c) select b,c from t1;
+affected rows: 2304
+info: Records: 2304  Duplicates: 0  Warnings: 0
+analyze table t1;
+Table	Op	Msg_type	Msg_text
+test.t1	analyze	status	OK
+affected rows: 1
+select count(*) from t1 where a in (...)
+count(*)
+1000
+affected rows: 1
+@ndb_execute_count:=VARIABLE_VALUE-@ndb_init_execute_count
+5
+affected rows: 1
+update t1 set c = 'kalle' where a in (...)
+affected rows: 1000
+info: Rows matched: 1000  Changed: 1000  Warnings: 0
+@ndb_execute_count:=VARIABLE_VALUE-@ndb_init_execute_count
+9
+affected rows: 1
+delete from t1 where a in (...)
+affected rows: 1000
+@ndb_execute_count:=VARIABLE_VALUE-@ndb_init_execute_count
+3
+affected rows: 1
+delete from t1 where a in (...)
+affected rows: 0
+@ndb_execute_count:=VARIABLE_VALUE-@ndb_init_execute_count
+3
+affected rows: 1
+update t1 set c = 'kalle' where a in (...)
+affected rows: 0
+info: Rows matched: 0  Changed: 0  Warnings: 0
+@ndb_execute_count:=VARIABLE_VALUE-@ndb_init_execute_count
+9
+affected rows: 1
+update t1 set c = 'kalle' where a in (...)
+affected rows: 0
+info: Rows matched: 0  Changed: 0  Warnings: 0
+@ndb_execute_count:=VARIABLE_VALUE-@ndb_init_execute_count
+9
+affected rows: 1
+drop table t1;
+affected rows: 0

=== modified file 'mysql-test/suite/ndb/t/ndb_condition_pushdown.test'
--- a/mysql-test/suite/ndb/t/ndb_condition_pushdown.test	2010-11-19 10:51:30 +0000
+++ b/mysql-test/suite/ndb/t/ndb_condition_pushdown.test	2010-12-01 22:00:42 +0000
@@ -2309,6 +2309,41 @@ select * from t where exists
 
 drop table t,subq;
 
+# Bug#58553 Queries with pushed conditions causes 'explain extended' to crash mysqld
+create table tx (
+  a int not null,
+  b int not null,
+  c int not null,
+  d int not null,
+  primary key (`a`,`b`)
+) engine = ndb;
+
+explain extended select * from tx join tx as t2 on tx.c=1 where t2.c=1;
+
+explain extended
+select straight_join *
+from tx
+ join tx as t2 on t2.a = tx.a and t2.b = tx.b
+ join tx as t3 on t3.a = tx.c and t3.b = tx.d
+ join tx as t4 on t4.a = t3.b and t4.b = t2.c;
+
+explain extended
+select t2.c, count(distinct t2.a)
+from tx
+join tx as t2 on tx.a = t2.c and tx.b = t2.d
+where t2.a = 4
+group by t2.c;
+
+explain extended select * from tx join tx as t2 on tx.c=1 where t2.c=1;
+
+explain extended
+select t2.c, count(distinct t2.a)
+from tx
+join tx as t2 on tx.a = t2.c and tx.b = t2.d
+where t2.a = 4
+group by t2.c;
+
+drop table tx;
 
 set engine_condition_pushdown = @old_ecpd;
 DROP TABLE t1,t2,t3,t4,t5;

=== modified file 'mysql-test/suite/ndb/t/ndb_dd_alter.test'
--- a/mysql-test/suite/ndb/t/ndb_dd_alter.test	2010-02-22 12:18:59 +0000
+++ b/mysql-test/suite/ndb/t/ndb_dd_alter.test	2010-11-30 10:35:37 +0000
@@ -286,6 +286,15 @@ source show_attributes.inc;
 
 DROP TABLE test.t1;
 
+# Bug#55618
+create table t1 (a int primary key, b int, c int, index bc (b,c))
+storage disk tablespace ts engine = ndb;
+alter online table t1 drop index bc;
+alter online table t1 add index b (b);
+alter online table t1 drop index b;
+drop table t1;
+
+
  ALTER TABLESPACE ts
  DROP DATAFILE './table_space/datafile.dat'
  ENGINE NDB;

=== modified file 'mysql-test/suite/ndb/t/ndb_update_no_read.test'
--- a/mysql-test/suite/ndb/t/ndb_update_no_read.test	2010-09-22 11:36:01 +0000
+++ b/mysql-test/suite/ndb/t/ndb_update_no_read.test	2010-12-01 12:06:43 +0000
@@ -347,3 +347,131 @@ show warnings; # Workaround to bug#39663
 --enable_warnings # Workaround to bug#39663
 
 drop table t1;
+
+# bug#58040
+
+create table t1
+(a int not null primary key auto_increment, b int, c varchar(256))
+engine = ndb;
+
+# insert some rows...
+insert into t1(b,c) values (1,'this is a test'),
+(2,'this is a test'),(3,'this is a test'),
+(4,'this is a test'),(5,'this is a test'),(6,'this is a test'),
+(7,'this is a test'),(8,'this is a test'),(9,'this is a test');
+
+insert into t1(b,c) select b,c from t1;
+insert into t1(b,c) select b,c from t1;
+insert into t1(b,c) select b,c from t1;
+insert into t1(b,c) select b,c from t1;
+insert into t1(b,c) select b,c from t1;
+insert into t1(b,c) select b,c from t1;
+insert into t1(b,c) select b,c from t1;
+insert into t1(b,c) select b,c from t1;
+insert into t1(b,c) select b,c from t1;
+analyze table t1;
+
+# looong in list
+let $list =
+(3220,3371,709,363,603,2232,1738,2079,585,1798,2786,2495,1631,2000,59,2137,
+1703,564,1102,868,3934,427,694,2908,2324,2542,1779,1133,1508,3153,2701,2966,
+3687,1551,3395,3157,3914,1096,2755,1433,3096,16,3592,521,1977,1886,441,3285,
+3257,2040,911,403,736,3720,496,1244,3221,1386,2988,1442,2271,3050,148,2355,
+1751,3349,3512,731,3320,244,2462,1141,1410,1815,4007,1140,1236,2824,1323,1843,
+422,3929,182,3064,3603,2798,68,2251,1255,2417,3436,67,1458,1260,1450,1740,3493,
+2043,965,4069,2762,3876,2945,2741,1194,3593,2135,4046,659,1263,2416,2539,921,
+698,1396,2152,2130,3411,1013,2682,703,240,1933,3581,3798,1926,2381,717,361,
+2697,221,3726,2124,1317,89,1413,312,2279,2556,1920,3282,3850,893,2012,1463,
+1032,4044,3448,2116,1743,3761,3145,1760,3351,3462,599,2164,4050,2178,4014,519,
+2898,610,86,2138,1547,3543,3098,3599,376,2854,2408,2506,1846,2732,950,700,2829,
+1724,3989,1644,1700,2706,70,2478,2136,854,1175,3678,2975,1680,471,2508,3069,
+289,1758,2768,2398,131,550,948,3625,1476,2760,1974,648,2664,3706,1497,2111,
+2784,801,1931,3913,1539,205,3686,1253,2101,1229,1466,909,566,2757,1478,2483,
+192,1343,1103,259,3243,2393,547,569,2074,2750,2826,3756,2934,1788,495,410,2797,
+1104,883,2899,3083,337,822,829,2698,2723,2285,3155,328,3111,1663,3652,3174,
+2429,1298,1720,3757,156,1684,2125,169,58,3937,773,2433,2867,3323,650,4087,1775,
+2822,3328,3037,1907,346,3217,1531,1456,3595,3218,2678,762,10,210,2427,2341,75,
+1506,2552,2384,2196,2191,2972,1113,4032,378,2953,1389,1916,3253,1742,42,3550,
+2835,885,3099,555,393,3135,44,3400,251,2896,3640,3712,282,1995,1187,491,3433,
+3968,3176,1459,1126,1088,3534,1634,114,3843,3013,97,2358,1872,1814,1180,3740,
+601,3354,216,677,4067,484,3621,3891,2981,2708,953,1652,2197,1426,1218,3735,
+2269,1300,2523,3627,174,3529,1192,2369,939,3024,1542,3651,1145,3684,1994,2187,
+2498,1546,2418,371,2368,1686,2816,2231,862,3513,3741,1267,389,1615,2096,1636,
+739,3800,2168,1537,942,538,954,1234,3112,1676,2165,2019,3364,1613,4056,2371,
+3079,2484,3417,3580,17,3980,945,1470,2609,2864,2791,3812,1125,832,1861,2158,
+1014,92,2470,1604,1991,903,805,2046,320,1906,1022,2614,1266,2335,3506,3736,
+3168,26,2769,2346,2444,1445,479,3965,819,3010,1029,3318,1687,290,1407,3920,379,
+3885,2892,3377,1210,2262,1580,107,3517,3302,2334,1027,3166,2217,681,2466,928,
+3791,2612,3009,372,2790,2294,2713,3856,2862,2266,2845,2480,1876,3394,1835,735,
+1293,1969,3248,237,419,3352,740,2426,3638,2319,1729,3303,2189,283,1839,1905,
+1165,3971,2696,3258,2221,665,1559,1734,3416,3835,2894,535,3911,611,1453,3649,
+837,2085,1060,3646,4023,2042,1939,1226,2601,2657,967,4059,2035,3556,1529,3845,
+170,3842,1928,3407,150,271,936,1952,2543,446,662,804,1349,654,470,3713,3232,
+2600,2955,2881,1929,2747,2549,1291,2509,2773,3316,3461,2004,2270,674,3334,1947,
+1067,4072,189,2619,122,593,3558,3236,2082,1504,1182,1867,43,2486,3028,4033,448,
+1150,4013,1148,1691,3234,459,3807,2195,4063,869,3962,582,660,600,3925,2166,
+3179,3846,1620,476,2122,2949,2024,3606,2027,3468,1540,1786,1364,1593,1802,411,
+1940,3004,2802,3598,2530,2613,2338,3953,128,1951,4061,3907,2568,2844,2962,2683,
+1471,3554,417,767,1526,1480,118,658,209,2656,3295,2123,3117,465,3005,3246,336,
+604,2442,1283,2579,2795,3484,1997,463,2877,84,3081,2318,3336,818,3583,3245,
+3613,2897,3921,1820,2819,2306,3516,1763,2973,3019,3380,723,19,3444,3795,3065,
+1692,1297,1289,3707,3080,1824,1612,2617,3014,621,3988,2842,3813,2204,2298,3233,
+2738,2548,2914,902,3200,1061,2081,607,3392,3895,2190,789,2865,943,1595,976,
+2863,1666,3496,1896,3568,3249,2200,933,1717,1857,592,467,2770,2663,1560,575,
+605,1196,3238,2558,2375,2859,2667,3106,443,1702,2382,284,4017,307,2492,4002,
+931,1004,397,619,1052,1003,3797,2694,177,1017,3519,1237,1733,3734,2407,109,
+2246,1600,1981,3437,620,1058,530,2112,2449,1381,2403,1198,1062,668,1512,69,
+1822,2283,401,1135,3110,3214,670,2645,3586,3924,4078,4090,2083,1566,1563,2516,
+675,1491,774,1967,3973,3609,872,2893,2535,1123,2623,2562,3793,1503,1968,113,
+2811,3930,1908,447,2419,1117,2471,1051,787,695,1303,146,3633,367,3132,602,1862,
+2127,1306,1285,3564,426,3224,273,1385,2807,3701,4041,865,2690,1697,3960,2684,
+4079,1772,3171,3716,2120,3918,2922,2497,2154,630,3879,3688,2055,2316,155,1220,
+3927,1425,2413,1791,3237,206,3384,1371,3819,4089,94,1404,2343,4031,1144,3034,
+2500,2846,3042,2553,1380,166,3487,646,963,3772,3617,1474,3610,1146,386,2592,
+3421,1887,3589,141,3033,3326,3509,1475,1320,533,2275,1932,3732,2474,1980,49,
+1511,2671,3278,1486,1080,1610,3575,3904,2227,3669,784,1736,3724,729,3818,3825,
+3908,3031,3109,704,685,2448,710,359,3235,1583,2376,2810,1619,64,2635,3032,1412,
+1159,3792,1890,2885,55,1571,3826,744,80,1683,348,3097,1754,2402,2310,2072,831,
+3053,2882,2599,127,2118,3748,2512,844,3376,490,813,2011,2099,3626,1350,3993,
+2207,3553,350,2805,2276,2235,2803,159,1039,2075,576,614,1899,3348,649,218,637,
+2942,270,3422,3775,3873,3239,989,2463,783,3312);
+
+--echo select count(*) from t1 where a in (...)
+--source suite/ndb/include/ndb_init_execute_count.inc
+--disable_query_log
+eval select count(*) from t1 where a in $list;
+--source suite/ndb/include/ndb_execute_count.inc
+
+--echo update t1 set c = 'kalle' where a in (...)
+--source suite/ndb/include/ndb_init_execute_count.inc
+--disable_query_log
+eval update t1 set c = 'kalle' where a in $list;
+--source suite/ndb/include/ndb_execute_count.inc
+
+--echo delete from t1 where a in (...)
+--source suite/ndb/include/ndb_init_execute_count.inc
+--disable_query_log
+eval delete from t1 where a in $list;
+--source suite/ndb/include/ndb_execute_count.inc
+
+--echo delete from t1 where a in (...)
+--source suite/ndb/include/ndb_init_execute_count.inc
+--disable_query_log
+eval delete from t1 where a in $list;
+--source suite/ndb/include/ndb_execute_count.inc
+
+--echo update t1 set c = 'kalle' where a in (...)
+--source suite/ndb/include/ndb_init_execute_count.inc
+--disable_query_log
+eval update t1 set c = 'kalle' where a in $list;
+--source suite/ndb/include/ndb_execute_count.inc
+
+--echo update t1 set c = 'kalle' where a in (...)
+--source suite/ndb/include/ndb_init_execute_count.inc
+--disable_query_log
+eval update t1 set c = 'kalle' where a in $list;
+--source suite/ndb/include/ndb_execute_count.inc
+
+--enable_query_log
+
+drop table t1;

=== modified file 'scripts/make_binary_distribution.sh'
--- a/scripts/make_binary_distribution.sh	2010-10-12 14:53:28 +0000
+++ b/scripts/make_binary_distribution.sh	2010-11-29 12:32:45 +0000
@@ -1,19 +1,18 @@
 #!/bin/sh
 # Copyright (C) 2000-2006 MySQL AB
-#  All rights reserved. Use is subject to license terms.
-#
+# 
 # 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
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 ##############################################################################
 #
@@ -303,8 +302,8 @@ if [ x"$BASE_SYSTEM" != x"netware" ] ; t
 
   # Copy readme and license files
   cp README Docs/INSTALL-BINARY  $DEST/
-  if [ -f COPYING -a -f EXCEPTIONS-CLIENT ] ; then
-    cp COPYING EXCEPTIONS-CLIENT $DEST/
+  if [ -f COPYING ] ; then
+    cp COPYING $DEST/
   elif [ -f LICENSE.mysql ] ; then
     cp LICENSE.mysql $DEST/
   else
@@ -382,7 +381,7 @@ copyfileto()
 copyfileto $BASE/docs ChangeLog Docs/mysql.info
 
 copyfileto $BASE COPYING COPYING.LIB README Docs/INSTALL-BINARY \
-         EXCEPTIONS-CLIENT LICENSE.mysql
+           LICENSE.mysql
 
 # Non platform-specific bin dir files:
 BIN_FILES="extra/comp_err$BS extra/replace$BS extra/perror$BS \

=== modified file 'scripts/make_win_bin_dist'
--- a/scripts/make_win_bin_dist	2010-10-12 14:53:28 +0000
+++ b/scripts/make_win_bin_dist	2010-11-26 14:06:32 +0000
@@ -188,8 +188,8 @@ cp ChangeLog              $DESTDIR/Docs/
 cp support-files/my-*.ini $DESTDIR/
 
 if [ -f COPYING ] ; then
-  cp COPYING EXCEPTIONS-CLIENT $DESTDIR/
-  cp COPYING                   $DESTDIR/Docs/
+  cp COPYING $DESTDIR/
+  cp COPYING $DESTDIR/Docs/
 fi
 
 # ----------------------------------------------------------------------

=== modified file 'sql/ha_ndbcluster.cc'
--- a/sql/ha_ndbcluster.cc	2010-11-25 14:42:27 +0000
+++ b/sql/ha_ndbcluster.cc	2010-12-01 22:00:42 +0000
@@ -2403,10 +2403,18 @@ static int write_conflict_row(NDB_SHARE 
 inline int
 check_completed_operations_pre_commit(Thd_ndb *thd_ndb, NdbTransaction *trans,
                                       const NdbOperation *first,
+                                      const NdbOperation *last,
                                       uint *ignore_count)
 {
   uint ignores= 0;
   DBUG_ENTER("check_completed_operations_pre_commit");
+
+  if (unlikely(first == 0))
+  {
+    assert(last == 0);
+    DBUG_RETURN(0);
+  }
+
   /*
     Check that all errors are "accepted" errors
     or exceptions to report
@@ -2414,7 +2422,7 @@ check_completed_operations_pre_commit(Th
 #ifdef HAVE_NDB_BINLOG
   uint conflict_rows_written= 0;
 #endif
-  while (first)
+  while (true)
   {
     const NdbError &err= first->getNdbError();
     if (err.classification != NdbError::NoError
@@ -2510,6 +2518,10 @@ check_completed_operations_pre_commit(Th
     }
     if (err.classification != NdbError::NoError)
       ignores++;
+
+    if (first == last)
+      break;
+
     first= trans->getNextCompletedOperation(first);
   }
   if (ignore_count)
@@ -2536,14 +2548,22 @@ check_completed_operations_pre_commit(Th
 inline int
 check_completed_operations(Thd_ndb *thd_ndb, NdbTransaction *trans,
                            const NdbOperation *first,
+                           const NdbOperation *last,
                            uint *ignore_count)
 {
   uint ignores= 0;
   DBUG_ENTER("check_completed_operations");
+
+  if (unlikely(first == 0))
+  {
+    assert(last == 0);
+    DBUG_RETURN(0);
+  }
+
   /*
     Check that all errors are "accepted" errors
   */
-  while (first)
+  while (true)
   {
     const NdbError &err= first->getNdbError();
     if (err.classification != NdbError::NoError &&
@@ -2557,6 +2577,10 @@ check_completed_operations(Thd_ndb *thd_
     }
     if (err.classification != NdbError::NoError)
       ignores++;
+
+    if (first == last)
+      break;
+
     first= trans->getNextCompletedOperation(first);
   }
   if (ignore_count)
@@ -2592,20 +2616,21 @@ int execute_no_commit(Thd_ndb *thd_ndb, 
   DBUG_ENTER("execute_no_commit");
   ha_ndbcluster::release_completed_operations(trans);
   const NdbOperation *first= trans->getFirstDefinedOperation();
+  const NdbOperation *last= trans->getLastDefinedOperation();
   thd_ndb->m_execute_count++;
+  thd_ndb->m_unsent_bytes= 0;
   DBUG_PRINT("info", ("execute_count: %u", thd_ndb->m_execute_count));
   if (trans->execute(NdbTransaction::NoCommit,
                      NdbOperation::AO_IgnoreError,
                      thd_ndb->m_force_send))
   {
-    thd_ndb->m_unsent_bytes= 0;
     DBUG_RETURN(-1);
   }
-  thd_ndb->m_unsent_bytes= 0;
   if (!ignore_no_key || trans->getNdbError().code == 0)
     DBUG_RETURN(trans->getNdbError().code);
 
-  DBUG_RETURN(check_completed_operations_pre_commit(thd_ndb, trans, first,
+  DBUG_RETURN(check_completed_operations_pre_commit(thd_ndb, trans,
+                                                    first, last,
                                                     ignore_count));
 }
 
@@ -2627,25 +2652,25 @@ int execute_commit(Thd_ndb *thd_ndb, Ndb
     ao= NdbOperation::AbortOnError;
   }
   const NdbOperation *first= trans->getFirstDefinedOperation();
+  const NdbOperation *last= trans->getLastDefinedOperation();
   thd_ndb->m_execute_count++;
+  thd_ndb->m_conflict_fn_usage_count= 0;
+  thd_ndb->m_unsent_bytes= 0;
   DBUG_PRINT("info", ("execute_count: %u", thd_ndb->m_execute_count));
   if (trans->execute(NdbTransaction::Commit, ao, force_send))
   {
     thd_ndb->m_max_violation_count= 0;
     thd_ndb->m_old_violation_count= 0;
-    thd_ndb->m_conflict_fn_usage_count= 0;
-    thd_ndb->m_unsent_bytes= 0;
     DBUG_RETURN(-1);
   }
   g_ndb_status_conflict_fn_max+= thd_ndb->m_max_violation_count;
   g_ndb_status_conflict_fn_old+= thd_ndb->m_old_violation_count;
   thd_ndb->m_max_violation_count= 0;
   thd_ndb->m_old_violation_count= 0;
-  thd_ndb->m_conflict_fn_usage_count= 0;
-  thd_ndb->m_unsent_bytes= 0;
   if (!ignore_error || trans->getNdbError().code == 0)
     DBUG_RETURN(trans->getNdbError().code);
-  DBUG_RETURN(check_completed_operations(thd_ndb, trans, first, ignore_count));
+  DBUG_RETURN(check_completed_operations(thd_ndb, trans, first, last,
+                                         ignore_count));
 }
 
 inline
@@ -5060,8 +5085,8 @@ inline int ha_ndbcluster::fetch_next(Ndb
                           (long) m_thd_ndb->m_unsent_bytes));
       if (m_thd_ndb->m_unsent_bytes)
       {
-        if (flush_bulk_insert() != 0)
-          DBUG_RETURN(-1);
+        if ((error = flush_bulk_insert()) != 0)
+          DBUG_RETURN(error);
       }
       contact_ndb= (local_check == 2);
     }
@@ -6629,6 +6654,8 @@ int ha_ndbcluster::exec_bulk_update(uint
       no_uncommitted_rows_execute_failure();
       DBUG_RETURN(ndb_err(m_thd_ndb->trans));
     }
+    assert(m_rows_changed >= ignore_count);
+    assert(m_rows_updated >= ignore_count);
     m_rows_changed-= ignore_count;
     m_rows_updated-= ignore_count;
   }
@@ -6701,7 +6728,8 @@ int ha_ndbcluster::ndb_update_row(const 
                    have_pk &&
                    bitmap_is_overlapping(table->write_set, m_pk_bitmap_p) &&
                    primary_key_cmp(old_data, new_data));
-  bool batch_allowed= is_bulk_update || thd_allow_batch(thd);
+  bool batch_allowed= !m_update_cannot_batch && 
+    (is_bulk_update || thd_allow_batch(thd));
   NdbOperation::SetValueSpec sets[1];
 
   DBUG_ENTER("ndb_update_row");
@@ -6929,9 +6957,14 @@ int ha_ndbcluster::ndb_update_row(const 
   }
   else if (blob_count > 0)
     m_blobs_pending= TRUE;
-  
-  m_rows_changed+= 1 - ignore_count;
-  m_rows_updated+= 1 - ignore_count;
+
+  m_rows_changed++;
+  m_rows_updated++;
+
+  assert(m_rows_changed >= ignore_count);
+  assert(m_rows_updated >= ignore_count);
+  m_rows_changed-= ignore_count;
+  m_rows_updated-= ignore_count;
 
   DBUG_RETURN(0);
 }
@@ -6969,6 +7002,7 @@ int ha_ndbcluster::end_bulk_delete()
       no_uncommitted_rows_execute_failure();
       DBUG_RETURN(ndb_err(m_thd_ndb->trans));
     }
+    assert(m_rows_deleted >= ignore_count);
     m_rows_deleted-= ignore_count;
   }
   m_is_bulk_delete = false;
@@ -6990,7 +7024,9 @@ int ha_ndbcluster::ndb_delete_row(const 
   const NdbOperation *op;
   uint32 part_id= ~uint32(0);
   int error;
-  bool allow_batch= m_is_bulk_delete || thd_allow_batch(thd);
+  bool allow_batch= !m_delete_cannot_batch &&
+    (m_is_bulk_delete || thd_allow_batch(thd));
+
   DBUG_ENTER("ndb_delete_row");
   DBUG_ASSERT(trans);
 
@@ -7060,11 +7096,11 @@ int ha_ndbcluster::ndb_delete_row(const 
     thd_ndb->m_unsent_bytes+= 12;
 
     no_uncommitted_rows_update(-1);
+    m_rows_deleted++;
 
     if (!(primary_key_update || m_delete_cannot_batch))
     {
       // If deleting from cursor, NoCommit will be handled in next_result
-      m_rows_deleted++;
       DBUG_RETURN(0);
     }
   }
@@ -7133,6 +7169,7 @@ int ha_ndbcluster::ndb_delete_row(const 
       ERR_RETURN(trans->getNdbError());
 
     no_uncommitted_rows_update(-1);
+    m_rows_deleted++;
 
     /*
       Check if we can batch the delete.
@@ -7160,7 +7197,6 @@ int ha_ndbcluster::ndb_delete_row(const 
 	 !primary_key_update &&
 	 !need_flush)
     {
-      m_rows_deleted++;
       DBUG_RETURN(0);
     }
   }
@@ -7175,7 +7211,10 @@ int ha_ndbcluster::ndb_delete_row(const 
     DBUG_RETURN(ndb_err(trans));
   }
   if (!primary_key_update)
-    m_rows_deleted+= 1 - ignore_count;
+  {
+    assert(m_rows_deleted >= ignore_count);
+    m_rows_deleted-= ignore_count;
+  }
   DBUG_RETURN(0);
 }
   
@@ -8275,6 +8314,13 @@ int ha_ndbcluster::reset()
   assert(m_is_bulk_delete == false);
   m_is_bulk_delete = false;
 
+  /* 
+    Setting pushed_code=NULL here is a temporary fix for bug #58553. This
+    should not be needed any longer if http://lists.mysql.com/commits/125336 
+    is merged into this branch.
+  */
+  pushed_cond= NULL;
+
   DBUG_RETURN(0);
 }
 
@@ -9099,11 +9145,15 @@ int ndbcluster_commit(handlerton *hton, 
         char buff[ STRING_BUFFER_USUAL_SIZE ];
         const char* msg= NULL;
         if (thd->lex->sql_command == SQLCOM_DELETE)
+        {
+          assert(thd_ndb->m_handler->m_rows_deleted >= ignore_count);
           affected= (thd_ndb->m_handler->m_rows_deleted-= ignore_count);
+        }
         else
         {
           DBUG_PRINT("info", ("Update : message was %s", 
                               thd->main_da.message()));
+          assert(thd_ndb->m_handler->m_rows_updated >= ignore_count);
           affected= (thd_ndb->m_handler->m_rows_updated-= ignore_count);
           /* For update in this scenario, we set found and changed to be 
            * the same as affected
@@ -15560,9 +15610,6 @@ int ha_ndbcluster::check_if_supported_al
   HA_ALTER_FLAGS not_supported= ~(supported_alter_operations());
   uint i;
   const NDBTAB *tab= (const NDBTAB *) m_table;
-  NDBCOL new_col;
-  int pk= 0;
-  int ai= 0;
   HA_ALTER_FLAGS add_column;
   HA_ALTER_FLAGS adding;
   HA_ALTER_FLAGS dropping;
@@ -15723,15 +15770,59 @@ int ha_ndbcluster::check_if_supported_al
     Field *field= table->field[i];
     const NDBCOL *col= tab->getColumn(i);
 
+    NDBCOL new_col;
     create_ndb_column(0, new_col, field, create_info);
 
+    bool index_on_column = false;
+    /**
+     * Check all indexes to determine if column has index instead of checking
+     *   field->flags (PRI_KEY_FLAG | UNIQUE_KEY_FLAG | MULTIPLE_KEY_FLAG
+     *   since field->flags appears to only be set on first column in
+     *   multi-part index
+     */
+    for (uint j= 0; j<table->s->keys; j++)
+    {
+      KEY* key_info= table->key_info + j;
+      KEY_PART_INFO* key_part= key_info->key_part;
+      KEY_PART_INFO* end= key_part+key_info->key_parts;
+      for (; key_part != end; key_part++)
+      {
+        if (key_part->field->field_index == i)
+        {
+          index_on_column= true;
+          j= table->s->keys; // break outer loop
+          break;
+        }
+      }
+    }
+
+    if (index_on_column == false && (*alter_flags & adding).is_set())
+    {
+      for (uint j= table->s->keys; j<altered_table->s->keys; j++)
+      {
+        KEY* key_info= altered_table->key_info + j;
+        KEY_PART_INFO* key_part= key_info->key_part;
+        KEY_PART_INFO* end= key_part+key_info->key_parts;
+        for (; key_part != end; key_part++)
+        {
+          if (key_part->field->field_index == i)
+          {
+            index_on_column= true;
+            j= altered_table->s->keys; // break outer loop
+            break;
+          }
+        }
+      }
+    }
+
     /**
      * This is a "copy" of code in ::create()
      *   that "auto-converts" columns with keys into memory
      *   (unless storage disk is explicitly added)
-     * This is needed to check if getStorageType() == getStorageType() further down
+     * This is needed to check if getStorageType() == getStorageType() 
+     * further down
      */
-    if (field->flags & (PRI_KEY_FLAG | UNIQUE_KEY_FLAG | MULTIPLE_KEY_FLAG))
+    if (index_on_column)
     {
       if (field->field_storage_type() == HA_SM_DISK)
       {
@@ -15739,6 +15830,14 @@ int ha_ndbcluster::check_if_supported_al
       }
       new_col.setStorageType(NdbDictionary::Column::StorageTypeMemory);
     }
+    else if (field->field_storage_type() == HA_SM_DEFAULT)
+    {
+      /**
+       * If user didn't specify any column format, keep old
+       *   to make as many alter's as possible online
+       */
+      new_col.setStorageType(col->getStorageType());
+    }
 
     if (col->getStorageType() != new_col.getStorageType())
     {
@@ -15758,11 +15857,6 @@ int ha_ndbcluster::check_if_supported_al
       DBUG_PRINT("info", ("add/drop index not supported for disk stored column"));
       DBUG_RETURN(HA_ALTER_NOT_SUPPORTED);
     }
-
-    if (field->flags & PRI_KEY_FLAG)
-      pk=1;
-    if (field->flags & FIELD_IN_ADD_INDEX)
-      ai=1;
   }
 
   if ((*alter_flags & HA_CHANGE_AUTOINCREMENT_VALUE).is_set())

=== modified file 'sql/ha_ndbcluster_glue.h'
--- a/sql/ha_ndbcluster_glue.h	2010-11-15 09:15:27 +0000
+++ b/sql/ha_ndbcluster_glue.h	2010-11-17 08:10:15 +0000
@@ -106,6 +106,13 @@ enum column_format_type {
 /* No support for --ndb-wait_setup */
 #define NDB_NO_WAIT_SETUP
 
+/*
+  The enum open_table_mode has been removed in 5.5.7 and 'open_table_from_share'
+  now takes "bool is_create_table" instead of the enum type. Define OTM_OPEN
+  to false since it's not a create table
+*/
+#define OTM_OPEN false
+
 #endif
 
 /* extract the bitmask of options from THD */
@@ -209,13 +216,6 @@ int mysql_cond_timedwait(mysql_cond_t* c
   return pthread_cond_timedwait(cond, mutex, abstime);
 }
 
-/*  mysql_truncate_table emulation, added in 5.5 */
-static inline
-bool mysql_truncate_table(THD *thd, TABLE_LIST *table_ref)
-{
-  return mysql_truncate(thd, table_ref, 0);
-}
-
 #endif
 
 static inline
@@ -273,4 +273,17 @@ uint partition_info_num_subparts(const p
 #endif
 }
 
+/*  mysql_truncate_table emulation */
+static inline
+bool mysql_truncate_table(THD *thd, TABLE_LIST *table_ref)
+{
+#if MYSQL_VERSION_ID < 50500
+  return mysql_truncate(thd, table_ref, 0);
+#else
+  /* mysql_truncate support removed in 5.5.7 */
+  abort();
+  return false;
+#endif
+}
+
 #endif

=== modified file 'storage/ndb/CMakeLists.txt'
--- a/storage/ndb/CMakeLists.txt	2010-11-15 11:08:25 +0000
+++ b/storage/ndb/CMakeLists.txt	2010-12-01 22:00:42 +0000
@@ -40,6 +40,7 @@ ELSE()
     ${CMAKE_CURRENT_SOURCE_DIR}/include/mgmapi
     ${CMAKE_CURRENT_SOURCE_DIR}/include/mgmcommon
     ${CMAKE_CURRENT_SOURCE_DIR}/include/ndbapi
+    ${CMAKE_CURRENT_SOURCE_DIR}/include/logger
     ${CMAKE_CURRENT_BINARY_DIR}/include
 
     # Util library includes
@@ -57,14 +58,6 @@ IF(WITH_NDB_TEST)
   MESSAGE(STATUS "Building NDB test programs")
 ENDIF()
 
-SET(WITH_NDB_PORT "" CACHE INTEGER
-  "Default port used by NDB Cluster management server")
-IF(WITH_NDB_PORT GREATER 0)
-  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DNDB_PORT=\"${WITH_NDB_PORT}\"")
-  SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DNDB_PORT=\"${WITH_NDB_PORT}\"")
-  MESSAGE ( STATUS "Setting management server port to ${WITH_NDB_PORT}" )
-ENDIF()
-
 OPTION(WITH_NDB_BINLOG
   "Disable NDB binlog" ON)
 
@@ -89,13 +82,6 @@ ELSE()
   ENDIF()
 ENDIF()
 
-IF(MSVC)
-  # Disable some warnings for NDB build on Windows
-  # 4355: 'this': used in base member initializer list
-  SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4355")
-  SET(CMAKE_C_FLAGS   "${CMAKE_C_FLAGS} /wd4355")
-ENDIF()
-
 IF(NOT SOURCE_SUBLIBS)
   ADD_SUBDIRECTORY(include)
   ADD_SUBDIRECTORY(src)

=== modified file 'storage/ndb/config/type_kernel.cmake'
--- a/storage/ndb/config/type_kernel.cmake	2008-08-21 06:37:31 +0000
+++ b/storage/ndb/config/type_kernel.cmake	2010-11-26 10:42:53 +0000
@@ -13,23 +13,11 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}
-                    ${CMAKE_BINARY_DIR}/include
-                    ${CMAKE_BINARY_DIR}/storage/ndb/include
-                    ${CMAKE_SOURCE_DIR}/include
-                    ${CMAKE_SOURCE_DIR}/storage/ndb/include
-                    ${CMAKE_SOURCE_DIR}/storage/ndb/src/kernel/vm
-                    ${CMAKE_SOURCE_DIR}/storage/ndb/src/kernel/error
-                    ${CMAKE_SOURCE_DIR}/storage/ndb/src/kernel/blocks
-                    ${CMAKE_SOURCE_DIR}/storage/ndb/src/kernel
-                    ${CMAKE_SOURCE_DIR}/storage/ndb/include/kernel
-                    ${CMAKE_SOURCE_DIR}/storage/ndb/include/transporter
-                    ${CMAKE_SOURCE_DIR}/storage/ndb/include/debugger
-                    ${CMAKE_SOURCE_DIR}/storage/ndb/include/mgmapi
-                    ${CMAKE_SOURCE_DIR}/storage/ndb/include/mgmcommon
-                    ${CMAKE_SOURCE_DIR}/storage/ndb/include/ndbapi
-                    ${CMAKE_SOURCE_DIR}/storage/ndb/include/util
-                    ${CMAKE_SOURCE_DIR}/storage/ndb/include/portlib
-                    ${CMAKE_SOURCE_DIR}/storage/ndb/include/logger
-                    ${CMAKE_SOURCE_DIR}/zlib)
+INCLUDE_DIRECTORIES(
+  ${CMAKE_CURRENT_SOURCE_DIR}
+  ${CMAKE_SOURCE_DIR}/storage/ndb/src/kernel/vm
+  ${CMAKE_SOURCE_DIR}/storage/ndb/src/kernel/error
+  ${CMAKE_SOURCE_DIR}/storage/ndb/src/kernel/blocks
+  ${CMAKE_SOURCE_DIR}/storage/ndb/src/kernel
+)
 

=== removed file 'storage/ndb/config/type_ndbapi.cmake'
--- a/storage/ndb/config/type_ndbapi.cmake	2008-08-20 13:22:09 +0000
+++ b/storage/ndb/config/type_ndbapi.cmake	1970-01-01 00:00:00 +0000
@@ -1,30 +0,0 @@
-# Copyright (C) 2007 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
-
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR}
-                    ${CMAKE_BINARY_DIR}/include
-                    ${CMAKE_BINARY_DIR}/storage/ndb/include
-                    ${CMAKE_SOURCE_DIR}/include
-                    ${CMAKE_SOURCE_DIR}/mysys
-                    ${CMAKE_SOURCE_DIR}/storage/ndb/include
-                    ${CMAKE_SOURCE_DIR}/storage/ndb/include/kernel
-                    ${CMAKE_SOURCE_DIR}/storage/ndb/include/transporter
-                    ${CMAKE_SOURCE_DIR}/storage/ndb/include/debugger
-                    ${CMAKE_SOURCE_DIR}/storage/ndb/include/mgmapi
-                    ${CMAKE_SOURCE_DIR}/storage/ndb/include/mgmcommon
-                    ${CMAKE_SOURCE_DIR}/storage/ndb/include/ndbapi
-                    ${CMAKE_SOURCE_DIR}/storage/ndb/include/util
-                    ${CMAKE_SOURCE_DIR}/storage/ndb/include/portlib
-                    ${CMAKE_SOURCE_DIR}/storage/ndb/include/logger)

=== modified file 'storage/ndb/include/ndb_config.h.in'
--- a/storage/ndb/include/ndb_config.h.in	2010-11-09 10:45:29 +0000
+++ b/storage/ndb/include/ndb_config.h.in	2010-11-18 09:38:59 +0000
@@ -34,3 +34,4 @@
 #cmakedefine HAVE_LINUX_FUTEX 1
 #cmakedefine HAVE_ATOMIC_H 1
 #cmakedefine HAVE_SUN_PREFETCH_H 1
+#cmakedefine NDB_PORT @NDB_PORT@

=== modified file 'storage/ndb/include/ndb_global.h'
--- a/storage/ndb/include/ndb_global.h	2010-11-15 15:03:18 +0000
+++ b/storage/ndb/include/ndb_global.h	2010-11-30 07:47:55 +0000
@@ -46,7 +46,11 @@
 #define NDB_WIN 1
 #define PATH_MAX 256
 #define DIR_SEPARATOR "\\"
-#pragma warning(disable: 4503 4786)
+
+/* Disable a few compiler warnings on Windows */
+/* 4355: 'this': used in base member initializer list */
+#pragma warning(disable: 4355)
+
 #else
 #undef NDB_WIN32
 #undef NDB_WIN
@@ -86,6 +90,8 @@
 #include <fcntl.h>
 #endif
 
+#include <sys/stat.h>
+
 #ifdef HAVE_SYS_PARAM_H
 #include <sys/param.h>
 #endif

=== modified file 'storage/ndb/include/portlib/NdbDir.hpp'
--- a/storage/ndb/include/portlib/NdbDir.hpp	2010-09-23 09:02:47 +0000
+++ b/storage/ndb/include/portlib/NdbDir.hpp	2010-11-18 10:03:45 +0000
@@ -17,8 +17,10 @@
 #define NdbDir_HPP
 
 #ifdef _WIN32
+#ifndef mode_t /* MySQL 5.5+ defines mode_t */
 typedef int mode_t;
 #endif
+#endif
 
 class NdbDir {
 public:

=== modified file 'storage/ndb/include/util/ndb_opts.h'
--- a/storage/ndb/include/util/ndb_opts.h	2010-08-16 17:02:58 +0000
+++ b/storage/ndb/include/util/ndb_opts.h	2010-11-17 10:01:47 +0000
@@ -131,9 +131,10 @@ void ndb_usage(void (*usagefunc)(void), 
                struct my_option *my_long_options);
 void ndb_short_usage_sub(const char* extra);
 
-
+my_bool ndb_is_load_default_arg_separator(const char* arg);
 
 #ifdef __cplusplus
 }
 #endif
+
 #endif /*_NDB_OPTS_H */

=== modified file 'storage/ndb/ndb_configure.cmake'
--- a/storage/ndb/ndb_configure.cmake	2010-11-10 09:42:49 +0000
+++ b/storage/ndb/ndb_configure.cmake	2010-11-18 09:38:59 +0000
@@ -130,6 +130,13 @@ IF(WITH_NDBMTD)
 
 ENDIF()
 
+SET(WITH_NDB_PORT "" CACHE INTEGER
+  "Default port used by MySQL Cluster management server")
+IF(WITH_NDB_PORT GREATER 0)
+  SET(NDB_PORT ${WITH_NDB_PORT})
+  MESSAGE(STATUS "Setting MySQL Cluster management server port to ${NDB_PORT}")
+ENDIF()
+
 CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/include/ndb_config.h.in
                ${CMAKE_CURRENT_BINARY_DIR}/include/ndb_config.h)
 

=== modified file 'storage/ndb/src/common/debugger/CMakeLists.txt'
--- a/storage/ndb/src/common/debugger/CMakeLists.txt	2010-11-11 15:08:52 +0000
+++ b/storage/ndb/src/common/debugger/CMakeLists.txt	2010-11-26 10:42:53 +0000
@@ -22,6 +22,8 @@ ADD_LIBRARY(ndbtrace STATIC
             SignalLoggerManager.cpp
             DebuggerNames.cpp
             BlockNames.cpp
-            EventLogger.cpp)
+            EventLogger.cpp
+            ${NDB_SOURCE_DIR}/src/kernel/error/ndbd_exit_codes.c
+)
 
-TARGET_LINK_LIBRARIES(ndbtrace ndblogger ndberror ndbgeneral)
+TARGET_LINK_LIBRARIES(ndbtrace ndblogger ndbgeneral)

=== modified file 'storage/ndb/src/common/debugger/signaldata/CMakeLists.txt'
--- a/storage/ndb/src/common/debugger/signaldata/CMakeLists.txt	2010-01-15 18:13:17 +0000
+++ b/storage/ndb/src/common/debugger/signaldata/CMakeLists.txt	2010-11-17 11:35:04 +0000
@@ -13,8 +13,6 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-
-INCLUDE(${CMAKE_SOURCE_DIR}/storage/ndb/config/type_ndbapi.cmake)
 ADD_LIBRARY(ndbsignaldata STATIC
         AlterIndxImpl.cpp BuildIndxImpl.cpp BuildIndx.cpp
         CreateIndxImpl.cpp CreateTab.cpp

=== modified file 'storage/ndb/src/common/logger/CMakeLists.txt'
--- a/storage/ndb/src/common/logger/CMakeLists.txt	2010-11-11 15:08:52 +0000
+++ b/storage/ndb/src/common/logger/CMakeLists.txt	2010-11-17 11:35:04 +0000
@@ -13,9 +13,6 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-
-INCLUDE(${CMAKE_SOURCE_DIR}/storage/ndb/config/type_ndbapi.cmake)
-
 ADD_LIBRARY(ndblogger STATIC
             Logger.cpp
             LogHandlerList.cpp

=== modified file 'storage/ndb/src/common/mgmcommon/CMakeLists.txt'
--- a/storage/ndb/src/common/mgmcommon/CMakeLists.txt	2008-08-20 13:22:09 +0000
+++ b/storage/ndb/src/common/mgmcommon/CMakeLists.txt	2010-11-17 11:35:04 +0000
@@ -16,7 +16,6 @@
 
 INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/storage/ndb/src/mgmapi
                     ${CMAKE_SOURCE_DIR}/storage/ndb/src/mgmsrv)
-INCLUDE(${CMAKE_SOURCE_DIR}/storage/ndb/config/type_ndbapi.cmake)
 INCLUDE(${CMAKE_SOURCE_DIR}/storage/ndb/config/type_mgmapiclient.cmake)
 
 ADD_LIBRARY(ndbmgmsrv STATIC

=== modified file 'storage/ndb/src/common/portlib/CMakeLists.txt'
--- a/storage/ndb/src/common/portlib/CMakeLists.txt	2010-11-03 21:21:28 +0000
+++ b/storage/ndb/src/common/portlib/CMakeLists.txt	2010-11-29 16:19:21 +0000
@@ -28,7 +28,7 @@ ADD_LIBRARY(ndbportlib STATIC
             NdbMem.c NdbConfig.c NdbTick.c NdbDir.cpp
             ndb_daemon.cc ${EXTRA_SRC}
             NdbNuma.cpp)
-TARGET_LINK_LIBRARIES(ndbportlib mysys)
+TARGET_LINK_LIBRARIES(ndbportlib mysys ${LIBSOCKET})
 
 ADD_EXECUTABLE(NdbDir-t
   NdbDir.cpp

=== modified file 'storage/ndb/src/common/portlib/NdbDir.cpp'
--- a/storage/ndb/src/common/portlib/NdbDir.cpp	2010-09-29 07:54:14 +0000
+++ b/storage/ndb/src/common/portlib/NdbDir.cpp	2010-11-30 07:47:55 +0000
@@ -21,7 +21,6 @@
 #ifndef __WIN__
 
 #include <dirent.h>
-#include <sys/stat.h>
 
 class DirIteratorImpl {
   DIR* m_dirp;

=== modified file 'storage/ndb/src/common/portlib/NdbThread.c'
--- a/storage/ndb/src/common/portlib/NdbThread.c	2010-08-20 11:10:25 +0000
+++ b/storage/ndb/src/common/portlib/NdbThread.c	2010-11-17 10:59:04 +0000
@@ -472,7 +472,7 @@ NdbThread_LockCPU(struct NdbThread* pThr
   return error_no;
 }
 
-static pthread_key_t tls_keys[NDB_THREAD_TLS_MAX];
+static pthread_key(void*, tls_keys[NDB_THREAD_TLS_MAX]);
 
 void *NdbThread_GetTlsKey(NDB_THREAD_TLS key)
 {

=== modified file 'storage/ndb/src/common/portlib/ndb_daemon.cc'
--- a/storage/ndb/src/common/portlib/ndb_daemon.cc	2010-06-17 12:28:52 +0000
+++ b/storage/ndb/src/common/portlib/ndb_daemon.cc	2010-11-17 10:20:39 +0000
@@ -222,6 +222,8 @@ int ndb_daemon_init(int argc, char** arg
 
 #ifdef _WIN32
 
+#include <sys/locking.h>
+
 #define F_TLOCK _LK_NBLCK
 #define F_ULOCK _LK_UNLCK
 #define F_LOCK  _LK_LOCK

=== modified file 'storage/ndb/src/common/util/BaseString.cpp'
--- a/storage/ndb/src/common/util/BaseString.cpp	2010-09-21 07:36:08 +0000
+++ b/storage/ndb/src/common/util/BaseString.cpp	2010-11-28 11:34:01 +0000
@@ -646,5 +646,4 @@ TAPTEST(BaseString)
 
 #endif
 
-template class Vector<char *>;
 template class Vector<BaseString>;

=== modified file 'storage/ndb/src/common/util/CMakeLists.txt'
--- a/storage/ndb/src/common/util/CMakeLists.txt	2010-11-11 16:14:33 +0000
+++ b/storage/ndb/src/common/util/CMakeLists.txt	2010-11-28 11:34:01 +0000
@@ -53,6 +53,7 @@ ADD_LIBRARY(ndbgeneral STATIC
             Bitmask.cpp
 	    SparseBitmask.cpp
             require.c
+            Vector.cpp
 )
 TARGET_LINK_LIBRARIES(ndbgeneral ndbtrace ${ZLIB_LIBRARY} mysys)
 

=== modified file 'storage/ndb/src/common/util/File.cpp'
--- a/storage/ndb/src/common/util/File.cpp	2009-05-27 15:21:45 +0000
+++ b/storage/ndb/src/common/util/File.cpp	2010-11-30 07:47:55 +0000
@@ -19,9 +19,7 @@
 #include <ndb_global.h>
 
 #include <File.hpp>
-
 #include <NdbOut.hpp>
-#include <my_dir.h>
 
 //
 // PUBLIC
@@ -29,33 +27,27 @@
 time_t 
 File_class::mtime(const char* aFileName)
 {
-  MY_STAT stmp;
-  time_t rc = 0;
-
-  if (my_stat(aFileName, &stmp, MYF(0)) != NULL) {
-    rc = stmp.st_mtime;
-  }
-
-  return rc;
+  struct stat s;
+  if (stat(aFileName, &s) != 0)
+    return 0;
+  return s.st_mtime;
 }
 
 bool 
 File_class::exists(const char* aFileName)
 {
-  MY_STAT stmp;
-
-  return (my_stat(aFileName, &stmp, MYF(0))!=NULL);
+  struct stat s;
+  if (stat(aFileName, &s) != 0)
+    return false;
+  return true;
 }
 
 off_t
 File_class::size(FILE* f)
 {
-  MY_STAT s;
-
-  // Note that my_fstat behaves *differently* than my_stat. ARGGGHH!
-  if (my_fstat(fileno(f), &s, MYF(0)))
+  struct stat s;
+  if (fstat(fileno(f), &s) != 0)
     return 0;
-
   return s.st_size;
 }
 

=== modified file 'storage/ndb/src/common/util/Makefile.am'
--- a/storage/ndb/src/common/util/Makefile.am	2010-08-27 15:36:53 +0000
+++ b/storage/ndb/src/common/util/Makefile.am	2010-11-28 11:34:01 +0000
@@ -28,7 +28,7 @@ libgeneral_la_SOURCES = \
             strdup.c \
             ConfigValues.cpp ndb_init.cpp basestring_vsnprintf.c \
             Bitmask.cpp SparseBitmask.cpp parse_mask.hpp \
-	    ndb_rand.c require.c
+	    ndb_rand.c require.c Vector.cpp
 
 INCLUDES_LOC = @ZLIB_INCLUDES@
 

=== modified file 'storage/ndb/src/common/util/SparseBitmask.cpp'
--- a/storage/ndb/src/common/util/SparseBitmask.cpp	2010-11-11 09:46:05 +0000
+++ b/storage/ndb/src/common/util/SparseBitmask.cpp	2010-11-28 11:34:01 +0000
@@ -91,6 +91,3 @@ TAPTEST(SparseBitmask)
 }
 
 #endif
-
-template class Vector<unsigned>;
-

=== added file 'storage/ndb/src/common/util/Vector.cpp'
--- a/storage/ndb/src/common/util/Vector.cpp	1970-01-01 00:00:00 +0000
+++ b/storage/ndb/src/common/util/Vector.cpp	2010-11-28 11:34:01 +0000
@@ -0,0 +1,27 @@
+/*
+   Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+
+   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
+*/
+
+#include "Vector.hpp"
+
+template class Vector<int>;
+template class Vector<Uint8>;
+template class Vector<Uint16>;
+template class Vector<Uint32>;
+template class Vector<Uint64>;
+template class Vector<char*>;
+template class Vector<const char*>;
+template class Vector<Vector<Uint32> >;

=== removed directory 'storage/ndb/src/common/util/filetest'
=== removed file 'storage/ndb/src/common/util/filetest/FileUnitTest.cpp'
--- a/storage/ndb/src/common/util/filetest/FileUnitTest.cpp	2009-05-26 18:53:34 +0000
+++ b/storage/ndb/src/common/util/filetest/FileUnitTest.cpp	1970-01-01 00:00:00 +0000
@@ -1,239 +0,0 @@
-/*
-   Copyright (C) 2003 MySQL AB
-    All rights reserved. Use is subject to license terms.
-
-   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
-*/
-
-#include "FileUnitTest.hpp"
-#include <File.hpp>
-
-#include <NdbOut.hpp>
-
-typedef bool (*TESTFUNC)(const char*);
-
-typedef const char TESTNAME;
-typedef struct 
-{
-  const char* name;
-  TESTFUNC test;
-}Tests;
-
-static Tests testCases[] = { {"Create/Write", &FileUnitTest::testWrite}, 
-                            {"Read", &FileUnitTest::testRead},
-                            {"Exists", &FileUnitTest::testExists},
-                            {"File Size", &FileUnitTest::testSize}, 
-                            {"Rename", &FileUnitTest::testRename},
-                            {"Remove", &FileUnitTest::testRemove} };
-
-static int testFailed = 0;
-                          
-int main(int argc, char* argv[])
-{
-  if (argc < 2)
-  {
-    ndbout << "Usage: filetest <filename>" << endl;
-    return 0;
-  }
-  const char* fileName = argv[1];
-
-  int testCount = (sizeof(testCases) / sizeof(Tests)); 
-  ndbout << "Starting " << testCount << " tests..." << endl;
-  for (int i = 0; i < testCount; i++)
-  {
-    ndbout << "-- " << " Test " << i + 1 
-         << " [" << testCases[i].name << "] --" << endl;
-    if (testCases[i].test(fileName))
-    {
-      ndbout << "-- Passed --" << endl;
-    }    
-    else
-    {
-      ndbout << "-- Failed -- " << endl;
-    }
-    
-  }
-  ndbout << endl << "-- " << testCount - testFailed << " passed, " 
-       << testFailed << " failed --" << endl;
-  return 0;
-}
-
-
-bool 
-FileUnitTest::testWrite(const char* aFileName)
-{
-  bool rc = true;
-  File f;
-  if (f.open(aFileName, "w"))
-  {  
-   	f.writeChar("ABABABABABAB ABBABAB ABBABA ABAB JKH KJHA JHHAHAH...");
-   	f.writeChar("12129791242 1298371923 912738912 378129837128371128132...\n");    
-    f.close();    
-  }
-  else
-  {
-    error("testWrite failed: ");
-    rc = false;
-  }
-  return rc;
-}
-
-bool 
-FileUnitTest::testRead(const char* aFileName)
-{
-  bool rc = true;
-  // Read file
-  File f;
-  if (f.open(aFileName, "r"))
-  {
-    long size = f.size();
-    ndbout << "File size = " << size << endl;
-    ndbout << "Allocating buf of " << size << " bytes" << endl;
-    char* buf = new char[size];
-    buf[size - 1] = '\0';
-    int r = 0;
-    while ((r = f.readChar(buf, r, size)) > 0)
-    {       
-      ndbout << "Read(" << r << "):" << buf << endl;
-    }   
-    f.close(); 
-    delete buf;
-  }
-  else
-  {
-    error("readTest failed: ");
-    rc = false;
-  }  
-  return rc;
-}
-
-bool 
-FileUnitTest::testExists(const char* aFileName)
-{
-  bool rc = true;
-  if (File::exists(aFileName))
-  {
-    if (File::exists("ThisFileShouldnotbe.txt"))
-    {
-      rc = false;
-      error("testExists failed, the file should NOT be found.");
-    }
-  }
-  else
-  {
-    rc = false;
-    error("testExists failed, the file should exist.");    
-  }
-  
-  return rc;
-}
-
-
-bool 
-FileUnitTest::testSize(const char* aFileName)
-{
-  bool rc = true;
-  File f;
-  if (f.open(aFileName, "r"))
-  {
-    long size = f.size();
-    if (size <= 0)
-    {
-      rc = false;
-      error("testSize failed, size is <= 0");
-    }
-    ndbout << "File size = " << size << endl;
-  }
-  else
-  {
-    rc = false;
-    error("testSize failed, could no open file.");
-  }
-  f.close();
-  return rc;
-}
-
-bool 
-FileUnitTest::testRename(const char* aFileName)
-{
-  bool rc = true;
-  if (File::rename(aFileName, "filetest_new.txt"))
-  {
-    if (!File::exists("filetest_new.txt"))
-    {
-      rc = false;
-      error("testRename failed, new file does not exists.");
-    }
-    else
-    {
-      ndbout << "Renamed " << aFileName << " to filetest_new.txt" << endl;
-    }        
-  }
-  else
-  {
-    rc = false;
-    error("testRename failed, unable to rename file.");
-  }
-  
-  return rc;
-}
-
-bool 
-FileUnitTest::testRemove(const char* aFileName)
-{
-  bool rc = true;
-  File f;
-  if (f.open("filetest_new.txt", "r"))
-  {
-    if (!f.remove())
-    {
-      rc = false;
-      error("testRemove failed, could not remove file.");
-    }
-    else
-    {
-      if (File::exists("filetest_new"))
-      {
-        rc = false;
-        error("testRemove failed, file was not removed, it still exists.");
-      }      
-    }         
-  } // (f.open("filetest_new", "r"))
-  else
-  {
-    rc = false;
-    error("testRemove failed, could not read the file.");
-  }
-  
- return rc;   
-}
-
-void  
-FileUnitTest::error(const char* msg)
-{
-  testFailed++;
-  ndbout << "Test failed: " << msg << endl;  
-  perror("Errno msg");
-}
-
-
-FileUnitTest::FileUnitTest()
-{
-  
-}
-
-FileUnitTest::~FileUnitTest()
-{
-
-}

=== removed file 'storage/ndb/src/common/util/filetest/FileUnitTest.hpp'
--- a/storage/ndb/src/common/util/filetest/FileUnitTest.hpp	2009-05-26 18:53:34 +0000
+++ b/storage/ndb/src/common/util/filetest/FileUnitTest.hpp	1970-01-01 00:00:00 +0000
@@ -1,43 +0,0 @@
-/*
-   Copyright (C) 2003 MySQL AB
-    All rights reserved. Use is subject to license terms.
-
-   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
-*/
-
-#ifndef FILEUNITTEST_H
-#define FILEUNITTEST_H
-
-/**
- * Unit test of File.
- *
- * @version #@ $Id: FileUnitTest.hpp,v 1.1 2002/03/13 18:09:03 eyualex Exp $
- */
-class FileUnitTest
-{
-public:
-  static bool testWrite(const char* aFileName);
-  static bool testRead(const char* aFileName);
-  static bool testExists(const char* aFileName);
-  static bool testSize(const char* aFileName);
-  static bool testRename(const char* aFileName);
-  static bool testRemove(const char* aFileName);
-  
-  static void error(const char* msg);
-private:
-  FileUnitTest();
-  ~FileUnitTest();
-  
-};
-#endif

=== removed file 'storage/ndb/src/common/util/filetest/Makefile'
--- a/storage/ndb/src/common/util/filetest/Makefile	2005-04-27 01:19:54 +0000
+++ b/storage/ndb/src/common/util/filetest/Makefile	1970-01-01 00:00:00 +0000
@@ -1,14 +0,0 @@
-include .defs.mk
-
-TYPE :=
-
-BIN_TARGET := filetest
-BIN_TARGET_ARCHIVES := portlib general
-
-SOURCES := FileUnitTest.cpp
-
-CCFLAGS_LOC += -I$(NDB_TOP)/include/logger -I$(NDB_TOP)/include/portlib
-
-include $(NDB_TOP)/Epilogue.mk
-
-

=== modified file 'storage/ndb/src/common/util/ndb_opts.c'
--- a/storage/ndb/src/common/util/ndb_opts.c	2010-08-16 17:02:58 +0000
+++ b/storage/ndb/src/common/util/ndb_opts.c	2010-11-17 10:01:47 +0000
@@ -97,3 +97,23 @@ void ndb_std_print_version()
   printf("MySQL distrib %s%s, for %s (%s)\n",
          NDB_VERSION_STRING,suffix,SYSTEM_TYPE,MACHINE_TYPE);
 }
+
+my_bool ndb_is_load_default_arg_separator(const char* arg)
+{
+#ifndef MYSQL_VERSION_ID
+#error "Need MYSQL_VERSION_ID defined"
+#endif
+
+#if MYSQL_VERSION_ID >= 50501
+  /*
+    load_default() in 5.5+ returns an extra arg which has to
+    be skipped when processing the argv array
+   */
+  if (arg == args_separator)
+    return TRUE;
+#else
+  (void)arg;
+#endif
+  return FALSE;
+}
+

=== modified file 'storage/ndb/src/cw/cpcd/CMakeLists.txt'
--- a/storage/ndb/src/cw/cpcd/CMakeLists.txt	2010-03-05 19:19:56 +0000
+++ b/storage/ndb/src/cw/cpcd/CMakeLists.txt	2010-11-17 11:35:04 +0000
@@ -14,7 +14,6 @@
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 
-INCLUDE(${CMAKE_SOURCE_DIR}/storage/ndb/config/type_ndbapi.cmake)
 INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/storage/ndb/src/ndbapi
                     ${CMAKE_SOURCE_DIR}/storage/ndb/src/mgmapi
                     ${CMAKE_SOURCE_DIR}/storage/ndb/src/common/mgmcommon

=== modified file 'storage/ndb/src/cw/cpcd/CPCD.cpp'
--- a/storage/ndb/src/cw/cpcd/CPCD.cpp	2009-10-08 04:35:04 +0000
+++ b/storage/ndb/src/cw/cpcd/CPCD.cpp	2010-11-30 07:47:55 +0000
@@ -28,7 +28,6 @@
 #include "common.hpp"
 #ifdef _WIN32
 #include <sys/types.h>
-#include <sys/stat.h>
 #include <direct.h>
 #endif
 

=== modified file 'storage/ndb/src/cw/cpcd/Process.cpp'
--- a/storage/ndb/src/cw/cpcd/Process.cpp	2010-01-29 14:42:03 +0000
+++ b/storage/ndb/src/cw/cpcd/Process.cpp	2010-11-30 07:47:55 +0000
@@ -20,7 +20,6 @@
 
 #ifdef _WIN32
 #include <process.h>
-#include <sys/stat.h>
 #include <io.h>
 #endif
 #include <BaseString.hpp>

=== modified file 'storage/ndb/src/kernel/blocks/Makefile.am'
--- a/storage/ndb/src/kernel/blocks/Makefile.am	2010-09-23 12:00:25 +0000
+++ b/storage/ndb/src/kernel/blocks/Makefile.am	2010-12-01 22:00:42 +0000
@@ -70,7 +70,7 @@ libblocks_a_SOURCES = tsman.cpp lgman.cp
   PgmanProxy.cpp \
   dbtup/DbtupClient.cpp
 
-EXTRA_PROGRAMS = ndb_print_file
+ndbtools_PROGRAMS = ndb_print_file
 ndb_print_file_SOURCES = print_file.cpp diskpage.cpp dbtup/tuppage.cpp
 ndb_print_file_LDFLAGS = @ndb_bin_am_ldflags@ \
   $(top_builddir)/storage/ndb/src/libndbclient.la \

=== modified file 'storage/ndb/src/kernel/blocks/backup/CMakeLists.txt'
--- a/storage/ndb/src/kernel/blocks/backup/CMakeLists.txt	2010-01-04 00:59:59 +0000
+++ b/storage/ndb/src/kernel/blocks/backup/CMakeLists.txt	2010-11-26 10:42:53 +0000
@@ -13,9 +13,6 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-
-INCLUDE(${CMAKE_SOURCE_DIR}/storage/ndb/config/type_kernel.cmake)
-
 ADD_EXECUTABLE(ndb_print_backup_file read.cpp)
 TARGET_LINK_LIBRARIES(ndb_print_backup_file
-    ndbtrace ndblogger ndbgeneral ndberror ndbportlib)
+    ndbtrace ndblogger ndbgeneral ndbportlib)

=== modified file 'storage/ndb/src/kernel/blocks/dbdict/CMakeLists.txt'
--- a/storage/ndb/src/kernel/blocks/dbdict/CMakeLists.txt	2010-01-04 00:59:59 +0000
+++ b/storage/ndb/src/kernel/blocks/dbdict/CMakeLists.txt	2010-11-26 10:42:53 +0000
@@ -13,10 +13,7 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-
-INCLUDE(${CMAKE_SOURCE_DIR}/storage/ndb/config/type_kernel.cmake)
-
 ADD_EXECUTABLE(ndb_print_schema_file
                printSchemaFile.cpp)
 TARGET_LINK_LIBRARIES(ndb_print_schema_file
-    ndbtrace ndblogger ndbgeneral ndberror ndbportlib)
+    ndbtrace ndblogger ndbgeneral ndbportlib)

=== modified file 'storage/ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp'
--- a/storage/ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp	2010-03-10 07:43:06 +0000
+++ b/storage/ndb/src/kernel/blocks/dbdict/printSchemaFile.cpp	2010-11-26 10:42:53 +0000
@@ -25,7 +25,7 @@
 
 #include <NdbMain.h>
 #include <NdbOut.hpp>
-#include <SchemaFile.hpp>
+#include "SchemaFile.hpp"
 #include <kernel_types.h>
 
 static const char* progname = 0;

=== modified file 'storage/ndb/src/kernel/blocks/dbdih/CMakeLists.txt'
--- a/storage/ndb/src/kernel/blocks/dbdih/CMakeLists.txt	2010-01-04 00:59:59 +0000
+++ b/storage/ndb/src/kernel/blocks/dbdih/CMakeLists.txt	2010-11-26 10:42:53 +0000
@@ -14,8 +14,6 @@
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 
-INCLUDE(${CMAKE_SOURCE_DIR}/storage/ndb/config/type_kernel.cmake)
-
 ADD_EXECUTABLE(ndb_print_sys_file printSysfile.cpp)
 TARGET_LINK_LIBRARIES(ndb_print_sys_file
-    ndbtrace ndblogger ndbgeneral ndberror ndbportlib)
+    ndbtrace ndblogger ndbgeneral ndbportlib)

=== removed directory 'storage/ndb/src/kernel/blocks/dbdih/printSysfile'
=== modified file 'storage/ndb/src/kernel/blocks/dbdih/printSysfile.cpp'
--- a/storage/ndb/src/kernel/blocks/dbdih/printSysfile.cpp	2010-03-10 07:43:06 +0000
+++ b/storage/ndb/src/kernel/blocks/dbdih/printSysfile.cpp	2010-11-30 07:47:55 +0000
@@ -18,11 +18,10 @@
 
 
 #include <ndb_global.h>
-#include <my_dir.h>
 
 #include <NdbMain.h>
 #include <NdbOut.hpp>
-#include <Sysfile.hpp>
+#include "Sysfile.hpp"
 
 static int g_all = 0;
 
@@ -139,9 +138,9 @@ NDB_COMMAND(printSysfile, 
       continue;
     }
     
-    MY_STAT sbuf,*st;
+    struct stat sbuf;
 
-    if(!(st=my_stat(filename, &sbuf,0)))
+    if(stat(filename, &sbuf) != 0)
     {
       ndbout << "Could not find file: \"" << filename << "\"" << endl;
       continue;

=== removed file 'storage/ndb/src/kernel/blocks/dbdih/printSysfile/Makefile'
--- a/storage/ndb/src/kernel/blocks/dbdih/printSysfile/Makefile	2005-04-27 01:19:54 +0000
+++ b/storage/ndb/src/kernel/blocks/dbdih/printSysfile/Makefile	1970-01-01 00:00:00 +0000
@@ -1,12 +0,0 @@
-include .defs.mk
-
-TYPE := ndbapi
-
-BIN_TARGET := printSysfile
-BIN_TARGET_ARCHIVES := portlib general
-
-CCFLAGS_LOC += -I..
-
-SOURCES := printSysfile.cpp
-
-include $(NDB_TOP)/Epilogue.mk

=== removed file 'storage/ndb/src/kernel/blocks/dbdih/printSysfile/printSysfile.cpp'
--- a/storage/ndb/src/kernel/blocks/dbdih/printSysfile/printSysfile.cpp	2009-10-15 12:31:11 +0000
+++ b/storage/ndb/src/kernel/blocks/dbdih/printSysfile/printSysfile.cpp	1970-01-01 00:00:00 +0000
@@ -1,162 +0,0 @@
-/*
-   Copyright (C) 2003 MySQL AB
-    All rights reserved. Use is subject to license terms.
-
-   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
-*/
-
-
-#include <ndb_global.h>
-
-#include <NdbMain.h>
-#include <NdbOut.hpp>
-#include <Sysfile.hpp>
-
-void 
-usage(const char * prg){
-  ndbout << "Usage " << prg 
-	 << " P[0-1].sysfile" << endl;  
-}
-
-struct NSString {
-  Sysfile::ActiveStatus NodeStatus;
-  const char * desc;
-};
-
-static const
-NSString NodeStatusStrings[] = {
-  { Sysfile::NS_Active,                 "Active         " },
-  { Sysfile::NS_ActiveMissed_1,         "Active missed 1" },
-  { Sysfile::NS_ActiveMissed_2,         "Active missed 2" },
-  { Sysfile::NS_ActiveMissed_3,         "Active missed 3" },
-  { Sysfile::NS_HotSpare,               "Hot spare      " },
-  { Sysfile::NS_NotActive_NotTakenOver, "Not active     " },
-  { Sysfile::NS_TakeOver,               "Take over      " },
-  { Sysfile::NS_NotActive_TakenOver,    "Taken over     " },
-  { Sysfile::NS_NotDefined,             "Not defined    " },
-  { Sysfile::NS_Standby,                "Stand by       " }
-};
-
-const
-char * getNSString(Uint32 ns){
-  for(Uint32 i = 0; i<(sizeof(NodeStatusStrings)/sizeof(NSString)); i++)
-    if((Uint32)NodeStatusStrings[i].NodeStatus == ns)
-      return NodeStatusStrings[i].desc;
-  return "<Unknown state>";
-}
-
-void
-fill(const char * buf, int mod){
-  int len = strlen(buf)+1;
-  ndbout << buf << " ";
-  while((len % mod) != 0){
-    ndbout << " ";
-    len++;
-  }
-}
-
-void 
-print(const char * filename, const Sysfile * sysfile){
-  char buf[255];
-  ndbout << "----- Sysfile: " << filename << " -----" << endl;
-  ndbout << "Initial start ongoing: " 
-	 << Sysfile::getInitialStartOngoing(sysfile->systemRestartBits) 
-	 << ", ";
-
-  ndbout << "Restart Ongoing: "
-	 << Sysfile::getRestartOngoing(sysfile->systemRestartBits) 
-	 << ", ";
-
-  ndbout << "LCP Ongoing: "
-	 << Sysfile::getLCPOngoing(sysfile->systemRestartBits) 
-	 << endl;
-
-
-  ndbout << "-- Global Checkpoint Identities: --" << endl;
-  sprintf(buf, "keepGCI = %u", sysfile->keepGCI);
-  fill(buf, 40); 
-  ndbout << " -- Tail of REDO log" << endl;
-  
-  sprintf(buf, "oldestRestorableGCI = %u", sysfile->oldestRestorableGCI);
-  fill(buf, 40);
-  ndbout << " -- " << endl;
-
-  sprintf(buf, "newestRestorableGCI = %u", sysfile->newestRestorableGCI);
-  fill(buf, 40);
-  ndbout << " -- " << endl;
-
-  sprintf(buf, "latestLCP = %u", sysfile->latestLCP_ID);
-  fill(buf, 40);
-  ndbout << " -- " << endl;
-
-  ndbout << "-- Node status: --" << endl;
-  for(int i = 1; i < MAX_NDB_NODES; i++){
-    if(Sysfile::getNodeStatus(i, sysfile->nodeStatus) !=Sysfile::NS_NotDefined){
-      sprintf(buf, 
-	      "Node %.2d -- %s GCP: %d, NodeGroup: %d, TakeOverNode: %d, "
-	      "LCP Ongoing: %s",
-	      i, 
-	      getNSString(Sysfile::getNodeStatus(i,sysfile->nodeStatus)),
-	      sysfile->lastCompletedGCI[i],
-	      Sysfile::getNodeGroup(i, sysfile->nodeGroups),
-	      Sysfile::getTakeOverNode(i, sysfile->takeOver),
-	      BitmaskImpl::get(NdbNodeBitmask::Size, 
-			       sysfile->lcpActive, i) != 0 ? "yes" : "no");
-      ndbout << buf << endl;
-    }
-  }
-}
-
-NDB_COMMAND(printSysfile, 
-	    "printSysfile", "printSysfile", "Prints a sysfile", 16384){ 
-  ndb_init();
-  if(argc < 2){
-    usage(argv[0]);
-    return 0;
-  }
-
-  for(int i = 1; i<argc; i++){
-    const char * filename = argv[i];
-    
-    MY_STAT sbuf,*st;
-
-    if(!st=my_stat(filename, &sbuf,0))
-    {
-      ndbout << "Could not find file: \"" << filename << "\"" << endl;
-      continue;
-    }
-    const Uint32 bytes = sbuf.st_size;
-    
-    Uint32 * buf = new Uint32[bytes/4+1];
-    
-    FILE * f = fopen(filename, "rb");
-    if(f == 0){
-      ndbout << "Failed to open file" << endl;
-      delete [] buf;
-      continue;
-    }
-    Uint32 sz = fread(buf, 1, bytes, f);
-    fclose(f);
-    if(sz != bytes){
-      ndbout << "Failure while reading file" << endl;
-      delete [] buf;
-      continue;
-    }
-    
-    print(filename, (Sysfile *)&buf[0]);
-    delete [] buf;
-    continue;
-  }
-  return 0;
-}

=== modified file 'storage/ndb/src/kernel/blocks/dblqh/CMakeLists.txt'
--- a/storage/ndb/src/kernel/blocks/dblqh/CMakeLists.txt	2010-01-04 00:59:59 +0000
+++ b/storage/ndb/src/kernel/blocks/dblqh/CMakeLists.txt	2010-11-26 10:42:53 +0000
@@ -14,10 +14,8 @@
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
 
-INCLUDE(${CMAKE_SOURCE_DIR}/storage/ndb/config/type_kernel.cmake)
-
 ADD_EXECUTABLE(ndb_redo_log_reader
     redoLogReader/records.cpp
     redoLogReader/reader.cpp)
 TARGET_LINK_LIBRARIES(ndb_redo_log_reader
-    ndbtrace ndblogger ndbgeneral ndberror ndbportlib)
+    ndbtrace ndblogger ndbgeneral ndbportlib)

=== modified file 'storage/ndb/src/kernel/blocks/dbtup/tuppage.cpp'
--- a/storage/ndb/src/kernel/blocks/dbtup/tuppage.cpp	2010-03-10 07:43:06 +0000
+++ b/storage/ndb/src/kernel/blocks/dbtup/tuppage.cpp	2010-11-30 08:25:21 +0000
@@ -18,7 +18,6 @@
 
 #include <ndb_global.h>
 #include "tuppage.hpp"
-#include "Dbtup.hpp"
 
 /**
  * Fix pages maintain a double linked list of free entries

=== modified file 'storage/ndb/src/kernel/blocks/ndbfs/PosixAsyncFile.cpp'
--- a/storage/ndb/src/kernel/blocks/ndbfs/PosixAsyncFile.cpp	2010-09-24 15:10:46 +0000
+++ b/storage/ndb/src/kernel/blocks/ndbfs/PosixAsyncFile.cpp	2010-11-30 07:47:55 +0000
@@ -42,8 +42,6 @@
 #include <sys/uio.h>
 #include <dirent.h>
 
-#include <sys/stat.h>
-
 PosixAsyncFile::PosixAsyncFile(SimulatedBlock& fs) :
   AsyncFile(fs),
   theFd(-1),

=== modified file 'storage/ndb/src/kernel/blocks/print_file.cpp'
--- a/storage/ndb/src/kernel/blocks/print_file.cpp	2010-03-11 19:47:09 +0000
+++ b/storage/ndb/src/kernel/blocks/print_file.cpp	2010-11-30 10:39:42 +0000
@@ -23,7 +23,6 @@
 #include "diskpage.hpp"
 #include <ndb_limits.h>
 #include <dbtup/tuppage.hpp>
-#include <my_dir.h>
 
 static void print_usage(const char*);
 static int print_zero_page(int, void *, Uint32 sz);
@@ -36,7 +35,7 @@ static bool print_page(int page_no) 
 }
 
 int g_verbosity = 1;
-int g_page_size = File_formats::NDB_PAGE_SIZE;
+unsigned g_page_size = File_formats::NDB_PAGE_SIZE;
 int (* g_print_page)(int count, void*, Uint32 sz) = print_zero_page;
 
 File_formats::Undofile::Zero_page g_uf_zero;
@@ -69,12 +68,13 @@ int main(int argc, char ** argv)
     
     const char * filename = argv[i];
     
-    MY_STAT sbuf;
-    if(!my_stat(filename, &sbuf, MYF(0))){
+    struct stat sbuf;
+    if(stat(filename, &sbuf) != 0)
+    {
       ndbout << "Could not find file: \"" << filename << "\"" << endl;
       continue;
     }
-    const Uint32 bytes = sbuf.st_size;
+    //const Uint32 bytes = sbuf.st_size;
     
     UtilBuffer buffer;
     
@@ -185,7 +185,7 @@ operator<<(NdbOut& out, const File_forma
 
 int
 print_extent_page(int count, void* ptr, Uint32 sz){
-  if(count == g_df_zero.m_extent_pages)
+  if((unsigned)count == g_df_zero.m_extent_pages)
   {
     g_print_page = print_data_page;
   }
@@ -395,7 +395,7 @@ print_undo_page(int count, void* ptr, Ui
 	    {
 	      printf("%.8x ", page->m_data[pos]);
 	      if((pos + 1) % 7 == 0)
-		ndbout_c("");
+		ndbout_c("%s", "");
 	      pos++;
 	    }
 	  }
@@ -408,12 +408,13 @@ print_undo_page(int count, void* ptr, Ui
     }
   }
   
-  if(count == g_uf_zero.m_undo_pages + 1)
+  if((unsigned)count == g_uf_zero.m_undo_pages + 1)
   {
   }
   
   return 0;
 }
 
-// hp3750
+// Dummy implementations
 Signal::Signal(){}
+SimulatedBlock::Callback SimulatedBlock::TheEmptyCallback = {0, 0};

=== modified file 'storage/ndb/src/kernel/main.cpp'
--- a/storage/ndb/src/kernel/main.cpp	2010-11-03 11:34:45 +0000
+++ b/storage/ndb/src/kernel/main.cpp	2010-11-17 10:01:47 +0000
@@ -144,7 +144,11 @@ real_main(int argc, char** argv)
   const char* progname = argv[0];
   Vector<BaseString> original_args;
   for (int i = 0; i < argc; i++)
+  {
+    if (ndb_is_load_default_arg_separator(argv[i]))
+      continue;
     original_args.push_back(argv[i]);
+  }
 
   int ho_error;
   if ((ho_error=handle_options(&argc, &argv, my_long_options,

=== modified file 'storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp'
--- a/storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp	2010-05-24 08:04:47 +0000
+++ b/storage/ndb/src/kernel/vm/ndbd_malloc_impl.cpp	2010-11-28 11:34:01 +0000
@@ -1076,4 +1076,3 @@ main(int argc, char** argv)
 template class Vector<Chunk>;
 
 #endif
-template class Vector<Uint32>;

=== modified file 'storage/ndb/src/mgmapi/mgmapi.cpp'
--- a/storage/ndb/src/mgmapi/mgmapi.cpp	2010-10-13 12:22:51 +0000
+++ b/storage/ndb/src/mgmapi/mgmapi.cpp	2010-11-26 09:41:23 +0000
@@ -550,6 +550,41 @@ ndb_mgm_call(NdbMgmHandle handle,
   DBUG_RETURN(p);
 }
 
+/*
+  ndb_mgm_call_slow
+
+  Some commands are synchronous and known to take longer time
+  to complete(for example restart and stop). Increase the timeout
+  value before sending command if the timeout value is set lower
+  than what is normal.
+
+  Unfortunately the restart or stop may take longer than the
+  defalt min timeout value selected, mgmapi users can workaround
+  this problem by setting an even larger timeout for all commands
+  or only around restart and stop.
+
+*/
+
+static inline
+const Properties *
+ndb_mgm_call_slow(NdbMgmHandle handle,
+                  const ParserRow<ParserDummy> *command_reply,
+                  const char *cmd, const Properties *cmd_args,
+                  unsigned int min_timeout = 5*60*1000, // ms
+                  const char* cmd_bulk= NULL)
+{
+  const unsigned int save_timeout = handle->timeout;
+  if (min_timeout > save_timeout)
+    handle->timeout = min_timeout;
+  const Properties* reply = ndb_mgm_call(handle, command_reply,
+                                         cmd, cmd_args, cmd_bulk);
+
+  // Restore saved timeout value
+  handle->timeout = save_timeout;
+
+  return reply;
+}
+
 /**
  * Returns true if connected
  */
@@ -1290,7 +1325,6 @@ ndb_mgm_stop4(NdbMgmHandle handle, int n
     DBUG_RETURN(-1);
   }
 
-  Uint32 stoppedNoOfNodes = 0;
   if(no_of_nodes <= 0){
     /**
      * All nodes should be stopped (all or just db)
@@ -1302,12 +1336,14 @@ ndb_mgm_stop4(NdbMgmHandle handle, int n
     // force has no effect, continue anyway for consistency
     const Properties *reply;
     if(use_v2)
-      reply = ndb_mgm_call(handle, stop_reply_v2, "stop all", &args);
+      reply = ndb_mgm_call_slow(handle, stop_reply_v2, "stop all", &args);
     else
-      reply = ndb_mgm_call(handle, stop_reply_v1, "stop all", &args);
+      reply = ndb_mgm_call_slow(handle, stop_reply_v1, "stop all", &args);
     CHECK_REPLY(handle, reply, -1);
 
-    if(!reply->get("stopped", &stoppedNoOfNodes)){
+    Uint32 stopped = 0;
+    if(!reply->get("stopped", &stopped))
+    {
       SET_ERROR(handle, NDB_MGM_STOP_FAILED, 
 		"Could not get number of stopped nodes from mgm server");
       delete reply;
@@ -1325,7 +1361,7 @@ ndb_mgm_stop4(NdbMgmHandle handle, int n
       DBUG_RETURN(-1);
     }
     delete reply;
-    DBUG_RETURN(stoppedNoOfNodes);
+    DBUG_RETURN(stopped);
   }
 
   /**
@@ -1351,12 +1387,14 @@ ndb_mgm_stop4(NdbMgmHandle handle, int n
 
   const Properties *reply;
   if(use_v2)
-    reply = ndb_mgm_call(handle, stop_reply_v2, "stop v2", &args);
+    reply = ndb_mgm_call_slow(handle, stop_reply_v2, "stop v2", &args);
   else
-    reply = ndb_mgm_call(handle, stop_reply_v1, "stop", &args);
+    reply = ndb_mgm_call_slow(handle, stop_reply_v1, "stop", &args);
+  CHECK_REPLY(handle, reply, -1);
 
-  CHECK_REPLY(handle, reply, stoppedNoOfNodes);
-  if(!reply->get("stopped", &stoppedNoOfNodes)){
+  Uint32 stopped;
+  if(!reply->get("stopped", &stopped))
+  {
     SET_ERROR(handle, NDB_MGM_STOP_FAILED, 
 	      "Could not get number of stopped nodes from mgm server");
     delete reply;
@@ -1374,7 +1412,7 @@ ndb_mgm_stop4(NdbMgmHandle handle, int n
     DBUG_RETURN(-1);
   }
   delete reply;
-  DBUG_RETURN(stoppedNoOfNodes);
+  DBUG_RETURN(stopped);
 }
 
 extern "C"
@@ -1413,7 +1451,7 @@ ndb_mgm_restart4(NdbMgmHandle handle, in
   DBUG_ENTER("ndb_mgm_restart");
   CHECK_HANDLE(handle, -1);
   SET_ERROR(handle, NDB_MGM_NO_ERROR, "Executing: ndb_mgm_restart4");
-  Uint32 restarted = 0;
+
   const ParserRow<ParserDummy> restart_reply_v1[] = {
     MGM_CMD("restart reply", NULL, ""),
     MGM_ARG("result", String, Mandatory, "Error message"),
@@ -1454,11 +1492,8 @@ ndb_mgm_restart4(NdbMgmHandle handle, in
     args.put("initialstart", initial);
     args.put("nostart", nostart);
     // force has no effect, continue anyway for consistency
-    const Properties *reply;
-    const int timeout = handle->timeout;
-    handle->timeout= 5*60*1000; // 5 minutes
-    reply = ndb_mgm_call(handle, restart_reply_v1, "restart all", &args);
-    handle->timeout= timeout;
+    const Properties *reply =
+      ndb_mgm_call_slow(handle, restart_reply_v1, "restart all", &args);
     CHECK_REPLY(handle, reply, -1);
 
     BaseString result;
@@ -1468,6 +1503,8 @@ ndb_mgm_restart4(NdbMgmHandle handle, in
       delete reply;
       DBUG_RETURN(-1);
     }
+
+    Uint32 restarted;
     if(!reply->get("restarted", &restarted)){
       SET_ERROR(handle, NDB_MGM_RESTART_FAILED, 
 		"Could not get restarted number of nodes from mgm server");
@@ -1500,29 +1537,28 @@ ndb_mgm_restart4(NdbMgmHandle handle, in
 	      "The connected mgm server does not support 'restart --force'");
 
   const Properties *reply;
-  const int timeout = handle->timeout;
-  handle->timeout= 5*60*1000; // 5 minutes
   if(use_v2)
-    reply = ndb_mgm_call(handle, restart_reply_v2, "restart node v2", &args);
+    reply = ndb_mgm_call_slow(handle, restart_reply_v2,
+                              "restart node v2", &args);
   else
-    reply = ndb_mgm_call(handle, restart_reply_v1, "restart node", &args);
-  handle->timeout= timeout;
-  if(reply != NULL) {
-    BaseString result;
-    reply->get("result", result);
-    if(strcmp(result.c_str(), "Ok") != 0) {
-      SET_ERROR(handle, NDB_MGM_RESTART_FAILED, result.c_str());
-      delete reply;
-      DBUG_RETURN(-1);
-    }
-    reply->get("restarted", &restarted);
-    if(use_v2)
-      reply->get("disconnect", (Uint32*)disconnect);
-    else
-      *disconnect= 0;
+    reply = ndb_mgm_call_slow(handle, restart_reply_v1,
+                              "restart node", &args);
+  CHECK_REPLY(handle, reply, -1);
+
+  BaseString result;
+  reply->get("result", result);
+  if(strcmp(result.c_str(), "Ok") != 0) {
+    SET_ERROR(handle, NDB_MGM_RESTART_FAILED, result.c_str());
     delete reply;
-  } 
-  
+    DBUG_RETURN(-1);
+  }
+  Uint32 restarted;
+  reply->get("restarted", &restarted);
+  if(use_v2)
+    reply->get("disconnect", (Uint32*)disconnect);
+  else
+    *disconnect= 0;
+  delete reply;
   DBUG_RETURN(restarted);
 }
 

=== modified file 'storage/ndb/src/mgmclient/CommandInterpreter.cpp'
--- a/storage/ndb/src/mgmclient/CommandInterpreter.cpp	2010-11-11 09:46:05 +0000
+++ b/storage/ndb/src/mgmclient/CommandInterpreter.cpp	2010-11-28 11:34:01 +0000
@@ -3181,6 +3181,3 @@ err:
   ndbout << "Invalid arguments: expected <NG>" << endl;
   return -1;
 }
-
-template class Vector<char const*>;
-template class Vector<int>;

=== modified file 'storage/ndb/src/mgmsrv/MgmtSrvr.cpp'
--- a/storage/ndb/src/mgmsrv/MgmtSrvr.cpp	2010-10-15 08:57:02 +0000
+++ b/storage/ndb/src/mgmsrv/MgmtSrvr.cpp	2010-11-30 10:00:52 +0000
@@ -1303,14 +1303,16 @@ int MgmtSrvr::sendSTOP_REQ(const Vector<
  */
 
 int MgmtSrvr::stopNodes(const Vector<NodeId> &node_ids,
-                        int *stopCount, bool abort, int* stopSelf)
+                        int *stopCount, bool abort, bool force,
+                        int* stopSelf)
 {
-  /*
-    verify that no nodes are starting before stopping as this would cause
-    the starting node to shutdown
-  */
-  if (!abort && check_nodes_starting())
+  if (force || abort)
+    ; // Skip node state checks
+  else if (is_any_node_starting())
+  {
+    /* Refuse to stop since some node(s) are starting */
     return OPERATION_NOT_ALLOWED_START_STOP;
+  }
 
   NdbNodeBitmask nodes;
   int ret= sendSTOP_REQ(node_ids,
@@ -1403,7 +1405,7 @@ int MgmtSrvr::enterSingleUser(int * stop
  * Perform node restart
  */
 
-int MgmtSrvr::check_nodes_stopping()
+bool MgmtSrvr::is_any_node_stopping()
 {
   NodeId nodeId = 0;
   trp_node node;
@@ -1414,12 +1416,12 @@ int MgmtSrvr::check_nodes_stopping()
        (node.m_state.startLevel == NodeState::SL_STOPPING_2) || 
        (node.m_state.startLevel == NodeState::SL_STOPPING_3) || 
        (node.m_state.startLevel == NodeState::SL_STOPPING_4))
-      return 1;
+      return true; // At least one node was stopping
   }
-  return 0;
+  return false; // No node was stopping
 }
 
-int MgmtSrvr::check_nodes_starting()
+bool MgmtSrvr::is_any_node_starting()
 {
   NodeId nodeId = 0;
   trp_node node;
@@ -1427,12 +1429,12 @@ int MgmtSrvr::check_nodes_starting()
   {
     node = theFacade->theClusterMgr->getNodeInfo(nodeId);
     if((node.m_state.startLevel == NodeState::SL_STARTING))
-      return 1;
+      return true; // At least one node was starting
   }
-  return 0;
+  return false; // No node was starting
 }
 
-int MgmtSrvr::check_nodes_single_user()
+bool MgmtSrvr::is_cluster_single_user()
 {
   NodeId nodeId = 0;
   trp_node node;
@@ -1440,23 +1442,34 @@ int MgmtSrvr::check_nodes_single_user()
   {
     node = theFacade->theClusterMgr->getNodeInfo(nodeId);
     if((node.m_state.startLevel == NodeState::SL_SINGLEUSER))
-      return 1;
+      return true; // Cluster is in single user modes
   }
-  return 0;
+  return false; // Cluster is not in single user mode
 }
 
 int MgmtSrvr::restartNodes(const Vector<NodeId> &node_ids,
                            int * stopCount, bool nostart,
                            bool initialStart, bool abort,
+                           bool force,
                            int *stopSelf)
 {
-  /*
-    verify that no nodes are starting before stopping as this would cause
-    the starting node to shutdown
-    check single user mode
-  */
-  if ((!abort && check_nodes_starting()) || check_nodes_single_user())
+  if (is_cluster_single_user())
+  {
+    /*
+      Refuse to restart since cluster is in single user mode
+      and when the node is restarting it would not be allowed to
+      join cluster, see BUG#31056
+    */
+    return OPERATION_NOT_ALLOWED_START_STOP;
+  }
+
+  if (force || abort)
+    ; // Skip node state checks
+  else if (is_any_node_starting())
+  {
+    /* Refuse to restart since some node(s) are starting */
     return OPERATION_NOT_ALLOWED_START_STOP;
+  }
 
   NdbNodeBitmask nodes;
   int ret= sendSTOP_REQ(node_ids,
@@ -1508,7 +1521,7 @@ int MgmtSrvr::restartNodes(const Vector<
     the starting node to shutdown
   */
   int retry= 600*10;
-  for (;check_nodes_stopping();)
+  for (;is_any_node_stopping();)
   {
     if (--retry)
       break;

=== modified file 'storage/ndb/src/mgmsrv/MgmtSrvr.hpp'
--- a/storage/ndb/src/mgmsrv/MgmtSrvr.hpp	2010-10-15 08:57:02 +0000
+++ b/storage/ndb/src/mgmsrv/MgmtSrvr.hpp	2010-11-30 10:00:52 +0000
@@ -175,13 +175,10 @@ public:
 	     const char **address);
 
   /**
-   *   Stop a node
-   * 
-   *   @param   processId: Id of the DB process to stop
-   *   @return  0 if succeeded, otherwise: as stated above, plus:
+   *   Stop a list of nodes
    */
   int stopNodes(const Vector<NodeId> &node_ids, int *stopCount, bool abort,
-                int *stopSelf);
+                bool force, int *stopSelf);
 
   int shutdownMGM(int *stopCount, bool abort, int *stopSelf);
 
@@ -209,13 +206,13 @@ public:
  int start(int processId);
 
   /**
-   *   Restart nodes
-   *   @param processId: Id of the DB process to start
+   *   Restart a list of nodes
    */
   int restartNodes(const Vector<NodeId> &node_ids,
                    int *stopCount, bool nostart,
-                   bool initialStart, bool abort, int *stopSelf);
-  
+                   bool initialStart, bool abort, bool force,
+                   int *stopSelf);
+
   /**
    *   Restart all DB nodes
    */
@@ -410,9 +407,9 @@ private:
                         enum ndb_mgm_node_type type,
                         Uint32 timeout_ms);
 
-  int check_nodes_starting();
-  int check_nodes_stopping();
-  int check_nodes_single_user();
+  bool is_any_node_starting(void);
+  bool is_any_node_stopping(void);
+  bool is_cluster_single_user(void);
 
   //**************************************************************************
 

=== modified file 'storage/ndb/src/mgmsrv/Services.cpp'
--- a/storage/ndb/src/mgmsrv/Services.cpp	2010-10-13 15:04:06 +0000
+++ b/storage/ndb/src/mgmsrv/Services.cpp	2010-11-30 10:00:52 +0000
@@ -951,6 +951,7 @@ MgmApiSession::restart(Properties const 
                                     nostart != 0,
                                     initialstart != 0,
                                     abort != 0,
+                                    force != 0,
                                     &m_stopSelf);
 
   if (force &&
@@ -1141,7 +1142,8 @@ MgmApiSession::stop(Properties const &ar
   int result= 0;
   if (nodes.size())
   {
-    result= m_mgmsrv.stopNodes(nodes, &stopped, abort != 0, &m_stopSelf);
+    result= m_mgmsrv.stopNodes(nodes, &stopped, abort != 0, force != 0,
+                               &m_stopSelf);
 
     if (force &&
         (result == NODE_SHUTDOWN_WOULD_CAUSE_SYSTEM_CRASH ||

=== modified file 'storage/ndb/src/mgmsrv/testConfig.cpp'
--- a/storage/ndb/src/mgmsrv/testConfig.cpp	2010-11-11 09:46:05 +0000
+++ b/storage/ndb/src/mgmsrv/testConfig.cpp	2010-12-01 19:47:51 +0000
@@ -146,6 +146,17 @@ create_config(const char* first, ...)
 // Global variable for my_getopt
 extern "C" const char* my_defaults_file;
 
+static
+unsigned
+ndb_procid()
+{
+#ifdef _WIN32
+  return (unsigned)GetCurrentProcessId();
+#else
+  return (unsigned)getpid();
+#endif
+}
+
 Config*
 create_mycnf(const char* first, ...)
 {
@@ -153,8 +164,8 @@ create_mycnf(const char* first, ...)
 
   NdbDir::Temp tempdir;
   BaseString mycnf_file;
-  mycnf_file.assfmt("%s%s%s",
-                    tempdir.path(), DIR_SEPARATOR, "test_my.cnf");
+  mycnf_file.assfmt("%s%stest_my.%u.cnf",
+                    tempdir.path(), DIR_SEPARATOR, ndb_procid());
 
   FILE* config_file= fopen(mycnf_file.c_str(), "w+");
   CHECK(config_file);
@@ -174,6 +185,7 @@ create_mycnf(const char* first, ...)
     printf("%s", buf);
 #endif
 
+  fflush(config_file);
   rewind(config_file);
 
   // Trick handle_options to read from the temp file
@@ -471,6 +483,3 @@ TAPTEST(MgmConfig)
   ndb_end(0);
   return 1; // OK
 }
-
-template class Vector<const char*>;
-

=== modified file 'storage/ndb/src/ndbapi/CMakeLists.txt'
--- a/storage/ndb/src/ndbapi/CMakeLists.txt	2010-11-10 08:01:00 +0000
+++ b/storage/ndb/src/ndbapi/CMakeLists.txt	2010-12-01 22:00:42 +0000
@@ -13,9 +13,9 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
-
-INCLUDE(${CMAKE_SOURCE_DIR}/storage/ndb/config/type_ndbapi.cmake)
-INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/storage/ndb/src/mgmapi)
+INCLUDE_DIRECTORIES(
+  ${CMAKE_CURRENT_SOURCE_DIR}
+  ${NDB_SOURCE_DIR}/src/mgmapi)
 
 ADD_LIBRARY(ndbapi STATIC
             NdbEventOperation.cpp

=== modified file 'storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp'
--- a/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp	2010-11-09 20:40:03 +0000
+++ b/storage/ndb/src/ndbapi/NdbDictionaryImpl.cpp	2010-11-28 11:34:01 +0000
@@ -8005,13 +8005,6 @@ NdbDictInterface::execCREATE_HASH_MAP_CO
   m_impl->theWaiter.signal(NO_WAIT);
 }
 
-
-
-template class Vector<int>;
-template class Vector<Uint8>;
-template class Vector<Uint16>;
-template class Vector<Uint32>;
-template class Vector<Vector<Uint32> >;
 template class Vector<NdbTableImpl*>;
 template class Vector<NdbColumnImpl*>;
 

=== modified file 'storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp'
--- a/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp	2010-10-06 12:35:34 +0000
+++ b/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp	2010-11-28 11:34:01 +0000
@@ -3644,6 +3644,5 @@ EventBufData_hash::search(Pos& hpos, Ndb
   DBUG_VOID_RETURN_EVENT;
 }
 
-template class Vector<Uint64>;
 template class Vector<Gci_container_pod>;
 template class Vector<NdbEventBuffer::EventBufData_chunk*>;

=== modified file 'storage/ndb/test/ndbapi/testBasic.cpp'
--- a/storage/ndb/test/ndbapi/testBasic.cpp	2010-08-31 06:39:44 +0000
+++ b/storage/ndb/test/ndbapi/testBasic.cpp	2010-11-28 11:34:01 +0000
@@ -1491,8 +1491,6 @@ runBug28073(NDBT_Context *ctx, NDBT_Step
   return result;
 }
 
-template class Vector<Uint64>;
-
 int
 runBug20535(NDBT_Context* ctx, NDBT_Step* step)
 {

=== modified file 'storage/ndb/test/ndbapi/testBitfield.cpp'
--- a/storage/ndb/test/ndbapi/testBitfield.cpp	2010-09-03 05:35:51 +0000
+++ b/storage/ndb/test/ndbapi/testBitfield.cpp	2010-11-28 11:34:01 +0000
@@ -665,4 +665,3 @@ testBitmask()
 }
 
 template class Vector<Alloc>;
-template class Vector<Uint32>;

=== modified file 'storage/ndb/test/ndbapi/testMgm.cpp'
--- a/storage/ndb/test/ndbapi/testMgm.cpp	2010-06-14 13:36:31 +0000
+++ b/storage/ndb/test/ndbapi/testMgm.cpp	2010-11-26 09:41:23 +0000
@@ -2483,6 +2483,68 @@ int runTestDumpEvents(NDBT_Context* ctx,
   return NDBT_OK;
 }
 
+int runTestStatusAfterStop(NDBT_Context* ctx, NDBT_Step* step)
+{
+  NdbMgmd mgmd;
+  mgmd.set_timeout(50); // Short timeout, should be upgraded
+
+  if (!mgmd.connect())
+    return NDBT_FAILED;
+
+  ndb_mgm_node_type
+    node_types[2] = { NDB_MGM_NODE_TYPE_NDB,
+                      NDB_MGM_NODE_TYPE_UNKNOWN };
+
+  // Test: get status, stop node, get status again
+  printf("Getting status\n");
+  ndb_mgm_cluster_state *cs = ndb_mgm_get_status2(mgmd.handle(), node_types);
+  if (cs == NULL)
+  {
+    printf("%s (%d)\n", ndb_mgm_get_latest_error_msg(mgmd.handle()),
+           ndb_mgm_get_latest_error(mgmd.handle()));
+    return NDBT_FAILED;
+  }
+
+  for(int i=0; i < cs->no_of_nodes; i++ )
+  {
+    ndb_mgm_node_state *ns = cs->node_states + i;
+    printf("Node ID: %d  status:%d\n", ns->node_id, ns->node_status);
+  }
+  free(cs);
+  cs = NULL;
+
+  printf("Stopping data node\n");
+  // We only stop 1 data node, in this case NodeId=2
+  int nodes[1] =  { 2 };
+  int stopped = ndb_mgm_stop2(mgmd.handle(), NDB_ARRAY_SIZE(nodes), nodes, 0);
+  if (stopped < 0)
+  {
+    printf("ndb_mgm_stop failed, '%s' (%d)\n",
+           ndb_mgm_get_latest_error_msg(mgmd.handle()),
+           ndb_mgm_get_latest_error(mgmd.handle()));
+    return NDBT_FAILED;
+  }
+
+  printf("Stopped %d data node(s)\n", stopped);
+
+  printf("Getting status\n");
+  cs = ndb_mgm_get_status2(mgmd.handle(), node_types);
+  if (cs == NULL)
+  {
+    printf("%s (%d)\n", ndb_mgm_get_latest_error_msg(mgmd.handle()),
+           ndb_mgm_get_latest_error(mgmd.handle()));
+    return NDBT_FAILED;
+  }
+  for(int i=0; i < cs->no_of_nodes; i++ )
+  {
+    ndb_mgm_node_state *ns = cs->node_states + i;
+    printf("Node ID: %d  status:%d\n", ns->node_id, ns->node_status);
+  }
+  free(cs);
+
+  return NDBT_OK;
+}
+
 NDBT_TESTSUITE(testMgm);
 DRIVER(DummyDriver); /* turn off use of NdbApi */
 TESTCASE("ApiSessionFailure",
@@ -2614,6 +2676,10 @@ TESTCASE("TestDumpEvents",
  	 "Test 'dump events'"){
   STEPS(runTestDumpEvents, 1);
 }
+TESTCASE("TestStatusAfterStop",
+ 	 "Test get status after stop "){
+  STEPS(runTestStatusAfterStop, 1);
+}
 NDBT_TESTSUITE_END(testMgm);
 
 int main(int argc, const char** argv){

=== modified file 'storage/ndb/test/run-test/CMakeLists.txt'
--- a/storage/ndb/test/run-test/CMakeLists.txt	2010-11-11 17:26:34 +0000
+++ b/storage/ndb/test/run-test/CMakeLists.txt	2010-11-17 11:35:04 +0000
@@ -14,7 +14,6 @@
 # along with this program; if not, write to the Free Software
 # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301  USA
 
-INCLUDE(${CMAKE_SOURCE_DIR}/storage/ndb/config/type_ndbapi.cmake)
 INCLUDE_DIRECTORIES(
  ${CMAKE_SOURCE_DIR}/include
  ${CMAKE_SOURCE_DIR}/storage/ndb/include

=== modified file 'storage/ndb/test/run-test/atrt.hpp'
--- a/storage/ndb/test/run-test/atrt.hpp	2010-11-03 18:00:22 +0000
+++ b/storage/ndb/test/run-test/atrt.hpp	2010-11-30 07:47:55 +0000
@@ -193,7 +193,6 @@ extern const char * g_clusters;
 
 #ifdef _WIN32
 #include <direct.h>
-#include <sys/stat.h>
 
 inline int lstat(const char *name, struct stat *buf) {
   return stat(name, buf);

=== modified file 'storage/ndb/test/run-test/main.cpp'
--- a/storage/ndb/test/run-test/main.cpp	2010-08-03 09:17:42 +0000
+++ b/storage/ndb/test/run-test/main.cpp	2010-11-28 12:27:13 +0000
@@ -81,10 +81,6 @@ const char * g_dummy;
 char * g_env_path = 0;
 const char* g_mysqld_host = 0;
 
-/** Dummy, extern declared in ndb_opts.h */
-int g_print_full_config = 0;
-my_bool opt_core;
-
 static struct my_option g_options[] =
 {
   { "help", '?', "Display this help and exit.", 

=== modified file 'storage/ndb/test/run-test/setup.cpp'
--- a/storage/ndb/test/run-test/setup.cpp	2010-08-02 11:49:11 +0000
+++ b/storage/ndb/test/run-test/setup.cpp	2010-11-17 10:01:47 +0000
@@ -1,9 +1,8 @@
 #include "atrt.hpp"
 #include <ndb_global.h>
-#include <my_sys.h>
-#include <my_getopt.h>
-#include <NdbOut.hpp>
-#include <BaseString.hpp>
+#include <util/ndb_opts.h>
+#include <util/NdbOut.hpp>
+#include <util/BaseString.hpp>
 
 extern int g_mt;
 extern int g_mt_rr;
@@ -116,6 +115,8 @@ setup_config(atrt_config& config, const 
      */
     for (j = 0; j<(size_t)argc; j++)
     {
+      if (ndb_is_load_default_arg_separator(tmp[j]))
+        continue;
       for (k = 0; proc_args[k].name; k++)
       {
 	if (!strncmp(tmp[j], proc_args[k].name, strlen(proc_args[k].name)))
@@ -418,6 +419,8 @@ load_options(int argc, char** argv, int 
 {
   for (size_t i = 0; i<(size_t)argc; i++)
   {
+    if (ndb_is_load_default_arg_separator(argv[i]))
+      continue;
     for (size_t j = 0; f_options[j].name; j++)
     {
       const char * name = f_options[j].name;

=== modified file 'storage/ndb/tools/restore/Restore.cpp'
--- a/storage/ndb/tools/restore/Restore.cpp	2010-11-09 20:40:03 +0000
+++ b/storage/ndb/tools/restore/Restore.cpp	2010-11-30 07:47:55 +0000
@@ -30,8 +30,6 @@
 #include <NdbAutoPtr.hpp>
 #include "../src/ndbapi/NdbDictionaryImpl.hpp"
 
-#include <sys/stat.h>
-
 #include "../../../../sql/ha_ndbcluster_tables.h"
 extern NdbRecordPrintFormat g_ndbrecord_print_format;
 extern bool ga_skip_unknown_objects;

=== modified file 'support-files/mysql.spec.sh'
--- a/support-files/mysql.spec.sh	2010-10-06 10:06:47 +0000
+++ b/support-files/mysql.spec.sh	2010-11-29 10:12:31 +0000
@@ -10,9 +10,9 @@
 # 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
-#
+# along with this program; see the file COPYING. If not, write to the
+# Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston
+# MA  02110-1301  USA.
 
 ##############################################################################
 # Some common macro definitions
@@ -1063,7 +1063,6 @@ fi
 
 %files devel
 %defattr(-, root, root, 0755)
-%doc mysql-release-%{mysql_version}/EXCEPTIONS-CLIENT
 %doc %attr(644, root, man) %{_mandir}/man1/mysql_config.1*
 %attr(755, root, root) %{_bindir}/mysql_config
 %dir %attr(755, root, root) %{_includedir}/mysql
@@ -1134,6 +1133,10 @@ fi
 ##############################################################################
 %changelog
 
+* Wed Nov 24 2010 Alexander Nozdrin <alexander.nozdrin@stripped>
+
+- EXCEPTIONS-CLIENT has been deleted, remove it from here too.
+
 * Tue Jun 15 2010 Joerg Bruehe <joerg.bruehe@stripped>
 
 - Change the behaviour on upgrade:


Attachment: [text/bzr-bundle] bzr/ole.john.aske@oracle.com-20101201220042-22mf7mvxdl7q2t9i.bundle
Thread
bzr commit into mysql-5.1-telco-7.0-spj-scan-vs-scan branch(ole.john.aske:3383) Ole John Aske1 Dec