diff options
Diffstat (limited to 'storage/ndb')
35 files changed, 207 insertions, 530 deletions
diff --git a/storage/ndb/MAINTAINERS b/storage/ndb/MAINTAINERS index d1547d48234..38f504cd1a1 100644 --- a/storage/ndb/MAINTAINERS +++ b/storage/ndb/MAINTAINERS @@ -1,3 +1,5 @@ +Copyright (c) 2007 MySQL AB + MySQL Cluster MAINTAINERS ------------------------- diff --git a/storage/ndb/config/win-lib.am b/storage/ndb/config/win-lib.am index 05ac1ec8a40..1b3d772cf17 100644 --- a/storage/ndb/config/win-lib.am +++ b/storage/ndb/config/win-lib.am @@ -1,5 +1,22 @@ # Microsoft Developer Studio Project File - Name="@name@" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 + +# Copyright (c) 2004, 2005 MySQL AB +# 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 + # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Static Library" 0x0104 diff --git a/storage/ndb/config/win-prg.am b/storage/ndb/config/win-prg.am index 70c19a70c6d..e234f74abc7 100644 --- a/storage/ndb/config/win-prg.am +++ b/storage/ndb/config/win-prg.am @@ -1,5 +1,22 @@ # Microsoft Developer Studio Project File - Name="mysqld" - Package Owner=<4> # Microsoft Developer Studio Generated Build File, Format Version 6.00 + +# Copyright (c) 2004, 2006 MySQL AB +# 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 + # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Console Application" 0x0103 diff --git a/storage/ndb/include/mgmapi/ndb_logevent.h b/storage/ndb/include/mgmapi/ndb_logevent.h index 519c13b2ca9..d491275df01 100644 --- a/storage/ndb/include/mgmapi/ndb_logevent.h +++ b/storage/ndb/include/mgmapi/ndb_logevent.h @@ -1,4 +1,5 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2005-2007 MySQL AB, 2009 Sun Microsystems, Inc. + 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 @@ -11,7 +12,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef NDB_LOGEVENT_H #define NDB_LOGEVENT_H diff --git a/storage/ndb/include/ndbapi/NdbEventOperation.hpp b/storage/ndb/include/ndbapi/NdbEventOperation.hpp index 0f98a4debef..3e7601e4f50 100644 --- a/storage/ndb/include/ndbapi/NdbEventOperation.hpp +++ b/storage/ndb/include/ndbapi/NdbEventOperation.hpp @@ -1,4 +1,5 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB, 2010 Sun Microsystems, Inc. + 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 @@ -11,7 +12,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef NdbEventOperation_H #define NdbEventOperation_H diff --git a/storage/ndb/include/ndbapi/NdbOperation.hpp b/storage/ndb/include/ndbapi/NdbOperation.hpp index 713c29f028d..65cb308000b 100644 --- a/storage/ndb/include/ndbapi/NdbOperation.hpp +++ b/storage/ndb/include/ndbapi/NdbOperation.hpp @@ -1,4 +1,5 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB, 2010 Sun Microsystems, Inc. + 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 @@ -11,7 +12,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef NdbOperation_H #define NdbOperation_H diff --git a/storage/ndb/src/common/portlib/NdbMutex.c b/storage/ndb/src/common/portlib/NdbMutex.c index 5595baba7c4..6edab9f23ea 100644 --- a/storage/ndb/src/common/portlib/NdbMutex.c +++ b/storage/ndb/src/common/portlib/NdbMutex.c @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 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 @@ -11,7 +11,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include <ndb_global.h> diff --git a/storage/ndb/src/common/util/Makefile.am b/storage/ndb/src/common/util/Makefile.am index 4a69924192e..87ec96fe1e3 100644 --- a/storage/ndb/src/common/util/Makefile.am +++ b/storage/ndb/src/common/util/Makefile.am @@ -1,4 +1,4 @@ -# Copyright (C) 2004-2005 MySQL AB +# Copyright (c) 2004, 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 diff --git a/storage/ndb/src/kernel/blocks/backup/read.cpp b/storage/ndb/src/kernel/blocks/backup/read.cpp index 78f6f2f1b50..ebe769ede24 100644 --- a/storage/ndb/src/kernel/blocks/backup/read.cpp +++ b/storage/ndb/src/kernel/blocks/backup/read.cpp @@ -1,4 +1,5 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2006 MySQL AB, 2009 Sun Microsystems, Inc. + 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 @@ -11,7 +12,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include <ndb_global.h> diff --git a/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp b/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp index 8f8d4aad9ab..b42e16cd6a3 100644 --- a/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp +++ b/storage/ndb/src/kernel/blocks/dbdict/Dbdict.cpp @@ -1,4 +1,5 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2008 MySQL AB, 2009 Sun Microsystems, Inc. + 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 @@ -11,7 +12,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include <ndb_global.h> #include <my_sys.h> diff --git a/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp b/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp index 11e8c1cc191..09cc1c9f162 100644 --- a/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp +++ b/storage/ndb/src/kernel/blocks/dblqh/DblqhMain.cpp @@ -1,4 +1,5 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2008 MySQL AB, 2009 Sun Microsystems, Inc. + 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 @@ -11,7 +12,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #define DBLQH_C #include "Dblqh.hpp" diff --git a/storage/ndb/src/kernel/blocks/lgman.cpp b/storage/ndb/src/kernel/blocks/lgman.cpp index 53cb1e113e1..84333889e42 100644 --- a/storage/ndb/src/kernel/blocks/lgman.cpp +++ b/storage/ndb/src/kernel/blocks/lgman.cpp @@ -1,17 +1,19 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2005, 2011, 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 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 + 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 */ + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA + 02110-1301 USA */ #include "lgman.hpp" #include "diskpage.hpp" @@ -2501,7 +2503,7 @@ Lgman::init_run_undo_log(Signal* signal) sendSignal(reference(), GSN_CONTINUEB, signal, 2, JBB); /** - * Insert in correct postion in list of logfile_group's + * Insert in correct position in list of logfile_group's */ Ptr<Logfile_group> pos; for(tmp.first(pos); !pos.isNull(); tmp.next(pos)) diff --git a/storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp b/storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp index c107baca39f..841ed49e36f 100644 --- a/storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp +++ b/storage/ndb/src/kernel/blocks/ndbfs/AsyncFile.cpp @@ -1,4 +1,5 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB, 2009 Sun Microsystems, Inc. + 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 @@ -11,7 +12,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include <ndb_global.h> #include <my_sys.h> diff --git a/storage/ndb/src/kernel/blocks/suma/Suma.cpp b/storage/ndb/src/kernel/blocks/suma/Suma.cpp index 9179cf7fbbd..bfcb74cbd04 100644 --- a/storage/ndb/src/kernel/blocks/suma/Suma.cpp +++ b/storage/ndb/src/kernel/blocks/suma/Suma.cpp @@ -1,4 +1,5 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2008 MySQL AB, 2009 Sun Microsystems, Inc. + 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 @@ -11,7 +12,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include <my_config.h> #include "Suma.hpp" diff --git a/storage/ndb/src/mgmsrv/InitConfigFileParser.cpp b/storage/ndb/src/mgmsrv/InitConfigFileParser.cpp index 560a9559999..42ce36221d7 100644 --- a/storage/ndb/src/mgmsrv/InitConfigFileParser.cpp +++ b/storage/ndb/src/mgmsrv/InitConfigFileParser.cpp @@ -1,4 +1,5 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB, 2009 Sun Microsystems, Inc. + 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 @@ -11,7 +12,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include <ndb_global.h> diff --git a/storage/ndb/src/mgmsrv/Makefile.am b/storage/ndb/src/mgmsrv/Makefile.am index 3ae70155554..593e9e3d292 100644 --- a/storage/ndb/src/mgmsrv/Makefile.am +++ b/storage/ndb/src/mgmsrv/Makefile.am @@ -1,4 +1,5 @@ -# Copyright (C) 2004-2006 MySQL AB +# Copyright (c) 2004-2007 MySQL AB, 2009 Sun Microsystems, Inc. +# 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 diff --git a/storage/ndb/src/ndbapi/DictCache.cpp b/storage/ndb/src/ndbapi/DictCache.cpp index 9c66b2be9d2..13bf8b63cee 100644 --- a/storage/ndb/src/ndbapi/DictCache.cpp +++ b/storage/ndb/src/ndbapi/DictCache.cpp @@ -1,4 +1,4 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003, 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 @@ -11,7 +11,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include <ndb_global.h> #include "DictCache.hpp" diff --git a/storage/ndb/src/ndbapi/NdbEventOperation.cpp b/storage/ndb/src/ndbapi/NdbEventOperation.cpp index 1353ca40e95..308a91808ca 100644 --- a/storage/ndb/src/ndbapi/NdbEventOperation.cpp +++ b/storage/ndb/src/ndbapi/NdbEventOperation.cpp @@ -1,4 +1,5 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB, 2010 Sun Microsystems, Inc. + 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 @@ -11,7 +12,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include <Ndb.hpp> diff --git a/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp b/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp index ed60650e33e..004e28c43a5 100644 --- a/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp +++ b/storage/ndb/src/ndbapi/NdbEventOperationImpl.cpp @@ -1,4 +1,5 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB, 2010 Sun Microsystems, Inc. + 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 @@ -11,7 +12,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include <ndb_global.h> diff --git a/storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp b/storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp index c027226584c..2f4bb18ba8e 100644 --- a/storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp +++ b/storage/ndb/src/ndbapi/NdbEventOperationImpl.hpp @@ -1,4 +1,5 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB, 2010 Sun Microsystems, Inc. + 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 @@ -11,7 +12,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef NdbEventOperationImpl_H #define NdbEventOperationImpl_H diff --git a/storage/ndb/test/run-test/Makefile.am b/storage/ndb/test/run-test/Makefile.am index e1bc71fb4a9..78be2471d90 100644 --- a/storage/ndb/test/run-test/Makefile.am +++ b/storage/ndb/test/run-test/Makefile.am @@ -1,4 +1,5 @@ -# Copyright (C) 2004-2006 MySQL AB +# Copyright (c) 2004-2007 MySQL AB, 2009 Sun Microsystems, Inc. +# 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 diff --git a/storage/ndb/test/run-test/atrt.hpp b/storage/ndb/test/run-test/atrt.hpp index db26bd9bfc0..39f7e1a7bf2 100644 --- a/storage/ndb/test/run-test/atrt.hpp +++ b/storage/ndb/test/run-test/atrt.hpp @@ -1,4 +1,5 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2003-2007 MySQL AB, 2008 Sun Microsystems, Inc. + 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 @@ -11,7 +12,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef atrt_config_hpp #define atrt_config_hpp diff --git a/storage/ndb/test/run-test/autotest-boot.sh b/storage/ndb/test/run-test/autotest-boot.sh index 1df3a26cc8a..f1f8aea2519 100644 --- a/storage/ndb/test/run-test/autotest-boot.sh +++ b/storage/ndb/test/run-test/autotest-boot.sh @@ -1,4 +1,21 @@ #!/bin/sh + +# Copyright (c) 2007 MySQL AB +# 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 + ############################################################# # This script created by Jonas does the following # # Cleans up clones and pevious builds, pulls new clones, # diff --git a/storage/ndb/test/run-test/autotest-run.sh b/storage/ndb/test/run-test/autotest-run.sh index b543cd1efb9..0c9c6aee215 100644 --- a/storage/ndb/test/run-test/autotest-run.sh +++ b/storage/ndb/test/run-test/autotest-run.sh @@ -1,4 +1,21 @@ #!/bin/sh + +# Copyright (c) 2007 MySQL AB +# 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 + ############################################################# # This script created by Jonas does the following # # Cleans up clones and pevious builds, pulls new clones, # diff --git a/storage/ndb/test/run-test/files.cpp b/storage/ndb/test/run-test/files.cpp index c6a29350b91..294d0aca56e 100644 --- a/storage/ndb/test/run-test/files.cpp +++ b/storage/ndb/test/run-test/files.cpp @@ -1,3 +1,21 @@ +/* + Copyright (c) 2007 MySQL AB + 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 "atrt.hpp" #include <sys/types.h> #include <dirent.h> diff --git a/storage/ndb/test/run-test/setup.cpp b/storage/ndb/test/run-test/setup.cpp index cbb7a34f171..b52f9bbda76 100644 --- a/storage/ndb/test/run-test/setup.cpp +++ b/storage/ndb/test/run-test/setup.cpp @@ -1,3 +1,21 @@ +/* + Copyright (c) 2007 MySQL AB + 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 "atrt.hpp" #include <ndb_global.h> #include <my_sys.h> diff --git a/storage/ndb/test/run-test/upgrade-boot.sh b/storage/ndb/test/run-test/upgrade-boot.sh index d3542166551..745418dbb7c 100644 --- a/storage/ndb/test/run-test/upgrade-boot.sh +++ b/storage/ndb/test/run-test/upgrade-boot.sh @@ -1,4 +1,21 @@ #!/bin/sh + +# Copyright (c) 2007 MySQL AB +# 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 + ############################################################# # This script created by Jonas does the following # # Cleans up clones and pevious builds, pulls new clones, # diff --git a/storage/ndb/test/sql/BANK.sql b/storage/ndb/test/sql/BANK.sql deleted file mode 100644 index 055761621e3..00000000000 --- a/storage/ndb/test/sql/BANK.sql +++ /dev/null @@ -1,44 +0,0 @@ -CREATE DATABASE IF NOT EXISTS BANK default charset=latin1 default collate=latin1_bin; -USE BANK; -DROP TABLE IF EXISTS GL; -CREATE TABLE GL ( TIME BIGINT UNSIGNED NOT NULL, - ACCOUNT_TYPE INT UNSIGNED NOT NULL, - BALANCE INT UNSIGNED NOT NULL, - DEPOSIT_COUNT INT UNSIGNED NOT NULL, - DEPOSIT_SUM INT UNSIGNED NOT NULL, - WITHDRAWAL_COUNT INT UNSIGNED NOT NULL, - WITHDRAWAL_SUM INT UNSIGNED NOT NULL, - PURGED INT UNSIGNED NOT NULL, - PRIMARY KEY USING HASH (TIME,ACCOUNT_TYPE)) - ENGINE = NDB; - -DROP TABLE IF EXISTS ACCOUNT; -CREATE TABLE ACCOUNT ( ACCOUNT_ID INT UNSIGNED NOT NULL, - OWNER INT UNSIGNED NOT NULL, - BALANCE INT UNSIGNED NOT NULL, - ACCOUNT_TYPE INT UNSIGNED NOT NULL, - PRIMARY KEY USING HASH (ACCOUNT_ID)) - ENGINE = NDB; - -DROP TABLE IF EXISTS TRANSACTION; -CREATE TABLE TRANSACTION ( TRANSACTION_ID BIGINT UNSIGNED NOT NULL, - ACCOUNT INT UNSIGNED NOT NULL, - ACCOUNT_TYPE INT UNSIGNED NOT NULL, - OTHER_ACCOUNT INT UNSIGNED NOT NULL, - TRANSACTION_TYPE INT UNSIGNED NOT NULL, - TIME BIGINT UNSIGNED NOT NULL, - AMOUNT INT UNSIGNED NOT NULL, - PRIMARY KEY USING HASH (TRANSACTION_ID,ACCOUNT)) - ENGINE = NDB; - -DROP TABLE IF EXISTS SYSTEM_VALUES; -CREATE TABLE SYSTEM_VALUES ( SYSTEM_VALUES_ID INT UNSIGNED NOT NULL, - VALUE BIGINT UNSIGNED NOT NULL, - PRIMARY KEY USING HASH (SYSTEM_VALUES_ID)) - ENGINE = NDB; - -DROP TABLE IF EXISTS ACCOUNT_TYPE; -CREATE TABLE ACCOUNT_TYPE ( ACCOUNT_TYPE_ID INT UNSIGNED NOT NULL, - DESCRIPTION CHAR(64) NOT NULL, - PRIMARY KEY USING HASH (ACCOUNT_TYPE_ID)) - ENGINE = NDB; diff --git a/storage/ndb/test/sql/T1.sql b/storage/ndb/test/sql/T1.sql deleted file mode 100644 index 754211c4eac..00000000000 --- a/storage/ndb/test/sql/T1.sql +++ /dev/null @@ -1,9 +0,0 @@ -create database if not exists TEST_DB; -use TEST_DB; -drop table if exists T1; -create table T1 (KOL1 int unsigned not null, - KOL2 int unsigned not null, - KOL3 int unsigned not null, - KOL4 int unsigned not null, - KOL5 int unsigned not null, - primary key using hash(KOL1)) engine=ndb; diff --git a/storage/ndb/test/sql/test_create_drop.pl b/storage/ndb/test/sql/test_create_drop.pl deleted file mode 100644 index eb9d5e31dc8..00000000000 --- a/storage/ndb/test/sql/test_create_drop.pl +++ /dev/null @@ -1,196 +0,0 @@ -# Copyright (C) 2005 MySQL AB -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Library General Public -# License as published by the Free Software Foundation; version 2 -# of the License. -# -# This 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 -# 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 - -use strict; -use IO::Socket; -use DBI; - -# mgm info -my $mgmhost = "localhost"; -my $mgmport = 38101; - -# location of ndb_x_fs -my $datadir = "c2"; -my @schemafiles = <$datadir/ndb_*_fs/D[12]/DBDICT/P0.SchemaLog>; -@schemafiles or die "no schemafiles in $datadir"; - -my $dsn; -$dsn = "dbi:mysql:test:localhost;port=38100"; - -# this works better for me -my $cnf = $ENV{MYSQL_HOME} . "/var/my.cnf"; -$dsn = "dbi:mysql:database=test;host=localhost;mysql_read_default_file=$cnf"; - -my $dbh; -$dbh = DBI->connect($dsn, 'root', undef, { RaiseError => 0, PrintError => 0 }); -$dbh or die $DBI::errstr; - -# mgm commands - -my $mgm = undef; - -sub mgmconnect { - $mgm = IO::Socket::INET->new( - Proto => "tcp", - PeerHost => $mgmhost, - PeerPort => $mgmport); - $mgm or die "connect to mgm failed: $!"; - $mgm->autoflush(1); -}; - -mgmconnect(); -warn "connected to mgm $mgmhost $mgmport\n"; - -my $nodeinfo = {}; - -sub getnodeinfo { - $nodeinfo = {}; - $mgm->print("get status\n"); - $mgm->print("\n"); - while (defined($_ = $mgm->getline)) { - /^node\s+status/ && last; - } - while (defined($_ = $mgm->getline)) { - /^\s*$/ && last; - /^node\.(\d+)\.(\w+):\s*(\S+)/ && ($nodeinfo->{$1}{$2} = $3); - } -} - -getnodeinfo(); - -my @dbnode = (); -for my $n (keys %$nodeinfo) { - my $p = $nodeinfo->{$n}; - ($p->{type} eq 'NDB') && push(@dbnode, $n); -} -@dbnode = sort { $a <=> $b } @dbnode; -@dbnode or die "mgm error, found no db nodes"; -warn "db nodes: @dbnode\n"; - -sub restartnode { - my($n, $initialstart) = @_; - warn "restart node $n initialstart=$initialstart\n"; - $mgm->print("restart node\n"); - $mgm->print("node: $n\n"); - $mgm->print("initialstart: $initialstart\n"); - $mgm->print("\n"); - while (1) { - sleep 5; - getnodeinfo(); - my $status = $nodeinfo->{$n}{status}; - my $sp = $nodeinfo->{$n}{startphase}; - warn "node $n status: $status sp: $sp\n"; - last if $status eq 'STARTED'; - } -} - -sub restartall { - warn "restart all\n"; - $mgm->print("restart all\n"); - $mgm->print("\n"); - while (1) { - sleep 5; - getnodeinfo(); - my $ok = 1; - for my $n (@dbnode) { - my $status = $nodeinfo->{$n}{status}; - my $sp = $nodeinfo->{$n}{startphase}; - warn "node $n status: $status sp: $sp\n"; - $ok = 0 if $status ne 'STARTED'; - } - last if $ok; - } -} - -# the sql stuff - -my $maxtab = 300; -my @tab = (); - -sub create { - my($n) = @_; - my $sql = "create table t$n (a int primary key, b varchar(20), key (b)) engine=ndb"; - warn "create t$n\n"; - $dbh->do($sql) or die "$sql\n$DBI::errstr"; -} - -sub drop { - my($n) = @_; - my $sql = "drop table t$n"; - warn "drop t$n\n"; - $dbh->do($sql) or die "$sql\n$DBI::errstr"; -} - -sub dropall { - for my $n (0..($maxtab-1)) { - my $sql = "drop table if exists t$n"; - $dbh->do($sql) or die "$sql\n$DBI::errstr"; - } -} - -sub createdrop { - my $n = int(rand($maxtab)); - if (! $tab[$n]) { - create($n); - $tab[$n] = 1; - } else { - drop($n); - $tab[$n] = 0; - } -} - -sub checkschemafiles { - system("printSchemaFile -ce @schemafiles"); - $? == 0 or die "schemafiles check failed"; -} - -sub randomrestart { - my($k) = @_; - my $s = int(rand(500)); - if ($s < 2) { - my $i = $k % scalar(@dbnode); - my $n = $dbnode[$i]; - my $initialstart = ($s < 1 ? 0 : 1); - restartnode($n, $initialstart); - return 1; - } - if ($s < 3) { - restartall(); - return 1; - } - return 0; -} - -# deterministic -srand(1); - -warn "drop any old tables\n"; -dropall(); - -my $loop = 1000000; -for my $k (0..($loop-1)) { - warn "$k\n"; - createdrop(); - checkschemafiles(); - if (randomrestart($k)) { - checkschemafiles(); - } -} - -$dbh->disconnect or die $DBI::errstr; - -# vim: set sw=2: diff --git a/storage/ndb/test/sql/test_range_bounds.pl b/storage/ndb/test/sql/test_range_bounds.pl deleted file mode 100644 index 964847044de..00000000000 --- a/storage/ndb/test/sql/test_range_bounds.pl +++ /dev/null @@ -1,235 +0,0 @@ -# Copyright (C) 2005 MySQL AB -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU Library General Public -# License as published by the Free Software Foundation; version 2 -# of the License. -# -# This 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 -# 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 - -# -# test range scan bounds -# give option --all to test all cases -# set MYSQL_HOME to installation top -# - -use strict; -use integer; -use Getopt::Long; -use DBI; - -my $opt_all = 0; -my $opt_cnt = 5; -my $opt_verbose = 0; -GetOptions("all" => \$opt_all, "cnt=i" => \$opt_cnt, "verbose" => \$opt_verbose) - or die "options are: --all --cnt=N --verbose"; - -my $mysql_home = $ENV{MYSQL_HOME}; -defined($mysql_home) or die "no MYSQL_HOME"; -my $dsn = "dbi:mysql:database=test;host=localhost;mysql_read_default_file=$mysql_home/var/my.cnf"; -my $opts = { RaiseError => 0, PrintError => 0, AutoCommit => 1, }; - -my $dbh; -my $sth; -my $sql; - -$dbh = DBI->connect($dsn, "root", undef, $opts) or die $DBI::errstr; - -my $table = 't'; - -$sql = "drop table if exists $table"; -$dbh->do($sql) or die $DBI::errstr; - -sub cut ($$$) { - my($op, $key, $val) = @_; - $op = '==' if $op eq '='; - my(@w) = @$val; - eval "\@w = grep(\$_ $op $key, \@w)"; - $@ and die $@; - return [ @w ]; -} - -sub mkdummy ($) { - my ($val) = @_; - return { - 'dummy' => 1, - 'exp' => '9 = 9', - 'res' => $val, - }; -} - -sub mkone ($$$$) { - my($col, $op, $key, $val) = @_; - my $res = cut($op, $key, $val); - return { - 'exp' => "$col $op $key", - 'res' => $res, - }; -} - -sub mktwo ($$$$$$) { - my($col, $op1, $key1, $op2, $key2, $val) = @_; - my $res = cut($op2, $key2, cut($op1, $key1, $val)); - return { - 'exp' => "$col $op1 $key1 and $col $op2 $key2", - 'res' => $res, - }; -} - -sub mkall ($$$$) { - my($col, $key1, $key2, $val) = @_; - my @a = (); - my $p = mkdummy($val); - push(@a, $p) if $opt_all; - my @ops = qw(< <= = >= >); - for my $op (@ops) { - my $p = mkone($col, $op, $key1, $val); - push(@a, $p) if $opt_all || @{$p->{res}} != 0; - } - my @ops1 = $opt_all ? @ops : qw(= >= >); - my @ops2 = $opt_all ? @ops : qw(<= <); - for my $op1 (@ops1) { - for my $op2 (@ops2) { - my $p = mktwo($col, $op1, $key1, $op2, $key2, $val); - push(@a, $p) if $opt_all || @{$p->{res}} != 0; - } - } - warn scalar(@a)." cases\n" if $opt_verbose; - return \@a; -} - -my $casecnt = 0; - -sub verify ($$$) { - my($sql, $ord, $res) = @_; - warn "$sql\n" if $opt_verbose; - $sth = $dbh->prepare($sql) or die "prepare: $sql: $DBI::errstr"; - $sth->execute() or die "execute: $sql: $DBI::errstr"; - # - # BUG: execute can return success on error so check again - # - $sth->err and die "execute: $sql: $DBI::errstr"; - my @out = (); - for my $b (@{$res->[0]}) { - for my $c (@{$res->[1]}) { - for my $d (@{$res->[2]}) { - push(@out, [$b, $c, $d]); - } - } - } - if ($ord) { - @out = sort { - $ord * ($a->[0] - $b->[0]) || - $ord * ($a->[1] - $b->[1]) || - $ord * ($a->[2] - $b->[2]) || - 0 - } @out; - } - my $cnt = scalar @out; - my $n = 0; - while (1) { - my $row = $sth->fetchrow_arrayref; - $row || last; - @$row == 3 or die "bad row: $sql: @$row"; - for my $v (@$row) { - $v =~ s/^\s+|\s+$//g; - $v =~ /^\d+$/ or die "bad value: $sql: $v"; - } - if ($ord) { - my $out = $out[$n]; - $row->[0] == $out->[0] && - $row->[1] == $out->[1] && - $row->[2] == $out->[2] or - die "$sql: row $n: got row @$row != @$out"; - } - $n++; - } - $sth->err and die "fetch: $sql: $DBI::errstr"; - $n == $cnt or die "verify: $sql: got row count $n != $cnt"; - $casecnt++; -} - -for my $nn ("bcd", "") { - my %nn; - for my $x (qw(b c d)) { - $nn{$x} = $nn =~ /$x/ ? "not null" : "null"; - } - warn "create table\n"; - $sql = <<EOF; -create table $table ( - a int primary key, - b int $nn{b}, - c int $nn{c}, - d int $nn{d}, - index (b, c, d) -) engine=ndb -EOF - $dbh->do($sql) or die $DBI::errstr; - warn "insert\n"; - $sql = "insert into $table values(?, ?, ?, ?)"; - $sth = $dbh->prepare($sql) or die $DBI::errstr; - my @val = (0..($opt_cnt-1)); - my $v0 = 0; - for my $v1 (@val) { - for my $v2 (@val) { - for my $v3 (@val) { - $sth->bind_param(1, $v0) or die $DBI::errstr; - $sth->bind_param(2, $v1) or die $DBI::errstr; - $sth->bind_param(3, $v2) or die $DBI::errstr; - $sth->bind_param(4, $v3) or die $DBI::errstr; - $sth->execute or die $DBI::errstr; - $v0++; - } - } - } - warn "generate cases\n"; - my $key1 = 1; - my $key2 = 3; - my $a1 = mkall('b', $key1, $key2, \@val); - my $a2 = mkall('c', $key1, $key2, \@val); - my $a3 = mkall('d', $key1, $key2, \@val); - warn "select\n"; - for my $ord (0, +1, -1) { - my $orderby = - $ord == 0 ? "" : - $ord == +1 ? " order by b, c, d" : - $ord == -1 ? " order by b desc, c desc, d desc" : die "not here"; - for my $p1 (@$a1) { - my $res = [ $p1->{res}, \@val, \@val ]; - $sql = "select b, c, d from $table" . - " where $p1->{exp}" . - $orderby; - verify($sql, $ord, $res); - for my $p2 (@$a2) { - my $res = [ $p1->{res}, $p2->{res}, \@val ]; - $sql = "select b, c, d from $table" . - " where $p1->{exp} and $p2->{exp}" . - $orderby; - verify($sql, $ord, $res); - for my $p3 (@$a3) { - my $res = [ $p1->{res}, $p2->{res}, $p3->{res} ]; - $sql = "select b, c, d from $table" . - " where $p1->{exp} and $p2->{exp} and $p3->{exp}" . - $orderby; - verify($sql, $ord, $res); - } - } - } - } - warn "drop table\n"; - $sql = "drop table $table"; - $dbh->do($sql) or die $DBI::errstr; -} - -warn "verified $casecnt cases\n"; -warn "done\n"; - -# vim: set sw=2: diff --git a/storage/ndb/test/tools/connect.cpp b/storage/ndb/test/tools/connect.cpp index 278dbe833ea..14d9b238102 100644 --- a/storage/ndb/test/tools/connect.cpp +++ b/storage/ndb/test/tools/connect.cpp @@ -1,4 +1,5 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2007 MySQL AB, 2008 Sun Microsystems, Inc. + 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 @@ -11,7 +12,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include <ndb_global.h> #include <ndb_opts.h> diff --git a/storage/ndb/test/tools/log_listner.cpp b/storage/ndb/test/tools/log_listner.cpp index c5125ef7414..a0a03f1319a 100644 --- a/storage/ndb/test/tools/log_listner.cpp +++ b/storage/ndb/test/tools/log_listner.cpp @@ -1,3 +1,21 @@ +/* + Copyright (c) 2007 MySQL AB + 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 <mgmapi.h> #include <ndb_global.h> #include <ndb_opts.h> diff --git a/storage/ndb/tools/restore/consumer_restore.cpp b/storage/ndb/tools/restore/consumer_restore.cpp index e8e8d584f09..fe8d4edd5f1 100644 --- a/storage/ndb/tools/restore/consumer_restore.cpp +++ b/storage/ndb/tools/restore/consumer_restore.cpp @@ -1,4 +1,5 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2004-2007 MySQL AB, 2009 Sun Microsystems, Inc. + 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 @@ -11,7 +12,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include <NDBT_ReturnCodes.h> #include "consumer_restore.hpp" diff --git a/storage/ndb/tools/restore/consumer_restorem.cpp b/storage/ndb/tools/restore/consumer_restorem.cpp index 233f8d5fe98..1f921ae02a3 100644 --- a/storage/ndb/tools/restore/consumer_restorem.cpp +++ b/storage/ndb/tools/restore/consumer_restorem.cpp @@ -1,4 +1,5 @@ -/* Copyright (C) 2003 MySQL AB +/* Copyright (c) 2004-2006 MySQL AB, 2009 Sun Microsystems, Inc. + 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 @@ -11,7 +12,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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "consumer_restore.hpp" #include <NdbSleep.h> |