Below is the list of changes that have just been committed into a local
5.1 repository of msvensson. When msvensson does a push these changes
will be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2008-05-09 09:37:37+02:00, msvensson@pilot.(none) +4 -0
Add ndb_show_compat
BitKeeper/etc/ignore@stripped, 2008-05-09 09:37:35+02:00, msvensson@pilot.(none) +1 -0
Added storage/ndb/src/common/util/ndb_show_compat to the ignore list
storage/ndb/src/common/util/Makefile.am@stripped, 2008-05-09 09:37:35+02:00, msvensson@pilot.(none) +9 -0
Add ndb_show_compat
storage/ndb/src/common/util/ndb_show_compat.cc@stripped, 2008-05-09 09:37:35+02:00, msvensson@pilot.(none) +27 -0
New BitKeeper file ``storage/ndb/src/common/util/ndb_show_compat.cc''
storage/ndb/src/common/util/ndb_show_compat.cc@stripped, 2008-05-09 09:37:35+02:00, msvensson@pilot.(none) +0 -0
storage/ndb/src/common/util/version.c@stripped, 2008-05-09 09:37:35+02:00, msvensson@pilot.(none) +45 -0
Add functions for printing "ndbCompatibleTable_full" and "ndbCompatibleTable_upgrade"
diff -Nrup a/BitKeeper/etc/ignore b/BitKeeper/etc/ignore
--- a/BitKeeper/etc/ignore 2008-02-27 12:29:54 +01:00
+++ b/BitKeeper/etc/ignore 2008-05-09 09:37:35 +02:00
@@ -3020,3 +3020,4 @@ win/vs8cache.txt
ylwrap
zlib/*.ds?
zlib/*.vcproj
+storage/ndb/src/common/util/ndb_show_compat
diff -Nrup a/storage/ndb/src/common/util/Makefile.am b/storage/ndb/src/common/util/Makefile.am
--- a/storage/ndb/src/common/util/Makefile.am 2007-09-25 12:05:25 +02:00
+++ b/storage/ndb/src/common/util/Makefile.am 2008-05-09 09:37:35 +02:00
@@ -35,6 +35,15 @@ testBitmask_LDFLAGS = @ndb_bin_am_ldflag
$(top_builddir)/mysys/libmysys.a \
$(top_builddir)/strings/libmystrings.a
+noinst_PROGRAMS = ndb_show_compat
+ndb_show_compat_SOURCES = ndb_show_compat.cc
+ndb_show_compat_LDADD = \
+ $(builddir)libgeneral.la \
+ $(top_builddir)/storage/ndb/src/common/portlib/libportlib.la \
+ $(top_builddir)/dbug/libdbug.a \
+ $(top_builddir)/mysys/libmysys.a \
+ $(top_builddir)/strings/libmystrings.a
+
testBitmask.cpp : Bitmask.cpp
rm -f testBitmask.cpp
@LN_CP_F@ Bitmask.cpp testBitmask.cpp
diff -Nrup a/storage/ndb/src/common/util/ndb_show_compat.cc b/storage/ndb/src/common/util/ndb_show_compat.cc
--- /dev/null Wed Dec 31 16:00:00 196900
+++ b/storage/ndb/src/common/util/ndb_show_compat.cc 2008-05-09 09:37:35 +02:00
@@ -0,0 +1,27 @@
+/* Copyright (C) 2008 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 */
+
+
+extern "C" {
+ void ndbPrintFullyCompatibleTable(void);
+ void ndbPrintUpgradeCompatibleTable(void);
+}
+
+int main(void){
+ ndbPrintFullyCompatibleTable();
+ ndbPrintUpgradeCompatibleTable();
+}
+
+
diff -Nrup a/storage/ndb/src/common/util/version.c b/storage/ndb/src/common/util/version.c
--- a/storage/ndb/src/common/util/version.c 2007-07-11 14:36:40 +02:00
+++ b/storage/ndb/src/common/util/version.c 2008-05-09 09:37:35 +02:00
@@ -252,3 +252,48 @@ ndbCompatible_ndb_ndb(Uint32 ownVersion,
{
return ndbCompatible_upgrade(ownVersion, otherVersion);
}
+
+
+void
+ndbPrintCompatibleTable(struct NdbUpGradeCompatible table[])
+{
+ int i;
+ printf("ownVersion, matchType, otherVersion\n");
+ for (i = 0; table[i].ownVersion != 0 && table[i].otherVersion != 0; i++) {
+
+ printf("%u.%u.%u, ",
+ getMajor(table[i].ownVersion),
+ getMinor(table[i].ownVersion),
+ getBuild(table[i].ownVersion));
+ switch (table[i].matchType) {
+ case UG_Range:
+ printf("Range");
+ break;
+ case UG_Exact:
+ printf("Exact");
+ break;
+ default:
+ break;
+ }
+ printf(", %u.%u.%u\n",
+ getMajor(table[i].otherVersion),
+ getMinor(table[i].otherVersion),
+ getBuild(table[i].otherVersion));
+
+ }
+ printf("\n");
+}
+
+
+void
+ndbPrintFullyCompatibleTable(void){
+ printf("ndbCompatibleTable_full\n");
+ ndbPrintCompatibleTable(ndbCompatibleTable_full);
+}
+
+
+void
+ndbPrintUpgradeCompatibleTable(void){
+ printf("ndbCompatibleTable_upgrade\n");
+ ndbPrintCompatibleTable(ndbCompatibleTable_upgrade);
+}
| Thread |
|---|
| • bk commit into 5.1 tree (msvensson:1.2580) | msvensson | 9 May |